/* =============================================================================
   ESTILOS GLOBAIS DA PÁGINA PÚBLICA DO TORNEIO (PWA)
   Caminho: front/pages/tournament/css/tournament.css
   ============================================================================= */

.tournament-page-wrapper {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
    box-sizing: border-box;
}

/* 1. Hero Cover Imersivo do Torneio */
.tournament-hero-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding-top: 2rem;
    padding-bottom: 2.5rem;
    background: linear-gradient(135deg, #0b1120 0%, #0f172a 100%);
    overflow: hidden;
    box-sizing: border-box;
    border-radius: 24px !important;
}

.tournament-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(28px) brightness(0.35);
    transform: scale(1.08);
    pointer-events: none;
    z-index: 1;
}

.tournament-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.45) 0%, rgba(15, 23, 42, 0.95) 100%);
    z-index: 2;
    pointer-events: none;
}

.tournament-hero-container {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

.tournament-hero-grid {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

/* Cartaz do Torneio no Hero (Proporção 4:5 / 240x300) */
.tournament-hero-poster-box {
    flex: 0 0 240px;
    width: 240px;
    aspect-ratio: 4 / 5;
    height: auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #0f172a;
    position: relative;
}

.tournament-hero-poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.tournament-hero-poster-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* Conteúdo e Metadados do Hero */
.tournament-hero-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.tournament-hero-badges-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.tournament-hero-status-badge {
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.725rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    line-height: normal;
}

.tournament-hero-status-badge.is-live {
    background: #ea580c;
    color: #ffffff;
}

.tournament-hero-status-badge.is-open {
    background: #16a34a;
    color: #ffffff;
}

.tournament-hero-status-badge.is-soon {
    background: #0284c7;
    color: #ffffff;
}

.tournament-hero-status-badge.is-checkin {
    background: #ea580c;
    color: #ffffff;
}

.tournament-hero-status-badge.is-closed {
    background: rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tournament-hero-status-badge.is-completed {
    background: rgba(51, 65, 85, 0.8);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tournament-hero-status-badge.is-draft {
    background: rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
}

.tournament-hero-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffffff;
    display: inline-block;
}

.tournament-hero-club-badge {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.tournament-hero-club-badge:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.tournament-hero-title {
    font-size: 2.35rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.035em;
    font-family: 'Manrope', -apple-system, sans-serif;
    line-height: 1.15;
}

.tournament-hero-meta-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.tournament-hero-meta-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    font-weight: 600;
}

.tournament-hero-actions-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 0.65rem;
    flex-wrap: wrap;
}

.btn-tournament-hero-cta {
    background: var(--primary, #2563eb);
    color: #ffffff;
    padding: 0.8rem 1.6rem;
    font-size: 0.875rem;
    font-weight: 800;
    border-radius: 9999px;
    border: 1px solid var(--primary, #2563eb);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-tournament-hero-cta:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

.btn-tournament-hero-cta.is-live {
    background: #ea580c;
    border-color: #ea580c;
}

.btn-tournament-hero-cta.is-live:hover {
    background: #c2410c;
    border-color: #c2410c;
}

.btn-tournament-hero-cta.is-open {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--text-main, #0f172a);
}

.btn-tournament-hero-cta.is-open:hover {
    background: var(--bg-input, #f1f5f9);
    border-color: var(--bg-input, #f1f5f9);
    color: var(--primary, #2563eb);
}

.btn-tournament-hero-secondary {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    padding: 0.8rem 1.4rem;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 9999px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-tournament-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

/* 2. Abas de Navegação (Tabs) - Padrão Idêntico ao Clube */
.tournament-tabs-navbar {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    -webkit-overflow-scrolling: touch;
    will-change: scroll-position;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

.tournament-tabs-navbar::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari, Opera */
}

@media (max-width: 991px) {
    .tournament-tabs-navbar {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        border-radius: 0;
        border-left: none;
        border-right: none;
        background-color: transparent !important;
        border: none !important;
        width: 100% !important;
    }
}

.tournament-tab-link {
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-input);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
    white-space: nowrap;
    scroll-snap-align: center;
    color: var(--text-muted);
    background-color: rgba(37, 99, 235, 0.08);
}

.tournament-tab-link:hover {
    color: var(--primary);
}

.tournament-tab-link.active {
    color: var(--text-white, #ffffff);
    background-color: var(--primary, #2563eb);
}

.tournament-tab-badge {
    background: rgba(15, 23, 42, 0.12);
    color: currentColor;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    margin-left: 0.2rem;
}

.tournament-tab-link.active .tournament-tab-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.tournament-tab-badge.is-live {
    background: #ea580c;
    color: #ffffff;
}

/* 3. Área de Conteúdo da Aba Ativa */
.tournament-tab-content-area {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* 4. Cartão Genérico de Conteúdo */
.tournament-card-box {
    background: #ffffff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 20px;
    padding: 1.75rem;
    margin-bottom: 0;
    box-sizing: border-box;
}

.tournament-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-color, #f1f5f9);
}

.tournament-card-header.flex-between {
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.tournament-card-header .header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tournament-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tournament-card-heading {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    margin: 0;
    letter-spacing: -0.025em;
    font-family: 'Manrope', -apple-system, sans-serif;
}

.tournament-card-subheading {
    font-size: 0.825rem;
    color: var(--text-muted, #64748b);
    margin: 0.15rem 0 0 0;
}

.tournament-empty-box {
    text-align: center;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted, #64748b);
}

.tournament-empty-box h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    margin: 0;
}

.tournament-empty-box p {
    font-size: 0.9rem;
    max-width: 480px;
    margin: 0;
}

.btn-primary-small {
    background: var(--primary, #2563eb);
    color: #ffffff;
    padding: 0.65rem 1.25rem;
    font-size: 0.825rem;
    font-weight: 750;
    border-radius: 9999px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

/* =============================================================================
   5. RESPONSIVIDADE MOBILE & TABLET (< 992px)
   ============================================================================= */

@media (max-width: 991px) {
    .tournament-hero-grid {
        gap: 1.75rem;
    }

    .tournament-hero-poster-box {
        flex: 0 0 170px;
        width: 170px;
        height: auto;
        aspect-ratio: 4 / 5;
    }

    .tournament-hero-title {
        font-size: 1.85rem;
    }

    .tournament-card-box {
        padding: 1.25rem;
        border-radius: 16px;
    }
}

@media (max-width: 768px) {
    /* 1. Hero Otimizado para Mobile: Cartaz e Badges lado a lado */
    .tournament-hero-wrapper {
        padding-top: 1rem;
        padding-bottom: 1.15rem;
        border-radius: 20px !important;
    }

    .tournament-hero-container {
        padding: 0 1rem;
    }

    .tournament-hero-grid {
        display: grid;
        grid-template-columns: 105px minmax(0, 1fr);
        column-gap: 1rem;
        row-gap: 0.65rem;
        align-items: center;
    }

    .tournament-hero-poster-box {
        grid-column: 1;
        grid-row: 1;
        flex: none !important;
        width: 105px !important;
        height: 131px !important;
        aspect-ratio: 4 / 5 !important;
        border-radius: 14px !important;
        margin: 0;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    }

    .tournament-hero-poster-placeholder svg {
        max-width: 36px;
        max-height: 36px;
    }

    .tournament-hero-content {
        display: contents;
    }

    .tournament-hero-badges-row {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 0.42rem;
        min-width: 0;
        width: 100%;
        margin: 0;
    }

    .tournament-hero-status-badge {
        font-size: 0.685rem;
        padding: 0.3rem 0.65rem;
        letter-spacing: 0.03em;
        white-space: nowrap;
        max-width: 100%;
        box-sizing: border-box;
    }

    .tournament-hero-appl-badge {
        max-width: 100%;
        box-sizing: border-box;
    }

    .tournament-hero-club-badge {
        font-size: 0.72rem;
        padding: 0.3rem 0.7rem;
        max-width: 100%;
        box-sizing: border-box;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tournament-hero-club-badge span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tournament-hero-title {
        grid-column: 1 / -1;
        grid-row: 2;
        font-size: 1.45rem !important;
        line-height: 1.22 !important;
        margin: 0.2rem 0 0 0;
        word-break: break-word;
    }

    .tournament-hero-meta-row {
        grid-column: 1 / -1;
        grid-row: 3;
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        align-items: flex-start;
        margin: 0;
    }

    .tournament-hero-meta-item {
        font-size: 0.8rem;
    }

    .tournament-hero-actions-row {
        grid-column: 1 / -1;
        grid-row: 4;
        display: flex;
        flex-wrap: wrap;
        gap: 0.55rem;
        margin-top: 0.25rem;
    }

    .btn-tournament-hero-cta,
    .btn-tournament-hero-secondary {
        padding: 0.55rem 1rem;
        font-size: 0.825rem;
    }

    /* 2. Abas Sticky */
    .tournament-tabs-bar-wrapper {
        top: calc(44px + max(2px, env(safe-area-inset-top, 0px)));
    }

    .tournament-tabs-container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .tournament-hero-wrapper {
        padding-top: 0.85rem;
        padding-bottom: 1.1rem;
        border-radius: 18px !important;
    }

    .tournament-hero-container {
        padding: 0 0.85rem;
    }

    .tournament-hero-grid {
        grid-template-columns: 96px minmax(0, 1fr);
        column-gap: 0.75rem;
        row-gap: 0.55rem;
    }

    .tournament-hero-poster-box {
        width: 96px !important;
        height: 120px !important;
        border-radius: 12px !important;
    }

    .tournament-hero-badges-row {
        gap: 0.36rem;
    }

    .tournament-hero-status-badge {
        font-size: 0.65rem;
        padding: 0.28rem 0.55rem;
    }

    .tournament-hero-club-badge {
        font-size: 0.685rem;
        padding: 0.28rem 0.6rem;
    }

    .tournament-hero-title {
        font-size: 1.325rem !important;
    }

    .tournament-hero-meta-item {
        font-size: 0.775rem;
    }

    .tournament-tab-link {
        padding: 0.65rem 0.85rem;
        font-size: 0.8rem;
    }
}

/* Modal de Registo de Parceiro */
.pro-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
}

.pro-modal-dialog {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

.pro-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.4rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.pro-modal-title-box {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.pro-modal-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #2563eb);
}

.pro-modal-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    margin: 0;
}

.pro-modal-subtitle {
    font-size: 0.725rem;
    color: var(--text-muted, #64748b);
    display: block;
}

.pro-modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    padding: 0.3rem;
}

.pro-modal-body {
    padding: 1.25rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.pro-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    padding: 0.95rem 1.4rem;
    background: var(--bg-input, #f8fafc);
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.btn-modal-cancel,
.btn-pro-modal-cancel,
#btn-cancel-partner-modal {
    background: #ffffff;
    border: 1px solid var(--border-color, #cbd5e1);
    color: var(--text-main, #0f172a);
    padding: 0.65rem 1.35rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: normal;
}

.btn-modal-cancel:hover,
.btn-pro-modal-cancel:hover,
#btn-cancel-partner-modal:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.btn-modal-submit,
.btn-pro-modal-save,
#btn-submit-partner-modal {
    background: var(--primary, #2563eb);
    border: 1px solid var(--primary, #2563eb);
    color: #ffffff;
    padding: 0.65rem 1.45rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 750;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
    line-height: normal;
}

.btn-modal-submit:hover,
.btn-pro-modal-save:hover,
#btn-submit-partner-modal:hover {
    background: var(--primary-hover, #1d4ed8);
    border-color: var(--primary-hover, #1d4ed8);
}

/* =============================================================================
   6. MODAL DE CARTAZ FULLSCREEN (LIGHTBOX)
   ============================================================================= */
.tournament-hero-poster-box.is-clickable {
    cursor: pointer;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.tournament-hero-poster-zoom-cue {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    opacity: 0.85;
    pointer-events: none;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.tournament-hero-poster-box:hover .tournament-hero-poster-zoom-cue {
    opacity: 1;
    background: rgba(15, 23, 42, 0.85);
}

@media (max-width: 480px) {
    .tournament-hero-poster-zoom-cue {
        width: 24px;
        height: 24px;
        bottom: 6px;
        right: 6px;
        border-radius: 6px;
    }
    .tournament-hero-poster-zoom-cue svg {
        width: 12px;
        height: 12px;
    }
}

.tournament-poster-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow: hidden !important;
    touch-action: none !important;
    overscroll-behavior: none !important;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.tournament-poster-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

html.poster-modal-open,
body.poster-modal-open {
    overflow: hidden !important;
    height: 100% !important;
    touch-action: none !important;
    overscroll-behavior: none !important;
    -webkit-overflow-scrolling: auto !important;
}

.tournament-poster-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 17, 32, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    touch-action: none !important;
    overscroll-behavior: none !important;
}

.tournament-poster-modal-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 95vw;
    max-height: 94vh;
    max-height: 94dvh;
    overflow: hidden !important;
    box-sizing: border-box;
    touch-action: none !important;
    overscroll-behavior: none !important;
}

.tournament-poster-modal-close {
    position: absolute;
    top: -46px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    z-index: 3;
    padding: 0;
}

.tournament-poster-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.tournament-poster-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: calc(94dvh - 50px);
    overflow: hidden !important;
    box-sizing: border-box;
    touch-action: none !important;
}

.tournament-poster-modal-img {
    max-width: min(88vw, 680px);
    max-height: calc(88dvh - 70px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: none !important;
}

.tournament-poster-modal-caption {
    margin-top: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    font-weight: 700;
    text-align: center;
    max-width: 90vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .tournament-poster-modal-overlay {
        padding: 0.75rem;
    }
    .tournament-poster-modal-close {
        top: -42px;
        right: 4px;
        width: 36px;
        height: 36px;
    }
    .tournament-poster-modal-img {
        max-width: 92vw;
        max-height: calc(88dvh - 65px);
        border-radius: 12px;
    }
    .tournament-poster-modal-caption {
        font-size: 0.8rem;
        margin-top: 0.5rem;
    }
}
