/* Design tokens. Scoped under #bos-app so the WordPress theme is unaffected. */
#bos-app {
  --bos-bg: #f7f7f7;
  --bos-card: #fff;
  --bos-text: #181818;
  --bos-muted: #606060;
  --bos-border: #d9d9d9;
  --bos-green: #688f31;
  --bos-lime: oklch(0.902 0.163 128);
  --bos-lime-hover: oklch(0.852 0.163 128);
  --bos-lime-ink: oklch(0.22 0.03 265);
  --bos-error: #b42318;
  --bos-shadow: 0 6px 18px -10px rgb(0 0 0 / 0.6);
  font-family: 'Rubik', ui-sans-serif, system-ui, sans-serif;
  color: var(--bos-text);
  line-height: 1.5;
}
#bos-app *, #bos-app *::before, #bos-app *::after { box-sizing: border-box; }
#bos-app h2 { color: var(--bos-green); margin: 0 0 12px; font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
#bos-app p { margin: 0; }
#bos-app a { color: inherit; }

#bos-app .bos-root { background: var(--bos-bg); border-radius: 12px; }
#bos-app .bos-shade { min-height: 560px; padding: 24px 16px; }
#bos-app .bos-page { max-width: 720px; margin: 0 auto; }
#bos-app .bos-center { display: flex; align-items: center; justify-content: center; min-height: 480px; text-align: center; }
#bos-app .bos-eyebrow { color: var(--bos-muted); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; margin-bottom: 8px; }

#bos-app .bos-card { background: var(--bos-card); border: 1px solid var(--bos-border); padding: 28px; border-radius: 8px; width: 100%; max-width: 400px; }
#bos-app .bos-card p { margin-bottom: 16px; color: var(--bos-muted); }
#bos-app .bos-signin { display: flex; flex-direction: column; gap: 14px; text-align: left; }
#bos-app .bos-signin h2 { text-align: center; }
#bos-app .bos-logo { max-width: 200px; max-height: 80px; width: auto; height: auto; object-fit: contain; align-self: center; }
#bos-app label { display: flex; flex-direction: column; gap: 6px; font-size: 0.875rem; font-weight: 500; color: var(--bos-text); }
#bos-app input[type='email'], #bos-app input[type='password'], #bos-app .bos-search {
  font: inherit; font-size: 16px; color: var(--bos-text); background: #fff; border: 1px solid var(--bos-border); border-radius: 6px; padding: 11px 14px; width: 100%;
}
#bos-app input:focus-visible, #bos-app button:focus-visible, #bos-app a:focus-visible { outline: 2px solid var(--bos-green); outline-offset: 2px; }

#bos-app button { font: inherit; cursor: pointer; }
#bos-app .bos-btn { background: var(--bos-lime); color: var(--bos-lime-ink); border: 0; border-radius: 6px; padding: 12px 24px; font-weight: 600; box-shadow: var(--bos-shadow); }
#bos-app .bos-btn:hover { background: var(--bos-lime-hover); }
#bos-app .bos-btn:disabled { opacity: 0.6; cursor: default; }
#bos-app .bos-btn-ghost { background: var(--bos-bg); border: 1px solid var(--bos-border); box-shadow: none; font-weight: 500; }
#bos-app .bos-btn-ghost:hover { background: #fff; }
#bos-app .bos-link { background: none; border: 0; color: var(--bos-text); text-decoration: none; padding: 8px 0; font-size: 0.95rem; font-weight: 500; }
#bos-app .bos-link:hover { color: var(--bos-green); }
#bos-app .bos-icon-btn { background: #fff; color: var(--bos-text); border: 1px solid var(--bos-border); border-radius: 6px; min-width: 48px; height: 48px; font-size: 1.1rem; font-weight: 500; }
#bos-app .bos-icon-btn:hover { border-color: var(--bos-green); color: var(--bos-green); }
#bos-app .bos-error { color: var(--bos-error); }
#bos-app .bos-muted a, #bos-app .bos-check a { color: var(--bos-green); font-weight: 500; }
#bos-app .bos-field-hint { color: var(--bos-muted); font-size: 0.75rem; font-weight: 400; }
#bos-app .bos-phone { display: grid; grid-template-columns: 84px 1fr; gap: 10px; }
#bos-app input[type='text'], #bos-app input[type='tel'] {
  font: inherit; font-size: 16px; color: var(--bos-text); background: #fff; border: 1px solid var(--bos-border); border-radius: 6px; padding: 11px 14px; width: 100%;
}
#bos-app .bos-check { flex-direction: row; align-items: flex-start; gap: 10px; color: var(--bos-text); font-weight: 400; }
#bos-app .bos-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--bos-green); flex: none; }
#bos-app .bos-code { font-size: 1.6rem !important; letter-spacing: 0.5em; text-align: center; font-variant-numeric: tabular-nums; }
#bos-app .bos-terms { max-width: 640px; max-height: 85vh; display: flex; flex-direction: column; gap: 16px; }
#bos-app .bos-terms-body { overflow: auto; color: var(--bos-text); font-size: 0.9rem; }
#bos-app .bos-terms-body h1 { font-size: 1.3rem; }
#bos-app .bos-muted { color: var(--bos-muted); font-size: 0.875rem; text-align: center; }

