/* Players (Phase 10): search, the followed list, a player's page and the goal takeover, on look
   A's tokens (css/lamplit.css) and the shared parts in scores.css and teams.css. Every element's
   resting style is its final look, so lamplit.css's reduced-motion block (which stops every
   animation) leaves the takeover shown still rather than hidden. */

/* ---------------------------------------------------------------------------------------
   Search and the player list
   --------------------------------------------------------------------------------------- */

.ll-search {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 14px;
    border-radius: var(--ll-radius-sm);
    color: var(--ll-muted);
}

.ll-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ll-text);
    font: inherit;
    font-size: 16px; /* 16 px keeps iPhones from zooming in. */
}

.ll-search:focus-within {
    border-color: color-mix(in srgb, var(--ll-live) 60%, transparent);
}

.ll-player-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--ll-line);
}

.ll-player-row:last-child {
    border-bottom: 0;
}

.ll-player-link {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 44px;
    color: inherit;
    text-decoration: none;
}

.ll-player-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ll-player-name {
    font-weight: 700;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ll-player-tonight {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ll-muted);
}

.ll-player-row.is-live .ll-player-tonight {
    color: var(--ll-text);
}

.ll-player-line {
    font-size: 13px;
    font-weight: 700;
}

.ll-follow.is-on {
    color: var(--ll-live);
    border-color: color-mix(in srgb, var(--ll-live) 60%, transparent);
}

/* Team page leaders and roster rows are links now. */
.ll-leader-card,
.ll-roster-player {
    color: inherit;
    text-decoration: none;
}

/* ---------------------------------------------------------------------------------------
   A player's page
   --------------------------------------------------------------------------------------- */

.ll-player-hero {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    padding-top: 0;
}

.ll-player-shot {
    display: flex;
    justify-content: center;
    margin: 0 -16px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--team-1) 45%, transparent), color-mix(in srgb, var(--team-2) 30%, transparent));
}

/* The action shot: a 16:9 banner, faded into the card at the bottom. */
.ll-action {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1296 / 729;
    object-fit: cover;
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
    mask-image: linear-gradient(to bottom, #000 70%, transparent);
}

/* Without an action shot, the headshot or logo sits in the banner's place. */
.ll-player-shot > .ll-face {
    margin: 20px 0;
}

.ll-player-hero-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ll-player-number {
    font-size: 22px;
    font-weight: 900;
    color: var(--team-1);
    filter: brightness(1.4);
}

.ll-player-team {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.ll-player-today {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    color: inherit;
    text-decoration: none;
}

.ll-player-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 8px;
}

/* ---------------------------------------------------------------------------------------
   The goal takeover
   --------------------------------------------------------------------------------------- */

.ll-takeover {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #05070D;
    color: #FFFFFF;
    cursor: pointer;
    animation: ll-takeover-in .25s ease-out;
}

.ll-takeover-shot {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: .55;
}

.ll-takeover-shot .ll-action {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    -webkit-mask-image: none;
    mask-image: none;
    animation: ll-takeover-zoom 5s ease-out;
}

/* The team colours sweep across, then rest as a wash. */
.ll-takeover-sweep {
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, var(--team-1) 0%, color-mix(in srgb, var(--team-1) 60%, transparent) 38%, transparent 55%, color-mix(in srgb, var(--team-2) 55%, transparent) 100%);
    opacity: .7;
    animation: ll-takeover-sweep .9s cubic-bezier(.2, .8, .2, 1);
}

.ll-takeover-words {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px;
    text-align: center;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .6);
}

.ll-takeover-goal {
    font-size: clamp(88px, 26vw, 220px);
    font-weight: 900;
    line-height: .9;
    letter-spacing: .04em;
    animation: ll-takeover-goal .6s cubic-bezier(.2, 1.4, .4, 1);
}

.ll-takeover-name {
    font-size: clamp(28px, 7vw, 54px);
    font-weight: 800;
}

.ll-takeover-number {
    font-size: 18px;
    font-weight: 700;
}

.ll-takeover .ll-muted {
    color: rgba(255, 255, 255, .75);
}

@keyframes ll-takeover-in {
    from { opacity: 0; }
}

@keyframes ll-takeover-zoom {
    from { transform: scale(1.12); }
}

@keyframes ll-takeover-sweep {
    from { transform: translateX(-100%); opacity: 1; }
}

@keyframes ll-takeover-goal {
    from { transform: scale(.4); opacity: 0; }
}
