/* Family First Blog Search — styles */
.ffbs-wrap {
    max-width: 900px;
    margin: 0 auto 2rem;
    padding: 1.25rem 1.5rem 1.5rem;
    background: #f8f6f2;
    border-radius: 12px;
    border: 1px solid #e6e2d9;
    font-family: inherit;
    box-sizing: border-box;
}

.ffbs-title {
    margin: 0 0 1rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: #3b4a44;
    text-align: center;
    letter-spacing: 0.02em;
}

.ffbs-form {
    position: relative;
    margin: 0 0 1rem;
}

.ffbs-input-wrap {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1.5px solid #d6d0c3;
    transition: border-color 0.15s;
    overflow: hidden;
}

.ffbs-input-wrap:focus-within {
    border-color: #5f706a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.ffbs-input {
    flex: 1;
    border: 0;
    outline: 0;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    background: transparent;
    color: #2f3a35;
    min-width: 0;
    font-family: inherit;
    line-height: 1.4;
}

.ffbs-input::placeholder {
    color: #9a988e;
    font-style: italic;
}

.ffbs-btn {
    border: 0;
    background: #5f706a;
    color: #fff;
    padding: 0 1.15rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.15s;
    font-family: inherit;
}

.ffbs-btn:hover, .ffbs-btn:focus {
    background: #4a5a54;
}

.ffbs-btn svg {
    display: block;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .ffbs-btn-text {
        display: none;
    }
    .ffbs-btn {
        padding: 0 1rem;
    }
}

/* Suggestions dropdown */
.ffbs-suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d6d0c3;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    max-height: 360px;
    overflow-y: auto;
    z-index: 999;
    display: none;
}

.ffbs-suggest.is-open {
    display: block;
}

.ffbs-suggest-item {
    display: block;
    padding: 0.7rem 1rem;
    color: #2f3a35;
    text-decoration: none;
    border-bottom: 1px solid #f0ede6;
    transition: background 0.12s;
    line-height: 1.35;
}

.ffbs-suggest-item:last-child {
    border-bottom: 0;
}

.ffbs-suggest-item:hover,
.ffbs-suggest-item.is-focused {
    background: #f5f2ec;
}

.ffbs-suggest-item mark {
    background: #ffefa8;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.ffbs-suggest-title {
    font-weight: 600;
    font-size: 0.98rem;
    color: #3b4a44;
    display: block;
    margin-bottom: 0.15rem;
}

.ffbs-suggest-meta {
    display: block;
    font-size: 0.8rem;
    color: #8a8a80;
}

.ffbs-suggest-empty {
    padding: 1rem;
    text-align: center;
    color: #8a8a80;
    font-size: 0.9rem;
    font-style: italic;
}

.ffbs-suggest-loading {
    padding: 1rem;
    text-align: center;
    color: #8a8a80;
    font-size: 0.85rem;
}

/* Category buttons */
.ffbs-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.25rem;
}

.ffbs-cat {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.95rem;
    background: #fff;
    border: 1.5px solid #d6d0c3;
    border-radius: 999px;
    color: #3b4a44;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.2;
    transition: all 0.15s;
    white-space: nowrap;
    font-family: inherit;
}

.ffbs-cat:hover,
.ffbs-cat:focus {
    background: #5f706a;
    color: #fff;
    border-color: #5f706a;
}

.ffbs-cat.is-active {
    background: #5f706a;
    color: #fff;
    border-color: #5f706a;
    box-shadow: 0 2px 6px rgba(95, 112, 106, 0.25);
}

.ffbs-cat-count {
    font-size: 0.78rem;
    opacity: 0.75;
}

.ffbs-cat:hover .ffbs-cat-count,
.ffbs-cat.is-active .ffbs-cat-count {
    opacity: 0.9;
}

@media (max-width: 600px) {
    .ffbs-wrap {
        padding: 1rem;
        margin: 0 auto 1.25rem;
    }
    .ffbs-cat {
        font-size: 0.82rem;
        padding: 0.4rem 0.8rem;
    }
    .ffbs-title {
        font-size: 1.05rem;
    }
}
