/* ==========================================================
   CHAMPIONSHIP PUBLIC V4
   ========================================================== */

:root {
    --cp-red: #e10600;
    --cp-black: #15151b;
    --cp-bg: #f5f5f6;
    --cp-white: #ffffff;
    --cp-border: #dedee2;
    --cp-muted: #7f7f88;
    --cp-width: min(1600px, calc(100% - 72px));
}


* {
    box-sizing: border-box;
}


body.champ-public-page {
    margin: 0;

    background: var(--cp-bg);

    color: var(--cp-black);
}


/* ==========================================================
   HERO
   ========================================================== */

.cp-hero {
    position: relative;

    background:
        radial-gradient(
            circle at 82% 15%,
            rgba(225,6,0,.05),
            transparent 28%
        ),
        linear-gradient(
            115deg,
            #ffffff,
            #fafafa 65%,
            #f2f2f3
        );

    border-bottom: 1px solid var(--cp-border);
}


.cp-hero-grid {
    width: var(--cp-width);
    min-height: 500px;

    margin: 0 auto;

    display: grid;
    grid-template-columns:
        minmax(520px, 1fr)
        minmax(460px, .95fr);

    align-items: center;

    gap: 70px;
}


.cp-hero-copy {
    padding: 55px 0 50px;
}


.cp-eyebrow {
    margin-bottom: 12px;

    color: var(--cp-red);

    font-size: 12px;
    font-weight: 1000;
    letter-spacing: .14em;
}


.cp-hero h1 {
    max-width: 760px;

    margin: 0;

    color: var(--cp-black);

    font-size: clamp(58px, 5.7vw, 92px);
    font-weight: 1000;
    line-height: .92;
    letter-spacing: -.065em;

    text-transform: uppercase;
}


.cp-season-pills {
    display: flex;
    gap: 10px;

    margin-top: 24px;
}


.cp-season-pills span {
    padding: 8px 14px;

    background: #fff;

    border: 1px solid #d6d6da;
    border-radius: 20px;

    color: var(--cp-black);

    font-size: 10px;
    font-weight: 900;
}


/* Next round */

.cp-next-event {
    width: min(600px, 100%);

    margin-top: 48px;

    display: grid;
    grid-template-columns:
        116px
        minmax(0, 1fr);

    border-top: 1px solid #d8d8dc;
}


.cp-round {
    min-height: 118px;

    padding: 17px 20px 12px 0;

    display: flex;
    flex-direction: column;
    justify-content: center;

    border-right: 3px solid var(--cp-red);
}


.cp-round span,
.cp-label {
    color: #777780;

    font-size: 9px;
    font-weight: 1000;
    letter-spacing: .10em;
}


.cp-round strong {
    margin-top: 4px;

    font-size: 46px;
    font-weight: 1000;
    line-height: .9;
}


.cp-next-main {
    padding: 17px 0 10px 27px;
}


.cp-label {
    color: var(--cp-red);
}


.cp-next-main h2 {
    margin: 4px 0 2px;

    font-size: 24px;
    font-weight: 1000;
    line-height: 1;

    text-transform: uppercase;
}


.cp-next-main p {
    margin: 0;

    color: #777780;

    font-size: 11px;
}


.cp-event-datetime {
    display: flex;

    margin-top: 13px;
}


.cp-event-datetime > span {
    min-height: 33px;

    padding: 0 12px;

    display: inline-flex;
    align-items: center;
    gap: 7px;

    font-size: 10px;
    font-weight: 1000;

    font-variant-numeric: tabular-nums;
}


.cp-event-date {
    background: #fff;

    border: 1px solid #d6d6da;

    color: var(--cp-black);
}


.cp-event-time {
    background: var(--cp-red);

    border: 1px solid var(--cp-red);

    color: #fff;
}


/* Track */

.cp-track {
    position: relative;

    min-height: 400px;

    display: flex;
    align-items: center;
    justify-content: center;
}


