/* Site stylesheet: mobile first, system font stack, one accent colour. */
:root {
    --accent: #1b6ef3;
    --text: #1d2330;
    --muted: #5d6676;
    --bg: #ffffff;
    --surface: #f3f5f9;
    --border: #d5dae3;
    --error: #b3261e;
    --ok: #1e7a3c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}

a {
    color: var(--accent);
}

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.site-name {
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}

.page {
    max-width: 40rem;
    margin: 0 auto;
    padding: 1rem;
}

.form {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form input[type="email"],
.form input[type="password"],
.form input[type="text"] {
    width: 100%;
    padding: 0.6rem 0.7rem;
    font: inherit;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
}

.form input:focus-visible,
.button:focus-visible,
.link-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.button {
    padding: 0.65rem 1rem;
    font: inherit;
    font-weight: 600;
    color: #ffffff;
    background: var(--accent);
    border: 0;
    border-radius: 0.375rem;
    cursor: pointer;
}

a.button {
    display: inline-block;
    text-decoration: none;
}

/* Public start page and footer. */
.course-cards {
    display: grid;
    gap: 1rem;
}

.course-card {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--surface);
}

.course-card h2 {
    margin-top: 0;
}

.site-footer {
    max-width: 40rem;
    margin: 2rem auto 0;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

.inline-form {
    display: inline;
    margin: 0;
}

.link-button {
    padding: 0;
    font: inherit;
    color: var(--accent);
    background: none;
    border: 0;
    text-decoration: underline;
    cursor: pointer;
}

.notice {
    padding: 0.6rem 0.8rem;
    background: var(--surface);
    border-left: 4px solid var(--accent);
    border-radius: 0.25rem;
}

.notice-error {
    border-left-color: var(--error);
    color: var(--error);
}

.notice-ok {
    border-left-color: var(--ok);
    color: var(--ok);
}

/* Shown on every page while the Testkasse replaces Digistore24 (config digistore.mock_checkout). */
.test-banner {
    margin: 0;
    padding: 0.5rem 1rem;
    background: var(--error);
    color: #fff;
    text-align: center;
    font-weight: 600;
}

/* Course list, course page and video page. */
.muted {
    color: var(--muted);
}

.course-list,
.video-list,
.chapter-list {
    padding-left: 1.25rem;
}

.video-item .status {
    margin-left: 0.5rem;
    font-size: 0.9rem;
}

.video-js {
    display: block;
    width: 100%;
    max-width: 960px;
    background: #000;
}

.chapter-list {
    list-style: none;
    padding-left: 0;
}

.chapter {
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    padding: 0.25rem 0;
    cursor: pointer;
    text-align: left;
}

.chapter-time {
    font-variant-numeric: tabular-nums;
    margin-right: 0.5rem;
}

.video-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Player: Video.js runs without its injected <style> (CSP), so the size comes from here. */
.video-js {
    height: auto;
    aspect-ratio: 16 / 9;
}

.video-js .chapter-marker {
    position: absolute;
    top: 0;
    width: 3px;
    height: 100%;
    margin-left: -1px;
    background: rgba(255, 255, 255, 0.9);
    pointer-events: none;
    z-index: 1;
}

.chapter.is-current {
    font-weight: 700;
    color: var(--text);
}
