/* Shared styling for the other-matches overlay tiles */

@media (prefers-reduced-motion: reduce) {
    .overlay-other-matches-list--paged .overlay-other-matches-page {
        transition: none;
    }
}

.other-match-item {
    display: grid;
    /* gap: calc(0.5rem * var(--overlay-card-scale, 1)); */
    /* background: rgba(12, 35, 60, 0.65); */
    background-color: transparent;
    /* border-radius: calc(0.8rem * var(--overlay-card-scale, 1)); */
    /* border: 1px solid rgba(255, 255, 255, 0.12); */
    /* padding: calc(0.9rem * var(--overlay-card-scale, 1)); */
    padding: 20px;
    max-width: 100%;
    width: 1040px;
    height: 400px;
}

.other-match-title {
    /* font-size: calc(1.2rem * var(--overlay-card-scale, 1)); */
    font-size: 1.2rem;
    font-weight: 600;
}

.other-match-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* gap: calc(0.75rem * var(--overlay-card-scale, 1)); */
    gap: 0.75rem;
    flex-wrap: wrap;
    background: rgba(148, 176, 232, 0.9);
    color: #10223b;
    /* border-radius: calc(0.75rem * var(--overlay-card-scale, 1)); */
    border-radius: 0.75rem;
    /* padding: calc(0.55rem * var(--overlay-card-scale, 1)); */
    padding: 0.55rem;
    /* margin-bottom: calc(0.65rem * var(--overlay-card-scale, 1)); */
    margin-bottom: 0.65rem;
}

.other-match-header-left {
    display: flex;
    flex-direction: column;
    /* gap: calc(0.35rem * var(--overlay-card-scale, 1)); */
    gap: 0.35rem;
}

.other-match-header-right {
    display: flex;
    align-items: center;
}

.other-match-subtitle {
    /* font-size: calc(0.8rem * var(--overlay-card-scale, 1)); */
    font-size: 0.8rem;
    opacity: 0.8;
}
/* 
.other-match-status.badge {
    font-size: calc(0.78rem * var(--overlay-card-scale, 1));
    padding: calc(0.35rem * var(--overlay-card-scale, 1)) calc(0.5rem * var(--overlay-card-scale, 1));
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: auto;
} */

.other-match-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    /* justify-self: flex-start; */
    /* align-self: flex-start; */
}



.other-match-teams {
    display: flex;
    flex-direction: column;
    gap: 0;
    /* border-radius: calc(0.75rem * var(--overlay-card-scale, 1)); */
    border-radius: 0.75rem;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    /* background: rgba(255, 255, 255, 0.08); */
    background-color: rgb(0, 124, 89);
    color: #ffffff;
}

.other-match-body > .other-match-teams:last-child {
    /* border-bottom-left-radius: calc(0.75rem * var(--overlay-card-scale, 1)); */
    border-bottom-left-radius: 0.75rem;
    /* border-bottom-right-radius: calc(0.75rem * var(--overlay-card-scale, 1)); */
    border-bottom-right-radius: 0.75rem;
}

.other-match-team {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    /* gap: calc(0.65rem * var(--overlay-card-scale, 1)); */
    gap: 0.65rem;
    /* padding: calc(0.6rem * var(--overlay-card-scale, 1)) calc(0.75rem * var(--overlay-card-scale, 1)); */
    padding: 0.6rem 0.75rem;
    /* padding-left: calc((0.65rem + 1.15rem) * var(--overlay-card-scale, 1)); */
    padding-left: 1.9rem;
    width: 100%;
    position: relative;
    min-width: 0;
}

.other-match-team::before {
    content: "";
    display: none;
}

