/* Match archive (archive-match.php) - like for like with the live /matches/ page.
   Values are the child theme's `.post-type-archive-match` overrides converted from
   16px-root rem to px. Teko throughout. Enqueued only on this archive. */

.match_archive {
    background: var(--background);
}

.screen_reader_text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Next match ------------------------------------------------------------ */
.match_next {
    padding: 64px 16px;
    background: var(--primary);
    color: var(--white);
    font-family: var(--font-display);

    & .match_next_inner {
        max-width: 1100px;
        margin: 0 auto;
    }

    /* Heading above the box. The live child theme floated a faded "ghost" title
       half behind the box (negative margin, #344B5F); that read as a rendering
       bug in review, so it is a normal white heading here, matching the
       homepage matches band. */
    & .match_next_title {
        margin: 0 0 24px;
        padding: 0;
        color: var(--white);
        font-family: var(--font-display);
        font-size: 48px;
        font-weight: 700;
        line-height: 1.1;
        letter-spacing: 1px;
        text-transform: uppercase;

        @media (max-width: 1024px) { margin-left: 12.8px; font-size: 40px; }
        @media (max-width: 768px)  { font-size: 32px; }
        @media (max-width: 400px)  { margin-left: 0; font-size: 28px; text-align: center; }
    }

    & .match_next_box {
        position: relative;
        z-index: 1;
        max-width: 1100px;
        margin: 0 auto 48px;
        padding: 32px;
        border-radius: 12px;
        background: var(--primary-box);

        @media (max-width: 1024px) { margin-left: 12.8px; margin-right: 12.8px; }
        @media (max-width: 768px)  { padding: 24px; }
    }

    & .match_next_row {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;

        @media (max-width: 768px) { gap: 16px; }
        @media (max-width: 400px) { flex-direction: column; gap: 24px; text-align: center; }
    }

    & .match_team img {
        width: 80px;
        height: auto;
        margin-bottom: 8px;

        @media (max-width: 1024px) { width: 65px; }
        @media (max-width: 768px)  { width: 50px; }
    }
}

/* Team column (shared) --------------------------------------------------- */
.match_archive .match_team {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;

    & img {
        display: block;
        width: 60px;
        height: auto;
        margin-bottom: 6.4px;
        object-fit: contain;
        object-position: center;
    }

    & span {
        color: var(--white);
        font-family: var(--font-display);
        font-size: 16px;
        font-weight: 600;
        letter-spacing: .5px;
        text-transform: uppercase;

        @media (max-width: 500px) { font-size: 12px; }
        @media (max-width: 400px) { font-size: 16px; }
    }
}

/* Match info column (shared) --------------------------------------------- */
.match_archive .match_info {
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 20px;
    width: 260px;
    padding: 24px 0 16px;
    color: var(--white);
    font-size: 16px;
    text-align: center;
    clip-path: polygon(15% 0%, 85% 0%, 100% 100%, 0% 100%);

    @media (max-width: 768px) { width: 130px; }
    @media (max-width: 400px) { width: 100%; padding: 16px; clip-path: none; }

    & .match_date,
    & .match_time,
    & .match_location {
        color: var(--white);
        font-family: var(--font-display);
    }

    & .match_date {
        font-size: 19.2px;
        line-height: 1;
        text-transform: uppercase;

        @media (max-width: 500px) { font-size: 11.2px; }
        @media (max-width: 400px) { font-size: 19.2px; }
    }

    & .match_time {
        font-size: 32px;
        font-weight: 700;
        line-height: 1;
        letter-spacing: 1px;

        @media (max-width: 1024px) { font-size: 24px; }
        @media (max-width: 768px)  { font-size: 20.8px; }
        @media (max-width: 400px)  { font-size: 19.2px; }
    }

    & .match_result {
        font-size: 25.6px;
        font-weight: 700;
    }

    & .match_location {
        font-size: 19.2px;
        text-transform: uppercase;

        @media (max-width: 500px) { font-size: 11.2px; }
        @media (max-width: 400px) { font-size: 19.2px; }
    }
}

/* Upcoming / Finished lists ---------------------------------------------- */
.match_list {
    padding-bottom: 16px;
}

.match_list_title {
    max-width: 1200px;
    margin: 32px auto 16px;
    padding-left: 8px;
    color: var(--grey-3);
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

.match_list_empty {
    padding: 64px 16px;
    text-align: center;
    color: var(--text-muted);
}

.match_banner {
    margin-bottom: 48px;
    padding: 0;
    color: var(--white);

    @media (max-width: 850px) { padding: 0 40px; }
    @media (max-width: 600px) { padding: 0 10px; }

    & .match_banner_inner {
        display: flex;
        width: 100%;
        max-width: 800px;
        height: 140px;
        margin: 0 auto;
        overflow: hidden;
        background: var(--primary);

        @media (max-width: 768px) { height: auto; }
        @media (max-width: 400px) { flex-direction: column; gap: 16px; }
    }

    & .match_team {
        flex: 1;
        background: var(--primary-box);

        @media (max-width: 400px) {
            width: 100%;
            padding: 20px 0;
            clip-path: none;
        }
    }

    & .match_team_left  { clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%); }
    & .match_team_right { clip-path: polygon(0 0, 100% 0, 100% 100%, 15% 100%); }

    & .match_team img {
        @media (max-width: 768px) { width: 50px; }
    }

    & .match_team span {
        @media (max-width: 500px) { font-size: 10.4px; }
        @media (max-width: 400px) { font-size: 16px; }
    }

    /* Buy tickets bar (upcoming only) */
    & .match_ticket {
        max-width: 800px;
        margin: 0 auto;
        background: var(--secondary);
        font-family: var(--font-display);
        text-align: center;
    }

    & .match_ticket_button {
        display: inline-block;
        padding: 8px 32px;
        color: var(--white);
        font-family: var(--font-display);
        font-size: 16px;
        font-weight: 700;
        text-transform: uppercase;
        text-decoration: none;
        transition: background-color .3s var(--ease);

        &:hover,
        &:focus-visible {
            color: var(--white);
        }

        &.is_disabled {
            opacity: .5;
            cursor: default;
            pointer-events: none;
        }

        @media (max-width: 768px) { padding: 12px 24px; font-size: 14.4px; }
    }

    &:hover .match_ticket {
        background: var(--secondary-hover);
    }
}
