/* ============================================================
   FULL WIDTH LAYOUT — shared hero + summary bar pattern
   Used by: DrawlotsV2, PairingDrawV2, RegistrationV2, Bracket (+ shared .reg-premium-page surface)

   Top area: two-column hero (poster+meta card | sponsor carousel card)
   replacing the old 3-column sponsor strip. Everything below spans the
   full page width instead of sharing the row with that strip.
   ============================================================ */

/* The `.full-width-layout` breakout rule (page spans the full 1800px shell instead
   of the .main-content centre track) lives in layout-v2.css next to the
   .dashboard-v3-shell special-case, so pages that don't load this file (Tournament
   Management / EventDetails) get it too. */

/* Shared "premium" page surface: lime radial glow over the --reg-bg tint (token in
   theme-v2.css). Add `reg-premium-page` next to `full-width-layout` on any tournament page
   (RegistrationV2, Bracket, ...). Moved here from registration-v2-premium.css. */
.reg-premium-page {
    background: radial-gradient(circle at 8% 0%, rgba(163, 255, 18, 0.12), transparent 36%), var(--reg-bg);
    padding: 16px;
}

@media (max-width: 767px) {
    .reg-premium-page {
        padding: 8px;
    }
}

.fw-hero {
    display: grid;
    grid-template-columns: minmax(320px, 38%) 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.fw-hero-info-card,
.fw-hero-sponsors-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.fw-hero-info-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    min-width: 0;
}

/* The poster is shown as a tall banner above the text (not a small thumbnail beside it) at
   every breakpoint - see the 1100px/768px overrides below for how its height scales with the
   extra width the card gets once the two-column .fw-hero grid collapses. */
.fw-hero-poster {
    flex-shrink: 0;
    width: 100%;
    height: 220px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-surface-secondary);
}

.fw-hero-poster img {
    width: 100%;
    height: 100%;
    /* contain, not cover: poster art is typically a portrait flyer - cropping it to fill a
       short wide banner would show LESS of the artwork despite the bigger box. Letterboxes
       on the container's own background instead. */
    object-fit: contain;
    display: block;
}

/* Shown in .fw-hero-sponsors-card's slot in place of the sponsor carousel when
   Model.ShowSponsorLogos is false - fills the card the same way .fw-sponsors-inner does. */
.fw-hero-poster-large {
    flex: 1;
    min-width: 0;
    min-height: 160px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-surface-secondary);
}

.fw-hero-poster-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fw-hero-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.fw-hero-body .back-link {
    margin-bottom: 6px;
}

.fw-hero-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.fw-hero-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.3px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.fw-hero-meta-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.fw-hero-meta-row span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.fw-hero-meta-row i {
    color: var(--primary-green);
    font-size: 12px;
    width: 14px;
    flex-shrink: 0;
    text-align: center;
}

.fw-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.fw-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.fw-badge i {
    color: var(--primary-green);
    font-size: 11px;
}

.fw-hero-sponsors-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 16px;
    overflow: hidden;
}

.fw-sponsors-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 0 0 10px;
}

.fw-sponsors-inner {
    flex: 1;
    min-width: 0;
}

/* ---- Summary / action bar ---- */
.fw-summary-bar {
    display: flex;
    align-items: stretch;
    gap: 20px;
    margin: 16px 24px 0;
    padding: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.fw-stat {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.fw-stat + .fw-stat {
    padding-left: 20px;
    border-left: 1px solid var(--border-color);
}

.fw-stat-main {
    flex: 1.8;
    justify-content: flex-start;
}

.fw-stat-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--tint-success-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tint-success-fg);
    font-size: var(--icon-md);
}

.fw-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
    white-space: nowrap;
}

.fw-stat-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    white-space: nowrap;
}

.fw-stat-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    padding-left: 16px;
}

/* ---- Registration-only hero extras (tags row, status/countdown/CTA row, progress row) ---- */
.fw-hero-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.fw-hero-tag {
    background: var(--tint-gold-bg);
    border: 1px solid var(--tint-gold-bg);
    color: var(--tint-gold-fg);
    font-size: 10px;
    border-radius: var(--radius-pill);
    padding: 4px 8px;
    letter-spacing: 0.7px;
}

.fw-hero-cta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.fw-status-pill {
    color: var(--tint-gold-fg);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    white-space: nowrap;
}

.fw-countdown-compact {
    display: flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
}

.fw-countdown-label {
    color: var(--text-secondary);
    font-size: 11px;
}

.fw-countdown-unit {
    font-size: 11px;
    color: var(--text-secondary);
}

.fw-countdown-unit strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.fw-hero-progress-row {
    margin-top: 10px;
}

.fw-hero-progress-row span {
    color: var(--text-secondary);
    font-size: 11px;
}

/* Responsive */
@media (max-width: 1100px) {
    .fw-hero {
        grid-template-columns: 1fr;
        margin-bottom: 8px;
    }

    /* .fw-hero-info-card is now full page width instead of sharing the row with the
       sponsors card - the poster has more room, so let it stand taller. */
    .fw-hero-poster {
        height: 260px;
    }
}

@media (max-width: 768px) {
    .fw-hero {
        padding: 16px 16px 0;
        gap: 14px;
        margin-bottom: 4px;
    }

    .fw-hero-info-card {
        padding: 16px;
    }

    .fw-hero-poster {
        height: 180px;
    }

    .fw-hero-cta-row {
        justify-content: center;
    }

    .fw-summary-bar {
        flex-direction: column;
        gap: 14px;
        margin: 14px 16px 0;
    }

    .fw-stat + .fw-stat {
        padding-left: 0;
        padding-top: 14px;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }

    .fw-stat-actions {
        margin-left: 0;
        padding-left: 0;
    }
}
