/* ==========================================================================
   SCOGLIO - Coppa Scoglio
   Palette: pietra/roccia + blu mare, accento arancio per l'esito qualificazione
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700;9..144,900&family=Inter:wght@400;500;600;700&display=swap');

.sco-container {
    --sco-stone: #44403c;
    --sco-stone-dark: #221f1a;
    --sco-sea: #0891b2;
    --sco-coral: #e8590c;
    --sco-coral-dark: #c24a08;
    --sco-cream: #f5f4f2;
    --sco-ink: #211f1c;
    --sco-muted: #6f6a63;
    --sco-white: #ffffff;
    --sco-line: #e7e3dc;

    max-width: 1100px;
    margin: 28px auto;
    padding: 0 16px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--sco-ink);
}

.sco-error {
    background: #fdecea;
    color: #8c1d17;
    padding: 18px 22px;
    border-radius: 12px;
    border: 1px solid #f3c6c2;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
}

.sco-empty {
    background: var(--sco-cream);
    border: 2px dashed var(--sco-line);
    border-radius: 14px;
    padding: 26px 20px;
    color: var(--sco-muted);
    font-style: italic;
    text-align: center;
}

/* ---------------------------------------------------------------------- */
/* Titolo generale                                                         */
/* ---------------------------------------------------------------------- */

.sco-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 22px;
}

.sco-trophy {
    font-size: 24px;
}

.sco-title h2 {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 900;
    font-size: 28px;
    letter-spacing: -0.01em;
    color: var(--sco-stone-dark);
}

/* ---------------------------------------------------------------------- */
/* Tabellone SVG                                                           */
/* ---------------------------------------------------------------------- */

.sco-bracket-wrapper {
    background: var(--sco-white);
    border-radius: 16px;
    border: 1px solid var(--sco-line);
    padding: 16px 12px;
    margin-bottom: 40px;
    box-shadow: 0 8px 22px rgba(34, 31, 26, 0.06);
    overflow-x: auto;
}

.sco-bracket-svg {
    display: block;
    width: 100%;
    height: auto;
    min-width: 640px;
}

.sco-bracket-line {
    stroke: var(--sco-sea);
}

.sco-bracket-label {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 700;
    font-size: 17px;
    fill: var(--sco-stone-dark);
}

/* ---------------------------------------------------------------------- */
/* Sezione                                                                 */
/* ---------------------------------------------------------------------- */

.sco-section {
    margin-bottom: 40px;
}

.sco-section-title {
    margin: 0 0 18px 4px;
    text-align: center;
}

.sco-section-title h3 {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 800;
    font-size: 30px;
    letter-spacing: 0.01em;
    color: var(--sco-stone-dark);
}

/* ---------------------------------------------------------------------- */
/* Tabella                                                                 */
/* ---------------------------------------------------------------------- */

.sco-table-wrapper {
    background: var(--sco-white);
    border-radius: 16px;
    border: 1px solid var(--sco-line);
    overflow: hidden;
    overflow-x: auto;
    box-shadow: 0 8px 22px rgba(34, 31, 26, 0.06);
    margin-bottom: 14px;
}

.sco-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 540px;
}

.sco-table thead th {
    background: var(--sco-stone);
    color: #ffffff;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 13px 14px;
    text-align: center;
    white-space: nowrap;
}

.sco-table thead th.sco-col-team {
    text-align: left;
}

.sco-table td {
    padding: 12px 14px;
    text-align: center;
    border-bottom: 1px solid var(--sco-line);
    color: var(--sco-ink);
}

.sco-table td.sco-col-team {
    text-align: left;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 14.5px;
    color: var(--sco-stone-dark);
}

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

.sco-table tbody tr:nth-child(even) {
    background: var(--sco-cream);
}

/* ---------------------------------------------------------------------- */
/* Squadra qualificata                                                     */
/* ---------------------------------------------------------------------- */

.sco-qualified {
    background: linear-gradient(135deg, var(--sco-coral) 0%, var(--sco-coral-dark) 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 13px 20px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 8px 18px rgba(232, 89, 12, 0.28);
}

.sco-qualified-name {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 800;
    font-size: 15.5px;
    letter-spacing: 0.01em;
}

/* ---------------------------------------------------------------------- */
/* Responsive                                                              */
/* ---------------------------------------------------------------------- */

@media (max-width: 620px) {
    .sco-title h2 {
        font-size: 22px;
    }
}