.cp-track img {
    position: relative;
    z-index: 2;

    width: min(100%, 620px);
    max-height: 365px;

    object-fit: contain;

    filter:
        grayscale(1)
        contrast(1.3);

    opacity: .86;
}


.cp-track-year {
    position: absolute;
    right: -15px;
    bottom: -10px;

    color: rgba(21,21,27,.025);

    font-size: clamp(100px, 14vw, 220px);
    font-weight: 1000;
    line-height: .8;
}


/* ==========================================================
   STATS
   ========================================================== */

.cp-stats {
    position: relative;
    z-index: 4;

    width: var(--cp-width);
    min-height: 100px;

    margin: -1px auto 0;

    display: grid;
    grid-template-columns:
        1fr
        .8fr
        .8fr
        .8fr
        1.8fr;

    background: #fff;

    border: 1px solid var(--cp-border);
    border-radius: 5px;

    box-shadow:
        0 9px 27px rgba(21,21,27,.07);

    overflow: hidden;
}


.cp-stat {
    position: relative;

    min-width: 0;

    padding: 22px 24px;

    display: flex;
    align-items: center;
    gap: 15px;

    border-right: 1px solid var(--cp-border);
}


.cp-stat:last-child {
    border-right: 0;
}


.cp-stat-icon {
    color: var(--cp-red);

    font-size: 24px;
    line-height: 1;
}


.cp-stat span {
    display: block;

    margin-bottom: 5px;

    color: #85858e;

    font-size: 9px;
    font-weight: 900;
    letter-spacing: .10em;
}


.cp-stat strong {
    overflow: hidden;

    display: block;

    color: var(--cp-black);

    font-size: 16px;
    font-weight: 1000;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.cp-stat-leader::after {
    content: "";

    position: absolute;
    right: -20px;
    bottom: -55px;

    width: 115px;
    height: 115px;

    background: rgba(225,6,0,.075);

    border-radius: 50%;
}


.cp-stat-leader strong {
    color: var(--cp-red);
}


/* ==========================================================
   MAIN
   ========================================================== */

.cp-main {
    width: var(--cp-width);

    margin: 20px auto 0;
}


.cp-overview {
    display: grid;
    grid-template-columns:
        1fr
        1fr
        1fr;

    gap: 18px;
}


/* ==========================================================
   CARDS
   ========================================================== */

.cp-card {
    overflow: hidden;

    background: #fff;

    border: 1px solid var(--cp-border);
    border-top: 3px solid var(--cp-black);

    border-radius: 4px;

    box-shadow:
        0 7px 22px rgba(21,21,27,.055);
}


.cp-card-head {
    min-height: 62px;

    padding: 0 19px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    border-bottom: 1px solid var(--cp-border);
}


.cp-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
}


.cp-card-icon {
    color: var(--cp-red);

    font-size: 18px;
}


.cp-card-head h2 {
    margin: 0;

    font-size: 15px;
    font-weight: 1000;
    letter-spacing: -.02em;
}


.cp-card-action {
    color: var(--cp-red);

    font-size: 9px;
    font-weight: 900;
}


/* ==========================================================
   CALENDAR
   ========================================================== */

.cp-calendar-row {
    min-height: 70px;

    display: grid;
    grid-template-columns:
        67px
        minmax(0, 1fr)
        70px;

    align-items: center;

    color: inherit;
    text-decoration: none;

    border-bottom: 1px solid #e7e7ea;

    transition: background .15s ease;
}


.cp-calendar-row:hover {
    background: #f7f7f8;
}


.cp-calendar-number {
    height: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border-right: 1px solid #e1e1e4;
}


.cp-calendar-number strong {
    font-size: 23px;
    font-weight: 1000;
    line-height: .9;
}


.cp-calendar-number span {
    margin-top: 5px;

    color: #777780;

    font-size: 8px;
    font-weight: 900;
}


.cp-calendar-event {
    padding: 0 14px;

    min-width: 0;
}


