/* ==========================================================================
   Cheeky Snooze — Assessment form styles
   Editorial, warm, minimal. Cream background + brown accents.
   ========================================================================== */

.cs-assessment {
    --cs-bg: #F0EAE0;
    --cs-card: #FBF6EC;
    --cs-card-shadow: 0 1px 2px rgba(60, 46, 31, .04), 0 20px 40px rgba(60, 46, 31, .06);
    --cs-ink: #2E241A;
    --cs-ink-soft: #6B5A47;
    --cs-ink-muted: #8B7355;
    --cs-line: #E8DFD1;
    --cs-line-strong: #C9BBA5;
    --cs-btn: #5C4A38;
    --cs-btn-hover: #4A3B2C;
    --cs-btn-text: #FBF6EC;
    --cs-focus: rgba(92, 74, 56, .18);

    --cs-serif: 'Cormorant Garamond', 'Playfair Display', 'DM Serif Display', Georgia, 'Times New Roman', serif;
    --cs-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    font-family: var(--cs-sans);
    color: var(--cs-ink);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.cs-assessment * {
    box-sizing: border-box;
}

/* ---------- Progress bar ---------- */
.cs-progress {
    max-width: 720px;
    margin: 0 auto 28px;
    display: none;
}
.cs-progress.is-visible {
    display: block;
}
.cs-progress__meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--cs-ink-muted);
    margin-bottom: 10px;
}
.cs-progress__bar {
    height: 2px;
    background: var(--cs-line);
    border-radius: 2px;
    overflow: hidden;
}
.cs-progress__fill {
    height: 100%;
    background: var(--cs-btn);
    width: 0%;
    transition: width .4s cubic-bezier(.22,.61,.36,1);
}

/* ---------- Card ---------- */
.cs-card {
    background: var(--cs-card);
    border-radius: 16px;
    padding: 56px 56px 48px;
    box-shadow: var(--cs-card-shadow);
    position: relative;
    overflow: hidden;
}

/* ---------- Steps ---------- */
.cs-step {
    display: none;
    animation: cs-fade-in .35s ease-out;
}
.cs-step.is-active {
    display: block;
}
@keyframes cs-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Typography ---------- */
.cs-eyebrow {
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 11px;
    color: var(--cs-ink-muted);
    margin: 0 0 16px;
    text-align: center;
}
.cs-title {
    font-family: var(--cs-serif);
    font-weight: 400;
    font-size: 40px;
    line-height: 1.15;
    letter-spacing: -.5px;
    margin: 0 0 20px;
    text-align: center;
}
.cs-title--sm {
    font-size: 32px;
    text-align: left;
    margin-bottom: 6px;
}
.cs-title--center {
    text-align: center;
}
.cs-lede {
    font-size: 15px;
    color: var(--cs-ink-soft);
    text-align: center;
    max-width: 480px;
    margin: 0 auto 40px;
    line-height: 1.6;
}
.cs-sublede {
    color: var(--cs-ink-soft);
    margin: 0 0 32px;
    font-size: 15px;
}
.cs-sublede--center {
    text-align: center;
}

/* ---------- Fields ---------- */
.cs-field {
    margin-bottom: 24px;
}
.cs-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--cs-ink);
    margin-bottom: 10px;
    letter-spacing: .1px;
}
.cs-multi-hint {
    font-size: 14px;
    font-weight: 500;
    color: var(--cs-ink);
    margin: 0 0 12px;
}
.cs-input {
    width: 100%;
    padding: 14px 16px;
    background: transparent;
    border: 1px solid var(--cs-line-strong);
    border-radius: 10px;
    font-family: var(--cs-sans);
    font-size: 15px;
    color: var(--cs-ink);
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    appearance: none;
}
.cs-input::placeholder {
    color: var(--cs-ink-muted);
    opacity: .7;
}
.cs-input:focus {
    outline: none;
    border-color: var(--cs-btn);
    box-shadow: 0 0 0 4px var(--cs-focus);
}
.cs-input--sm {
    width: auto;
    min-width: 140px;
}
.cs-input.has-error {
    border-color: #B85C4A;
}

