/* ==========================================================================
   🔥 FIREBIX SEARCH CORE MATRIX & LIVE OVERLAY STYLESHEET
   Location: search_core/search.css
   ========================================================================== */
:root {
    --fire-base: #F13423;
    --fire-glow: #FF6B35;
    --fire-dark: #0F172A;
    --fire-gray-bg: #FAFAFB;
    --fire-card-bg: #ffffff;
    --fire-text-main: #0F172A;
    --fire-text-muted: #64748B;
    --fire-border: #E2E8F0;
    --fire-gradient: linear-gradient(135deg, #F13423, #FF6B35);
    --fire-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --fire-shadow-md: 0 6px 20px rgba(15, 23, 42, 0.06);
    --transition-snappy: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent !important;
}

body.firebix-search-page {
    background: var(--fire-gray-bg);
    color: var(--fire-text-main);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   🧩 LAYOUT ARCHITECTURE
   ========================================================================== */
.app-layout-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.search-main-content {
    width: 100%;
    max-width: 680px;
    background: var(--fire-card-bg);
    padding-bottom: 95px;
    min-width: 0;
    box-sizing: border-box;
}

.desktop-right-sidebar {
    display: none;
}

/* ==========================================================================
   🔍 TOP FIXED SEARCH HEADER (BACK BTN + SEARCH INPUT + MIC)
   ========================================================================== */
.search-page-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--fire-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.yt-back-btn {
    border: none;
    background: transparent;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    color: var(--fire-dark);
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition-snappy);
}

.yt-back-btn:active {
    background: #F1F5F9;
    transform: scale(0.92);
}

.search-page-input-container {
    flex: 1;
    min-width: 0;
}

.search-form-matrix {
    width: 100%;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input-wrap i.bi-search {
    position: absolute;
    left: 12px;
    color: var(--fire-text-muted);
    font-size: 13.5px;
    pointer-events: none;
}

.search-input-wrap input[type="search"] {
    width: 100%;
    padding: 8px 36px 8px 34px;
    background: #F1F5F9;
    border: 1.5px solid transparent;
    border-radius: 20px;
    outline: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--fire-text-main);
    transition: var(--transition-snappy);
}

.search-input-wrap input[type="search"]:focus {
    border-color: var(--fire-dark);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.05);
}

.search-clear-inline-btn {
    position: absolute;
    right: 12px;
    color: #94A3B8;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* MIC BUTTON */
.btn-voice-search {
    border: none;
    background: #F1F5F9;
    color: var(--fire-dark);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition-snappy);
}

.btn-voice-search:active {
    transform: scale(0.92);
    background: #E2E8F0;
}

/* ==========================================================================
   📊 FILTER PILLS TRACK
   ========================================================================== */
.search-stats-filter-bar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 14px;
    background: #ffffff;
    border-bottom: 1px solid var(--fire-border);
    scrollbar-width: none;
}

.search-stats-filter-bar::-webkit-scrollbar { 
    display: none; 
}

.stat-filter-pill {
    white-space: nowrap;
    padding: 5px 12px;
    border-radius: 20px;
    background: #F1F5F9;
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: var(--transition-snappy);
    flex-shrink: 0;
}

.stat-filter-pill.active {
    background: var(--fire-dark);
    color: #ffffff;
}

.search-output-container {
    padding: 10px 0;
}

.search-engine-block {
    padding: 12px 14px;
    background: #ffffff;
    border-bottom: 1px solid var(--fire-border);
}

.search-engine-block-head {
    margin-bottom: 10px;
}

.search-engine-block-head h4 {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--fire-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   🏬 1. BUSINESS STORE CARDS
   ========================================================================== */
.search-business-card-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-biz-item-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #FAFAFB;
    border: 1px solid var(--fire-border);
    cursor: pointer;
    transition: var(--transition-snappy);
}

.search-biz-item-card:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: var(--fire-shadow-sm);
}

.sbiz-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--fire-border);
    flex-shrink: 0;
    background-color: #E2E8F0;
}

.sbiz-details {
    flex: 1;
    min-width: 0;
}

