/* =============================================================
   Astrology Hub — CHROME (Topbar + Footer) Cosmic Revision v51+
   ----------------------------------------------------------------
   .ahh — Celestial Bridge topbar (zoned glass bar)
   .ahf — Cosmic Imprint footer (hero band · grid · mantra · news · bar)
   Theme via html.ah-dark / html.ah-light set by master <head> preflight.
   Loaded AFTER dashboard.css so these win on every hub page.
   ============================================================= */

/* Global selection — readable in both modes */
::selection {
    background: rgba(167,139,250,0.45);
    color: #ffffff;
    text-shadow: none;
}
html.ah-light ::selection {
    background: rgba(99,102,241,0.28);
    color: #0b1220;
}

/* Hide legacy chrome from previous design */
.ah-tb, .ah-footer { display: none !important; }

/* =============================================================
   Topbar (.ahh) + footer (.ahf) styling migrated to Tailwind utilities
   (semantic design-token system). Only the JS-injected spotlight
   search dropdown (.ah-tb__sr / .ahh__search__results) remains here,
   because shell.js emits those class names dynamically.
   ============================================================= */

/* ═══════════════════════════════════════════════════════════════════
   v71 — Spotlight search dropdown — professional, theme-aware
   ═══════════════════════════════════════════════════════════════════ */

/* Container (override legacy .ah-tb__sr) */
.ah-tb__sr {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0; right: 0;
    background: rgba(15,23,42,0.97) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(34,211,238,0.30) !important;
    border-radius: 16px !important;
    box-shadow: 0 28px 56px rgba(0,0,0,0.55), 0 0 0 1px rgba(34,211,238,0.12) inset !important;
    color: #f1f5f9 !important;
    overflow: hidden;
    max-height: 480px;
    overflow-y: auto;
    z-index: 50;
    padding: 6px;
}
.ah-tb__sr.is-open { display: block; }
html.ah-light .ah-tb__sr {
    background: rgba(255,255,255,0.98) !important;
    color: #0b1220 !important;
    border-color: rgba(23,1,172,0.25) !important;
    box-shadow: 0 28px 56px rgba(15,23,42,0.18), 0 0 0 1px rgba(23,1,172,0.10) inset !important;
}

/* Top gradient ribbon */
.ah-tb__sr::before {
    content: '';
    position: sticky;
    top: 0; left: 0; right: 0;
    display: block;
    height: 2px;
    margin: -6px -6px 4px;
    background: linear-gradient(90deg, #1701AC, #22d3ee, #1701AC);
    background-size: 200% 100%;
    animation: ah-tb-sr-flow 6s linear infinite;
}
@keyframes ah-tb-sr-flow {
    from { background-position: 0 0; }
    to   { background-position: 200% 0; }
}

/* Scope notice — "Scoped to chart #16" */
.ah-tb__sr-scope {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin: 4px 4px 6px;
    background: linear-gradient(135deg, rgba(34,211,238,0.14), rgba(23,1,172,0.08));
    border: 1px solid rgba(34,211,238,0.32);
    border-radius: 10px;
    font-size: 0.74rem;
    font-weight: 600;
    color: #C7BFF5;
}
html.ah-light .ah-tb__sr-scope {
    background: linear-gradient(135deg, rgba(34,211,238,0.08), rgba(23,1,172,0.05));
    border-color: rgba(23,1,172,0.22);
    color: #1701AC;
}
.ah-tb__sr-scope__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #14b8a6;
    box-shadow: 0 0 8px rgba(20,184,166,0.7);
    flex-shrink: 0;
    animation: ah-tb-sr-pulse 2.2s infinite;
}
@keyframes ah-tb-sr-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(0.85); opacity: 0.6; }
}
.ah-tb__sr-scope code {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.78rem;
    color: #22d3ee;
    background: rgba(34,211,238,0.14);
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
}
html.ah-light .ah-tb__sr-scope code {
    color: #0891b2;
    background: rgba(8,145,178,0.10);
}

