/*
 * Copyright AlpineReplay Inc, 2026. All rights reserved.
 *
 * Team page additions on top of Tailwind + components.css: the highlight
 * strip, the games signpost, compact game rows, the sticky mobile subscribe
 * bar and the highlight modal. Result and pitch colours are the state-page
 * mockup's; everything teal comes from variables.css.
 */

/* ---------- highlight strip ---------- */
.reel-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 12px 0 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.reel-strip::-webkit-scrollbar {
    display: none;
}
.reel-tile {
    flex: 0 0 auto;
    width: 148px;
    aspect-ratio: 9/14;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    scroll-snap-align: start;
    background: #0d1a1c;
    color: #f2f7f7;
    text-align: left;
    border: 0;
    padding: 0;
    cursor: pointer;
    isolation: isolate;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}
@media (min-width: 768px) {
    .reel-tile {
        width: 172px;
    }
}
.reel-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    transform: scale(1.02);
    transition: transform 0.5s ease;
}
.reel-tile:hover img {
    transform: scale(1.08);
}
.reel-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(13, 26, 28, 0.15) 0%,
        rgba(13, 26, 28, 0) 30%,
        rgba(13, 26, 28, 0.25) 55%,
        rgba(13, 26, 28, 0.92) 100%
    );
}
.reel-tile .top {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1;
    font-size: 11px;
    font-weight: 700;
}
.reel-tile .chip {
    background: rgba(13, 26, 28, 0.55);
    backdrop-filter: blur(6px);
    border-radius: 999px;
    padding: 3px 8px;
    color: #f2f7f7;
    white-space: nowrap;
}
.reel-tile .chip.cam {
    background: var(--teal-40-color);
    color: #fff;
}
.reel-tile .play {
    position: absolute;
    left: 50%;
    top: 44%;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    display: grid;
    place-items: center;
    z-index: 1;
    transition: transform 0.2s;
}
.reel-tile:hover .play {
    transform: translate(-50%, -50%) scale(1.08);
}
.reel-tile .play svg {
    width: 16px;
    height: 16px;
    margin-left: 2px;
    fill: #0d1a1c;
}
.reel-tile .info {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 1;
}
.reel-tile .jersey {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}
.reel-tile .jersey small {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    margin-left: 5px;
    vertical-align: 8px;
}
.reel-tile .what {
    font-size: 12px;
    font-weight: 700;
    margin-top: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* ---------- avatar stack ---------- */
.avatar-stack {
    display: inline-flex;
    align-items: center;
    flex: none;
}
.avatar-stack .av {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: var(--teal-40-color);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    display: inline-grid;
    place-items: center;
    margin-left: -9px;
    object-fit: cover;
    overflow: hidden;
    flex: none;
}
.avatar-stack .av:first-child {
    margin-left: 0;
}
.avatar-stack .av:nth-child(2) {
    background: #2aa9b1;
}
.avatar-stack .av:nth-child(3) {
    background: #0f6d73;
}
.avatar-stack .av:nth-child(4) {
    background: #5fc3c9;
}

/* ---------- games signpost ---------- */
.signpost {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.signpost .t {
    font-weight: 700;
    font-size: 14px;
    color: #111827;
}
.signpost .s {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    margin-top: 2px;
}
.signpost .arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f3f4f6;
    display: grid;
    place-items: center;
    flex: none;
    font-size: 16px;
    transition: transform 0.2s;
}
.signpost:hover .arrow {
    transform: translateY(2px);
}
.months {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.months span {
    font-size: 11px;
    font-weight: 700;
    color: #4b5563;
    background: #f3f4f6;
    border-radius: 999px;
    padding: 3px 8px;
}

/* ---------- game rows ---------- */
#games {
    scroll-margin-top: 80px;
}
.game-month {
    margin-top: 18px;
}
.game-month h3 {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}
.game-row {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}
.game-row:last-child {
    border-bottom: 0;
}
.game-row .thumb {
    display: block;
    width: 72px;
    aspect-ratio: 16/10;
    border-radius: 8px;
    overflow: hidden;
    background: #0d1a1c;
    position: relative;
}
.game-row .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.game-row a.thumb::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 5px 0 5px 9px;
    border-color: transparent transparent transparent #fff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}
.game-row .d {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}
.game-row .o {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin-top: 1px;
    letter-spacing: -0.01em;
}
.game-row .v {
    font-size: 12px;
    color: #6b7280;
    margin-top: 1px;
}
.score {
    font-size: 14px;
    font-weight: 800;
    border-radius: 8px;
    padding: 6px 9px;
    min-width: 56px;
    text-align: center;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
}
.score small {
    display: block;
    font-size: 10px;
    letter-spacing: 0.08em;
    font-weight: 800;
    opacity: 0.8;
    text-transform: uppercase;
}
.score.w {
    background: #eaf6ee;
    color: #16693a;
}
.score.l {
    background: #fceeec;
    color: #9b2c22;
}
.score.d {
    background: #eef1f2;
    color: #4a585d;
}
.score.none {
    background: #f3f4f6;
    color: #9ca3af;
}

/* ---------- sticky mobile subscribe bar ---------- */
.team-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 -6px 20px -12px rgba(0, 0, 0, 0.25);
}
.team-cta-text {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    line-height: 1.3;
    min-width: 0;
}
.team-cta-text b {
    display: block;
    color: #111827;
    font-size: 14px;
    font-weight: 800;
}
.team-cta .btn-primary {
    flex: none;
}

