/**
 * CDA Forum Search Styles
 */

/* Search form - compact (index page) */
.forum-search-form {
    display: flex;
    max-width: 400px;
    margin-bottom: 2em;
}

.forum-search-form input[type="text"] {
    flex: 1;
    padding: 0.5em 0.75em;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    border-radius: 4px 0 0 4px;
    color: inherit;
    font-family: inherit;
    font-size: 0.9em;
}

.forum-search-form input[type="text"]:focus {
    outline: none;
    border-color: #f86a22;
    background: rgba(0, 0, 0, 0.25);
}

.forum-search-form input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.forum-search-form button {
    padding: 0.5em 0.75em;
    background: #f86a22;
    border: 1px solid #f86a22;
    border-radius: 0 4px 4px 0;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.15s ease;
}

.forum-search-form button:hover {
    background: #e55a12;
    border-color: #e55a12;
}

.forum-search-form button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Search form - large variant (search results page) */
.forum-search-form--large {
    max-width: 100%;
    margin-bottom: 1.5em;
}

.forum-search-form--large input[type="text"] {
    padding: 0.65em 1em;
    font-size: 1em;
}

.forum-search-form--large button {
    padding: 0.65em 1em;
}

/* Results info */
.search-results-info {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.5);
    padding-bottom: 0.75em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 0.5em;
}

/* Highlight */
.search-highlight {
    background: rgba(248, 106, 34, 0.25);
    color: #f86a22;
    padding: 0.05em 0.2em;
    border-radius: 2px;
}

/* Snippet */
.topic-snippet {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.25em;
    line-height: 1.5;
}

/* Section badge */
.topic-section-badge {
    display: inline-block;
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.15em 0.5em;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.3em;
}

/* Empty state on search page */
.forum-search-empty {
    text-align: center;
    padding: 3em 1em;
    color: rgba(255, 255, 255, 0.4);
}

.forum-search-empty .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    display: block;
    margin: 0 auto 0.5em;
    color: rgba(255, 255, 255, 0.15);
}

.forum-search-empty p {
    margin: 0;
    font-size: 0.95em;
}

/* Light mode */
.lights-on .forum-search-form input[type="text"] {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.15);
    color: inherit;
}

.lights-on .forum-search-form input[type="text"]:focus {
    background: rgba(0, 0, 0, 0.05);
}

.lights-on .forum-search-form input[type="text"]::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.lights-on .search-results-info {
    color: rgba(0, 0, 0, 0.5);
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

.lights-on .search-highlight {
    background: rgba(248, 106, 34, 0.15);
    color: #d45a1a;
}

.lights-on .topic-snippet {
    color: rgba(0, 0, 0, 0.5);
}

.lights-on .topic-section-badge {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.5);
}

.lights-on .forum-search-empty {
    color: rgba(0, 0, 0, 0.4);
}

.lights-on .forum-search-empty .dashicons {
    color: rgba(0, 0, 0, 0.15);
}

/* Mobile */
@media (max-width: 768px) {
    .forum-search-form,
    .forum-search-form--large {
        max-width: 100%;
    }

    .topic-section-badge {
        display: none;
    }

    .forum-search-empty {
        padding: 2em 0.5em;
    }
}
