/* Spec 433: the page of a shared play - in the landing's static frame for a guest (.guest-landing.sp-guest, with
   home-landing.css) and inside the app shell for a signed-in person (.sp-page--app) - and the planner's link dialog. */

.sp-page {
    width: min(760px, 100% - 2rem);
    margin-inline: auto;
    padding: 1rem 0 2rem;
    color: var(--tt-ink);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.sp-page--app {
    width: min(760px, 100%);
}

.sp-page *,
.sp-page *::before,
.sp-page *::after {
    box-sizing: border-box;
}

.sp-page :is(h1, h2) {
    font-family: var(--tt-font-display);
    line-height: 1.2;
    margin: 0 0 0.6rem;
}

.sp-page h1 {
    font-size: clamp(1.5rem, 5vw, 2.1rem);
}

.sp-page h2 {
    font-size: clamp(1.2rem, 3.6vw, 1.45rem);
}

.sp-page :is(p, ul, ol) {
    margin: 0 0 0.75rem;
}

/* Each part on its own block (UI guidelines), not divided by lines. */
.sp-block {
    margin: 0 0 1rem;
    padding: 1.1rem 1.1rem 1.2rem;
    background: var(--tt-area);
    border-top: 3px solid var(--tt-rule, var(--tt-line));
}

.sp-game {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 0.9rem;
}

.sp-game .planner-game-thumb {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border: 1px solid var(--tt-line);
}

.sp-game .planner-game-thumb-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tt-box);
    color: var(--tt-ink);
    font-weight: 800;
}

.sp-game-text {
    min-width: 0;
}

.sp-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    color: var(--tt-muted);
}

.sp-logger,
.sp-note {
    color: var(--tt-muted);
}

.sp-seats {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 0.4rem;
}

.sp-seat {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 44px;
    padding: 0.35rem 0.7rem;
    background: var(--tt-field);
    border: 1px solid var(--tt-line);
}

.sp-seat-name {
    font-weight: 700;
}

.sp-seat-team,
.sp-seat-first {
    color: var(--tt-muted);
    font-size: 0.85rem;
}

.sp-seat-winner {
    color: var(--tt-accent);
}

.sp-seat-score {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

.sp-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
}

/* The colours of the friends' initials (planner.css), which the guest frame does not load. */
.sp-avatar--c0 { background: #9c4a26; }
.sp-avatar--c1 { background: #3d6f62; }
.sp-avatar--c2 { background: #4f7a3a; }
.sp-avatar--c3 { background: #6f5a8c; }
.sp-avatar--c4 { background: #a8432c; }
.sp-avatar--c5 { background: #3f6a86; }
.sp-avatar--c6 { background: #9a7428; }
.sp-avatar--c7 { background: #8c4a62; }

.sp-bgg {
    display: inline-flex;
    margin-top: 0.5rem;
}

.sp-gains {
    padding-left: 1.2rem;
}

.sp-guest .gl-actions {
    margin-bottom: 0.75rem;
}

.sp-topbar-actions {
    gap: 0.45rem;
}

/* Rule 18: the seats to pick, in the one selected look of ui-states.css. */
.sp-seat-picks {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
}

.sp-seat-pick {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    min-height: 44px;
    padding: 0.5rem 0.7rem;
    background: var(--tt-field);
    border: 1px solid var(--tt-line);
    color: var(--tt-ink);
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}

.sp-seat-pick:disabled {
    opacity: 0.55;
}

.sp-seat-pick-name {
    font-weight: 700;
}

.sp-seat-pick-state {
    font-size: 0.8rem;
    color: var(--tt-muted);
}

.sp-claim .game-card-btn {
    margin-top: 0.25rem;
}

/* The planner's link dialog: the code stays dark on white in both themes, so a phone camera reads it. */
.share-play-qr {
    width: min(260px, 100%);
    margin: 0.75rem auto;
    padding: 0;
    background: #fff;
}

.share-play-qr .qr-svg {
    display: block;
    width: 100%;
    height: auto;
}

.share-play-link {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.share-play-input {
    flex: 1 1 220px;
    min-width: 0;
}

.share-play-link-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 0.5rem;
}

.share-play-link-actions .game-card-btn {
    width: auto;
    margin: 0;
}

.share-play-seat-label {
    display: block;
    margin-top: 0.75rem;
    font-weight: 700;
}

.share-play-seat {
    width: 100%;
    margin-top: 0.3rem;
}

.share-play-claims-title {
    margin: 1rem 0 0.4rem;
    font-size: 1rem;
}

.share-play-claims {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.4rem;
}

.share-play-claim {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.share-play-modal .planner-modal-actions {
    flex-wrap: wrap;
}

@media (max-width: 420px) {
    .sp-topbar .gl-topbar-login {
        display: none;
    }
}
