.idt-tournament-tabs,
.idt-draw-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.idt-tournament-tabs a,
.idt-draw-navigation a {
    padding: 11px 18px;
    border: 1px solid rgba(120, 150, 135, .35);
    border-radius: 12px;
    color: inherit;
    font-weight: 750;
    text-decoration: none;
}

.idt-tournament-tabs a[aria-current="page"] {
    background: #176943;
    border-color: #176943;
    color: #fff;
}

.idt-draw-category {
    margin: 20px 0;
    border: 1px solid rgba(120, 150, 135, .35);
    border-radius: 18px;
    scroll-margin-top: 110px;
}

.idt-draw-category summary {
    padding: 20px;
    cursor: pointer;
    font-weight: 800;
}

.idt-draw-category summary span {
    margin-left: 12px;
    font-size: .78rem;
    opacity: .7;
}

.idt-draw-scroll {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 8px 20px 24px;
}

.idt-draw-round {
    flex: 0 0 285px;
    min-width: 0;
}

.idt-draw-round h3 {
    margin: 0 0 18px;
    padding: 12px;
    border-bottom: 2px solid #48a873;
    font-size: .92rem;
}

.idt-draw-round-matches {
    display: grid;
    gap: 14px;
}

.idt-draw-match {
    overflow: hidden;
    border: 1px solid rgba(120, 150, 135, .35);
    border-radius: 12px;
    background: rgba(120, 150, 135, .06);
}

.idt-draw-italian {
    border-left: 3px solid #48a873;
}

.idt-draw-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    font-size: .68rem;
    opacity: .8;
}

.idt-draw-player {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    padding: 10px 12px;
    border-top: 1px solid rgba(120, 150, 135, .18);
    font-size: .85rem;
}

.idt-draw-country {
    flex: 0 0 28px;
    font-size: .7rem;
}

.idt-draw-name {
    flex: 1;
    overflow-wrap: anywhere;
}

.idt-draw-player-italian {
    background: rgba(72, 168, 115, .12);
}

.idt-draw-winner {
    font-weight: 850;
}

.idt-draw-pending {
    opacity: .6;
    font-style: italic;
}

.idt-draw-result {
    padding: 10px 12px;
    border-top: 1px solid rgba(120, 150, 135, .18);
    font-size: .8rem;
    font-weight: 750;
}

@media (max-width: 600px) {
    .idt-draw-round {
        flex-basis: 255px;
    }

    .idt-draw-scroll {
        gap: 14px;
        padding: 8px 12px 18px;
    }
}

.idt-draw-detail-link {
    display: block;
    padding: 9px;
    margin-top: 6px;
    border: 1px solid #21865370;
    border-radius: 8px;
    text-align: center;
    font-size: .82rem;
    font-weight: 700;
    color: inherit;
    text-decoration: none;
}

.idt-draw-detail-link:hover {
    background: #21865315;
}

/* Readable tournament navigation on light backgrounds */
.atp-tournament-link {
    color: #176943;
}

/* Draw section inside the dark Grand Slam page */
.slam-body .idt-draws {
    color: #f1f5f2;
}

.slam-body .idt-draws .atp-section-heading h2 {
    color: #f1f5f2;
}

.slam-body .idt-draws .atp-section-heading p {
    color: #c1cec5;
}

.slam-body .idt-draws .atp-kicker {
    color: #79dda3;
}

.slam-body .idt-draws .atp-empty {
    background: #18271e;
    border: 1px solid #35483c;
    color: #f1f5f2;
}

.slam-body .idt-draws .atp-empty strong {
    color: #f1f5f2;
}

.slam-body .idt-draws .atp-empty p {
    color: #c1cec5;
}

.slam-body .idt-draw-round h3 {
    color: #f1f5f2;
}

.slam-body .idt-draw-detail-link {
    color: #79dda3;
}

.idt-tournament-period {
    margin: 8px 0;
    color: #176943;
    font-size: .95rem;
    font-weight: 750;
}

.slam-body .idt-tournament-period {
    color: #a9e8c1;
}

.idt-draw-empty {
    padding: 24px;
    line-height: 1.65;
}

.idt-draw-empty p {
    margin: 8px 0 0;
}

.idt-tournament-prize {
    color: #172b21;
    margin: 12px 0;
}

.idt-tournament-archive {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin: 20px 0;
    padding: 18px;
    background: #e6efe8;
    border: 1px solid #b8d2bf;
    border-radius: 12px;
    color: #172b21;
}

