/* =============================================================================
   ESTILOS DA ABA 5: REGULAMENTO E FORMATOS DE JOGO
   Caminho: front/pages/tournament/css/regulamento.css
   ============================================================================= */

.tournament-regulamento-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.tournament-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary, #2563eb);
}

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

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

/* Tabela de Formatos de Regras (Desktop) */
.rules-desktop-only {
    display: block;
}

.rules-table-responsive {
    width: 100%;
    overflow-x: auto;
}

.rules-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}

.rules-table th {
    background: var(--bg-input, #f1f5f9);
    color: var(--text-muted, #475569);
    font-weight: 750;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}

.rules-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-main, #0f172a);
    vertical-align: middle;
}

.rules-table tbody tr:last-child td {
    border-bottom: none;
}

.td-category-pill {
    width: 90px;
}

.cat-pill-badge {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary, #2563eb);
    padding: 0.3rem 0.65rem;
    border-radius: 8px;
    font-weight: 800;
    font-family: 'Manrope', sans-serif;
    font-size: 0.8rem;
    display: inline-block;
}

.rule-status-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 750;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
}

.rule-status-badge.is-active,
.rule-status-badge.is-golden {
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
}

.rule-status-badge.is-advantage {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
}

/* Cards de Formatos de Jogo (Mobile) */
.rules-mobile-cards {
    display: none;
    flex-direction: column;
    gap: 0.85rem;
}

.rules-cat-card {
    background: #ffffff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 14px;
    padding: 0.95rem 1rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rules-cat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border-color, #f1f5f9);
}

.rules-cat-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.rules-cat-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    font-family: 'Manrope', sans-serif;
    letter-spacing: -0.01em;
}

.rules-cat-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
}

.rules-spec-item {
    background: var(--bg-input, #f8fafc);
    border: 1px solid var(--border-color, #f1f5f9);
    border-radius: 10px;
    padding: 0.6rem 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    box-sizing: border-box;
}

.rules-spec-label {
    font-size: 0.68rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted, #64748b);
}

.rules-spec-val {
    font-size: 0.825rem;
    font-weight: 700;
    color: var(--text-main, #0f172a);
    line-height: 1.35;
    word-break: break-word;
}

/* Grelha de Critérios de Desempate */
.tiebreak-rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.tiebreak-rule-item {
    background: var(--bg-input, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    box-sizing: border-box;
}

.rule-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary, #2563eb);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rule-step-content {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.rule-step-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    margin: 0;
}

.rule-step-desc {
    font-size: 0.825rem;
    color: var(--text-muted, #64748b);
    line-height: 1.45;
    margin: 0;
}

/* Lista de Regras Gerais */
.general-rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.general-rules-list li {
    font-size: 0.9rem;
    color: var(--text-main, #0f172a);
    line-height: 1.6;
    padding-left: 1.25rem;
    position: relative;
}

.general-rules-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary, #2563eb);
}

.general-rules-list strong {
    color: var(--text-main, #0f172a);
}

/* 4. Grelha de Comissão Organizadora */
.regulamento-organizers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.regulamento-organizer-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    box-sizing: border-box;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.regulamento-organizer-card:hover {
    border-color: #cbd5e1;
    background: var(--bg-hover, #f8fafc);
}

.regulamento-avatar-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(37, 99, 235, 0.08);
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.regulamento-avatar-wrap.is-manager {
    background: rgba(14, 165, 233, 0.08);
}

.regulamento-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.regulamento-avatar-initial {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary, #2563eb);
    font-family: 'Manrope', sans-serif;
}

.regulamento-avatar-wrap.is-manager .regulamento-avatar-initial {
    color: #0284c7;
}

.regulamento-organizer-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}

.regulamento-role-tag {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary, #2563eb);
}

.regulamento-role-tag.is-manager {
    color: #0284c7;
}

.regulamento-organizer-name {
    font-size: 1rem;
    font-weight: 750;
    color: var(--text-main, #0f172a);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.regulamento-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.825rem;
    color: var(--text-muted, #64748b);
    text-decoration: none;
    margin-top: 0.15rem;
    transition: color 0.15s ease;
    word-break: break-all;
}

.regulamento-contact-link:hover {
    color: var(--primary, #2563eb);
}

/* =============================================================================
   RESPONSIVIDADE (MOBILE & TABLET)
   ============================================================================= */

@media (max-width: 768px) {
    .rules-desktop-only {
        display: none !important;
    }

    .rules-mobile-cards {
        display: flex !important;
    }

    .tiebreak-rules-grid {
        grid-template-columns: 1fr;
    }

    .regulamento-organizers-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .rules-cat-specs-grid {
        grid-template-columns: 1fr;
    }
}

