/* Hulp bij Pinflo (/help/, tools/site/pages/help.js + assets/js/helpPlayer.js). Rustig: ruime witruimte, geen schaduw,
   één oranje kader waar je tikt. Nergens blauw: eigen focusrand en geen tikkader van de gsm. */

/* Kop, speler en lijst op dezelfde lijn: de kop gebruikt de volle breedte van de pagina, de tekst blijft leesbaar. */
.help-hero.hw-hero--article > .container > * { max-width: none; margin-left: 0; margin-right: 0; }
.help-hero .section-lead { max-width: 640px; }

.help-hero button, .help-player-section button, .help-text-section button, .help-feedback-section button,
.help-search-input, .help-task, .help-cat a, .help-start-step, .help-next { -webkit-tap-highlight-color: transparent; }
.help-player-section :focus-visible, .help-text-section :focus-visible, .help-feedback-section :focus-visible,
.help-hub-section :focus-visible, .help-next-section :focus-visible, .help-search-input:focus-visible {
    outline: 3px solid var(--color-orange); outline-offset: 3px;
}

/* Voor wie: twee eigen knoppen naast elkaar. */
.help-roles { display: inline-flex; gap: 6px; padding: 5px; margin-bottom: 32px; border-radius: 14px; background: var(--color-bg-soft); max-width: 100%; }
.help-role {
    min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; background: none; cursor: pointer;
    font: inherit; font-size: 1rem; color: var(--color-text-secondary);
}
.help-role.is-active { background: var(--color-white); color: var(--color-text); font-weight: 600; }

/* De speler: links het ingezoomde beeld, rechts de zin en de bediening (op een gsm eronder). */
.help-player { display: grid; grid-template-columns: minmax(0, 620px) minmax(0, 1fr); gap: 56px; align-items: center; }
.help-stage {
    position: relative; overflow: hidden; aspect-ratio: 5 / 4; border: 1px solid var(--color-border-strong); border-radius: 24px;
    background: var(--color-bg-soft); cursor: pointer;
}
.help-layer {
    position: absolute; left: 0; top: 0; width: 390px; height: 844px; transform-origin: 0 0;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}
.help-layer + .help-layer { opacity: 0; }
.help-layer img { display: block; width: 390px; height: 844px; max-width: none; }
/* Zonder script: het eerste scherm gewoon passend. */
.help-player:not(.is-ready) .help-layer { position: static; width: auto; height: 100%; }
.help-player:not(.is-ready) .help-layer img { width: auto; height: 100%; margin: 0 auto; }
.help-player:not(.is-ready) .help-layer + .help-layer { display: none; }

