/* ── Simple skin: two-column layout ─────────────────────────── */

/* Override base container so the app fills the page */
body.simple-skin {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

body.simple-skin .navbar {
    flex-shrink: 0;
    margin-bottom: 0;
}
body.simple-skin .navbar .container {
    max-width: none;
    margin: 0;
    padding-left: 4rem;
}

.simple-app {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.simple-main {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    padding: 3rem 4rem;
    display: flex;
    flex-direction: column;
}

/* ── No-sidebar mode (screening, etc.) ──────────────────────── */
body.no-sidebar .simple-sidebar,
body.no-sidebar .sidebar-toggle {
    display: none;
}

/* ── Right sidebar ───────────────────────────────────────────── */
.simple-sidebar {
    width: 268px;
    min-width: 268px;
    flex-shrink: 0;
    background: #fff;
    border-left: 1px solid var(--color-card-border);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 16px 16px 10px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.sidebar-progress-summary {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-primary);
}

/* Observation group */
.sidebar-obs-group {
    border-bottom: 1px solid #f0ece8;
}

.sidebar-obs-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
}
.sidebar-obs-row:hover {
    background: #f8f7f4;
}
.sidebar-obs-group.is-current .sidebar-obs-row {
    background: #f4f0eb;
}

/* Locked observations */
.sidebar-obs-group.is-locked .sidebar-obs-row {
    cursor: default;
    opacity: 0.45;
}
.sidebar-obs-group.is-locked .sidebar-obs-row:hover {
    background: transparent;
}

/* SVG ring */
.sidebar-ring-wrap {
    position: relative;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}
.sidebar-ring-wrap svg {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}
.sidebar-ring-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
}
.sidebar-ring-label.complete {
    color: var(--color-primary);
    font-size: 10px;
}
.sidebar-ring-label.in-progress {
    color: var(--color-primary);
}

.sidebar-obs-info {
    flex: 1;
    min-width: 0;
}
.sidebar-obs-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-obs-group.is-current .sidebar-obs-title {
    color: var(--color-primary-dark);
}
.sidebar-obs-meta {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 1px;
}

/* Question sub-list */
.sidebar-q-list {
    list-style: none;
    padding: 4px 0 8px 0;
    background: #faf8f5;
    border-top: 1px solid #ede9e4;
}
.sidebar-q-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 14px 5px 30px;
    cursor: pointer;
    transition: background 0.12s;
    border-radius: 4px;
    margin: 1px 6px;
}
.sidebar-q-item:hover {
    background: #ede9e4;
}
.sidebar-q-item.is-current {
    background: #e8f0e8;
}

.sidebar-q-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 3px;
    flex-shrink: 0;
}
.sidebar-q-dot.answered {
    background: var(--color-primary);
}
.sidebar-q-dot.todo {
    background: #fff;
    border: 1.5px solid var(--color-card-border);
}

.sidebar-q-text {
    font-size: 11.5px;
    color: var(--color-text-muted);
    line-height: 1.4;
}
.sidebar-q-item.is-current .sidebar-q-text {
    color: var(--color-text);
    font-weight: 500;
}
.sidebar-q-item.answered .sidebar-q-text {
    color: var(--color-text-muted);
}

/* ── Question content area (Option B style) ──────────────────── */
.simple-question-wrap {
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
}

.simple-obs-header {
    margin-bottom: 2rem;
}

.simple-obs-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.simple-obs-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    line-height: 1.2;
}

.simple-q-number {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.simple-q-prompt {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}
.simple-q-prompt p:last-child {
    margin-bottom: 0;
}

.simple-q-helper {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.simple-q-optional {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    font-style: italic;
}

.simple-q-textarea {
    width: 100%;
    min-height: 140px;
    padding: 0.875rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    background: #fff;
    border: 2px solid var(--color-card-border);
    border-radius: 0.5rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    line-height: 1.6;
}
.simple-q-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.simple-btn-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    justify-content: space-between;
    align-items: center;
}

.simple-btn-row .btn-right-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Instructions card in simple skin */
.simple-instructions {
    background: #fff;
    border: 1px solid var(--color-card-border);
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 620px;
    margin: 0 auto;
}
.simple-instructions h2 {
    margin-bottom: 1rem;
}

/* Intake container */
.intake-wrap {
    max-width: 520px;
    margin: 0 auto;
}

@keyframes intake-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.intake-transition.is-transitioning {
    animation: intake-fade-in 0.6s ease;
}

/* Step 2: one-at-a-time question transitions */
.step2-question {
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.step2-fade-out {
    opacity: 0;
    transform: translateY(-6px);
}
.step2-fade-in {
    animation: intake-fade-in 0.5s ease;
}
.intake-wrap input[type="text"],
.intake-wrap input[type="number"],
.intake-wrap textarea,
.intake-wrap select {
    width: 100%;
    box-sizing: border-box;
}

/* Intake scale – labeled buttons */
.scale-labeled {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin: 0.75rem 0 0.25rem;
}
.scale-labeled input[type="radio"] { display: none; }
.scale-labeled label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--color-card-border);
    background: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    font-size: 0.9rem;
}
.scale-labeled label .scale-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    flex-shrink: 0;
    transition: all 0.15s ease;
}
.scale-labeled label:hover {
    border-color: var(--color-primary);
    background: rgba(74, 103, 65, 0.03);
}
.scale-labeled input[type="radio"]:checked + label {
    border-color: var(--color-primary);
    background: rgba(74, 103, 65, 0.06);
}
.scale-labeled input[type="radio"]:checked + label .scale-num {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}
.scale-labeled input[type="radio"]:focus-visible + label {
    box-shadow: 0 0 0 3px var(--color-focus-ring);
}

