/* Player/spectator manual (PlayerManualV2) - additive on top of .mpv2 (site-matchplay-v2.css).
   Only genuinely new pieces live here (TOC, step badges, callouts, static UI-replica snippets,
   hero); everything else on the page reuses existing .mpv2-* classes (info cards, buttons,
   tables, status badges) so the manual reads as part of the same product, not a bolted-on
   document. Scoped under .mpv2-player-manual with its own "pman-" class prefix - deliberately
   independent from the captain manual's "cman-" prefix/CSS file so the two pages can never
   collide or regress one another, even though the structure mirrors it closely. The accent
   here is a blue (spectator/neutral) rather than the captain manual's green, since this is a
   different audience and the two pages should still be told apart by their own eyebrow color. */

.mpv2-player-manual {
    --pman-accent: #2b6cb0;
    --pman-accent-text: #ffffff;
    --pman-accent-soft: color-mix(in srgb, var(--pman-accent) 14%, var(--mpv2-card-bg));
    --pman-tip-border: #1b6e4a;
    --pman-tip-bg: color-mix(in srgb, var(--pman-tip-border) 10%, var(--mpv2-card-bg));
    --pman-warn-border: #b45309;
    --pman-warn-bg: color-mix(in srgb, var(--pman-warn-border) 12%, var(--mpv2-card-bg));
    /* This page has no live tournament context (no inline --team-left-color/--team-right-color
       block like the real match views get from ViewBag), so the mockups below get their own
       fixed illustrative colors instead of depending on undefined team-color variables. */
    --pman-mock-left: #7F0000;
    --pman-mock-left-text: #ffffff;
    --pman-mock-right: #071E93;
    --pman-mock-right-text: #ffffff;
    padding-bottom: 12px;
}

/* ---------- Hero ---------- */

.pman-hero {
    background: var(--mpv2-card-bg);
    color: var(--mpv2-card-text);
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
    padding: 22px 20px;
    margin-bottom: 14px;
    text-align: center;
}

.pman-hero-eyebrow {
    display: inline-block;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--pman-accent);
    background: var(--pman-accent-soft);
    padding: 3px 12px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.pman-hero h1 {
    margin: 0 0 10px;
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.25;
}

.pman-hero p {
    margin: 0;
    line-height: 1.55;
    color: var(--mpv2-card-muted);
}

/* ---------- Table of contents ---------- */

.pman-toc {
    position: sticky;
    top: 50px;
    z-index: 5;
    background: var(--mpv2-card-bg);
    color: var(--mpv2-card-text);
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
    padding: 12px 14px;
    margin-bottom: 18px;
}

.pman-toc-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--mpv2-card-muted);
    margin-bottom: 8px;
}

.pman-toc-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.mpv2-player-manual a.pman-toc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--mpv2-card-text);
    background: color-mix(in srgb, var(--mpv2-card-text) 6%, transparent);
    border-radius: 999px;
    padding: 7px 12px;
    text-decoration: none;
}

.mpv2-player-manual a.pman-toc-link:active,
.mpv2-player-manual a.pman-toc-link:hover {
    background: var(--pman-accent-soft);
    color: var(--pman-accent);
}

.pman-toc-link-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4em;
    height: 1.4em;
    border-radius: 50%;
    background: var(--pman-accent);
    color: var(--pman-accent-text);
    font-size: 1rem;
    font-weight: 800;
    flex: 0 0 auto;
}

/* ---------- Sections ---------- */

.pman-section {
    scroll-margin-top: 60px;
    background: var(--mpv2-card-bg);
    color: var(--mpv2-card-text);
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
    padding: 18px 18px 20px;
    margin-bottom: 14px;
}

.pman-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

/* Reuses the same circled-numeral motif the app already uses for hole numbers
   (.mpv2-hole-number-value), so the manual's own chapter numbering visually echoes the
   product it documents instead of introducing an unrelated numbering style. */
.pman-section-num {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.1em;
    height: 2.1em;
    border-radius: 50%;
    background: var(--pman-accent);
    color: var(--pman-accent-text);
    font-size: 1.15rem;
    font-weight: 800;
}

.pman-section-head h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.pman-section p {
    line-height: 1.55;
    margin: 0 0 10px;
}

.pman-section p:last-child {
    margin-bottom: 0;
}

.pman-section h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 16px 0 8px;
}

/* ---------- Numbered step list (genuine sequences only, e.g. "tap this, then this") ---------- */