.help-ring {
    position: absolute; padding: 0; border: 3px solid var(--color-orange); border-radius: 14px; background: none; cursor: pointer;
    transition: left 0.7s cubic-bezier(0.4, 0, 0.2, 1), top 0.7s cubic-bezier(0.4, 0, 0.2, 1), width 0.7s cubic-bezier(0.4, 0, 0.2, 1), height 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    animation: help-ring-pulse 1.8s ease-in-out infinite;
}
.help-ring.is-hinting { animation: help-ring-hint 0.5s ease-in-out 2; }
@keyframes help-ring-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes help-ring-hint { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* De tik: een zachte oranje cirkel op de knop, net voor de volgende stap. */
.help-tap {
    position: absolute; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
    background: var(--color-orange); opacity: 0; pointer-events: none; transform: scale(0.3);
}
.help-tap.is-tapping { animation: help-tap 0.6s ease-out; }
@keyframes help-tap { 0% { opacity: 0.45; transform: scale(0.3); } 100% { opacity: 0; transform: scale(1.4); } }

/* Waar op je scherm: het hele scherm klein in een hoek, met het stuk dat groot in beeld is. */
.help-map {
    position: absolute; right: 14px; top: 14px; width: 72px; overflow: hidden; border: 1px solid var(--color-border-strong);
    border-radius: 10px; background: var(--color-white); pointer-events: none;
}
.help-map.is-left { right: auto; left: 14px; }
.help-map.is-bottom { top: auto; bottom: 14px; }
.help-map img { display: block; width: 100%; height: auto; }
.help-map-view { position: absolute; border: 2px solid var(--color-orange); border-radius: 3px; box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
    .help-layer, .help-ring { transition: none; }
    .help-ring, .help-ring.is-hinting { animation: none; }
}

.help-side { max-width: 460px; }
.help-count { margin: 0 0 10px; font-size: 0.95rem; color: var(--color-text-muted); }
.help-say { margin: 0; min-height: 4.4em; font-size: 1.35rem; line-height: 1.45; color: var(--color-text); }

/* Bediening: afspelen en een balk met een stukje per stap. */
.help-controls { display: flex; align-items: center; gap: 16px; margin-top: 28px; }
.help-play {
    flex: 0 0 52px; height: 52px; border: 0; border-radius: 50%; background: var(--color-orange); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.help-play-icon { width: 0; height: 0; margin-left: 4px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent var(--color-white); }
.help-player.is-playing .help-play-icon { width: 14px; height: 18px; margin: 0; border: 0; border-left: 5px solid var(--color-white); border-right: 5px solid var(--color-white); box-sizing: border-box; }
.help-bar { flex: 1; display: flex; gap: 5px; }
.help-segment { flex: 1; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.help-segment::before { content: ''; position: absolute; left: 0; right: 0; top: 11px; height: 6px; border-radius: 3px; background: var(--color-border); }
.help-segment-fill { position: absolute; left: 0; top: 11px; height: 6px; border-radius: 3px; background: var(--color-orange); width: 0; }

.help-nav { display: flex; gap: 12px; margin-top: 20px; }
.help-nav-button {
    min-height: 48px; padding: 0 22px; border: 1px solid var(--color-border-strong); border-radius: 12px;
    background: var(--color-white); color: var(--color-text); font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
}
.help-nav-button.is-primary { border-color: var(--color-orange); background: var(--color-orange); color: var(--color-white); }
.help-nav-button[disabled] { opacity: 0.4; cursor: default; }
@media (hover: hover) {
    .help-nav-button:not([disabled]):hover { border-color: var(--color-orange); }
    .help-nav-button.is-primary:not([disabled]):hover { background: var(--color-orange-hover); }
    .help-play:hover { background: var(--color-orange-hover); }
    .help-step:hover { background: var(--color-bg-soft); }
    .help-task:hover .help-task-title { color: var(--color-orange-hover); }
    .help-start-step:hover, .help-next:hover { border-color: var(--color-orange); }
    .help-cat-title a:hover, .help-cat-tasks a:hover, .help-cat-all:hover { color: var(--color-orange-hover); }
}

/* Nu zelf doen in de app: rustig tot je de uitleg bekeken hebt, dan oranje (Lars: "eerst kijken, dan nadoen"). */
.help-try { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--color-border); }
.help-try-button {
    display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 12px;
    border: 1px solid var(--color-border-strong); background: var(--color-white); color: var(--color-text);
    font-size: 1rem; font-weight: 600; text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.help-try-button::after { content: ' \2197'; margin-left: 6px; color: var(--color-orange); }
.help-player.is-done .help-try-button { border-color: var(--color-orange); background: var(--color-orange); color: var(--color-white); }
.help-player.is-done .help-try-button::after { color: var(--color-white); }
.help-try-note { margin: 10px 0 0; font-size: 0.95rem; line-height: 1.5; color: var(--color-text-secondary); }
@media (hover: hover) {
    .help-try-button:hover { border-color: var(--color-orange); }
    .help-player.is-done .help-try-button:hover { background: var(--color-orange-hover); }
}
@media (max-width: 860px) { .help-try-button { width: 100%; box-sizing: border-box; } }

/* Stap voor stap als tekst. Een stap aantikken toont die stap in de speler. */
.help-h2 { margin: 0 0 20px; font-size: 1.5rem; font-weight: 400; }
.help-steps { list-style: none; margin: 0; padding: 0; max-width: 720px; }
.help-steps li + li { margin-top: 4px; }
.help-step {
    display: flex; gap: 14px; width: 100%; padding: 12px 14px; border: 0; border-radius: 12px; background: none;
    text-align: left; font: inherit; font-size: 1.05rem; line-height: 1.5; color: var(--color-text); cursor: pointer;
}
.help-step.is-current { background: var(--color-orange-soft); }
.help-step-number {
    flex: 0 0 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--color-bg-soft); font-size: 0.9rem; font-weight: 600; color: var(--color-text-secondary);
}
.help-step.is-current .help-step-number { background: var(--color-orange); color: var(--color-white); }
.help-done { margin: 20px 0 0 14px; font-size: 1.05rem; color: var(--color-text-secondary); }

/* Hielp dit je? */
.help-feedback { padding: 28px; border-radius: 18px; background: var(--color-bg-soft); max-width: 640px; }
.help-feedback-question { margin: 0 0 14px; font-size: 1.15rem; font-weight: 600; }
.help-feedback-buttons { display: flex; gap: 12px; }
.help-feedback-thanks { margin: 0; font-size: 1.05rem; line-height: 1.5; }

/* Het overzicht: zoeken, voor wie, en de taken per onderwerp. */
.help-search { margin-top: 32px; max-width: 560px; }
.help-search-input {
    width: 100%; min-height: 56px; padding: 0 20px; box-sizing: border-box; border: 1px solid var(--color-border-strong);
    border-radius: 14px; background: var(--color-white); font: inherit; font-size: 1.1rem; color: var(--color-text);
    -webkit-appearance: none; appearance: none;
}
/* Geen blauw kruisje van de browser in het zoekveld (nergens blauw); wissen kan met de toets. */
.help-search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.help-collection + .help-collection { margin-top: 56px; }
.help-collection-text { margin: -10px 0 18px; font-size: 1.05rem; color: var(--color-text-secondary); }
.help-tasks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-border); max-width: 760px; }
.help-tasks li { border-bottom: 1px solid var(--color-border); }
.help-task { display: block; padding: 18px 0; text-decoration: none; color: inherit; }
.help-task-title { display: block; font-size: 1.15rem; font-weight: 600; color: var(--color-text); }
.help-task-why { display: block; margin-top: 4px; font-size: 1rem; line-height: 1.5; color: var(--color-text-secondary); }
.help-empty { font-size: 1.05rem; }
.help-task-label { display: block; margin-bottom: 4px; font-size: 0.9rem; color: var(--color-text-muted); }

