/* Vrije timer (kleurentimer + racetimer) – bouwt voort op site.css */
.timer-app { padding: 0; overflow: hidden; }
.timer-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid rgba(124,58,237,.08); }
.timer-tabs { display: inline-flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--accent-soft); }
.timer-tab { min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); background: transparent; border: 0; border-radius: 999px; font-weight: 800; cursor: pointer; }
.timer-tab[aria-selected="true"] { color: var(--accent); background: #fff; box-shadow: 0 5px 14px rgba(57,48,102,.12); }
.timer-utility { display: flex; gap: 8px; flex-wrap: wrap; }

.timer-layout { display: grid; grid-template-columns: 1.1fr .9fr; }
.timer-visual-column { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 22px; background: linear-gradient(180deg, rgba(255,255,255,.5), var(--accent-soft)); }
.timer-visual { width: 100%; min-height: 340px; display: grid; place-items: center; outline-offset: 6px; }
.timer-controls { padding: 30px 28px; display: flex; flex-direction: column; gap: 24px; justify-content: center; }

.field-label { display: block; margin-bottom: 10px; padding: 0; font-weight: 800; }
.input-wrap { display: flex; align-items: center; gap: 10px; padding: 0 14px; background: #fff; border: 2px solid rgba(124,58,237,.12); border-radius: 16px; }
.input-wrap:focus-within, .time-inputs input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); outline: 0; }
.input-wrap input { flex: 1; min-width: 0; height: 52px; border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--text); outline: 0; }
.time-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.time-inputs { display: grid; grid-template-columns: 1fr 22px 1fr; align-items: start; gap: 8px; }
.time-inputs label { text-align: center; color: var(--muted); font-size: .72rem; text-transform: uppercase; font-weight: 800; letter-spacing: .05em; }
.time-inputs input { width: 100%; height: 72px; display: block; margin-bottom: 6px; color: var(--text); background: #fff; border: 2px solid rgba(124,58,237,.12); border-radius: 16px; text-align: center; font-family: 'Baloo 2', 'Nunito', system-ui, sans-serif; font-size: 2.2rem; font-weight: 700; -moz-appearance: textfield; }
.time-inputs input::-webkit-inner-spin-button { appearance: none; }
.time-inputs input:disabled { opacity: .55; }
.time-colon { padding-top: 14px; text-align: center; font-size: 2rem; font-weight: 900; color: var(--muted); }
.quick-times { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.quick-times button { min-height: 42px; color: var(--accent); background: var(--accent-soft); border: 2px solid transparent; border-radius: 999px; font-weight: 800; cursor: pointer; }
.quick-times button:hover:not(:disabled), .quick-times button.active { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.quick-times button:disabled { opacity: .5; cursor: not-allowed; }
.control-actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.btn.is-pause { background: linear-gradient(135deg, #f59e0b, #fbbf24); box-shadow: 0 14px 30px rgba(245,158,11,.25); }
.keyboard-help { margin: -8px 0 0; color: var(--muted); font-size: .85rem; text-align: center; }
kbd { padding: 2px 6px; color: var(--muted); background: #f3f2f7; border: 1px solid #e5e2ec; border-radius: 6px; box-shadow: 0 1px 0 #d8d5df; font-size: .8rem; }

.status-pill { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 8px 16px; color: var(--muted); background: #fff; border: 1px solid rgba(124,58,237,.1); border-radius: 999px; font-size: .9rem; }
.status-pill span { width: 9px; height: 9px; border-radius: 50%; background: #aaa9b8; }
.status-pill.running span { background: var(--green); box-shadow: 0 0 0 5px rgba(52,211,153,.2); animation: pulse 1.3s infinite; }
.status-pill.paused span { background: var(--yellow); }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(52,211,153,0); } }

/* kleurentimer */
.circle-timer { position: relative; width: min(100%, 340px); aspect-ratio: 1; display: grid; place-items: center; }
.circle-timer svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.circle-bg, .circle-progress { fill: none; stroke-width: 16; }
.circle-bg { stroke: rgba(5,150,105,.14); }
.circle-progress { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .2s linear, stroke .4s; filter: drop-shadow(0 6px 7px var(--accent-glow)); }
.circle-dot { fill: var(--yellow); stroke: #fff; stroke-width: 3; }
.circle-center { width: 74%; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; background: #fff; box-shadow: 0 13px 40px rgba(72,48,122,.12); text-align: center; padding: 10px; }
.big-time { font-family: 'Baloo 2', 'Nunito', system-ui, sans-serif; font-size: clamp(3rem, 9vw, 4.6rem); line-height: .95; color: var(--accent); font-variant-numeric: tabular-nums; }
.visual-task { margin-top: 6px; max-width: 100%; color: var(--muted); font-weight: 800; overflow-wrap: anywhere; }
.timer-face { margin-top: 4px; font-size: 2rem; color: var(--accent-2); line-height: 1; }

/* racetimer */
.race-timer { width: min(100%, 440px); text-align: center; }
.race-sky { position: relative; height: 195px; overflow: hidden; background: linear-gradient(#dff3ff 0 65%, #dff1c5 65%); border-radius: 24px 24px 12px 12px; }
.race-cloud { position: absolute; color: #fff; font-size: 34px; opacity: .95; }
.race-cloud.one { top: 20px; left: 10%; } .race-cloud.two { top: 52px; right: 11%; transform: scale(.72); }
.race-finish { position: absolute; right: 17px; bottom: 40px; width: 8px; height: 72px; background: #fff; border: 2px solid var(--text); }
.race-finish::before { content: ""; position: absolute; left: 6px; top: -2px; width: 42px; height: 32px; border: 2px solid var(--text); background: conic-gradient(#fff 25%, #30324f 0 50%, #fff 0 75%, #30324f 0) 0 0/16px 16px; }
.race-road { position: absolute; left: 0; right: 0; bottom: 0; height: 54px; background: #585a6e; border-top: 7px solid #fff; }
.race-road::after { content: ""; position: absolute; left: 0; right: 0; top: 23px; border-top: 4px dashed var(--yellow); }
.race-runner { transform: scaleX(-1); /* het autootje-emoji kijkt standaard naar links */ position: absolute; z-index: 2; left: clamp(5px, var(--race-progress, 0%), calc(100% - 74px)); bottom: 22px; font-size: 54px; transition: left .22s linear; filter: drop-shadow(0 6px 3px rgba(0,0,0,.14)); }
.race-timer.is-running .race-runner { animation: bounce .45s ease-in-out infinite alternate; }
@keyframes bounce { from { transform: scaleX(-1) translateY(0); } to { transform: scaleX(-1) translateY(-5px); } }
.race-info { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; text-align: left; }
.race-info .big-time { font-size: 3.2rem; }
.race-info-text { min-width: 0; display: flex; flex-direction: column; }
.race-badge { padding: 8px 14px; color: var(--green-dark); background: rgba(52,211,153,.18); border-radius: 12px; font-weight: 900; }

/* zandloper (tekening: assets/js/zandloper.js) */
.hourglass-timer { width: min(100%, 440px); display: flex; align-items: center; justify-content: center; gap: 18px; }
.hourglass-canvas { display: block; width: min(62%, 250px); height: clamp(300px, 46vh, 380px); }
.hourglass-info { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.hourglass-info .big-time { font-size: clamp(2.6rem, 7vw, 3.8rem); }

/* voorbeelden + FAQ */
.use-section, .faq-section { margin-top: 44px; }
.use-cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.use-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; text-align: left; font: inherit; color: var(--text); cursor: pointer; background: rgba(255,255,255,.84); border: 1px solid rgba(124,58,237,.08); border-radius: var(--radius-lg); box-shadow: var(--shadow); transition: transform .2s ease; }
.use-card:hover, .use-card:focus-visible { transform: translateY(-3px); }
.use-card > span { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; background: var(--accent-soft); flex: none; }
.use-card div { flex: 1; min-width: 0; } .use-card small { display: block; color: var(--muted); font-weight: 600; }
.use-card b { color: var(--accent); font-family: 'Baloo 2', 'Nunito', system-ui, sans-serif; font-size: 1.2rem; }
.faq-list { display: grid; gap: 12px; max-width: 820px; }
.faq-list details { background: rgba(255,255,255,.84); border: 1px solid rgba(124,58,237,.08); border-radius: var(--radius-lg); padding: 0 20px; box-shadow: var(--shadow); }
.faq-list summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; padding: 18px 0; font-weight: 800; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary span { color: var(--accent); font-size: 1.4rem; line-height: 1; transition: transform .2s; }
.faq-list details[open] summary span { transform: rotate(45deg); }
.faq-list details p { margin: 0 0 18px; color: var(--muted); line-height: 1.7; }
.noscript { padding: 14px; text-align: center; background: #fef3c7; font-weight: 700; }

/* schermvullend (digibord) */
.timer-app:fullscreen { display: flex; flex-direction: column; border-radius: 0; overflow: auto; background: linear-gradient(180deg, #f1fbf6 0%, #f8fbff 100%); }
.timer-app:fullscreen .timer-layout { flex: 1; }
.timer-app:fullscreen .circle-timer { width: min(100%, 520px); }
.timer-app:fullscreen .hourglass-timer { width: min(100%, 760px); }
.timer-app:fullscreen .hourglass-canvas { width: min(60%, 460px); height: min(72vh, 680px); }

@media (max-width: 980px) {
  .timer-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .timer-topbar { padding: 12px; }
  .timer-tabs { flex: 1 1 100%; display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 20px; }
  .timer-tab { flex-direction: column; justify-content: center; gap: 2px; padding: 8px 4px; border-radius: 16px; font-size: .85rem; line-height: 1.15; }
  .timer-utility { width: 100%; } .timer-utility .btn { flex: 1; }
  .timer-visual-column { padding: 24px 14px; }
  .timer-visual { min-height: 300px; }
  .timer-controls { padding: 24px 18px; gap: 22px; }
  .keyboard-help { display: none; }
  .quick-times { gap: 6px; }
  .race-runner { font-size: 45px; }
  .hourglass-timer { flex-direction: column; gap: 6px; }
  .hourglass-canvas { width: 72%; height: 300px; }
  .hourglass-info { align-items: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .circle-progress, .race-runner { transition: none !important; }
  .race-timer.is-running .race-runner, .status-pill.running span { animation: none; }
}