.other-match-team[data-serving="true"]::before {
    display: block;
    /* width: calc(0.8rem * var(--overlay-card-scale, 1)); */
    width: 1rem;
    /* height: calc(0.8rem * var(--overlay-card-scale, 1)); */
    height: 1rem;
    border-radius: 50%;
    background: #c4f238;
    /* box-shadow: 0 0 calc(0.5rem * var(--overlay-card-scale, 1)) rgba(196, 242, 56, 0.65); */
    box-shadow: 0 0 0.5rem rgba(196, 242, 56, 0.65);
    position: absolute;
    /* left: calc(0.65rem * var(--overlay-card-scale, 1)); */
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
}

.other-match-team--winner {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.26), rgba(34, 197, 94, 0.08));
    /* box-shadow: inset 0 0 0 calc(0.1rem * var(--overlay-card-scale, 1)) rgba(34, 197, 94, 0.45); */
    box-shadow: inset 0 0 0 0.1rem rgba(34, 197, 94, 0.45);
    /* border-radius: calc(0.6rem * var(--overlay-card-scale, 1)); */
}

.other-match-teams .other-match-team--winner:first-child {
    /* border-top-left-radius: calc(0.75rem * var(--overlay-card-scale, 1)); */
    border-top-left-radius: 0.75rem;
    /* border-top-right-radius: calc(0.75rem * var(--overlay-card-scale, 1)); */
    border-top-right-radius: 0.75rem;
}

.other-match-teams .other-match-team--winner:last-child {
    /* border-bottom-left-radius: calc(0.75rem * var(--overlay-card-scale, 1)); */
    border-bottom-left-radius: 0.75rem;
    /* border-bottom-right-radius: calc(0.75rem * var(--overlay-card-scale, 1)); */
    border-bottom-right-radius: 0.75rem;
}

.other-match-team--winner .other-match-set-cell {
    background: rgba(34, 197, 94, 0.35);
}

.other-match-names {
    display: flex;
    flex-direction: column;
    flex: 1 1 0%;
    min-width: 0;
}

.other-match-players {
    display: flex;
    flex-direction: column;
    /* gap: calc(0.3rem * var(--overlay-card-scale, 1)); */
    gap: 0.3rem;
    flex: 1 1 0%;
    min-width: 0;
}

.other-match-team[data-seed]::after {
    content: attr(data-seed);
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.8rem;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    color: #e6f7c4;
    pointer-events: none;
    z-index: 1;
}

.other-match-team[data-serving="true"][data-seed]::after {
    color: rgb(0, 124, 89);
    /* color: #0f2b00; */
}

.other-match-player {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.1rem;
}

.other-match-player--serving {
    color: #f6e05e;
}

.other-match-team + .other-match-team {
    border-top: 2px solid rgba(255, 255, 255, 0.18);
    /* padding-top: calc(0.55rem * var(--overlay-card-scale, 1)); */
    padding-top: 0.55rem;
}

.other-match-scoreline {
    display: flex;
    align-items: stretch;
    /* gap: calc(0.45rem * var(--overlay-card-scale, 1)); */
    gap: 0.45rem;
    /* margin-left: auto; */
    margin-left: 0.2rem;
    flex: 0 0 auto;
}

.other-match-sets {
    display: grid;
    grid-auto-flow: column;
    /* grid-auto-columns: calc(2.1rem * var(--overlay-card-scale, 1)); */
    /* grid-auto-columns: unset; */
    /* gap: calc(0.4rem * var(--overlay-card-scale, 1)); */
    gap: 0.3rem;
    min-height: 2.5rem;
}

.other-match-set-cell {
    width: 2.4rem;
    /* min-height: calc(2rem * var(--overlay-card-scale, 1)); */
    min-height: 2rem;
    /* border-radius: calc(0.55rem * var(--overlay-card-scale, 1)); */
    border-radius: 0.25rem;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
    position: relative;
}

.other-match-set-cell sup {
    font-size: 0.55em;
    padding-left: 0.2em;
    vertical-align: super;
    position: relative;
    top: -0.35em;
    line-height: 1;
}