/* Result item */
.ah-tb__sr-item {
    display: grid;
    grid-template-columns: 36px 1fr 16px;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    margin: 2px 0;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    transition: background 0.12s ease, transform 0.12s ease;
    cursor: pointer;
}
.ah-tb__sr-item:hover,
.ah-tb__sr-item.is-active {
    background: linear-gradient(90deg, rgba(34,211,238,0.18), rgba(23,1,172,0.10) 80%, transparent);
}
.ah-tb__sr-item:hover .ah-tb__sr-item__chev,
.ah-tb__sr-item.is-active .ah-tb__sr-item__chev {
    transform: translateX(3px);
    color: #22d3ee;
}
html.ah-light .ah-tb__sr-item:hover,
html.ah-light .ah-tb__sr-item.is-active {
    background: linear-gradient(90deg, rgba(23,1,172,0.10), rgba(34,211,238,0.06) 80%, transparent);
}
html.ah-light .ah-tb__sr-item:hover .ah-tb__sr-item__chev,
html.ah-light .ah-tb__sr-item.is-active .ah-tb__sr-item__chev {
    color: #1701AC;
}

.ah-tb__sr-item.is-soon {
    opacity: 0.6;
    cursor: not-allowed;
}
.ah-tb__sr-item.is-soon:hover { background: transparent; }

.ah-tb__sr-item__icon {
    width: 36px; height: 36px;
    border-radius: 9px;
    display: inline-grid; place-items: center;
    background: linear-gradient(135deg, rgba(34,211,238,0.16), rgba(23,1,172,0.10));
    border: 1px solid rgba(34,211,238,0.32);
    color: #22d3ee;
    flex-shrink: 0;
}
html.ah-light .ah-tb__sr-item__icon {
    background: linear-gradient(135deg, rgba(23,1,172,0.08), rgba(34,211,238,0.04));
    border-color: rgba(23,1,172,0.22);
    color: #1701AC;
}

.ah-tb__sr-item__body {
    display: flex; flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.ah-tb__sr-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: #f8fafc;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}
html.ah-light .ah-tb__sr-label { color: #0b1220; }
.ah-tb__sr-label mark {
    background: rgba(34,211,238,0.28);
    color: #22d3ee;
    border-radius: 3px;
    padding: 0 2px;
    font-weight: 800;
}
html.ah-light .ah-tb__sr-label mark {
    background: rgba(23,1,172,0.15);
    color: #1701AC;
}

.ah-tb__sr-group {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: rgba(199,191,245,0.72);
    margin-top: 2px;
}
html.ah-light .ah-tb__sr-group { color: rgba(71,85,105,0.85); }

.ah-tb__sr-item__chev {
    color: rgba(148,163,184,0.55);
    transition: transform 0.18s ease, color 0.18s ease;
    flex-shrink: 0;
}
html.ah-light .ah-tb__sr-item__chev { color: rgba(71,85,105,0.45); }

/* Empty state */
.ah-tb__sr-empty {
    display: flex; flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 36px 22px;
    text-align: center;
}
.ah-tb__sr-empty svg {
    color: rgba(199,191,245,0.45);
    margin-bottom: 4px;
}
html.ah-light .ah-tb__sr-empty svg { color: rgba(71,85,105,0.45); }
.ah-tb__sr-empty strong {
    font-size: 0.92rem;
    font-weight: 700;
    color: #f8fafc;
}
html.ah-light .ah-tb__sr-empty strong { color: #0b1220; }
.ah-tb__sr-empty span {
    font-size: 0.78rem;
    color: rgba(203,213,225,0.70);
    max-width: 280px;
    line-height: 1.45;
}
html.ah-light .ah-tb__sr-empty span { color: #475569; }

/* Scrollbar styling for the dropdown */
.ah-tb__sr::-webkit-scrollbar { width: 6px; }
.ah-tb__sr::-webkit-scrollbar-thumb {
    background: rgba(34,211,238,0.30);
    border-radius: 999px;
}
.ah-tb__sr::-webkit-scrollbar-thumb:hover {
    background: rgba(34,211,238,0.50);
}