.cp-calendar-event strong,
.cp-calendar-event span {
    overflow: hidden;

    display: block;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.cp-calendar-event strong {
    font-size: 12px;
    font-weight: 1000;
}


.cp-calendar-event span {
    margin-top: 3px;

    color: #7e7e86;

    font-size: 9px;
}


.cp-calendar-time {
    padding-right: 12px;

    justify-self: end;

    font-size: 10px;
    font-weight: 1000;
}


.cp-calendar-row.is-next {
    background: var(--cp-red);

    color: #fff;
}


.cp-calendar-row.is-next .cp-calendar-number {
    border-color: rgba(255,255,255,.25);
}


.cp-calendar-row.is-next .cp-calendar-number span,
.cp-calendar-row.is-next .cp-calendar-event span {
    color: rgba(255,255,255,.82);
}


.cp-event-sessions {
    padding: 8px 13px 10px;

    background: #f5f5f6;

    border-bottom: 1px solid var(--cp-border);
}


.cp-event-sessions > div {
    min-height: 27px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid #e4e4e7;

    font-size: 9px;
}


.cp-event-sessions > div:last-child {
    border-bottom: 0;
}


.cp-event-sessions strong {
    color: var(--cp-red);

    font-variant-numeric: tabular-nums;
}


/* ==========================================================
   STANDINGS
   ========================================================== */

.cp-table-head,
.cp-standing-row {
    display: grid;

    align-items: center;
}


.cp-driver-grid {
    grid-template-columns:
        54px
        minmax(0, 1fr)
        70px;
}


.cp-team-grid {
    grid-template-columns:
        54px
        minmax(0, 1fr)
        70px;
}


.cp-table-head {
    min-height: 33px;

    padding: 0 15px;

    background: #f5f5f6;

    border-bottom: 1px solid var(--cp-border);

    color: #85858d;

    font-size: 8px;
    font-weight: 900;
}


.cp-table-head span:last-child {
    text-align: right;
}


.cp-standing-row {
    min-height: 58px;

    padding: 0 15px;

    border-bottom: 1px solid #e7e7e9;
}


.cp-standing-row:last-child {
    border-bottom: 0;
}


.cp-standing-row.is-leader {
    background:
        linear-gradient(
            90deg,
            rgba(225,6,0,.06),
            transparent 72%
        );
}


.cp-pos {
    font-size: 17px;
    font-weight: 1000;
}


.is-leader .cp-pos {
    color: var(--cp-red);
}


.cp-driver-name {
    min-width: 0;

    display: grid;
    grid-template-columns:
        41px
        minmax(0, 1fr);

    align-items: center;
}


.cp-driver-name span {
    color: var(--cp-red);

    font-size: 9px;
    font-weight: 900;
}


.cp-driver-name strong {
    overflow: hidden;

    font-size: 10px;
    font-weight: 1000;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.cp-team-name {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 9px;
}


.cp-team-name i,
.cp-latest-team i {
    flex: 0 0 auto;

    width: 3px;
    height: 21px;

    background: var(--team-color);
}


.cp-team-name strong {
    overflow: hidden;

    font-size: 10px;
    font-style: normal;
    font-weight: 1000;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.cp-points {
    justify-self: end;

    font-size: 13px;
    font-weight: 1000;

    font-variant-numeric: tabular-nums;
}


/* ==========================================================
   LATEST SESSION
   ========================================================== */

.cp-latest {
    margin-top: 18px;
}


.cp-latest-grid {
    display: grid;
    grid-template-columns:
        300px
        minmax(0, 1fr);
}


.cp-latest-event {
    position: relative;

    padding: 23px 20px;

    background:
        linear-gradient(
            130deg,
            #f4f4f5,
            #ffffff
        );

    border-right: 1px solid var(--cp-border);
}


.cp-latest-event > span {
    color: var(--cp-red);

    font-size: 9px;
    font-weight: 1000;
}


.cp-latest-event h3 {
    margin: 4px 0 14px;

    font-size: 19px;
    font-weight: 1000;

    text-transform: uppercase;
}


.cp-latest-circuit {
    display: flex;
    align-items: center;
    gap: 10px;
}


.cp-latest-circuit img {
    width: 27px;
    height: 18px;

    object-fit: cover;

    border: 1px solid #d6d6da;
}


.cp-latest-circuit div {
    display: flex;
    flex-direction: column;
}


.cp-latest-circuit strong {
    font-size: 10px;
}


.cp-latest-circuit small {
    margin-top: 2px;

    color: #85858c;

    font-size: 7px;
    font-weight: 900;
}


.cp-latest-date {
    margin-top: 19px;

    color: #777780;

    font-size: 9px;
    font-weight: 900;
}


.cp-latest-head,
.cp-latest-row {
    display: grid;
    grid-template-columns:
        55px
        minmax(220px, 1.2fr)
        minmax(180px, .8fr)
        70px;

    align-items: center;

    padding: 0 18px;
}


.cp-latest-head {
    min-height: 34px;

    background: #f5f5f6;

    border-bottom: 1px solid var(--cp-border);

    color: #85858d;

    font-size: 8px;
    font-weight: 900;
}


.cp-latest-head span:last-child {
    text-align: right;
}


.cp-latest-row {
    min-height: 55px;

    border-bottom: 1px solid #e6e6e8;
}


.cp-latest-row:last-child {
    border-bottom: 0;
}


.cp-latest-row.is-winner {
    background:
        linear-gradient(
            90deg,
            rgba(225,6,0,.06),
            transparent 70%
        );
}


.cp-latest-team {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 9px;

    color: #606068;

    font-size: 9px;
}


.cp-latest-points {
    justify-self: end;

    color: var(--cp-black);

    font-size: 13px;
    font-weight: 1000;
}


.cp-latest-row.is-winner .cp-latest-points {
    color: var(--cp-red);
}


.cp-no-results {
    min-height: 140px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


.cp-no-results span {
    color: var(--cp-red);

    font-size: 8px;
    font-weight: 1000;
}


.cp-no-results strong {
    margin-top: 4px;

    font-size: 19px;
    font-weight: 1000;
}


.cp-no-results p {
    margin: 6px 0 0;

    color: #85858c;

    font-size: 10px;
}


.cp-empty {
    min-height: 105px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #85858d;

    font-size: 9px;
    font-weight: 900;
}


/* ==========================================================
   FOOTER
   ========================================================== */

.cp-footer {
    width: var(--cp-width);
    min-height: 110px;

    margin: 28px auto 0;

    padding: 26px 0 45px;

    display: flex;
    justify-content: space-between;

    border-top: 1px solid #d8d8dc;

    color: #85858d;

    font-size: 9px;
    font-weight: 800;
}


.cp-footer > div:first-child {
    display: flex;
    flex-direction: column;
}


.cp-footer strong {
    color: var(--cp-black);

    font-size: 11px;
}


.cp-footer span {
    margin-top: 3px;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 1200px) {

    .cp-hero-grid {
        grid-template-columns:
            1fr
            .8fr;
    }

    .cp-overview {
        grid-template-columns:
            1fr
            1fr;
    }

    .cp-overview .cp-card:last-child {
        grid-column: 1 / -1;
    }

    .cp-stats {
        grid-template-columns:
            repeat(4, 1fr);
    }

    .cp-stat-leader {
        grid-column: 1 / -1;

        border-top: 1px solid var(--cp-border);
    }

}


@media (max-width: 800px) {

    :root {
        --cp-width:
            calc(100% - 28px);
    }

    .cp-hero-grid {
        grid-template-columns: 1fr;
    }

    .cp-track {
        min-height: 260px;
    }

    .cp-track img {
        max-height: 240px;
    }

    .cp-overview {
        grid-template-columns: 1fr;
    }

    .cp-overview .cp-card:last-child {
        grid-column: auto;
    }

    .cp-stats {
        grid-template-columns:
            1fr
            1fr;
    }

    .cp-stat-leader {
        grid-column: 1 / -1;
    }

    .cp-latest-grid {
        grid-template-columns: 1fr;
    }

    .cp-latest-event {
        border-right: 0;
        border-bottom: 1px solid var(--cp-border);
    }

}


@media (max-width: 560px) {

    .cp-hero h1 {
        font-size: 49px;
    }

    .cp-next-event {
        grid-template-columns:
            85px
            minmax(0, 1fr);
    }

    .cp-round strong {
        font-size: 37px;
    }

    .cp-next-main {
        padding-left: 17px;
    }

    .cp-next-main h2 {
        font-size: 19px;
    }

    .cp-stats {
        grid-template-columns: 1fr;
    }

    .cp-stat-leader {
        grid-column: auto;
    }

    .cp-latest-head,
    .cp-latest-row {
        grid-template-columns:
            42px
            minmax(0, 1fr)
            55px;
    }

    .cp-latest-head span:nth-child(3),
    .cp-latest-team {
        display: none;
    }

}



/* ==========================================================
   HERO TITLE FIX V4.1
   ========================================================== */

.cp-hero h1 {
    max-width: none;

    font-size: clamp(46px, 4.3vw, 72px);

    line-height: .95;

    letter-spacing: -.045em;

    white-space: nowrap;
}


@media (max-width: 1350px) {

    .cp-hero h1 {
        font-size: clamp(40px, 4vw, 60px);
    }

}


@media (max-width: 1050px) {

    .cp-hero h1 {
        font-size: clamp(34px, 5vw, 50px);
    }

}


@media (max-width: 800px) {

    .cp-hero h1 {
        white-space: normal;

        font-size: 48px;
    }

}



/* ==========================================================
   PUBLIC CHAMPIONSHIP TOOLBAR V2
   ========================================================== */

.cp-public-toolbar {
    width: var(--cp-width);
    height: 42px;

    margin: 0 auto;

    display: flex;
    align-items: center;
}

.cp-public-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 7px 0;

    color: #555960;
    text-decoration: none;

    font-size: 9px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .11em;
}

.cp-public-back-arrow {
    color: var(--cp-red);
    font-size: 17px;
    line-height: 1;
}

.cp-public-back:hover {
    color: var(--cp-red);
}


/*
 * La toolbar occupa già lo spazio sopra l'hero:
 * riduciamo quindi leggermente l'hero per non allungare la pagina.
 */
.cp-public-toolbar + .cp-hero .cp-hero-grid {
    min-height: 458px;
}


@media (max-width: 800px) {

    .cp-public-toolbar {
        height: 38px;
    }

    .cp-public-toolbar + .cp-hero .cp-hero-grid {
        min-height: auto;
    }

}



/* ==========================================================
   PUBLIC HERO BACK BUTTON FINAL
   ========================================================== */

.cp-hero-toolbar {
    width: var(--cp-width);

    margin: 0 auto;

    padding-top: 20px;

    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.cp-hero-back {
    min-height: 38px;

    padding:
        0 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    background: #ffffff;

    border:
        1px solid #cfd1d5;

    border-radius:
        3px;

    color:
        #15151b;

    text-decoration:
        none;

    font-size:
        10px;

    line-height:
        1;

    font-weight:
        900;

    letter-spacing:
        .04em;

    transition:
        border-color .15s ease,
        color .15s ease,
        background .15s ease;
}

.cp-hero-back > span:first-child {
    color: #e10600;

    font-size: 14px;
}

.cp-hero-back:hover {
    border-color: #e10600;

    color: #e10600;

    background: #fffafa;
}


/*
 * La toolbar occupa spazio sopra il contenuto:
 * compensiamo leggermente l'altezza hero.
 */
.cp-hero-toolbar + .cp-hero-grid {
    min-height: 455px;
}


/* Eliminiamo visivamente eventuali vecchie toolbar CSS */
.cp-public-toolbar {
    display: none !important;
}


@media (max-width: 800px) {

    .cp-hero-toolbar {
        padding-top: 13px;
    }

    .cp-hero-back {
        min-height: 34px;

        padding:
            0 12px;

        font-size:
            9px;
    }

    .cp-hero-toolbar + .cp-hero-grid {
        min-height: auto;
    }

}

