/* Layout only. Colors come from assets/{slug}/css/match-stars-cms.css */
.ms-cms-top {
    margin: 0;
    padding-top: 64px;
    overflow: visible;
    background-color: var(--ms-cms-page-bg);
    background-image: var(--ms-cms-page-grad);
}

.ms-cms-hero {
    position: relative;
    min-height: 306px;
    overflow: hidden;
    background-color: var(--ms-cms-hero-bg);
}

.ms-cms-hero__banner {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
}

.ms-cms-hero__banner.is-mobile {
    display: none;
}

.ms-cms-hero__inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    min-height: 306px;
    padding-top: 16px;
    padding-bottom: 0;
}

.ms-cms-hero__logo {
    position: relative;
    z-index: 2;
    width: min(200px, 28vw);
    height: auto;
    margin-bottom: 20px;
    flex-shrink: 0;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
}

.ms-cms-hero__players {
    display: block;
    width: min(955px, 72%);
    max-height: 420px;
    height: auto;
    object-fit: contain;
    object-position: right bottom;
    pointer-events: none;
}

.match-star-top {
    background: var(--ms-cms-heading-grad, #002c5f);
}

.match-star-top .stcky-match-star-nav h1,
.match-star-top .h-40 {
    color: var(--ms-cms-heading-color, #fff);
}

.ms-cms-heading {
    margin: 0;
    background: var(--ms-cms-heading-grad);
}

.ms-cms-heading h1 {
    margin: 0;
    padding: 16px 0;
    color: var(--ms-cms-heading-color);
    font-family: var(--font-oswald-700);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.ms-cms-board {
    padding: 0 0 56px;
    background: transparent;
    overflow: visible;
}

.ms-cms-board__card {
    position: relative;
    overflow: visible;
    margin-top: 0;
    padding: 28px 32px 32px;
    border-radius: 20px;
    background-color: var(--ms-cms-board-bg);
    background-image: var(--ms-cms-board-image);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: scroll;
}

.ms-cms-board__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 28px;
    align-items: end;
}

.ms-cms-board__layout.is-single {
    grid-template-columns: 1fr;
}

.ms-cms-board__layout.is-stats-only .ms-cms-players-card {
    grid-column: 2;
}

.ms-cms-media-card,
.ms-cms-players-card {
    position: relative;
    min-width: 0;
    padding: 0;
    background: transparent;
}

.ms-cms-media-card {
    align-self: stretch;
}

.ms-cms-players-card {
    display: flex;
    align-items: center;
}

@media (max-width: 767.98px) {
    .ms-cms-hero.has-mobile-banner .ms-cms-hero__banner:not(.is-mobile) {
        display: none;
    }

    .ms-cms-hero.has-mobile-banner .ms-cms-hero__banner.is-mobile {
        display: block;
    }
}

.ms-cms-featured {
    position: relative;
    z-index: 2;
    margin-top: -80px;
}

.ms-cms-featured__iframe {
    display: block;
    width: 100%;
    min-height: 420px;
    height: 100%;
    border: 0;
}

.ms-cms-featured__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    min-height: 420px;
    height: 100%;
    border-radius: 16px;
    background: var(--ms-cms-featured-bg);
    box-shadow: var(--ms-cms-featured-shadow);
}

.ms-cms-featured__img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    transition: opacity 0.2s ease;
}

.ms-cms-featured__img.is-switching {
    opacity: 0;
}

.ms-cms-featured__img.is-hidden {
    display: none;
}

.ms-cms-featured__fallback {
    display: none;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    min-height: 420px;
    height: 100%;
    padding: 28px 24px 72px;
    background: var(--ms-cms-fallback-grad);
}

.ms-cms-featured__img.is-hidden + .ms-cms-featured__fallback {
    display: flex;
}

.ms-cms-featured__fallback span {
    color: var(--ms-cms-fallback-accent);
    font-family: var(--font-oswald-700);
    font-size: 28px;
    line-height: 1;
}

