/* ─────────────────────────────────────────────────────────────────
   WLC Patient Intake — intake-specific styles only.
   The shared fc-assessment / fc-intake / fc-quiz shell and answer-card
   system live in the theme (assets/css/quiz.css). This file only adds
   what is unique to the intake: bootloader, grouped field layout,
   upload zones, consent stack, errors, loading state.
   ───────────────────────────────────────────────────────────────── */

/* ── Bootloader (shown briefly before JS renders the first screen) ── */
.wlc-intake__bootloader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 4rem 1rem;
    min-height: 240px;
}
.wlc-intake__bootloader-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fc-green, #1B7A5A);
    opacity: 0.35;
    animation: wlcBootPulse 1.1s ease-in-out infinite;
}
.wlc-intake__bootloader-dot:nth-child(2) { animation-delay: 0.18s; }
.wlc-intake__bootloader-dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes wlcBootPulse {
    0%, 100% { opacity: 0.25; transform: scale(0.85); }
    50%      { opacity: 0.95; transform: scale(1); }
}

.wlc-intake__noscript {
    padding: 2.5rem 1rem;
    text-align: center;
}

/* ── Grouped field layout (basic info, evidence) ─────────────────── */
.wlc-intake__fields {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-top: 0.75rem;
}

.wlc-intake__field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.wlc-intake__field .fc-quiz__field-label {
    font-family: var(--fc-font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--fc-gray-700, #4A4744);
    letter-spacing: 0.01em;
}

.wlc-intake__field .fc-quiz__field-optional {
    font-weight: 500;
    color: var(--fc-gray-500, #7A7672);
    margin-left: 0.25rem;
}

.wlc-intake__field .fc-quiz__field-helper {
    font-size: 0.8125rem;
    color: var(--fc-gray-600, #5C5854);
    line-height: 1.5;
}

.wlc-intake__field .fc-quiz__input--text {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 0.875rem;
    font-family: var(--fc-font-body);
    font-size: 1rem;
    color: var(--fc-black, #1A1A18);
    background: var(--fc-white, #FFFFFF);
    border: 1.5px solid var(--fc-gray-100, #E8E4DF);
    border-radius: 10px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.wlc-intake__field .fc-quiz__input--text:focus {
    outline: none;
    border-color: var(--fc-green, #1B7A5A);
    box-shadow: 0 0 0 3px rgba(27, 122, 90, 0.14);
}
.wlc-intake__field .fc-quiz__textarea {
    min-height: 96px;
    line-height: 1.5;
    resize: vertical;
}

/* ── Upload zones ────────────────────────────────────────────────── */
.wlc-intake__upload {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.wlc-upload-zone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 92px;
    padding: 1.1rem 1rem;
    border: 1.5px dashed var(--fc-gray-200, #D6D2CC);
    border-radius: 12px;
    background: var(--fc-cream, #FAF8F5);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
    font-size: 0.9375rem;
    color: var(--fc-gray-700, #4A4744);
}
.wlc-upload-zone:hover,
.wlc-upload-zone--active {
    border-color: var(--fc-green, #1B7A5A);
    background: rgba(27, 122, 90, 0.04);
}
.wlc-upload-zone--filled {
    border-style: solid;
    border-color: var(--fc-green, #1B7A5A);
    background: rgba(27, 122, 90, 0.06);
    color: var(--fc-black, #1A1A18);
}
.wlc-upload-zone__inner {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: inherit;
}
.wlc-upload-zone--filled .wlc-upload-zone__inner svg { color: var(--fc-green, #1B7A5A); }
.wlc-upload-zone__remove {
    background: none;
    border: none;
    padding: 0;
    margin: 0 0 0 0.25rem;
    color: var(--fc-green, #1B7A5A);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}
.wlc-upload-preview {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.wlc-upload-preview img {
    max-width: 140px;
    max-height: 140px;
    border-radius: 8px;
    border: 1px solid var(--fc-gray-100, #E8E4DF);
}

/* ── Consent stack ───────────────────────────────────────────────── */
.wlc-intake__consents {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1rem;
}
.wlc-intake__consent {
    background: var(--fc-cream, #FAF8F5);
    border: 1.5px solid var(--fc-gray-100, #E8E4DF);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    transition: border-color 0.18s ease, background 0.18s ease;
}
.wlc-intake__consent:has(.fc-quiz__consent-input:checked) {
    border-color: var(--fc-green, #1B7A5A);
    background: rgba(27, 122, 90, 0.06);
}

/* ── Errors ──────────────────────────────────────────────────────── */
.wlc-intake__errors {
    margin-top: 1.1rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: rgba(160, 64, 64, 0.06);
    border: 1px solid rgba(160, 64, 64, 0.25);
    color: #8a3535;
}
.wlc-intake__errors p { margin: 0.15rem 0; font-size: 0.875rem; line-height: 1.45; }
.wlc-intake__errors a { color: #8a3535; font-weight: 600; }

/* ── Loading state on viewport ───────────────────────────────────── */
.fc-intake__viewport.is-loading {
    position: relative;
    pointer-events: none;
}
.fc-intake__viewport.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(1px);
    border-radius: 12px;
    z-index: 1;
}

/* ── Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .wlc-intake__bootloader-dot { animation: none; }
    .wlc-intake__consent,
    .wlc-upload-zone { transition: none; }
}
