/* ============================================================
   Rush Web App — "Noir" theme
   Mirrors the iOS design system (DesignSystem.swift on the
   rush-visual-redesign branch): ultra-dark layered charcoal,
   high-contrast editorial type with tight tracking, hairline
   borders, liquid-glass materials, monochrome capsule CTAs,
   and exactly ONE restrained electric-blue accent.
   Used by the web app pages only (login/signup/dashboard/
   event/host/edit/etc); the marketing landing pages keep
   their own style.css.
   ============================================================ */

:root {
    /* Backgrounds & surfaces (dark tokens) */
    --rush-bg: #0A0A0C;
    --rush-bg-deep: #060608;
    --rush-surface: #141417;
    --rush-surface-elev: #1D1D21;
    --rush-hairline: rgba(255, 255, 255, 0.08);
    --rush-border: rgba(255, 255, 255, 0.10);
    --rush-border-strong: rgba(255, 255, 255, 0.18);

    /* Text — dark mode is a soft "gallery white", never pure #FFF */
    --rush-text: #F5F5F7;
    --rush-text-2: rgba(255, 255, 255, 0.62);
    --rush-text-3: rgba(255, 255, 255, 0.40);

    /* Inverse plate — the fill behind primary CTAs (white in dark mode) */
    --rush-inverse: #F5F5F7;
    --rush-text-inverse: #0B0B0D;

    /* THE accent — one restrained electric blue, used sparingly:
       links, focus rings, selection, live states. */
    --rush-accent: #5E7BFF;
    --rush-accent-soft: rgba(94, 123, 255, 0.14);

    /* Semantic states */
    --rush-success: #30D97E;
    --rush-warning: #FFB340;
    --rush-danger: #FF5C69;

    /* Accent fill — single-hue tonal gradient (no rainbows) */
    --rush-grad-primary: linear-gradient(180deg, #6E88FF, #4E6BF0);

    /* Photo scrim for full-bleed imagery */
    --rush-photo-scrim: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.35) 55%, rgba(0,0,0,0.85) 100%);

    /* Radii (RushRadius) */
    --rush-r-s: 10px;
    --rush-r-m: 14px;
    --rush-r-l: 18px;
    --rush-r-xl: 24px;
    --rush-r-xxl: 30px;

    /* Elevation — soft and low-opacity, depth without glow */
    --rush-shadow-card: 0 10px 18px rgba(0, 0, 0, 0.45);
    --rush-shadow-elevated: 0 18px 30px rgba(0, 0, 0, 0.6);
    --rush-shadow-cta: 0 10px 18px rgba(0, 0, 0, 0.5);

    /* SF Pro (default design) — confident editorial sans, not rounded */
    --rush-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter",
        "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body.rush-app {
    background-color: var(--rush-bg);
    color: var(--rush-text);
    font-family: var(--rush-font);
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Ambient screen base (RushBackground) — neutral vertical fade with a
   faint monochrome halo at the top. Depth without color. */
body.rush-app::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(60rem 26rem at 50% -12rem, rgba(255, 255, 255, 0.035), transparent 70%),
        linear-gradient(180deg, #0C0C0F 0%, var(--rush-bg) 45%, var(--rush-bg-deep) 100%);
}

/* Inputs never smaller than 16px, so iOS Safari doesn't zoom on focus
   (lets us keep pinch-zoom enabled for accessibility). */
body.rush-app input,
body.rush-app select,
body.rush-app textarea {
    font-size: 16px;
}

/* ---------- Cards (rushCard) — hairline borders, soft elevation ---------- */
.rush-card {
    background: var(--rush-surface);
    border: 1px solid var(--rush-border);
    border-radius: var(--rush-r-l);
    box-shadow: var(--rush-shadow-card);
    position: relative;
}
/* top-edge light catch (cardHighlight) — very quiet */
.rush-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 16%);
}
.rush-card-elevated {
    box-shadow: var(--rush-shadow-elevated);
}

/* ---------- Buttons ---------- */

/* The signature CTA — a monochrome capsule: gallery-white plate with
   near-black text. High contrast, zero noise. */
.rush-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 56px;
    border-radius: 999px;
    background: var(--rush-inverse);
    color: var(--rush-text-inverse);
    font-family: var(--rush-font);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: 1px solid var(--rush-hairline);
    box-shadow: var(--rush-shadow-cta);
    transition: transform 0.15s ease, opacity 0.15s ease, filter 0.15s ease;
    cursor: pointer;
}
.rush-btn-primary:hover { filter: brightness(0.96); }
.rush-btn-primary:active { transform: scale(0.97); opacity: 0.92; }
.rush-btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

/* Liquid-glass secondary CTA — translucent capsule with a hairline edge. */
.rush-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 56px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--rush-shadow-card);
    color: var(--rush-text);
    font-family: var(--rush-font);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.15s ease, background 0.15s ease;
    cursor: pointer;
}
.rush-btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }
.rush-btn-secondary:active { transform: scale(0.97); opacity: 0.92; }

/* Quiet text-only action (RushTertiaryButton) — accent tinted. */
.rush-btn-tertiary {
    color: var(--rush-accent);
    font-weight: 600;
    font-size: 14px;
    background: none;
    border: none;
    cursor: pointer;
}
.rush-btn-tertiary:hover { opacity: 0.8; }

/* Circular icon button (RushIconButton) */
.rush-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: var(--rush-surface);
    border: 1px solid var(--rush-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rush-text-2);
    transition: border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
    cursor: pointer;
    flex-shrink: 0;
}
.rush-icon-btn:hover { border-color: var(--rush-border-strong); color: var(--rush-text); }
.rush-icon-btn:active { transform: scale(0.94); }