.sbiz-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sbiz-title-row h3 {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--fire-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sbiz-badge {
    background: #EFF6FF;
    color: #2563EB;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 6px;
    flex-shrink: 0;
}

.sbiz-category {
    font-size: 11px;
    color: var(--fire-text-muted);
    font-weight: 600;
    display: block;
    margin-top: 1px;
}

.sbiz-addr {
    font-size: 10.5px;
    color: #94A3B8;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sbiz-action-btn {
    padding: 6px 12px;
    border-radius: 10px;
    background: var(--fire-dark);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==========================================================================
   📦 2. PRODUCT SCROLL GRID
   ========================================================================== */
.search-products-scroll-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.search-products-scroll-grid::-webkit-scrollbar {
    display: none;
}

.search-product-tile {
    width: 140px;
    border: 1px solid var(--fire-border);
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.search-product-tile:active {
    transform: scale(0.97);
}

.sp-img-box {
    width: 100%;
    height: 100px;
    background: #F8FAFC;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sp-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-meta {
    padding: 8px;
}

.sp-meta h5 {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--fire-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-price-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-top: 2px;
}

.sp-price-row strong {
    font-size: 12.5px;
    font-weight: 900;
    color: var(--fire-dark);
}

.sp-price-row .strike {
    font-size: 10px;
    color: #94A3B8;
    text-decoration: line-through;
}

.sp-store-name {
    font-size: 9.5px;
    color: var(--fire-text-muted);
    font-weight: 600;
    display: block;
    margin-top: 2px;
}

/* ==========================================================================
   👤 3. CREATOR FIRESITE CARD
   ========================================================================== */
.yt-channel-card-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.yt-channel-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #FAFAFB;
    border: 1px solid var(--fire-border);
    transition: var(--transition-snappy);
}

.yt-channel-card:hover {
    background: #ffffff;
    box-shadow: var(--fire-shadow-sm);
}

.yt-channel-avatar-wrap {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #E2E8F0;
    border: 1px solid var(--fire-border);
    display: block;
}

.yt-channel-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-channel-details {
    flex: 1;
    min-width: 0;
}

.yt-channel-details h3 {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--fire-dark);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yt-channel-handle {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--fire-base);
    margin-top: 1px;
}

.yt-channel-meta {
    font-size: 10.5px;
    color: var(--fire-text-muted);
}

.yt-channel-actions {
    margin-top: 4px;
}

.yt-view-channel-btn {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 16px;
    background: var(--fire-dark);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

/* ==========================================================================
   🎬 4. SPARKS VIDEOS RESPONSIVE GRID
   ========================================================================== */
.search-sparks-responsive-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.search-spark-video-card {
    position: relative;
    aspect-ratio: 9 / 14;
    border-radius: 12px;
    overflow: hidden;
    background: #000000;
    text-decoration: none;
    color: #ffffff;
    box-shadow: var(--fire-shadow-sm);
    transition: transform 0.15s ease;
}

.search-spark-video-card:active {
    transform: scale(0.97);
}

.search-spark-video-viewport {
    width: 100%;
    height: 100%;
}

.search-spark-video-viewport img,
.search-spark-video-viewport video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.search-spark-meta-overlay {
    position: absolute;
    inset: 0;
    padding: 8px 6px;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.85) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
}

.search-spark-meta-overlay strong {
    font-size: 10.5px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ffffff;
}

.search-spark-meta-overlay span {
    font-size: 9.5px;
    color: #cbd5e1;
}

.search-spark-menu-btn,
.search-post-menu-btn,
.search-article-menu-btn {
    border: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.search-spark-video-card > .search-spark-menu-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 3;
}

/* ==========================================================================
   📰 5. POSTS & ARTICLES RESULTS
   ========================================================================== */
.search-posts-vertical-stream,
.search-articles-vertical-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.firebix-search-post-card {
    position: relative;
    background: #ffffff;
    border: 1px solid var(--fire-border);
    border-radius: 14px;
    padding: 10px 12px;
}

.firebix-search-post-card .post-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.firebix-search-post-card > .search-post-menu-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    color: #64748b;
}

.avatar-wrapper {
    background: var(--fire-gradient);
    padding: 1.5px;
    border-radius: 50%;
    display: flex;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

.post-header h4 {
    font-size: 13px;
    font-weight: 800;
    color: var(--fire-dark);
}

.post-header small {
    font-size: 10.5px;
    color: var(--fire-text-muted);
}

.post-content h3 {
    font-size: 13.5px;
    font-weight: 800;
    margin-bottom: 2px;
    color: var(--fire-dark);
}

.post-content p {
    font-size: 12.5px;
    color: #334155;
    line-height: 1.4;
}

.post-image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 340px;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    margin: 6px 0;
}

.post-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 4px;
    border-top: 1px solid #F1F5F9;
}

.post-actions button {
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
}