#bos-app .bos-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
#bos-app .bos-header h2 { margin: 0; }
#bos-app .bos-search { margin-bottom: 16px; }
#bos-app .bos-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
#bos-app .bos-lesson { display: flex; gap: 16px; align-items: center; padding: 14px; border-radius: 8px; background: var(--bos-card); border: 1px solid var(--bos-border); text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
#bos-app .bos-lesson:hover { border-color: var(--bos-green); transform: translateY(-1px); }
#bos-app .bos-lesson img { width: 72px; height: 72px; border-radius: 6px; object-fit: cover; flex: none; }
#bos-app .bos-lesson strong { display: block; font-weight: 700; font-size: 1.05rem; }
#bos-app .bos-lesson p { color: var(--bos-muted); font-size: 0.875rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#bos-app .bos-done { margin-left: 8px; color: var(--bos-green); }

#bos-app .bos-player { text-align: center; }
#bos-app .bos-title { margin-bottom: 20px; }
#bos-app .bos-lengths { display: flex; justify-content: center; align-items: center; gap: 12px; margin-bottom: 24px; }
#bos-app .bos-lengths button { background: #fff; color: var(--bos-text); border: 1px solid var(--bos-border); border-radius: 8px; font-size: 1.25rem; font-weight: 600; width: 76px; height: 56px; }
#bos-app .bos-lengths button.on { background: var(--bos-lime); color: var(--bos-lime-ink); border-color: transparent; box-shadow: var(--bos-shadow); }
#bos-app .bos-lengths .bos-notes-btn { width: 36px; height: 36px; border-radius: 50%; font-size: 0.95rem; font-style: italic; }
#bos-app .bos-seek { width: 100%; accent-color: var(--bos-green); }
#bos-app .bos-times { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--bos-muted); font-variant-numeric: tabular-nums; }
#bos-app .bos-controls { display: flex; justify-content: center; align-items: center; gap: 28px; margin: 16px 0 24px; }
#bos-app .bos-play { width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--bos-lime); color: var(--bos-lime-ink); font-size: 1.6rem; box-shadow: var(--bos-shadow); }
#bos-app .bos-play:hover { background: var(--bos-lime-hover); }
#bos-app .bos-desc { color: var(--bos-muted); text-align: left; white-space: pre-line; background: #fff; border: 1px solid var(--bos-border); border-radius: 8px; padding: 20px; }

/* Tabs + programs */
#bos-app .bos-tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--bos-border); overflow-x: auto; scrollbar-width: none; }
#bos-app .bos-tabs a { white-space: nowrap; }
#bos-app .bos-section + .bos-section { margin-top: 24px; }
#bos-app .bos-section h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 10px; }
#bos-app .bos-tabs a { padding: 10px 14px; text-decoration: none; font-weight: 500; color: var(--bos-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
#bos-app .bos-tabs a.active { color: var(--bos-green); border-bottom-color: var(--bos-green); }
#bos-app .bos-grow { flex: 1; min-width: 0; }
#bos-app .bos-progress { height: 6px; background: #ececec; border-radius: 999px; overflow: hidden; margin-top: 10px; }
#bos-app .bos-progress span { display: block; height: 100%; background: var(--bos-green); border-radius: inherit; transition: width 0.3s; }
#bos-app .bos-progress-lg { height: 10px; margin-top: 20px; }
#bos-app .bos-count { display: block; color: var(--bos-muted); font-size: 0.8rem; margin-top: 6px; }
#bos-app .bos-lead { color: var(--bos-muted); white-space: pre-line; }
#bos-app .bos-finished { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; background: #fff; border: 2px solid var(--bos-green); border-radius: 16px; padding: 20px 24px; margin: 20px 0 8px; }
#bos-app .bos-steps { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 8px; }
#bos-app .bos-step { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: #fff; border: 1px solid var(--bos-border); border-radius: 8px; text-decoration: none; }
#bos-app a.bos-step:hover { border-color: var(--bos-green); }
#bos-app .bos-step strong { display: block; font-weight: 600; }
#bos-app .bos-step small { color: var(--bos-green); font-weight: 600; font-size: 0.8rem; }
#bos-app .bos-step-num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--bos-bg); border: 1px solid var(--bos-border); font-weight: 600; font-size: 0.9rem; }
#bos-app .bos-step.done .bos-step-num { background: var(--bos-green); border-color: var(--bos-green); color: #fff; }
#bos-app .bos-step.current { border: 2px solid var(--bos-green); }
#bos-app .bos-step.current .bos-step-num { background: var(--bos-lime); border-color: transparent; color: var(--bos-lime-ink); }
#bos-app .bos-step.locked { opacity: 0.55; cursor: not-allowed; }
#bos-app .bos-locked { cursor: default; }
#bos-app .bos-locked:hover { border-color: var(--bos-border); transform: none; }
#bos-app .bos-locked img { filter: grayscale(0.6); opacity: 0.8; }
#bos-app .bos-buy { flex: none; text-decoration: none; padding: 10px 16px; font-size: 0.9rem; }
#bos-app .bos-chip-owned { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--bos-lime); color: var(--bos-lime-ink); font-size: 0.7rem; font-weight: 600; vertical-align: middle; }