/* Mono plate — inverse rounded square for the tab-bar "+" and icon plates */
.rush-inverse-plate {
    background: var(--rush-inverse);
    color: var(--rush-text-inverse);
    border: 1px solid var(--rush-hairline);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Inputs (RushInputField) ---------- */
.rush-field {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 0 16px;
    border-radius: var(--rush-r-m);
    background: var(--rush-surface);
    border: 1px solid var(--rush-border);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.rush-field:focus-within {
    border-color: var(--rush-accent);
    box-shadow: 0 0 0 3px var(--rush-accent-soft);
}
.rush-field input,
.rush-field select {
    background: transparent;
    border: none;
    outline: none;
    color: var(--rush-text);
    width: 100%;
    font-family: var(--rush-font);
}
.rush-field input::placeholder { color: var(--rush-text-3); }
.rush-field .rush-field-icon {
    color: var(--rush-text-3);
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}
.rush-field:focus-within .rush-field-icon { color: var(--rush-accent); }

/* ---------- Typography helpers ---------- */
.rush-overline {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--rush-text-3);
}
/* Mono display headline — high contrast, tight tracking (no gradients) */
.rush-display {
    color: var(--rush-text);
    font-weight: 800;
    letter-spacing: -0.02em;
}
/* Legacy hook kept for markup compatibility — renders mono, not gradient */
.rush-grad-text {
    color: var(--rush-text);
    font-weight: 800;
    letter-spacing: -0.02em;
}
/* Monospaced digits so amounts don't jitter (RushFont.money) */
.rush-money { font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---------- Tags (RushTag) ---------- */
.rush-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.rush-tag-brand { background: var(--rush-accent-soft); color: var(--rush-accent); border: 1px solid rgba(94, 123, 255, 0.3); }
.rush-tag-success { background: rgba(48, 217, 126, 0.14); color: var(--rush-success); border: 1px solid rgba(48, 217, 126, 0.3); }
.rush-tag-warning { background: rgba(255, 179, 64, 0.14); color: var(--rush-warning); border: 1px solid rgba(255, 179, 64, 0.3); }
.rush-tag-danger { background: rgba(255, 92, 105, 0.14); color: var(--rush-danger); border: 1px solid rgba(255, 92, 105, 0.3); }
.rush-tag-neutral { background: rgba(255, 255, 255, 0.08); color: var(--rush-text-2); border: 1px solid var(--rush-border); }

/* ---------- Error / success message blocks ---------- */
.rush-msg-error {
    color: var(--rush-danger);
    background: rgba(255, 92, 105, 0.1);
    border: 1px solid rgba(255, 92, 105, 0.25);
    border-radius: var(--rush-r-s);
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}
.rush-msg-success {
    color: var(--rush-success);
    background: rgba(48, 217, 126, 0.1);
    border: 1px solid rgba(48, 217, 126, 0.25);
    border-radius: var(--rush-r-s);
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

/* ---------- Segmented control (RushSegmentedControl) ----------
   Glass capsule track; selected segment is an inverse (white) capsule
   with near-black text. */
.rush-seg {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--rush-hairline);
}
.rush-seg button {
    flex: 1;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--rush-text-2);
    transition: all 0.2s ease;
}
.rush-seg button.active {
    background: var(--rush-inverse);
    color: var(--rush-text-inverse);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

/* ---------- Tab bar — quiet mono shell ---------- */
.rush-tabbar {
    background: rgba(10, 10, 12, 0.85);
    border-top: 1px solid var(--rush-hairline);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding-bottom: env(safe-area-inset-bottom);
}
/* The center "+" — a mono inverse plate, not a gradient */
.rush-tab-plus {
    background: var(--rush-inverse);
    color: var(--rush-text-inverse);
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--rush-hairline);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--rush-shadow-cta);
    transition: transform 0.15s ease;
}

/* ---------- Loaders ---------- */
.rush-spinner {
    width: 24px;
    height: 24px;
    border: 2.5px solid var(--rush-surface-elev);
    border-top-color: var(--rush-text-2);
    border-radius: 50%;
    animation: rush-spin 0.8s linear infinite;
}
.rush-spinner-lg { width: 40px; height: 40px; border-width: 4px; }
@keyframes rush-spin { to { transform: rotate(360deg); } }

.rush-dots { display: flex; gap: 6px; align-items: center; justify-content: center; }
.rush-dots span {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--rush-text-2);
    animation: rush-dot 1s ease-in-out infinite;
}
.rush-dots span:nth-child(2) { animation-delay: 0.15s; }
.rush-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes rush-dot {
    0%, 100% { opacity: 0.35; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1); }
}

/* ---------- Step dots (pager) — accent marks progress ---------- */
.rush-step-dots { display: flex; gap: 6px; justify-content: center; }
.rush-step-dots span {
    width: 6px; height: 6px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    transition: all 0.3s ease;
}
.rush-step-dots span.active {
    width: 20px;
    background: var(--rush-accent);
}

/* ---------- Misc ---------- */
.rush-hairline { border-color: var(--rush-hairline); }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }
.rush-fade-in { animation: rush-fade 0.35s ease both; }
@keyframes rush-fade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Compact datetime fields (wave sales start/end) ---------- */
/* The native datetime-local widget is wider than the half-width columns
   it sits in and spills out of the field. Keep the real input (and all
   of its behavior) but show a short slash-format label over it; the
   native control reappears whenever the field is focused. */
.dt-compact { position: relative; }
.dt-compact input[type="datetime-local"] {
    width: 100%;
    min-width: 0;
    font-size: 13px;
    opacity: 0;
}
.dt-compact input[type="datetime-local"]:focus { opacity: 1; }
.dt-compact .dt-display {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    pointer-events: none;
}
.dt-compact input[type="datetime-local"]:focus + .dt-display { display: none; }
