/* app-bar.css — nav_v2 bottom app bar, grouped hub rows, drill-in, birth sheet.
   Loaded only when the nav_v2 flag is on (body.has-app-bar is added by app-bar.js). */

/* ---- Legacy pill nav + landing suppression under the flag ---- */
body.has-app-bar nav.nav-menu,
body.has-app-bar #whats-ahead-sub-tabs,
body.has-app-bar nav.topnav,
body.has-app-bar [data-legacy-nav] { display: none !important; }
/* nav_v2 replaces the whole legacy landing + results surface with the hub.
   #results stays in the DOM (hidden) so drill-in can move its tab panels out. */
/* index.html's legacy results surface only — NOT matrimony's #results.results-container,
   which is that page's real results area and must show in v2. */
body.has-app-bar #v2-landing,
body.has-app-bar #results:not(.results-container),
body.has-app-bar .about-section { display: none !important; }
body.has-app-bar #navv2-surface { display: block !important; }
/* rasitalks has no header bar, so it keeps its own classic account controls.
   Pages with a header use the single compact .acct-fab account entry below. */

/* ---- Bottom app bar ---- */
body.has-app-bar { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
.app-bar {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 420px; display: flex; z-index: 900;
    background: #fffdf6; border-top: 1px solid rgba(212, 160, 23, .45);
    box-shadow: 0 -4px 18px rgba(90, 45, 12, .08);
    padding-bottom: env(safe-area-inset-bottom);
}
.bar-slot {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 9px 0 7px; font-size: .62rem; font-weight: 600; color: #8a6a45;
    border: none; background: none; cursor: pointer; letter-spacing: .2px;
    font-family: inherit;
}
.bar-slot:focus-visible { outline: 2px solid var(--secondary-color, #d4a017); outline-offset: -2px; border-radius: 8px; }
.bar-icon { font-size: 1.25rem; line-height: 1.15; }
.bar-slot[aria-current='page'] { color: var(--primary-color, #8b4513); }
.bar-slot-talk { position: relative; }
.bar-slot-talk .bar-icon {
    width: 40px; height: 40px; margin-top: -16px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #f4d47c, var(--secondary-color, #d4a017));
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff; box-shadow: 0 4px 12px rgba(212, 160, 23, .5);
}
.bar-livedot {
    position: absolute; top: -14px; right: calc(50% - 24px); width: 9px; height: 9px;
    border-radius: 50%; background: #2ecc71; border: 2px solid #fff; animation: bar-pulse 1.6s infinite;
}
@keyframes bar-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .bar-livedot { animation: none; } }

/* ---- Bottom sheets (menu + birth) ---- */
.menu-sheet-wrap {
    position: fixed; inset: 0; background: rgba(42, 24, 8, .55); z-index: 950;
    display: none; align-items: flex-end;
}
.menu-sheet-wrap.open { display: flex; }
.menu-sheet {
    background: #fffdf6; width: 100%; max-width: 420px; margin: 0 auto;
    border-radius: 22px 22px 0 0; padding: 8px 18px calc(22px + env(safe-area-inset-bottom));
    max-height: 88vh; overflow-y: auto; animation: sheet-up .22s ease-out;
}
/* The birth sheet reuses the live calculator form; hide its now-redundant own
   heading and marketing note so the sheet title ("Show My …") stands alone. */
#birth-sheet-form-slot #birth-form-card > h2,
#birth-sheet-form-slot #birth-form-card .free-note { display: none; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .menu-sheet { animation: none; } }
.sheet-grip { width: 44px; height: 4px; border-radius: 2px; background: rgba(139, 69, 19, .3); margin: 8px auto 14px; }
.menu-item {
    display: block; width: 100%; text-align: left; padding: 13px 8px; font-family: inherit;
    border: none; background: none; font-size: .9rem; color: var(--text-brown, #5a2d0c);
    border-bottom: 1px solid rgba(212, 160, 23, .18); cursor: pointer;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:focus-visible { outline: 2px solid var(--secondary-color, #d4a017); outline-offset: -2px; border-radius: 8px; }

/* ---- Hub (grouped rows) ---- */
.hub { padding: 4px 0 8px; }
.hub-welcome {
    background: radial-gradient(120% 160% at 50% 0%, #fff6da 0%, #fff 60%);
    border: 1px solid rgba(212, 160, 23, .45);
    border-radius: 16px; padding: 16px 18px 14px; margin-bottom: 14px; text-align: center;
}
.hub-welcome b {
    display: block; font-family: Georgia, serif; font-weight: 600;
    color: var(--primary-color, #8b4513); font-size: 1.02rem; letter-spacing: 2px;
}
.hub-welcome b::after {
    content: ''; display: block; width: 56px; height: 1px; margin: 8px auto 0;
    background: linear-gradient(to right, transparent, rgba(212, 160, 23, .8), transparent);
}
.hub-welcome p {
    font-size: .8rem; color: #7a5b3a; margin-top: 8px; line-height: 1.55;
    font-family: Georgia, serif; font-style: italic;
}
.hub-group { margin-bottom: 18px; }
.hub-group-title {
    font-size: .7rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
    color: #9a6a2f; padding: 0 4px 6px; display: flex; align-items: center; gap: 8px;
}
.hub-group-title::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(to right, rgba(212, 160, 23, .5), transparent);
}
.hub-rowlist {
    background: #fff; border: 1px solid rgba(212, 160, 23, .35); border-radius: 14px; overflow: hidden;
}
.hub-row {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
    padding: 13px 14px; border: none; border-bottom: 1px solid rgba(212, 160, 23, .18);
    background: #fff; cursor: pointer; transition: background .15s; font-family: inherit;
}
.hub-row:last-child { border-bottom: none; }
.hub-row:active { background: var(--bg-light, #fff8dc); }
.hub-row:focus-visible { outline: 2px solid var(--secondary-color, #d4a017); outline-offset: -2px; }
.hub-ic {
    width: 30px; height: 30px; border-radius: 8px; background: var(--bg-light, #fff8dc);
    border: 1px solid rgba(212, 160, 23, .35); display: flex; align-items: center; justify-content: center;
    font-size: .95rem; flex-shrink: 0;
}
.hub-tx { flex: 1; min-width: 0; }
.hub-tx b { display: block; font-size: .88rem; color: var(--text-brown, #5a2d0c); font-weight: 600; }
.hub-tx small { font-size: .74rem; color: #8a6a45; }
.hub-chev { margin-left: auto; color: #c49a4a; font-size: 1.05rem; flex-shrink: 0; }

/* ---- Section drill-in ---- */
#section-view { display: none; }
#section-view.active { display: block; }
.section-view-bar {
    display: flex; align-items: center; gap: 10px; padding: 12px 0 14px;
    position: sticky; top: 0; background: var(--bg-cream, #fffbf0); z-index: 15;
}
#section-view-back {
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(212, 160, 23, .5);
    background: #fff; color: var(--text-brown, #5a2d0c); font-size: 1rem; cursor: pointer; flex-shrink: 0;
}
#section-view-back:focus-visible { outline: 2px solid var(--secondary-color, #d4a017); }
#section-view-title { font-family: Georgia, serif; color: var(--text-brown, #5a2d0c); font-size: 1.1rem; }

/* Daily Horoscope drill-in: the rasipalan browse-by-sign directory shown as a
   nav_v2 section. Drop the collapsible-card chrome (its own "Daily Horoscope"
   label duplicates the drill-in title bar; the chevron/collapse is meaningless
   once it's a full page) so it reads as a page, not a card. */
#section-view-body #daily-rasipalan-hub { margin: 0; }
#section-view-body #daily-rasipalan-hub .rasipalan-section-title,
#section-view-body #daily-rasipalan-hub .rasipalan-summary-chevron { display: none; }
#section-view-body #daily-rasipalan-hub .rasipalan-fold {
    border: none; border-radius: 0; background: transparent;
}
#section-view-body #daily-rasipalan-hub .rasipalan-fold-summary { cursor: default; padding: 0 2px 10px; }
#section-view-body #daily-rasipalan-hub .rasipalan-fold[open] .rasipalan-fold-summary { border-bottom: none; }
#section-view-body #daily-rasipalan-hub .rasipalan-fold-content { padding: 0 2px; }

/* ---- Birth sheet extras ---- */
.sheet-why { font-size: .76rem; color: #8a6a45; margin: 2px 0 13px; }
#birth-sheet h3 { font-family: Georgia, serif; color: var(--text-brown, #5a2d0c); font-size: 1.05rem; margin-bottom: 3px; }
.sheet-alt { display: block; margin-top: 10px; font-size: .74rem; color: var(--primary-color, #8b4513); text-decoration: underline; cursor: pointer; }

/* ---- RasiTalks double-shade wordmark (canonical, all pages) ----
   "Rasi" in a soft ivory shade, "Talks" in rich gold — both as vertical
   gradients where supported, with solid fallbacks. Designed for the dark
   gradient header; light-background pages override the shades locally. */
.brand-logo { font-family: Georgia, 'Times New Roman', serif; letter-spacing: 1.5px; font-weight: 700; }
.brand-logo .b-rasi { color: #ffffff; }
.brand-logo .b-talks { color: #ffe07a; }
@supports (-webkit-background-clip: text) or (background-clip: text) {
    .brand-logo .b-rasi, .brand-logo .b-talks {
        -webkit-background-clip: text; background-clip: text;
        -webkit-text-fill-color: transparent; color: transparent;
        text-shadow: none;
        /* Layered dark drop-shadows act as a crisp dark outline (faux-stroke) so the
           wordmark has high contrast against the gold header — the tight 0-offset
           layers ring each letter, the offset layer adds lift. */
        filter:
            drop-shadow(0 0 1px rgba(30, 12, 0, .95))
            drop-shadow(0 0 2px rgba(30, 12, 0, .7))
            drop-shadow(0 1.5px 2px rgba(30, 12, 0, .6));
    }
    .brand-logo .b-rasi { background-image: linear-gradient(180deg, #ffffff 25%, #ffedc4 95%); }
    /* Deeper, richer gold (bright top → dark amber base) so "Talks" reads as
       distinctly darker than the header's gold mid-band. */
    .brand-logo .b-talks { background-image: linear-gradient(180deg, #ffe79c 0%, #eaa81c 45%, #935107 100%); }
}

/* ---- Header account / sign-in ---- */
header.header { position: relative; }
/* Round account FAB at the top-right; it is also the signed-out sign-in entry. */
.topact {
    position: absolute; top: 12px; right: 16px; z-index: 6;
    display: flex; align-items: center;
}
@media (min-width: 900px) { .topact { right: 20px; } }

.acct-fab {
    width: 42px; height: 42px; border-radius: 50%; padding: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(96, 96, 96, 0.92); border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15); cursor: pointer;
    color: rgba(255, 255, 255, 0.9); font-family: inherit; font-weight: 700; font-size: .95rem;
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.acct-fab svg { width: 20px; height: 20px; }
.acct-fab.has-photo { background-size: cover; background-position: center; }
.acct-fab.signed-in { background: var(--primary-color, #8b4513); color: #fff; border-color: rgba(0, 0, 0, 0.15); }

/* Deep Night themed pages (rasitalks, etc.) */
body.theme-night .acct-fab {
    background: rgba(42, 32, 56, 0.9); border-color: rgba(232, 224, 216, 0.22); color: rgba(232, 224, 216, 0.85);
}

/* ---- Desktop: dock the bar as a top rail, 2-col hubs ---- */
@media (min-width: 900px) {
    .app-bar {
        position: static; transform: none; max-width: none; border-top: none;
        border-bottom: 1px solid rgba(212, 160, 23, .45); justify-content: center;
        box-shadow: none; margin-bottom: 12px;
    }
    .bar-slot { flex: 0 0 120px; flex-direction: row; gap: 7px; font-size: .8rem; padding: 12px 0; }
    .bar-slot-talk .bar-icon {
        width: auto; height: auto; margin: 0; border: none; box-shadow: none; background: none;
    }
    .bar-livedot { top: 2px; right: auto; left: -2px; }
    body.has-app-bar { padding-bottom: 0; }
    .hub-rowlist { display: grid; grid-template-columns: 1fr 1fr; }
    .hub-row:nth-last-child(2):nth-child(odd) { border-bottom: none; }
}