.pman-step-list {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pman-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.pman-step-badge {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.8em;
    height: 1.8em;
    margin-top: .1em;
    border-radius: 50%;
    border: 2px solid var(--pman-accent);
    color: var(--pman-accent);
    font-weight: 800;
    font-size: 1rem;
}

.pman-step-text {
    line-height: 1.5;
    padding-top: .15em;
}

/* ---------- Callouts ---------- */

.pman-callout {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border-left: 4px solid var(--mpv2-border);
    border-radius: 8px;
    background: var(--mpv2-card-bg);
    padding: 12px 14px;
    margin: 12px 0;
    line-height: 1.5;
}

.pman-callout-icon {
    flex: 0 0 auto;
    font-size: 1.1rem;
    margin-top: .1em;
}

.pman-callout-body strong {
    display: block;
    font-weight: 700;
    margin-bottom: 2px;
}

.pman-callout--tip {
    border-left-color: var(--pman-tip-border);
    background: var(--pman-tip-bg);
}

.pman-callout--tip .pman-callout-icon { color: var(--pman-tip-border); }

.pman-callout--warning {
    border-left-color: var(--pman-warn-border);
    background: var(--pman-warn-bg);
}

.pman-callout--warning .pman-callout-icon { color: var(--pman-warn-border); }

/* ---------- Static UI-replica mockups ----------
   Non-interactive illustrations of the real controls (tabindex="-1", no hrefs/handlers) built
   with the manual's own neutral accent rather than a team color, since this page has none. */

.pman-mock {
    border: 1px dashed var(--mpv2-border);
    border-radius: 10px;
    padding: 12px;
    margin: 10px 0 16px;
    background: color-mix(in srgb, var(--mpv2-card-text) 3%, transparent);
}

.pman-mock-label {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--mpv2-card-muted);
    margin-bottom: 8px;
}

/* Mini match-card mockup: two player names either side of a result, hole-dot strip beneath. */

.pman-mock-card {
    background: var(--mpv2-card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
    padding: 10px 12px;
    overflow: hidden;
}

.pman-mock-card-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
}

.pman-mock-card-name {
    font-weight: 700;
    font-size: 1.05rem;
}

.pman-mock-card-name--left {
    text-align: left;
    color: var(--pman-mock-left);
}

.pman-mock-card-name--right {
    text-align: right;
    color: var(--pman-mock-right);
}

.pman-mock-card-result {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6em;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--pman-mock-left);
    color: var(--pman-mock-left-text);
    font-weight: 800;
    font-size: 1rem;
    white-space: nowrap;
}

.pman-mock-card-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--mpv2-border);
}

.pman-mock-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6em;
    height: 1.6em;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.pman-mock-dot--left { background: var(--pman-mock-left); color: var(--pman-mock-left-text); }
.pman-mock-dot--right { background: var(--pman-mock-right); color: var(--pman-mock-right-text); }

.pman-mock-dot--square {
    background: transparent;
    border: 2px solid var(--mpv2-card-muted);
    color: var(--mpv2-card-muted);
}

.pman-mock-dot--unplayed {
    background: color-mix(in srgb, var(--mpv2-card-muted) 20%, transparent);
    color: var(--mpv2-card-muted);
}

/* Three-way hole-result choice row mockup (Vítěz / AS / Vítěz), mirrors the real Score page. */

.pman-mock-choice-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.pman-mock-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 58px;
    text-align: center;
    border-radius: 10px;
    border: 2px solid var(--mpv2-border);
    color: var(--mpv2-card-muted);
    font-size: 1rem;
    font-weight: 700;
    padding: 6px 4px;
}

.pman-mock-choice--selected {
    border-color: var(--pman-accent);
    background: var(--pman-accent);
    color: var(--pman-accent-text);
}

/* ---------- Comparison / FAQ table wrapper (reuses .mpv2-info-table itself) ---------- */

.pman-compare-scroll {
    overflow-x: auto;
    margin: 4px 0 14px;
}

.pman-compare-scroll .mpv2-info-table {
    min-width: 480px;
}

.pman-compare-scroll .mpv2-info-table th:first-child,
.pman-compare-scroll .mpv2-info-table td:first-child {
    text-align: left;
    white-space: normal;
    font-weight: 700;
}

.pman-compare-scroll .mpv2-info-table td {
    white-space: normal;
}

/* ---------- Narrow phones ---------- */

@media (max-width: 540px) {
    .pman-hero {
        padding: 16px 14px;
    }

    .pman-hero h1 {
        font-size: 1.4rem;
    }

    .pman-toc {
        top: 44px;
        padding: 10px 10px;
    }

    .pman-section {
        padding: 14px 12px 16px;
    }

    .pman-mock-card-name {
        font-size: 1rem;
    }
}