.idt-tournament-archive strong {
    color: #172b21;
    font-size: 1.05rem;
}

.idt-tournament-archive p {
    margin: 5px 0 0;
    color: #46564d;
    font-size: .88rem;
}

.idt-tournament-archive a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 16px;
    background: #176943;
    color: #fff;
    border-radius: 9px;
    font-weight: 750;
    text-decoration: none;
}

@media (max-width: 600px) {
    .idt-tournament-archive a {
        width: 100%;
        justify-content: center;
    }
}

.idt-previous-champion {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 12px;
}

.idt-champion-label {
    color: #46564d;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.idt-previous-champion strong {
    color: #176943;
    font-size: 1.15rem;
}

.idt-previous-champion p {
    margin: 0;
}

/* Edizione precedente: approfondimento secondario */

.atp-page .idt-tournament-archive {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 14px 0 20px;
    padding: 12px 14px;
    background: #e9eee7;
    border: 1px solid #d5ded3;
    border-radius: 10px;
    color: #46564d;
    box-shadow: none;
}

.atp-page .idt-tournament-archive > div {
    flex: 1 1 220px;
    min-width: 0;
}

.atp-page .idt-tournament-archive strong {
    color: #172b21;
    font-size: .9rem;
}

.atp-page .idt-tournament-archive p {
    margin: 4px 0 0;
    color: #52635a;
    font-size: .78rem;
}

.atp-page .idt-tournament-archive .idt-previous-champion {
    margin-top: 5px;
    padding: 0;
    background: transparent;
    border: 0;
}

.atp-page .idt-tournament-archive .idt-champion-label {
    color: #52635a;
    font-size: .7rem;
}

.atp-page .idt-tournament-archive > a,
.atp-page .idt-tournament-archive > a:hover {
    display: inline-block;
    width: auto;
    min-height: 0;
    padding: 8px 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: #176943;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 720px) {
    .atp-page .idt-tournament-archive {
        padding: 10px 12px;
        gap: 4px;
    }
}

/* Programma torneo: incontri per giornata */

.atp-page .idt-program-day {
    margin: 20px 0 28px;
}

.atp-page .idt-program-date {
    margin: 0 0 12px;
    padding: 10px 14px;
    background: #e3ebe2;
    border-left: 4px solid #176943;
    border-radius: 6px;
    color: #172b21;
    font-size: 1rem;
    font-weight: 750;
}

.atp-page .idt-program-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit, minmax(min(100%, 290px), 1fr)
    );
    gap: 12px;
}

.atp-page .idt-program-grid .match-card {
    background: #ffffff;
    color: #172b21;
    border: 1px solid #d5ded3;
    border-radius: 12px;
    padding: 15px;
    box-shadow: none;
}

.atp-page .idt-program-grid .match-top {
    color: #52635a;
    font-size: .78rem;
    margin-bottom: 12px;
}

.atp-page .idt-program-grid .status-next {
    background: #e3ebe2;
    color: #176943;
    border-radius: 6px;
    padding: 5px 8px;
}

.atp-page .idt-program-grid .match-player {
    color: #172b21;
    padding: 8px 0;
}

.atp-page .idt-program-grid .match-player strong {
    color: #172b21;
    overflow-wrap: anywhere;
}

.atp-page .idt-program-grid .match-player a strong {
    color: #176943;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.atp-page .idt-program-grid .match-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e3ebe2;
    color: #46564d;
}

@media (max-width: 720px) {
    .atp-page .idt-program-grid {
        grid-template-columns: 1fr;
    }

    .atp-page .idt-program-grid .match-card {
        padding: 12px;
    }
}

/* Programma torneo - layout editoriale compatto */

.atp-page .idt-program-day {
    margin: 20px 0 26px;
}

.atp-page .idt-program-date {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0 0 10px;
    margin: 0;
    color: #172b21;
    font-size: .88rem;
    font-weight: 750;
}

.atp-page .idt-program-grid {
    display: block;
    background: #fff;
    border: 1px solid #dce2dd;
    border-radius: 10px;
    overflow: hidden;
}

.atp-page .idt-program-grid .match-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto 16px;
    align-items: center;
    gap: 14px;
    background: #fff;
    color: #172b21;
    border: 0;
    border-bottom: 1px solid #e8ece8;
    border-radius: 0;
    margin: 0;
    padding: 12px 16px;
    min-height: 0;
    box-shadow: none;
    cursor: pointer;
}

.atp-page .idt-program-grid .match-card:last-child {
    border-bottom: 0;
}

