/*
 * Public-site mobile bottom navigation + "More" sheet, mirrors the
 * authenticated business app's bottom-nav pattern (app-shell.css +
 * mobile-nav.css), reusing the same --gv-* design tokens and the same
 * #bottom-nav-more-btn / #more-sheet / #more-sheet-backdrop ids so the
 * existing js/mobile-nav.js wiring works unchanged. Same 900px breakpoint
 * already established app-wide (business app, admin panel).
 */

.bottom-nav { display: none; }
.more-sheet-backdrop { display: none; }
.more-sheet { display: none; }
.public-header-menu-btn { display: none; }

@media (max-width: 900px) {

    /* The header's full link lists AND the Sign In / Get Started actions
       are superseded by the bottom nav + More sheet on mobile -- a single
       menu button (top-left) opens the same sheet, and the brand centers
       in the freed-up space. Sign In already lives at the top of the More
       sheet (.more-sheet-account); Get Started gets its own entry there
       too (below), so nothing is lost by clearing the header down to just
       the menu button + logo. */
    .public-nav,
    .public-nav-actions { display: none; }

    .public-header-inner {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }

    .public-brand {
        grid-column: 2;
        justify-self: center;
        max-width: 60vw;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .public-header-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        grid-column: 1;
        justify-self: start;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        border: none;
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
        font-size: 18px;
        cursor: pointer;
    }

    .public-header-menu-btn:active {
        background: rgba(255, 255, 255, 0.18);
    }

    .public-content {
        padding-bottom: calc(28px + 84px + env(safe-area-inset-bottom));
    }

    /* A floating "dock" rather than a flush bar -- inset from every edge,
       dark navy to match the hero band, so the mobile nav reads as the same
       brand as the desktop hero rather than a generic white tab bar. */
    .bottom-nav {
        display: flex;
        align-items: center;
        gap: 2px;
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(8px + env(safe-area-inset-bottom));
        z-index: 900;
        background:
            radial-gradient(ellipse 140px 60px at 50% -20%, color-mix(in srgb, var(--gv-violet, #7C3AED) 22%, transparent), transparent),
            linear-gradient(180deg, var(--gv-navy, #0b1220) 0%, color-mix(in srgb, var(--gv-navy, #0b1220) 88%, black) 100%);
        border-radius: 20px;
        padding: 5px 6px;
        box-shadow: 0 18px 40px -14px rgba(8, 21, 47, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    }

    .bottom-nav a,
    .bottom-nav button {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 6px 2px;
        border: none;
        background: none;
        color: rgba(255, 255, 255, 0.5);
        font-size: 10px;
        font-weight: 650;
        text-decoration: none;
        border-radius: 14px;
        transition: color 0.2s ease, background-color 0.2s ease;
        cursor: pointer;
        font-family: inherit;
    }

    .bottom-nav a i,
    .bottom-nav button i {
        font-size: 17px;
    }

    .bottom-nav a.active,
    .bottom-nav a:active,
    .bottom-nav button:active {
        color: #fff;
        background: linear-gradient(135deg, color-mix(in srgb, var(--gv-primary, #2563EB) 90%, transparent), color-mix(in srgb, var(--gv-violet, #7C3AED) 75%, var(--gv-primary, #2563EB)));
    }

    /* Central "Verify" action breaks out of the dock entirely -- a raised
       gradient disc with a pulsing ring, echoing the hero network's own
       center node so the same "this is the core action" language repeats
       from the homepage animation down into the nav itself. */

    .bottom-nav-verify {
        position: relative;
        color: rgba(255, 255, 255, 0.75) !important;
    }

    .bottom-nav-verify-icon {
        position: relative;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--gv-primary, #2563EB), var(--gv-violet, #7C3AED));
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: -22px;
        box-shadow: 0 10px 26px -6px color-mix(in srgb, var(--gv-primary, #2563EB) 75%, transparent);
        border: 3px solid var(--gv-navy, #0b1220);
    }
    .bottom-nav-verify-icon::after {
        content: '';
        position: absolute;
        inset: -6px;
        border-radius: 50%;
        border: 1.5px solid color-mix(in srgb, var(--gv-violet, #7C3AED) 55%, transparent);
        animation: bottom-nav-verify-pulse 2.6s ease-out infinite;
    }
    .bottom-nav-verify-icon i { font-size: 18px; color: #fff; }
    .bottom-nav-verify span:last-child { color: rgba(255, 255, 255, 0.55); font-size: 10px; font-weight: 650; margin-top: 2px; }
    .bottom-nav-verify.active span:last-child,
    .bottom-nav-verify:active span:last-child { color: #fff; }
    .bottom-nav-verify:active,
    .bottom-nav-verify.active { background: none !important; }

    /* -------------------------------------------------------------------
       More sheet
    ------------------------------------------------------------------- */

    .more-sheet-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(11, 18, 32, 0.5);
        z-index: 950;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .more-sheet-backdrop.open {
        opacity: 1;
        pointer-events: auto;
    }

    .more-sheet {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 960;
        width: min(300px, 82vw);
        background: var(--gv-surface, #fff);
        border-radius: 0 18px 18px 0;
        padding: calc(14px + env(safe-area-inset-top)) 14px 20px calc(14px + env(safe-area-inset-left));
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 8px 0 30px rgba(11, 18, 32, 0.2);
    }

    .more-sheet.open {
        transform: translateX(0);
    }

    .more-sheet-close-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 4px 14px;
        margin-bottom: 6px;
        border-bottom: 1px solid var(--gv-background, #f8fafc);
    }

    .more-sheet-title {
        font-size: 15px;
        font-weight: 800;
        color: var(--gv-text, #111827);
    }

    .more-sheet-close {
        width: 32px;
        height: 32px;
        border-radius: 9px;
        border: none;
        background: var(--gv-background, #f8f9fc);
        color: #526174;
        font-size: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .more-sheet-account {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 4px 10px 16px;
        margin-bottom: 8px;
        border-bottom: 1px solid var(--gv-background, #f8fafc);
        text-decoration: none;
        color: inherit;
    }

    .more-sheet-account-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--gv-primary, #2563EB);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 15px;
        flex-shrink: 0;
    }

    .more-sheet-account-info { flex: 1; min-width: 0; }
    .more-sheet-account-name { font-size: 14.5px; font-weight: 700; color: var(--gv-text, #111827); }
    .more-sheet-account-role { font-size: 11.5px; color: var(--gv-muted, #8792a2); }

    .more-sheet-section { margin-bottom: 6px; }

    .more-sheet-section-label {
        font-size: 10.5px;
        font-weight: 750;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--gv-muted, #9aa4b2);
        padding: 10px 10px 4px;
    }

    .more-sheet-nav { display: flex; flex-direction: column; }

    .more-sheet-nav form { margin: 0; }

    .more-sheet-nav a,
    .more-sheet-nav button {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        padding: 13px 10px;
        border: none;
        background: none;
        color: var(--gv-text, #111827);
        text-decoration: none;
        font-weight: 600;
        font-size: 15px;
        font-family: inherit;
        text-align: left;
        cursor: pointer;
        border-bottom: 1px solid var(--gv-background, #f8fafc);
    }

    .more-sheet-nav a.active { color: var(--gv-primary, #2563EB); }
    .more-sheet-nav a i,
    .more-sheet-nav button i { width: 22px; text-align: center; color: var(--gv-muted, #64748b); font-size: 17px; }
    .more-sheet-nav a.active i { color: var(--gv-primary, #2563EB); }

    .more-sheet-nav .nav-badge {
        background: var(--gv-danger, #dc2626);
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        border-radius: 999px;
        padding: 2px 7px;
        flex-shrink: 0;
    }
}

@keyframes bottom-nav-verify-pulse {
    0% { transform: scale(0.92); opacity: 0.85; }
    70% { transform: scale(1.45); opacity: 0; }
    100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .more-sheet { transition: none; }
    .bottom-nav-verify-icon::after { animation: none; }
}
