/* ============================================================
   sportsbet365 theme — layout.css
   App shell: sticky header, sidebar rail/offcanvas, main column,
   mobile bottom nav, footer.
   Breakpoints follow Bootstrap: 576 / 768 / 992 / 1200.
   ============================================================ */

/* ---- Shell ---- */
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-body {
    display: flex;
    flex: 1;
    min-width: 0;
}

.app-main {
    flex: 1;
    min-width: 0;
    padding: 1.25rem 1rem calc(var(--sb-bottomnav-h) + 1.5rem);
}

@media (min-width: 992px) {
    .app-main {
        padding: 1.5rem 2rem 2rem;
    }
}

/* ---- Header ---- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--sb-header-h);
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 0 1rem;
    background: rgba(23, 28, 46, .92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--sb-border-soft);
}

.app-header__logo img {
    height: 34px;
    width: auto;
    display: block;
}

.app-header__spacer { flex: 1; }

.app-header__burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: var(--sb-radius-sm);
    background: transparent;
    color: var(--sb-text);
    font-size: 1.25rem;
}
.app-header__burger:hover { background: var(--sb-surface-2); }

@media (min-width: 992px) {
    .app-header__burger { display: none; }
    .app-header { padding: 0 1.5rem; }
}

/* ---- Balance pill ---- */
.balance-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    height: 40px;
    padding: 0 .9rem;
    border-radius: var(--sb-radius-pill);
    background: var(--sb-surface-2);
    border: 1px solid var(--sb-border);
    color: var(--sb-text);
    font-weight: 600;
    white-space: nowrap;
}
.balance-pill i { color: var(--sb-gold); }
.balance-pill:hover { border-color: var(--sb-green); color: var(--sb-text); }

/* ---- Sidebar: desktop rail ---- */
.app-sidebar {
    width: var(--sb-sidebar-w);
    flex-shrink: 0;
    background: var(--sb-surface);
    border-right: 1px solid var(--sb-border-soft);
    padding: 1rem .75rem;
    display: none;
}

@media (min-width: 992px) {
    .app-sidebar {
        display: block;
        position: sticky;
        top: var(--sb-header-h);
        height: calc(100vh - var(--sb-header-h));
        overflow-y: auto;
    }
}

/* Sidebar nav items — shared by rail and offcanvas */
.side-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.side-nav__label {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sb-text-dim);
    padding: .9rem .75rem .35rem;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem .75rem;
    border-radius: var(--sb-radius-sm);
    color: var(--sb-text-muted);
    font-weight: 600;
    font-size: .92rem;
    transition: background var(--sb-fast) var(--sb-ease), color var(--sb-fast) var(--sb-ease);
}

.side-nav a:hover {
    background: var(--sb-surface-2);
    color: var(--sb-text);
}

.side-nav a.active {
    background: var(--sb-green-soft);
    color: var(--sb-green);
}

.side-nav a i,
.side-nav a svg {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* ---- Mobile bottom nav ---- */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    height: calc(var(--sb-bottomnav-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    display: flex;
    align-items: stretch;
    background: rgba(23, 28, 46, .97);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--sb-border-soft);
}

@media (min-width: 992px) {
    .bottom-nav { display: none; }
    .app-main { padding-bottom: 2rem; }
}

.bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--sb-text-dim);
    font-size: .68rem;
    font-weight: 600;
    border: 0;
    background: transparent;
}

.bottom-nav__item i { font-size: 1.15rem; }

.bottom-nav__item.active,
.bottom-nav__item:hover { color: var(--sb-green); }

/* raised center CTA (Deposit / Register) */
.bottom-nav__cta {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.bottom-nav__cta > a,
.bottom-nav__cta > button {
    position: absolute;
    top: -18px;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: var(--sb-grad-cta);
    color: var(--sb-text-on-accent);
    font-size: 1.3rem;
    box-shadow: var(--sb-glow-green), var(--sb-shadow-card);
}

/* ---- Footer ---- */
.app-footer {
    background: var(--sb-surface);
    border-top: 1px solid var(--sb-border-soft);
    padding: 2rem 1rem calc(var(--sb-bottomnav-h) + 2rem);
    color: var(--sb-text-muted);
    font-size: .9rem;
}

@media (min-width: 992px) {
    .app-footer { padding: 2.5rem 2rem; }
}

.app-footer .footer-logo { height: 30px; width: auto; }

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--sb-surface-2);
    transition: transform var(--sb-fast) var(--sb-ease), background var(--sb-fast) var(--sb-ease);
}
.footer-social a:hover {
    background: var(--sb-surface-3);
    transform: translateY(-2px);
}
.footer-social img { width: 18px; height: 18px; }

/* ---- Page container helper ---- */
.page-narrow {
    max-width: 640px;
    margin-inline: auto;
}