/* Voor wie begint: de uitleggen van een eerste werkdag op een rij, genummerd. */
.help-start { margin-bottom: 64px; }
.help-start-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.help-start-step {
    display: flex; align-items: center; gap: 14px; min-height: 64px; height: 100%; padding: 14px 18px; box-sizing: border-box;
    border: 1px solid var(--color-border-strong); border-radius: 16px; background: var(--color-white); color: var(--color-text);
    text-decoration: none; font-size: 1.05rem; font-weight: 600; line-height: 1.35;
}
.help-start-step .help-step-number { background: var(--color-orange); color: var(--color-white); }

/* De onderwerpen: per onderwerp de titel, één zin en de uitleggen die erin zitten. Geen beelden. */
.help-cats-title { margin-bottom: 24px; }
.help-cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.help-cat {
    display: flex; flex-direction: column; padding: 24px 24px 20px; border: 1px solid var(--color-border-strong);
    border-radius: 20px; background: var(--color-white);
}
.help-cat-title { margin: 0; font-size: 1.25rem; font-weight: 600; }
.help-cat-title a { color: var(--color-text); text-decoration: none; }
.help-cat-text { margin: 6px 0 0; font-size: 1rem; line-height: 1.5; color: var(--color-text-secondary); }
.help-cat-tasks { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--color-border); }
.help-cat-tasks li { border-bottom: 1px solid var(--color-border); }
.help-cat-tasks a {
    display: block; padding: 11px 0; font-size: 1.02rem; line-height: 1.4; color: var(--color-text); text-decoration: none;
}
.help-cat-all { align-self: flex-start; margin-top: auto; padding-top: 16px; font-size: 1rem; font-weight: 600; color: var(--color-text); text-decoration: none; }
.help-cat-all::after { content: ' \203A'; color: var(--color-orange); }
.help-task-meta { display: block; margin-top: 6px; font-size: 0.92rem; color: var(--color-text-muted); }

/* Onder een uitleg: de volgende in hetzelfde onderwerp. */
.help-next {
    display: flex; flex-direction: column; gap: 4px; max-width: 640px; padding: 22px 24px; border: 1px solid var(--color-border-strong);
    border-radius: 18px; color: inherit; text-decoration: none;
}
.help-next-label { font-size: 0.95rem; color: var(--color-text-muted); }
.help-next-title { font-size: 1.2rem; font-weight: 600; color: var(--color-text); }
.help-next-title::after { content: ' \203A'; color: var(--color-orange); }

@media (max-width: 860px) {
    .help-player { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .help-side { max-width: none; }
    .help-say { font-size: 1.2rem; min-height: 0; }
    .help-nav-button { flex: 1; }
    .help-map { width: 56px; }
    /* Op een gsm een staand beeld: zo is ook het hele scherm (voor het inzoomen) nog leesbaar. */
    .help-stage { aspect-ratio: 4 / 5; }
}

/* Een eigen display (flex, grid) mag het verbergen niet tenietdoen. */
.help-player-section [hidden], .help-text-section [hidden], .help-feedback-section [hidden], .help-hub-section [hidden] { display: none !important; }