.post-actions button.is-liked { color: var(--fire-base) !important; }
.post-actions button.is-disliked { color: var(--fire-dark) !important; }

/* ARTICLE CARDS */
.firebix-search-article-card {
    position: relative;
    width: 100%;
    background: var(--fire-card-bg);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    border: 1px solid var(--fire-border);
    cursor: pointer;
    height: 88px;
}

.article-cover-wrap {
    width: 32%;
    background: #F1F5F9;
    position: relative;
    flex-shrink: 0;
}

.article-cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--fire-dark);
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 4px;
}

.article-premium-body {
    width: 68%;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-premium-body h4 {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--fire-dark);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-premium-body p {
    font-size: 11px;
    color: var(--fire-text-muted);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-creator-line {
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-author-img {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.article-creator-line small {
    font-size: 10px;
    font-weight: 700;
    color: #475569;
}

.article-premium-actions button {
    border: none;
    background: transparent;
    font-size: 10.5px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.article-premium-actions button.is-liked { color: var(--fire-base); }

/* ==========================================================================
   🎙️ YOUTUBE STYLE SPEECH-TO-TEXT VOICE SEARCH MODAL
   ========================================================================== */
.voice-search-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.voice-search-modal-overlay.active {
    display: flex;
}

.voice-modal-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 32px 24px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
    animation: voiceModalPop 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes voiceModalPop {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.voice-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #F1F5F9;
    border: none;
    color: #64748B;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.voice-wave-sphere {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--fire-gradient);
    color: #ffffff;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px auto 20px;
    position: relative;
}

.wave-pulse {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid var(--fire-base);
    animation: pulseWave 1.4s infinite cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 0.6;
}

@keyframes pulseWave {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.4); opacity: 0; }
}

.voice-modal-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--fire-dark);
    margin-bottom: 6px;
}

.voice-modal-card p {
    font-size: 12.5px;
    color: var(--fire-text-muted);
    line-height: 1.45;
}

/* ==========================================================================
   🪐 LIVE DYNAMIC FETCH SEARCH OVERLAY (DROPDOWN MODAL / DRAWER)
   ========================================================================== */
.firebix-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 200000;
    display: none;
    color: var(--fire-dark);
}

body.firebix-search-open {
    overflow: hidden !important;
}

.firebix-search-overlay.is-open {
    display: block;
}

.firebix-search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.firebix-search-panel {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    z-index: 200001;
    overflow: hidden;
}