/* ---------- Chips (single & multi select) ---------- */
.cs-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.cs-chip {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--cs-line-strong);
    border-radius: 999px;
    font-family: var(--cs-sans);
    font-size: 14px;
    color: var(--cs-ink);
    cursor: pointer;
    transition: all .2s;
    line-height: 1.2;
}
.cs-chip:hover {
    border-color: var(--cs-btn);
    background: rgba(92, 74, 56, .04);
}
.cs-chip.is-selected {
    background: var(--cs-btn);
    border-color: var(--cs-btn);
    color: var(--cs-btn-text);
}
/* Fix: hover en chips ya seleccionados mantiene fondo marrón y texto crema */
.cs-chip.is-selected:hover {
    background: var(--cs-btn-hover);
    border-color: var(--cs-btn-hover);
    color: var(--cs-btn-text);
}

/* ---------- Toggle (Sí/No) ---------- */
.cs-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.cs-toggle__btn {
    padding: 16px 24px;
    background: transparent;
    border: 1px solid var(--cs-line-strong);
    border-radius: 10px;
    font-family: var(--cs-sans);
    font-size: 15px;
    color: var(--cs-ink);
    cursor: pointer;
    transition: all .2s;
}
.cs-toggle__btn:hover {
    border-color: var(--cs-btn);
    background: rgba(92, 74, 56, .04);
}
.cs-toggle__btn.is-selected {
    background: var(--cs-btn);
    border-color: var(--cs-btn);
    color: var(--cs-btn-text);
}
/* Fix: hover en toggles seleccionados */
.cs-toggle__btn.is-selected:hover {
    background: var(--cs-btn-hover);
    border-color: var(--cs-btn-hover);
    color: var(--cs-btn-text);
}

/* ---------- Buttons ---------- */
.cs-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    gap: 16px;
}
.cs-actions--center {
    justify-content: center;
}
.cs-actions--split {
    justify-content: space-between;
    flex-wrap: wrap;
}

.cs-btn {
    padding: 14px 32px;
    border-radius: 10px;
    font-family: var(--cs-sans);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    letter-spacing: .1px;
    border: 1px solid transparent;
    line-height: 1.2;
}
.cs-btn--primary {
    background: var(--cs-btn);
    color: var(--cs-btn-text);
    border-color: var(--cs-btn);
}
.cs-btn--primary:hover {
    background: var(--cs-btn-hover);
    border-color: var(--cs-btn-hover);
}
.cs-btn--ghost {
    background: transparent;
    color: var(--cs-ink);
    border-color: var(--cs-line-strong);
}
.cs-btn--ghost:hover {
    border-color: var(--cs-btn);
    background: rgba(92, 74, 56, .04);
}
.cs-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ---------- Review ---------- */
.cs-review {
    margin: 32px 0;
}
.cs-review__section {
    padding: 24px 0;
    border-bottom: 1px solid var(--cs-line);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}
.cs-review__section:last-child {
    border-bottom: none;
}
.cs-review__title {
    font-family: var(--cs-serif);
    font-size: 22px;
    font-weight: 400;
    margin: 0 0 8px;
}
.cs-review__content {
    color: var(--cs-ink-soft);
    font-size: 14px;
    line-height: 1.6;
}
.cs-review__content--empty {
    font-style: italic;
    color: var(--cs-ink-muted);
    opacity: .7;
}
.cs-review__edit {
    background: none;
    border: none;
    color: var(--cs-ink);
    text-decoration: underline;
    font-family: var(--cs-sans);
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    padding: 4px 0;
}
.cs-review__edit:hover {
    color: var(--cs-btn);
}

/* ---------- Footer ---------- */
.cs-footer {
    text-align: center;
    margin-top: 80px;
    padding-top: 32px;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--cs-ink-muted);
}

/* ---------- Loading state ---------- */
.cs-btn.is-loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}
.cs-btn.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(251, 246, 236, .3);
    border-top-color: var(--cs-btn-text);
    border-radius: 50%;
    animation: cs-spin .6s linear infinite;
}
@keyframes cs-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .cs-assessment {
        padding: 20px 12px 60px;
    }
    .cs-card {
        padding: 32px 24px;
        border-radius: 12px;
    }
    .cs-title {
        font-size: 30px;
    }
    .cs-title--sm {
        font-size: 24px;
    }
    .cs-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .cs-actions--center {
        flex-direction: column;
    }
    .cs-actions--split {
        flex-direction: column-reverse;
    }
    .cs-btn {
        width: 100%;
        padding: 16px 24px;
    }
    .cs-toggle {
        gap: 8px;
    }
    .cs-review__section {
        flex-direction: column;
    }
}