.other-match-current {
    --flip-bg: rgba(255, 204, 128, 0.92);
    --flip-color: #1a1a1a;
    --flip-duration: 0.7s;
    /* width: calc(2.6rem * var(--overlay-card-scale, 1)); */
    width: 2.6rem;
    /* border-radius: calc(0.6rem * var(--overlay-card-scale, 1)); */
    border-radius: 0.25rem;
    background: var(--flip-bg);
    color: var(--flip-color);
    font-weight: 700;
    /* font-size: calc(1.15rem * var(--overlay-card-scale, 1)); */
    font-size: 1.15rem;
    line-height: 1;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
    /* perspective: calc(70rem * var(--overlay-card-scale, 1)); */
    perspective: 70rem;
    transform-style: preserve-3d;
    padding: 0;
}

.other-match-current[data-type="none"] {
    --flip-bg: rgba(255, 255, 255, 0.1);
    --flip-color: #f8fafc;
}

.other-match-current-spacer {
    visibility: hidden;
    display: block;
    pointer-events: none;
}

.other-match-flip-card {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    border-radius: inherit;
    pointer-events: none;
}

.other-match-flip-face {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--flip-bg);
    color: var(--flip-color);
    backface-visibility: hidden;
    transform-style: preserve-3d;
    border-radius: inherit;
    /* padding: calc(0.35rem * var(--overlay-card-scale, 1)) calc(0.55rem * var(--overlay-card-scale, 1)); */
    padding: 0.35rem 0.55rem;
    box-shadow: inset 0 -1px rgba(0, 0, 0, 0.15);
}

.other-match-flip-face--back {
    transform: rotateY(180deg);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.18);
}

.other-match-current--flipping .other-match-flip-card {
    animation: otherMatchFullFlip var(--flip-duration) cubic-bezier(0.35, 0, 0.18, 1) forwards;
}

@keyframes otherMatchFullFlip {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(180deg);
    }
}

.other-match-flags {
    display: flex;
    align-items: stretch;
    /* gap: calc(0.5rem * var(--overlay-card-scale, 1)); */
    gap: 0.5rem;
    margin: 0;
}

.other-match-flags.is-flag-anim-out {
    animation: other-match-flags-rise 0.32s ease-in forwards;
    transform-origin: top center;
}

@keyframes other-match-flags-rise {
    0% {
        transform: scaleY(1) translateY(0);
        opacity: 1;
    }
    100% {
        transform: scaleY(0.7) translateY(-0.3rem);
        opacity: 0;
    }
}

.other-match-flags.is-flag-anim {
    animation: other-match-flags-drop 0.32s ease-out forwards;
    transform-origin: top center;
}

@keyframes other-match-flags-drop {
    0% {
        transform: scaleY(0.7) translateY(-0.3rem);
        opacity: 0;
    }
    100% {
        transform: scaleY(1) translateY(0);
        opacity: 1;
    }
}