/* Yes/No toggle buttons */
.yn-buttons {
    display: flex;
    gap: 0.75rem;
    margin: 0.75rem 0 0.25rem;
}
.yn-buttons input[type="radio"] { display: none; }
.yn-buttons label {
    flex: 1;
    max-width: 10rem;
    padding: 0.75rem 1.5rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: 2px solid var(--color-card-border);
    background: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}
.yn-buttons label:hover {
    border-color: var(--color-primary);
    background: rgba(74, 103, 65, 0.03);
}
.yn-buttons input[type="radio"]:checked + label {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}
.yn-buttons input[type="radio"]:focus-visible + label {
    box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.yn-buttons--stacked {
    flex-direction: column;
}
.yn-buttons--stacked label {
    max-width: none;
}

/* Intake reveal animation */
.intake-reveal {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.6s ease, opacity 0.8s ease, margin 0.6s ease;
    margin-top: 0;
}
.intake-reveal.is-visible {
    max-height: 40rem;
    opacity: 1;
    margin-top: 1rem;
}

/* Difficulty rating */
.simple-difficulty-wrap {
    max-width: 620px;
}
.simple-difficulty-scale {
    display: flex;
    gap: 0.75rem;
    margin: 1.5rem 0 0.5rem;
}
.simple-difficulty-scale label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color 0.15s;
}
.simple-difficulty-scale label:hover {
    color: var(--color-text);
}
.simple-difficulty-scale input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--color-primary);
    cursor: pointer;
}
.simple-difficulty-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    max-width: 280px;
}

/* MC options */
.simple-mc-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-card-border);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: #fff;
}
.simple-mc-option:hover {
    border-color: var(--color-primary);
    background: #f0f4ef;
}
.simple-mc-option input[type="radio"] {
    accent-color: var(--color-primary);
    flex-shrink: 0;
}

/* Video upload area */
.simple-upload-area {
    border: 2px dashed var(--color-card-border);
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    background: #fff;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}
.simple-upload-area:hover {
    border-color: var(--color-primary);
}

/* ── Mobile: phone-width (<= 480px) ────────────────────────── */

/* Hamburger button — hidden on desktop */
.sidebar-toggle {
    display: none;
}

/* Close-row inside sidebar — hidden on desktop */
.sidebar-close-row {
    display: none;
}

@media (max-width: 480px) {
    body.simple-skin {
        overflow: auto;
        height: auto;
    }

    .simple-app {
        flex-direction: column;
        overflow: visible;
    }

    .simple-main {
        padding: 1rem;
        overflow: visible;
    }

    .simple-obs-title {
        font-size: 1.3rem;
    }

    .simple-q-prompt {
        font-size: 1.1rem;
    }

    .simple-question-wrap {
        max-width: 100%;
    }

    .simple-instructions {
        max-width: 100%;
        padding: 1.25rem;
    }

    /* Sidebar: hidden by default, overlay when open */
    .simple-sidebar {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 100;
        width: 100%;
        min-width: 0;
        background: #fff;
    }

    .simple-sidebar.sidebar-open {
        display: flex;
    }

    /* Hamburger toggle — visible on mobile (except no-sidebar pages) */
    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        font-size: 1.4rem;
        cursor: pointer;
        padding: 0.25rem 0.5rem;
        color: var(--color-text);
    }
    body.no-sidebar .sidebar-toggle {
        display: none;
    }

    /* Close row visible on mobile */
    .sidebar-close-row {
        display: flex;
        padding: 12px 14px;
        border-bottom: 1px solid var(--color-card-border);
        flex-shrink: 0;
    }

    /* Close button inside sidebar overlay */
    .sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        font-size: 1.3rem;
        cursor: pointer;
        padding: 0.25rem 0.5rem;
        color: var(--color-text-muted);
        margin-left: auto;
    }

    /* Navbar: flex between brand and hamburger */
    .simple-skin .navbar .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-left: 1rem;
    }
}
