/* ============================================================
   Premium Search UI — Citizen Opinion
   Glassmorphism modal, animated input, polished results
   ============================================================ */

/* ── Search Toggle Button: Glow ───────────────────── */
.search-toggle,
.header-actions .search-toggle {
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
}

.search-toggle:hover,
.header-actions .search-toggle:hover {
    background: rgba(255, 153, 0, 0.1) !important;
    border-color: rgba(255, 153, 0, 0.2) !important;
    color: #ff9900 !important;
    box-shadow: 0 0 16px rgba(255, 153, 0, 0.1) !important;
    transform: scale(1.05);
}

/* ── Search Overlay: Dark Blur ────────────────────── */
.search-overlay {
    background: rgba(3, 10, 22, 0.75) !important;
    backdrop-filter: blur(16px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(150%) !important;
    transition: opacity 0.3s ease !important;
}

/* ── Search Modal: Glassmorphism Card ─────────────── */
.search-modal {
    background: linear-gradient(180deg,
            rgba(15, 30, 56, 0.98),
            rgba(10, 22, 44, 0.99)) !important;
    border: 1px solid rgba(255, 153, 0, 0.1) !important;
    border-radius: 20px !important;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset !important;
    overflow: hidden !important;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Saffron accent line at top of modal */
.search-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 153, 0, 0.3), transparent);
}

/* ── Search Input Area ────────────────────────────── */
.search-input-wrap {
    padding: 18px 24px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    background: rgba(255, 255, 255, 0.02);
    gap: 14px !important;
}

.search-input-wrap .search-icon {
    font-size: 20px !important;
    color: #ff9900 !important;
    opacity: 1 !important;
    animation: searchIconPulse 2s ease-in-out infinite;
}

@keyframes searchIconPulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

.search-input {
    font-size: 17px !important;
    color: #fff !important;
    font-weight: 400 !important;
    letter-spacing: 0.2px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.3) !important;
}

/* Close button */
.search-close {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    border-radius: 8px !important;
    padding: 5px 12px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.search-close:hover {
    background: rgba(255, 153, 0, 0.1) !important;
    border-color: rgba(255, 153, 0, 0.2) !important;
    color: #ff9900 !important;
}

/* ── Search Results Area ──────────────────────────── */
.search-results {
    max-height: 420px !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 153, 0, 0.2) transparent;
}

.search-results::-webkit-scrollbar {
    width: 5px !important;
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 153, 0, 0.2) !important;
    border-radius: 4px !important;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 153, 0, 0.35) !important;
}

/* ── Section Labels ───────────────────────────────── */
.search-section {
    padding: 8px 24px !important;
}

.search-section-label {
    font-size: 10px !important;
    color: #ff9900 !important;
    letter-spacing: 1.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    position: relative;
    padding-left: 12px;
}

.search-section-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 12px;
    background: linear-gradient(180deg, #ff9900, #e67e00);
    border-radius: 2px;
}

/* ── Search Result Items ──────────────────────────── */
.search-item {
    padding: 12px 16px !important;
    border-radius: 14px !important;
    transition: all 0.2s ease !important;
    margin: 2px 8px !important;
    border: 1px solid transparent;
}

.search-item:hover {
    background: rgba(255, 153, 0, 0.06) !important;
    border-color: rgba(255, 153, 0, 0.08);
    transform: translateX(4px);
}

/* Item icons with glow */
.search-item-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
    font-size: 17px !important;
}

.search-item-icon.opinion {
    background: rgba(255, 153, 0, 0.1) !important;
    box-shadow: 0 0 12px rgba(255, 153, 0, 0.08);
}

.search-item-icon.user {
    background: rgba(42, 143, 158, 0.1) !important;
    box-shadow: 0 0 12px rgba(42, 143, 158, 0.08);
}

.search-item-icon.hashtag {
    background: rgba(212, 165, 52, 0.1) !important;
    box-shadow: 0 0 12px rgba(212, 165, 52, 0.08);
}

.search-item-icon.category {
    background: rgba(76, 175, 80, 0.1) !important;
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.08);
}

/* Item text */
.search-item-title {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

.search-item:hover .search-item-title {
    color: #fff !important;
}

.search-item-meta {
    font-size: 11px !important;
    color: rgba(255, 255, 255, 0.35) !important;
}

/* ── Search Hints (suggestion tags) ───────────────── */
.search-hint {
    padding: 14px 24px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    gap: 8px !important;
    background: rgba(0, 0, 0, 0.1);
}

.search-hint-tag {
    font-size: 12px !important;
    padding: 6px 16px !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5) !important;
    transition: all 0.25s ease !important;
}

.search-hint-tag:hover {
    background: rgba(255, 153, 0, 0.1) !important;
    border-color: rgba(255, 153, 0, 0.15);
    color: #ff9900 !important;
    transform: translateY(-1px);
}

/* ── Keyboard shortcut badge ──────────────────────── */
.search-kbd {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.3) !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    padding: 3px 8px !important;
}

/* ── Empty State ──────────────────────────────────── */
.search-empty {
    padding: 40px 24px !important;
    color: rgba(255, 255, 255, 0.35) !important;
}

.search-empty-icon {
    font-size: 48px !important;
    opacity: 0.3 !important;
    margin-bottom: 12px;
}

/* ── Mobile Adjustments ───────────────────────────── */
@media (max-width: 480px) {
    .search-modal {
        top: 8px !important;
        width: 97% !important;
        border-radius: 16px !important;
    }

    .search-input-wrap {
        padding: 14px 16px !important;
    }

    .search-input {
        font-size: 16px !important;
    }

    .search-section {
        padding: 6px 16px !important;
    }

    .search-item {
        margin: 2px 4px !important;
        padding: 10px 12px !important;
    }

    .search-hint {
        padding: 10px 16px !important;
    }
}