/* Lesson image gallery + full-screen viewer */
#bos-app .bos-gallery { margin: 8px 0 20px; }
#bos-app .bos-video { position: relative; aspect-ratio: 16 / 9; margin: 8px 0 20px; border-radius: 16px; overflow: hidden; background: #000; }
#bos-app .bos-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
#bos-app .bos-slider { position: relative; }
#bos-app .bos-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 12px; }
#bos-app .bos-track::-webkit-scrollbar { display: none; }
#bos-app .bos-slide { flex: 0 0 100%; scroll-snap-align: center; padding: 0; border: 0; background: #fff; cursor: zoom-in; display: flex; align-items: center; justify-content: center; }
#bos-app .bos-gallery > .bos-slider .bos-slide img { width: 100%; height: clamp(300px, 70vw, 520px); object-fit: contain; display: block; }
#bos-app .bos-slider .bos-track { border: 1px solid var(--bos-border); }
#bos-app .bos-slide-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--bos-border); background: rgb(255 255 255 / 0.9); color: var(--bos-text); font-size: 1.5rem; line-height: 1; display: grid; place-items: center; }
#bos-app .bos-slide-btn.prev { left: 10px; }
#bos-app .bos-slide-btn.next { right: 10px; }
#bos-app .bos-slide-btn:disabled { opacity: 0.35; cursor: default; }
#bos-app .bos-dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
#bos-app .bos-dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: var(--bos-border); }
#bos-app .bos-dots button[aria-current='true'] { background: var(--bos-green); }
#bos-app .bos-viewer { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; overflow: hidden; padding: 0; border: 0; background: rgb(0 0 0 / 0.92); }
#bos-app .bos-viewer::backdrop { background: rgb(0 0 0 / 0.6); }
#bos-app .bos-viewer .bos-track { height: 100%; border-radius: 0; }
#bos-app .bos-viewer .bos-slide { background: transparent; cursor: default; padding: 48px 16px; }
#bos-app .bos-viewer .bos-slide img { max-width: 100%; max-height: 100%; object-fit: contain; }
#bos-app .bos-viewer-close { position: absolute; top: 12px; right: 12px; z-index: 1; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgb(255 255 255 / 0.15); color: #fff; font-size: 1.2rem; }

/* Advanced search */
#bos-app .bos-find { max-width: none; display: grid; gap: 18px; margin-bottom: 20px; }
#bos-app .bos-filter { border: 0; margin: 0; padding: 0; min-width: 0; }
#bos-app .bos-filter legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
#bos-app .bos-chips { display: flex; flex-wrap: wrap; gap: 8px; }
#bos-app .bos-chip { background: #fff; color: var(--bos-text); border: 1px solid var(--bos-border); border-radius: 999px; padding: 8px 14px; font-size: 0.9rem; }
#bos-app .bos-chip:hover { border-color: var(--bos-green); }
#bos-app .bos-chip[aria-pressed='true'] { background: var(--bos-lime); border-color: transparent; color: var(--bos-lime-ink); font-weight: 600; }
#bos-app .bos-find-actions { display: flex; gap: 10px; flex-wrap: wrap; }
#bos-app .bos-results-count { margin: 0 0 10px; font-size: 0.9rem; }

#bos-app .bos-modal { position: fixed; inset: 0; background: rgb(0 0 0 / 0.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 99999; }
#bos-app .bos-modal .bos-card p { color: var(--bos-text); }

#bos-app .bos-spinner { width: 40px; height: 40px; border: 3px solid var(--bos-border); border-top-color: var(--bos-green); border-radius: 50%; animation: bos-spin 0.9s linear infinite; }
@keyframes bos-spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
  #bos-app .bos-shade { padding: 16px 12px; }
  #bos-app .bos-card { padding: 20px; }
}