/* ---------- highlight modal ---------- */
/* Clip on the left, season unlock on the right; one column on phones. The
   clip has no native controls: a tap on the frame toggles playback and the
   play badge shows while it is paused. */
.reel-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(9, 9, 11, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.reel-modal[hidden] {
    display: none;
}
.reel-dlg {
    box-sizing: border-box;
    background: #fff;
    border-radius: 18px;
    max-width: 940px;
    width: 100%;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 22px 20px;
    position: relative;
    box-shadow:
        0 10px 15px -3px rgb(0 0 0/0.1),
        0 4px 6px -4px rgb(0 0 0/0.1);
}
@media (min-width: 768px) {
    .reel-dlg {
        padding: 28px 32px;
    }
}
.reel-dlg .reel-head {
    padding-right: 44px;
}
.reel-dlg h3 {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.reel-dlg .x {
    position: absolute;
    top: 14px;
    right: 14px;
    border: 2px solid var(--teal-30-color);
    background: #fff;
    color: #111827;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.reel-dlg .x:hover {
    background: var(--teal-10-color);
}
.reel-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-top: 16px;
}
@media (min-width: 768px) {
    .reel-grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
        gap: 28px;
        align-items: start;
        margin-top: 24px;
    }
}
.reel-dlg .vid {
    border-radius: 12px;
    overflow: hidden;
    background: #111;
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    cursor: pointer;
}
.reel-dlg .vid:focus-visible {
    outline: 3px solid var(--teal-30-color);
    outline-offset: 2px;
}
@media (max-width: 540px) {
    .reel-dlg .vid {
        aspect-ratio: 9/14;
        max-height: 56dvh;
    }
}
.reel-dlg .vid video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.reel-dlg .vid canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    mix-blend-mode: overlay;
}
.reel-dlg .reel-chip {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    background: var(--teal-40-color);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    padding: 5px 11px;
    pointer-events: none;
    white-space: nowrap;
    max-width: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
}
.reel-dlg .reel-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    display: none;
    place-items: center;
    z-index: 1;
    pointer-events: none;
}
.reel-dlg .vid.paused .reel-play {
    display: grid;
}
.reel-dlg .reel-play svg {
    width: 24px;
    height: 24px;
    margin-left: 3px;
    fill: #0d1a1c;
}
.reel-dlg #reel-status {
    color: #6b7280;
    font-size: 13px;
    margin-top: 6px;
}
.reel-dlg #reel-status:empty {
    display: none;
}
.reel-dlg .reel-proof {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    font-size: 14px;
    color: #374151;
    line-height: 1.35;
}
.reel-dlg .reel-proof b {
    font-weight: 700;
    color: #111827;
}
.reel-dlg .reel-offer .btn-primary {
    box-sizing: border-box;
    gap: 8px;
    font-size: 16px;
    white-space: nowrap;
    padding-left: 16px;
    padding-right: 16px;
}
.reel-dlg .reel-offer .btn-primary svg {
    width: 18px;
    height: 18px;
    flex: none;
}
.reel-dlg .reel-bullets {
    list-style: disc;
    margin: 14px 0 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 15px;
    color: #374151;
}
.reel-dlg .reel-bullets li::marker {
    color: var(--teal-40-color);
}
.reel-dlg .reel-offer .reel-billing {
    margin-top: 14px;
    font-size: 14px;
    color: #6b7280;
}
.reel-dlg .reel-offer .reel-billing b {
    color: #111827;
    font-weight: 800;
}
.reel-dlg .reel-offer .reel-fine {
    margin-top: 6px;
    font-size: 13px;
    color: #9ca3af;
}

@media (prefers-reduced-motion: reduce) {
    .reel-tile img,
    .reel-tile .play,
    .signpost .arrow {
        transition: none;
    }
}

/* Lazy-load sentinel at the end of the strip. Sized like a tile so the
   strip's scroll length already accounts for what has not loaded yet, and
   the scrollbar does not jump as batches arrive. */
.reel-more {
    flex: 0 0 auto;
    width: 148px;
    aspect-ratio: 9/14;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: var(--teal-10-color, #e6f4f4);
    color: var(--teal-40-color, #18929a);
    scroll-snap-align: start;
}
@media (min-width: 768px) {
    .reel-more {
        width: 172px;
    }
}
.reel-more-count {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}
.reel-more-label {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.8;
}
.reel-more[data-loading] {
    opacity: 0.55;
}