.other-match-flag {
    position: relative;
    display: flex;
    align-items: center;
    /* font-size: calc(0.78rem * var(--overlay-card-scale, 1)); */
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    text-transform: none;
    /* padding: calc(0.35rem * var(--overlay-card-scale, 1)) calc(0.65rem * var(--overlay-card-scale, 1)); */
    padding: 0.35rem 0.65rem;
    /* border-radius: 0 0 calc(0.55rem * var(--overlay-card-scale, 1)) calc(0.55rem * var(--overlay-card-scale, 1)); */
    border-radius: 0 0 0.55rem 0.55rem;
    /* background: linear-gradient(135deg, #1a4775, #0f2f55); */
    background: linear-gradient(135deg, #014733, #007c59);
    color: #f5f9ff;
    /* min-height: calc(2.1rem * var(--overlay-card-scale, 1)); */
    min-height: 2.1rem;
    overflow: hidden;
}

.other-match-flag::after {
    content: "";
    position: absolute;
    inset: 0;
    background: transparent;
    transform: translateX(0);
    opacity: 0;
    transition: opacity 0.45s ease-in-out;
    z-index: 0;
}

.other-match-flag-text {
    position: relative;
    letter-spacing: 0.08rem;
    z-index: 1;
}

.other-match-flag-icon {
    width: 1.4rem;
    height: 1.4rem;
    margin-right: 0.2rem;
    display: inline-block;
    vertical-align: middle;
    fill: currentColor;
}

.other-match-flag-text-label {
    display: inline-block;
    vertical-align: middle;
}

.other-match-flag.is-title {
    color: #f5f9ff;
}

.other-match-flag.is-flag {
    color: #ffffff;
}

.other-match-flag.is-flag::after {
    opacity: 1;
}

.other-match-flag.is-flag[data-flag-type="mp"]::after {
    /* background: rgba(220, 38, 38, 0.82); */
    background: linear-gradient(90deg, rgba(136, 0, 0, 0.95) 0%, rgba(136, 0, 0, 0.45) 55%, rgba(136, 0, 0, 0) 100%);
}

.other-match-flag.is-flag[data-flag-type="sp"]::after {
    /* background: rgba(14, 165, 233, 0.9); */
    background: linear-gradient(90deg, rgba(26, 71, 117, 0.95) 0%, rgba(26, 71, 117, 0.45) 55%, rgba(26, 71, 117, 0) 100%);
}

.other-match-flag.is-flag[data-flag-type="sd"]::after {
    background: linear-gradient(90deg, rgba(26, 71, 117, 0.95) 0%, rgba(26, 71, 117, 0.45) 55%, rgba(26, 71, 117, 0) 100%);
}

.other-match-flag.is-flag[data-flag-type="bp"]::after {
    /* background: rgba(14, 165, 233, 0.15); */
    background: linear-gradient(90deg, rgba(26, 71, 117, 0.95) 0%, rgba(26, 71, 117, 0.45) 55%, rgba(26, 71, 117, 0) 100%);
}

.other-match-flag.is-flag[data-flag-type="stat"] {
    padding-left: 0.4rem;
}
.other-match-flag.is-flag[data-flag-type="stat"]::after {
    background: linear-gradient(90deg, rgba(191, 90, 0, 0.95) 0%, rgba(191, 90, 0, 0.45) 55%, rgba(191, 90, 0, 0) 100%);
}


.other-match-flag.is-flag-anim::after {
    animation: overlay-flag-sweep-down 0.45s ease-out forwards;
}

.other-match-flag.is-flag-anim-out::after {
    animation: overlay-flag-sweep-up 0.45s ease-in forwards;
}

@keyframes overlay-flag-sweep-down {
    0% {
        transform: translateY(-105%);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes overlay-flag-sweep-up {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-105%);
        opacity: 1;
    }
}

.other-match-flag[data-flag-role="highlight"] {
    flex: 1 1 auto;
    justify-content: flex-start;
}

.other-match-flag[data-flag-role="highlight"] .other-match-flag-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.other-match-flag[data-flag-role="court"] {
    flex: 0 0 auto;
    justify-content: center;
    white-space: nowrap;
}

.other-match-flag--court {
    background: rgba(30, 64, 175, 0.28);
    color: #e0f2fe;
}

.other-match-updated {
    /* font-size: calc(0.78rem * var(--overlay-card-scale, 1)); */
    font-size: 0.8rem;
    opacity: 0.75;
    text-align: right;
}

.other-match-empty {
    text-align: center;
    /* padding: calc(1.4rem * var(--overlay-card-scale, 1)); */
    padding: 1.4rem;
    background: rgba(255, 255, 255, 0.08);
    /* border-radius: calc(0.8rem * var(--overlay-card-scale, 1)); */
    border-radius: 0.8rem;
    /* font-size: calc(1.05rem * var(--overlay-card-scale, 1)); */
    font-size: 1.05rem;
}

/* Scorecard layout overrides */
#scorecard-wrapper {
    border-bottom-style: dashed;
    border-right-style: dashed;
    width: 1040px;
    height: 500px;
}
