/**
 * board_term/css/search.css
 * Stuttering Glossary - Search Results Page Styles
 * 
 * Mobile-first approach with 768px breakpoint
 * Excludes styles defined in board_common.css:
 *   - .btn, .btn-* (button colors)
 *   - .pagination (pagination)
 *   - .search-highlight, mark (highlight)
 */

/* ============================================
   Search Result Header
   ============================================ */
.search-result-header {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
    text-align: center;
}

.search-result-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.search-keyword {
    color: #5a67d8;
}

.search-result-count {
    font-size: 0.9rem;
    color: #666;
}

.search-result-count strong {
    color: #5a67d8;
    font-size: 1.1rem;
}

/* ============================================
   Inline Search Form (Re-search)
   ============================================ */
.search-form-inline {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.search-input-inline {
    flex: 1;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    border: 2px solid #ddd;
    border-radius: 25px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input-inline:focus {
    border-color: #5a67d8;
}

.search-button-inline {
    padding: 0.6rem 1.2rem;
    background: #5a67d8;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.search-button-inline:hover {
    background: #4c51bf;
}

/* ============================================
   Match Section (Priority Groups)
   ============================================ */
.match-section {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.match-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.match-section-title i {
    color: #5a67d8;
}

.match-section-desc {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 1rem;
}

/* Section color variants */
.title-match-section {
    border-left: 4px solid #f6ad55;
}

.abbr-match-section {
    border-left: 4px solid #68d391;
}

.desc-match-section {
    border-left: 4px solid #63b3ed;
}

/* ============================================
   Term Search List
   ============================================ */
.term-search-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.term-search-item {
    border-bottom: 1px solid #eee;
}

.term-search-item:last-child {
    border-bottom: none;
}

.term-search-link {
    display: block;
    padding: 0.8rem 0;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s;
}

.term-search-link:hover {
    background: #f8f9fa;
}

/* Term titles */
.term-search-ko {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.2rem;
}

.term-search-en {
    font-size: 0.85rem;
    color: #666;
    font-weight: 400;
    margin-bottom: 0.3rem;
}

.term-search-ko.dim-title,
.term-search-en.dim-title {
    color: #888;
}

/* Preview text */
.term-search-preview {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
    margin-top: 0.3rem;
}

/* Abbreviation badges */
.term-search-abbr {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.abbr-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    background: #e9ecef;
    color: #495057;
    border-radius: 3px;
}

.abbr-badge.highlight-abbr {
    background: #fef3c7;
    color: #92400e;
}

/* Meta info */
.term-search-meta {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #888;
    align-items: center;
}

/* Match type badges */
.match-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
}

.title-badge {
    background: #fef3c7;
    color: #92400e;
}

.abbr-badge-type {
    background: #d1fae5;
    color: #065f46;
}

.desc-badge {
    background: #dbeafe;
    color: #1e40af;
}

/* ============================================
   No Result
   ============================================ */
.no-result {
    text-align: center;
    padding: 3rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.no-result-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.no-result-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.no-result-text {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.no-result-tips {
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.no-result-tips h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.no-result-tips ul {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.85rem;
    color: #666;
}

.no-result-tips li {
    margin-bottom: 0.3rem;
}

/* ============================================
   Search Actions (Back Button)
   ============================================ */
.search-actions {
    margin-top: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* ============================================
   Desktop Styles (768px+)
   ============================================ */
@media (min-width: 768px) {

    /* Search Header */
    .search-result-header {
        margin-top: 1.5rem;
        margin-bottom: 2rem;
    }

    .search-result-title {
        font-size: 1.5rem;
    }

    .search-result-count {
        font-size: 1rem;
    }

    /* Search Form */
    .search-form-inline {
        max-width: 600px;
    }

    .search-input-inline {
        padding: 0.75rem 1.2rem;
        font-size: 1rem;
    }

    .search-button-inline {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    /* Match Section */
    .match-section {
        padding: 1.5rem;
    }

    .match-section-title {
        font-size: 1.1rem;
    }

    .match-section-desc {
        font-size: 0.85rem;
    }

    /* Term List */
    .term-search-link {
        padding: 1rem 0.5rem;
    }

    .term-search-ko {
        font-size: 1.1rem;
    }

    .term-search-en {
        font-size: 0.9rem;
    }

    .term-search-preview {
        font-size: 0.9rem;
    }

    .term-search-meta {
        font-size: 0.8rem;
    }

    /* No Result */
    .no-result {
        padding: 4rem 2rem;
    }

    .no-result-icon {
        font-size: 4rem;
    }

    .no-result-title {
        font-size: 1.4rem;
    }

    .no-result-tips {
        max-width: 400px;
    }
}