.ms-cms-featured__fallback strong {
    color: #fff;
    font-family: var(--font-oswald-700);
    font-size: 40px;
    line-height: 1.05;
    text-transform: uppercase;
}

.ms-cms-featured__meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.72) 100%);
}

.ms-cms-featured__meta p {
    margin: 0;
    color: #fff;
    font-family: var(--font-satoshi-700);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.ms-cms-featured__play {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.ms-cms-featured__play.is-static {
    display: none;
}

.ms-cms-featured__play img {
    display: block;
    width: 32px;
    height: 32px;
}

.ms-cms-featured__controls {
    position: absolute;
    z-index: 3;
    top: 14px;
    right: 14px;
    display: flex;
    gap: 8px;
}

.ms-cms-featured__controls button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0 0 3px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.58);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.ms-cms-featured__controls button:hover,
.ms-cms-featured__controls button:focus-visible {
    background: #f4512c;
}

.ms-cms-tabs {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 12px 0;
    list-style: none;
    width: 100%;
}

.ms-cms-tabs > li {
    margin: 0;
}

.ms-cms-tab {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 14px;
    padding: 12px 16px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    text-align: left;
    cursor: default;
}

.ms-cms-tab__rank {
    flex: 0 0 28px;
    color: #fff;
    font-family: var(--font-oswald-700);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.ms-cms-tab__photo {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
}

.ms-cms-tab__copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.ms-cms-tab__name {
    color: #fff;
    font-family: var(--font-oswald-700);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.ms-cms-tab__team {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-family: var(--font-satoshi-500);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    text-transform: uppercase;
}

.ms-cms-tab__team img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.ms-cms-tab__awards {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    color: #fff;
    font-family: var(--font-oswald-700);
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.ms-cms-tab__awards img {
    width: 28px;
    height: 32px;
}

.match-star-card-button,
.match-star-card-static {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    text-decoration: none;
}

.match-star-card-button {
    cursor: pointer;
}

.match-star-card-button .tournament-star-img,
.match-star-card-static .tournament-star-img {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.match-star-card-button:hover .tournament-star-img,
.match-star-card-button:focus-visible .tournament-star-img {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.match-star-card-button:focus-visible,
.match-star-popup__close:focus-visible,
.match-star-popup__profile:focus-visible {
    outline: 3px solid #ff6b00;
    outline-offset: 3px;
}

body.match-star-popup-open {
    overflow: hidden;
}

.match-star-popup[hidden] {
    display: none;
}

.match-star-popup {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    padding: 24px;
}

.match-star-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
}

.match-star-popup__dialog {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(240px, 0.82fr) minmax(320px, 1.18fr);
    width: min(820px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.match-star-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0 0 2px;
    border: 2px solid #687184;
    border-radius: 50%;
    background: #fff;
    color: #687184;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.match-star-popup__image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 390px;
    padding: 54px 30px;
    background: linear-gradient(145deg, #fff4eb 0%, #f6f8fb 100%);
}

.match-star-popup__image {
    display: block;
    width: 100%;
    max-height: 390px;
    object-fit: contain;
}

.match-star-popup__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 58px 48px 48px;
}

.match-star-popup__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin: 0 0 10px;
    color: #17191f;
    font-family: var(--font-oswald-700);
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
}

.match-star-popup__content h2 {
    margin: 0 0 12px;
    color: #101116;
    font-family: var(--font-oswald-700);
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 700;
    line-height: 1.05;
    text-transform: uppercase;
}

.match-star-popup__description {
    margin: 0 0 24px;
    color: #292c33;
    font-size: 15px;
    line-height: 1.55;
    white-space: pre-line;
}

.match-star-popup__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.match-star-popup__stats > div {
    min-width: 0;
}

.match-star-popup__stats span,
.match-star-popup__stats strong {
    display: block;
}

.match-star-popup__stats span {
    margin-bottom: 3px;
    color: #17191f;
    font-family: var(--font-oswald-700);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.match-star-popup__stats strong {
    color: #101116;
    font-family: var(--font-oswald-700);
    font-size: 27px;
    line-height: 1;
}

.match-star-popup__profile {
    display: block;
    width: 100%;
    margin-top: auto;
    padding: 13px 18px;
    border-radius: 8px;
    background: #191a20;
    color: #fff;
    font-family: var(--font-oswald-700);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}

.match-star-popup__profile:hover {
    background: #f4512c;
    color: #fff;
}

@media (max-width: 991.98px) {
    .ms-cms-hero,
    .ms-cms-hero__inner {
        min-height: 240px;
    }

    .ms-cms-hero__players {
        width: min(720px, 68%);
        max-height: 280px;
    }

    .ms-cms-heading h1 {
        font-size: 26px;
        padding: 14px 0;
    }

    .ms-cms-top {
        padding-top: 36px;
    }

    .ms-cms-board__card {
        margin-top: 0;
        padding: 20px 16px 24px;
    }

    .ms-cms-board__layout {
        grid-template-columns: 1fr;
        gap: 16px;
        align-items: start;
    }

    .ms-cms-board__layout.is-stats-only .ms-cms-players-card {
        grid-column: 1;
    }

    .ms-cms-featured {
        margin-top: -48px;
    }

    .ms-cms-featured__media,
    .ms-cms-featured__img,
    .ms-cms-featured__fallback,
    .ms-cms-featured__iframe {
        min-height: 280px;
    }

    .ms-cms-tab__name {
        font-size: 18px;
    }

    .ms-cms-tab__awards {
        font-size: 26px;
    }
}

@media (max-width: 767.98px) {
    .ms-cms-hero,
    .ms-cms-hero__inner {
        min-height: 180px;
    }

    .ms-cms-hero__logo {
        width: 110px;
        margin-bottom: 12px;
    }

    .ms-cms-hero__players {
        width: 70%;
        max-height: 180px;
    }

    .ms-cms-heading h1 {
        font-size: 20px;
        line-height: 24px;
        padding: 12px 0;
    }

    .ms-cms-board {
        padding: 0 0 28px;
    }

    .ms-cms-top {
        padding-top: 28px;
    }

    .ms-cms-board__card {
        margin-top: 0;
        border-radius: 16px;
        padding: 16px 12px 20px;
    }

    .ms-cms-featured {
        margin-top: -32px;
    }

    .ms-cms-featured__media,
    .ms-cms-featured__img,
    .ms-cms-featured__fallback,
    .ms-cms-featured__iframe {
        min-height: 220px;
        border-radius: 12px;
    }

    .ms-cms-media-card,
    .ms-cms-players-card {
        padding: 0;
    }

    .ms-cms-featured__fallback strong {
        font-size: 28px;
    }

    .ms-cms-featured__meta {
        padding: 10px 12px;
    }

    .ms-cms-featured__meta p {
        font-size: 12px;
    }

    .ms-cms-tab {
        gap: 10px;
        padding: 10px 12px;
    }

    .ms-cms-tab__rank {
        flex-basis: 20px;
        font-size: 22px;
    }

    .ms-cms-tab__photo {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }

    .ms-cms-tab__name {
        font-size: 15px;
    }

    .ms-cms-tab__team {
        font-size: 11px;
    }

    .ms-cms-tab__awards {
        gap: 6px;
        font-size: 22px;
    }

    .ms-cms-tab__awards img {
        width: 22px;
        height: 26px;
    }

    .match-star-popup {
        align-items: start;
        padding: 14px;
        overflow-y: auto;
    }

    .match-star-popup__dialog {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .match-star-popup__image-wrap {
        min-height: 260px;
        padding: 42px 24px 24px;
    }

    .match-star-popup__image {
        max-height: 300px;
    }

    .match-star-popup__content {
        padding: 30px 24px 26px;
    }

    .match-star-popup__meta {
        font-size: 15px;
    }

    .match-star-popup__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