.firebix-search-body {
    flex: 1 1 auto;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 12px 14px 100px 14px;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.firebix-search-body h4 {
    font-size: 11.5px !important;
    font-weight: 800 !important;
    color: #64748B !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin: 16px 0 8px 0 !important;
    padding-bottom: 4px !important;
    border-bottom: 1px solid var(--fire-border) !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.firebix-search-body h4:first-child {
    margin-top: 0 !important;
}

.live-search-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.live-search-item-row {
    text-decoration: none !important;
    color: var(--fire-dark) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 10px !important;
    background: #FAFAFB !important;
    border: 1px solid var(--fire-border) !important;
    border-radius: 12px !important;
    transition: var(--transition-snappy) !important;
}

.live-search-item-row:hover {
    background: #ffffff !important;
    box-shadow: var(--fire-shadow-sm) !important;
}

.search-creator-avatar {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    background: #E2E8F0;
}

.search-media-thumb {
    width: 44px !important;
    height: 44px !important;
    border-radius: 8px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    background: #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-media-thumb.fallback-spark { background: #000; color: #fff; font-size: 16px; }
.search-media-thumb.fallback-post { background: #F1F5F9; color: #64748b; font-size: 16px; }
.search-media-thumb.fallback-article { background: #FFF7ED; color: #EA580C; font-size: 16px; }

.search-card-info {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.search-card-info strong {
    font-size: 13px !important;
    font-weight: 800 !important;
    color: var(--fire-dark) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: flex;
    align-items: center;
    gap: 4px;
}

.search-card-info span {
    font-size: 11px !important;
    color: var(--fire-text-muted) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-top: 1px !important;
}

.live-type-pill {
    font-size: 10px;
    font-weight: 800;
    color: #64748B;
    background: #F1F5F9;
    padding: 2px 7px;
    border-radius: 6px;
    flex-shrink: 0;
}

.live-type-pill.biz {
    color: #2563EB;
    background: #EFF6FF;
}

.live-type-pill.spark {
    color: var(--fire-base);
    background: #FEE2E2;
}

/* ==========================================================================
   💻 DESKTOP & MOBILE MEDIA QUERIES
   ========================================================================== */
@media (min-width: 992px) {
    body.firebix-search-page .bottom-nav { display: none !important; }
    
    body.firebix-search-page .app-layout-wrapper {
        display: grid;
        grid-template-columns: 680px 280px;
        justify-content: center;
        padding-left: 260px;
        gap: 20px;
        max-width: 1260px;
        margin: 0 auto;
    }
    
    body.firebix-search-page .search-main-content {
        border-left: 1px solid var(--fire-border);
        border-right: 1px solid var(--fire-border);
    }

    .desktop-right-sidebar {
        display: flex !important;
        flex-direction: column;
        position: sticky;
        top: 14px;
        height: fit-content;
        gap: 14px;
    }

    .widget-box {
        background: #ffffff;
        border-radius: 18px;
        padding: 16px;
        border: 1px solid var(--fire-border);
        box-shadow: var(--fire-shadow-sm);
    }

    .widget-box h4 {
        font-size: 13.5px;
        font-weight: 800;
        color: var(--fire-dark);
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .legal-footer p {
        font-size: 11px;
        color: #94A3B8;
    }

    /* Live Search Popup on Desktop */
    .firebix-search-panel {
        width: min(100%, 640px);
        height: 75vh;
        margin: 8vh auto;
        border-radius: 20px;
        box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
    }
}

@media (max-width: 680px) {
    .search-sparks-responsive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
    .search-page-topbar {
        padding: 6px 10px;
    }
    .yt-back-btn {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }
}

.empty-box.search-state-card {
    padding: 50px 16px;
    text-align: center;
    background: #ffffff;
    border-radius: 16px;
    margin: 10px 14px;
    border: 1px solid var(--fire-border);
}

.empty-box.search-state-card i { 
    font-size: 36px; 
    color: var(--fire-base); 
    display: block; 
    margin-bottom: 8px; 
}

.empty-box.search-state-card h3 { 
    font-size: 15px; 
    font-weight: 800; 
    color: var(--fire-dark); 
}

.empty-box.search-state-card span { 
    font-size: 12px; 
    color: var(--fire-text-muted); 
    display: block; 
    margin-top: 3px; 
}

/* ============================================================================
   🔥 FIREBIX LIVE SEARCH HARDENING PATCH
   - Keeps AJAX/live-search results clean even if API returns lightweight HTML
   - Prevents raw images/video from expanding to full size
   - Makes the overlay a real centered desktop sheet and full-screen mobile sheet
   ============================================================================ */
.firebix-search-overlay,
.firebix-search-overlay * {
    -webkit-font-smoothing: antialiased;
}

.firebix-search-overlay {
    isolation: isolate;
}

.firebix-search-panel {
    color: var(--fire-dark);
}

.firebix-search-header,
.firebix-search-topbar,
.search-overlay-header {
    flex: 0 0 auto;
    width: 100%;
}

/* Generic protection for API-rendered live result markup */
.firebix-search-body > section,
.firebix-search-body > div:not(.firebix-search-empty-state),
.firebix-search-body > ul {
    width: 100%;
    max-width: 100%;
}

.firebix-search-body > section {
    margin: 0 0 14px;
}

.firebix-search-body h3,
.firebix-search-body h4,
.firebix-search-body h5,
.firebix-search-body p,
.firebix-search-body span,
.firebix-search-body a {
    max-width: 100%;
}

.firebix-search-body a {
    color: inherit;
}

/* If the API sends plain img/video elements, never let them become giant */
.firebix-search-body img,
.firebix-search-body video {
    max-width: 100%;
    box-sizing: border-box;
}

.firebix-search-body > section img,
.firebix-search-body > div img,
.firebix-search-body > ul img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 10px;
    flex: 0 0 44px;
}

.firebix-search-body > section video,
.firebix-search-body > div video,
.firebix-search-body > ul video {
    width: 44px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    flex: 0 0 44px;
    background: #000;
}

/* Common lightweight result rows */
.firebix-search-body > section > a,
.firebix-search-body > section > div > a,
.firebix-search-body .search-result-item,
.firebix-search-body .search-result-row,
.firebix-search-body .live-search-result {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 9px 10px;
    margin: 0 0 6px;
    background: #FAFAFB;
    border: 1px solid var(--fire-border);
    border-radius: 12px;
    text-decoration: none;
}

.firebix-search-body .search-result-item:last-child,
.firebix-search-body .search-result-row:last-child,
.firebix-search-body .live-search-result:last-child {
    margin-bottom: 0;
}

.firebix-search-body .search-result-item strong,
.firebix-search-body .search-result-row strong,
.firebix-search-body .live-search-result strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 800;
    color: var(--fire-dark);
}

.firebix-search-body .search-result-item small,
.firebix-search-body .search-result-row small,
.firebix-search-body .live-search-result small {
    display: block;
    margin-top: 2px;
    color: var(--fire-text-muted);
    font-size: 10.5px;
}

/* Existing API classes — keep these authoritative */
.firebix-search-body .live-search-item-row {
    min-width: 0;
}

.firebix-search-body .search-card-info {
    min-width: 0;
    overflow: hidden;
}

.firebix-search-body .search-card-info strong,
.firebix-search-body .search-card-info span {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Search section headings stay compact and aligned */
.firebix-search-body > section > h4,
.firebix-search-body > div > h4,
.firebix-search-body > ul > h4 {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 26px;
    margin: 0 0 8px;
    padding: 0 2px 6px;
    border-bottom: 1px solid var(--fire-border);
    color: var(--fire-dark);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.firebix-search-body .firebix-search-empty-state {
    display: flex;
    min-height: 180px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 30px 16px;
    color: var(--fire-text-muted);
}

/* ============================================================================
   🎙️ VOICE SEARCH — YOUTUBE-LIKE LISTENING SHEET
   ============================================================================ */
.voice-search-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    background: rgba(15, 23, 42, 0.58) !important;
    backdrop-filter: blur(7px) !important;
    -webkit-backdrop-filter: blur(7px) !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.voice-search-modal-overlay.active {
    display: flex !important;
    opacity: 1;
    pointer-events: auto;
}

.voice-modal-card {
    width: min(360px, calc(100vw - 40px));
    background: #fff;
    border: 1px solid rgba(226,232,240,.95);
    border-radius: 24px;
    padding: 30px 24px 26px;
    text-align: center;
    position: relative;
    box-shadow: 0 24px 70px rgba(15,23,42,.28);
    animation: voiceModalPop .22s cubic-bezier(.25,1,.5,1);
}

.voice-modal-close {
    width: 34px !important;
    height: 34px !important;
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #F1F5F9 !important;
    color: #64748B !important;
    cursor: pointer !important;
}

.voice-modal-close:hover {
    background: #E2E8F0 !important;
    color: var(--fire-dark) !important;
}

.voice-wave-sphere {
    width: 82px !important;
    height: 82px !important;
    margin: 12px auto 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    border-radius: 50% !important;
    background: var(--fire-gradient) !important;
    color: #fff !important;
    font-size: 30px !important;
}

.wave-pulse {
    position: absolute !important;
    inset: -9px !important;
    border: 2px solid var(--fire-base) !important;
    border-radius: 50% !important;
    animation: pulseWave 1.35s infinite cubic-bezier(.25,1,.5,1) !important;
    pointer-events: none !important;
}

.voice-modal-card h3 {
    margin: 0 0 6px !important;
    color: var(--fire-dark) !important;
    font-size: 18px !important;
    font-weight: 800 !important;
}

.voice-modal-card p {
    margin: 0 !important;
    color: var(--fire-text-muted) !important;
    font-size: 12.5px !important;
    line-height: 1.45 !important;
}

.btn-voice-search.is-listening {
    background: var(--fire-gradient) !important;
    color: #fff !important;
    box-shadow: 0 0 0 4px rgba(241,52,35,.10);
}

@media (min-width: 992px) {
    .firebix-search-panel {
        inset: 7vh auto auto 50% !important;
        transform: translateX(-50%) !important;
        width: min(640px, calc(100vw - 40px)) !important;
        height: 76vh !important;
        max-height: 760px;
        border-radius: 20px !important;
        box-shadow: 0 25px 70px rgba(0,0,0,.25) !important;
    }

    .firebix-search-body {
        width: 100%;
        max-width: 100%;
        padding: 12px 14px 30px;
    }
}

@media (max-width: 680px) {
    .firebix-search-panel {
        inset: 0 !important;
        width: 100% !important;
        height: 100dvh !important;
        border-radius: 0 !important;
    }

    .firebix-search-body {
        padding: 10px 12px 90px;
    }

    .voice-search-modal-overlay {
        padding: 16px !important;
    }

    .voice-modal-card {
        width: min(340px, calc(100vw - 32px));
        border-radius: 22px;
    }
}