.atp-page .idt-program-grid .match-card:hover {
    background: #f7f9f7;
    transform: none;
}

.atp-page .idt-program-time {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    border-right: 1px solid #e8ece8;
    padding-right: 10px;
    text-align: center;
    font-size: .82rem;
    color: #52635a;
    font-variant-numeric: tabular-nums;
}

.atp-page .idt-program-time strong {
    color: #263b30;
    font-size: .92rem;
}

.atp-page .idt-program-players {
    min-width: 0;
}

.atp-page .idt-program-round {
    display: block;
    margin-bottom: 5px;
    color: #65736b;
    font-size: .68rem;
    font-weight: 650;
}

.atp-page .idt-program-grid .match-player {
    display: block;
    margin: 0;
    padding: 3px 0;
    background: transparent;
    border: 0;
    min-height: 0;
}

.atp-page .idt-program-grid .match-player strong {
    color: #172b21;
    font-size: .9rem;
    font-weight: 650;
    line-height: 1.4;
}

.atp-page .idt-program-grid .match-player a strong {
    color: #172b21;
    text-decoration: none;
}

.atp-page .idt-program-grid .match-player a:hover strong,
.atp-page .idt-program-grid .match-player a:focus-visible strong {
    color: #176943;
    text-decoration: underline;
}

.atp-page .idt-program-result {
    grid-column: 3;
    color: #263b30;
    font-size: .82rem;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    max-width: 180px;
    overflow-wrap: anywhere;
}

.atp-page .idt-program-chevron {
    grid-column: 4;
    grid-row: 1;
    color: #7b8880;
    font-size: 1.5rem;
    font-weight: 400;
}

@media (max-width: 720px) {
    .atp-page .idt-program-grid .match-card {
        grid-template-columns: 52px minmax(0, 1fr) 12px;
        gap: 9px;
        padding: 10px;
    }

    .atp-page .idt-program-time {
        padding-right: 6px;
        font-size: .68rem;
    }

    .atp-page .idt-program-time strong {
        font-size: .8rem;
    }

    .atp-page .idt-program-grid .match-player strong {
        font-size: .82rem;
    }

    .atp-page .idt-program-result {
        grid-column: 2;
        font-size: .76rem;
        max-width: none;
    }

    .atp-page .idt-program-chevron {
        grid-column: 3;
        grid-row: 1;
    }
}

.atp-page .idt-program-country {
    display: inline-block;
    min-width: 29px;
    margin-right: 7px;
    color: #65736b;
    font-size: .65rem;
    font-weight: 650;
    letter-spacing: .03em;
    vertical-align: baseline;
}

.atp-page .idt-program-grid .match-player > div {
    display: flex;
    align-items: baseline;
    gap: 3px;
    min-width: 0;
}

.atp-page .idt-program-grid .match-player a {
    min-width: 0;
}

.atp-page .idt-program-grid .match-player a strong {
    text-decoration: underline;
    text-decoration-color: #b6c4ba;
    text-underline-offset: 3px;
}

@media (max-width: 720px) {
    .atp-page .idt-program-country {
        min-width: 23px;
        margin-right: 3px;
        font-size: .6rem;
    }
}

.idt-program-rank {
    display: inline-block;
    min-width: 32px;
    margin-right: 5px;
    padding: 2px 5px;
    border-radius: 4px;
    background: #eaf2ec;
    color: #176345;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}

.idt-program-rank:hover {
    background: #176345;
    color: #fff;
}

.idt-program-rank:focus-visible {
    outline: 2px solid #176345;
    outline-offset: 2px;
}

/* IDT - Informazioni sul torneo */

.idt-tournament-information {
    background: #fff;
    border: 1px solid #dce5dd;
    border-radius: 16px;
    padding: 24px;
    margin: 20px 0;
}

.idt-tournament-information h2 {
    font-size: 21px;
    margin: 0 0 18px;
}

.idt-tournament-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 0;
}

.idt-tournament-facts > div {
    padding: 14px;
    background: #f1f6f2;
    border-radius: 10px;
}

.idt-tournament-facts dt {
    font-size: 12px;
    font-weight: 600;
    color: #62776b;
    margin-bottom: 7px;
}

.idt-tournament-facts dd {
    font-size: 16px;
    font-weight: 750;
    color: #193e2c;
    margin: 0;
}

@media (max-width: 600px) {
    .idt-tournament-information {
        padding: 16px;
    }

    .idt-tournament-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
