/* ============================================================================
   FOOTER
   ============================================================================ */

.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky-bar);
    background: var(--footer-bg);
    border-top: 1px solid var(--border-subtle);
    padding: 0.5rem 2rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
    backdrop-filter: blur(12px);
    min-height: 36px;
    display: flex;
    align-items: center;
}

/* Mobile bottom quick-nav — hidden on desktop, shown on phones via 07-mobile */
.bottom-nav {
    display: none;
}

[data-theme="light"] .app-footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--border-subtle);
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.06);  /* tokens-allow: directional shadow (out of --shadow scale) */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
}

.footer-left {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);  /* tokens-allow: theme-tuned footer text (revisit: --text-muted) */
    letter-spacing: 0.01em;
}

[data-theme="light"] .footer-left {
    color: rgba(0, 0, 0, 0.55);  /* tokens-allow: theme-tuned footer text (revisit: --text-muted) */
}

.footer-user {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);  /* tokens-allow: theme-tuned footer text (revisit: --text-muted) */
    letter-spacing: 0.01em;
}

.footer-user strong {
    color: var(--primary-light, #60a5fa);
    font-weight: 700;
}

[data-theme="light"] .footer-user {
    color: rgba(0, 0, 0, 0.6);  /* tokens-allow: theme-tuned footer text (revisit: --text-muted) */
}

[data-theme="light"] .footer-user strong {
    color: var(--brand-ink);
}

/* Footer Help Link — visible on mobile only */
.footer-help-link {
    display: none;
    color: rgba(255, 255, 255, 0.7);  /* tokens-allow: theme-tuned footer text (revisit: --text-muted) */
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
    padding: var(--space-0-5) var(--space-1-5);
    border-radius: var(--radius-xs);
    transition: color var(--motion-base), background var(--motion-base);
}

.footer-help-link:hover {
    color: var(--text-primary);
    background: var(--raise-4);
}

[data-theme="light"] .footer-help-link {
    color: rgba(0, 0, 0, 0.55);  /* tokens-allow: theme-tuned footer text (revisit: --text-muted) */
}

[data-theme="light"] .footer-help-link:hover {
    color: #000;  /* tokens-allow: pure black (3rd-party/brand) */
    background: var(--raise-4);
}

/* Tournament Info Drawer — half-circle pull-out tab for mobile */
.info-drawer-tab {
    display: none;
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: var(--z-nav);
    width: 28px;
    height: 56px;
    border-radius: 28px 0 0 28px;
    background: var(--card-bg, #1e1e2e);
    border: 1px solid var(--border-subtle, #333);
    border-right: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.3);  /* tokens-allow: horizontal drawer shadow (out of --shadow scale) */
    transition: width var(--motion-base);
}

.info-drawer-tab::after {
    content: 'i';
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 700;
    font-size: 1rem;
    color: var(--brand-ink);
}

[data-theme="light"] .info-drawer-tab {
    background: var(--surface-solid);
    border-color: var(--border-subtle);
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.1);  /* tokens-allow: horizontal drawer shadow (out of --shadow scale) */
}

.info-drawer-panel {
    display: none;
    position: fixed;
    right: -300px;
    top: 0;
    bottom: 0;
    width: 280px;
    z-index: var(--z-nav-label);
    background: var(--card-bg, #1e1e2e);
    border-left: 1px solid var(--border-subtle, #333);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4);  /* tokens-allow: horizontal drawer shadow (out of --shadow scale) */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1rem 1rem;
    transition: right var(--motion-slower) var(--ease-decelerate);
}

.info-drawer-panel.open {
    right: 0;
}

.info-drawer-panel .drawer-close {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 0.5rem);
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: var(--space-1) var(--space-2);
}

.info-drawer-panel .drawer-section {
    margin-bottom: var(--space-4);
}

.info-drawer-panel .drawer-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: var(--space-1);
}

.info-drawer-panel .drawer-value {
    font-size: 0.88rem;
    color: var(--text-primary, #e8e8e8);
    font-weight: 600;
}

[data-theme="light"] .info-drawer-panel {
    background: var(--surface-solid);
    border-left-color: var(--border-subtle);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);  /* tokens-allow: horizontal drawer shadow (out of --shadow scale) */
}

.info-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--z-nav);
    background: var(--scrim);
    opacity: 0;
    animation: drawerBackdropIn 0.3s ease forwards;
}

@keyframes drawerBackdropIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Footer spacing — account for sticky footer */
.container {
    padding-bottom: var(--space-12);
}

body {
    padding-bottom: 0;
}

body.login-active {
    padding-bottom: 0 !important;
    overflow: hidden;
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: var(--space-2);
}

.mt-2 {
    margin-top: var(--space-4);
}

.mt-3 {
    margin-top: var(--space-6);
}

.mb-1 {
    margin-bottom: var(--space-2);
}

.mb-2 {
    margin-bottom: var(--space-4);
}

.mb-3 {
    margin-bottom: var(--space-6);
}
