/* ==========================================================================
   Sophicly Scenario Cards v2.1.0
   Situational quiz with carousel navigation.
   ========================================================================== */

.scs-widget {
    --scs-font: 'Proxima Soft', system-ui, -apple-system, sans-serif;
    --scs-text: #f0f0f2;
    --scs-text-muted: rgba(255,255,255,0.55);
    --scs-bg: #1C1D1F;
    --scs-card-bg: #2a2b2e;
    --scs-card-border: rgba(255,255,255,0.08);
    --scs-success: #1CD991;
    --scs-error: #E74C3C;
    --scs-accent: #51dacf;
    --scs-purple: #5333ed;

    font-family: var(--scs-font); max-width: 640px; margin: 24px auto;
    color: var(--scs-text); -webkit-font-smoothing: antialiased;
    animation: scsFadeIn 0.4s ease both;
}
.scs-widget *, .scs-widget *::before, .scs-widget *::after { box-sizing: border-box; }
@keyframes scsFadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

.scs-title { font-size: 20px; font-weight: 600; margin-bottom: 16px; text-align: center; }

/* ── Progress Dots ────────────────────────────────────────────────────── */

.scs-progress {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; margin-bottom: 16px;
}
.scs-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255,255,255,0.15);
    transition: background 0.25s ease, transform 0.25s ease;
}
.scs-dot--active { background: var(--scs-purple); transform: scale(1.3); }
.scs-dot--correct { background: var(--scs-success); }
.scs-dot--wrong { background: var(--scs-error); }
.scs-progress-text {
    font-size: 13px; font-weight: 500; color: var(--scs-text-muted);
    margin-left: 8px;
}

/* ── Results Banner ───────────────────────────────────────────────────── */

.scs-results-banner {
    text-align: center; padding: 14px 20px; border-radius: 10px;
    margin-bottom: 16px; font-size: 16px; font-weight: 600;
    background: rgba(231,76,60,0.1); border: 1px solid var(--scs-error);
    color: var(--scs-text);
    animation: scsFadeIn 0.3s ease both;
}
.scs-results-banner--perfect {
    background: rgba(28,217,145,0.1); border-color: var(--scs-success);
}
.scs-results-fraction { font-size: 18px; font-weight: 700; }
.scs-results-pct { font-size: 14px; color: var(--scs-text-muted); font-weight: 500; }

/* ── Scenario Card ────────────────────────────────────────────────────── */

@keyframes scsCardEnter {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.scs-card {
    background: var(--scs-card-bg); border: 1px solid var(--scs-card-border);
    border-radius: 14px; padding: 24px; margin-bottom: 16px;
}
.scs-card--entering {
    animation: scsCardEnter 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.scs-situation {
    font-size: 16px; line-height: 1.6; margin-bottom: 20px;
    font-weight: 500; color: var(--scs-text);
}

.scs-image {
    width: 100%; max-height: 280px; object-fit: cover;
    border-radius: 10px; margin-bottom: 16px;
}

/* ── Options ──────────────────────────────────────────────────────────── */

.scs-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }

.scs-option {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 16px; border-radius: 10px;
    border: 2px solid var(--scs-card-border);
    background: rgba(255,255,255,0.02);
    cursor: pointer; user-select: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.scs-option:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}

.scs-option--selected {
    border-color: var(--scs-purple);
    box-shadow: 0 0 0 3px rgba(83,51,237,0.2);
    background: rgba(83,51,237,0.06);
}
.scs-option--correct {
    border-color: var(--scs-success) !important;
    background: rgba(28,217,145,0.08) !important;
    box-shadow: none !important;
    cursor: default;
}
.scs-option--wrong {
    border-color: var(--scs-error) !important;
    background: rgba(231,76,60,0.08) !important;
    box-shadow: none !important;
    cursor: default;
}

.scs-option-indicator {
    width: 24px; height: 24px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 700;
    color: var(--scs-text-muted);
}
.scs-option--selected .scs-option-indicator { color: var(--scs-purple); }
.scs-option--correct .scs-option-indicator { color: var(--scs-success); font-size: 18px; }
.scs-option--wrong .scs-option-indicator { color: var(--scs-error); font-size: 18px; }

.scs-option-content { flex: 1; min-width: 0; }
.scs-option-label { font-size: 14px; font-weight: 600; line-height: 1.4; }

.scs-option-feedback {
    font-size: 13px; line-height: 1.4; margin-top: 6px;
    padding: 8px 10px; border-radius: 6px;
    animation: scsFadeIn 0.25s ease both;
}
.scs-option--correct .scs-option-feedback {
    background: rgba(28,217,145,0.1); color: var(--scs-success);
    border-left: 3px solid var(--scs-success);
}
.scs-option--wrong .scs-option-feedback {
    background: rgba(231,76,60,0.1); color: var(--scs-error);
    border-left: 3px solid var(--scs-error);
}

/* ── Reveal Button (per-scenario) ─────────────────────────────────────── */

.scs-btn--reveal {
    display: block; width: 100%; padding: 10px 20px; margin-top: 4px;
    border: none; border-radius: 24px;
    background: var(--scs-purple); color: #fff;
    font-family: var(--scs-font); font-size: 14px; font-weight: 600;
    cursor: pointer; transition: background 0.2s ease, transform 0.15s ease;
}
.scs-btn--reveal:hover { background: #6b4fff; }
.scs-btn--reveal:active { transform: scale(0.97); }

/* ── Navigation ───────────────────────────────────────────────────────── */

.scs-nav {
    display: flex; justify-content: space-between; gap: 12px;
    margin-bottom: 16px;
}

/* ── Action Buttons ───────────────────────────────────────────────────── */

.scs-actions {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; flex-wrap: wrap;
}

.scs-btn {
    padding: 8px 20px; border: none; border-radius: 24px;
    font-family: var(--scs-font); font-size: 14px; font-weight: 600;
    cursor: pointer; transition: background 0.2s ease, transform 0.15s ease;
}
.scs-btn:active { transform: scale(0.97); }
.scs-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.scs-btn--check { background: var(--scs-purple); color: #fff; }
.scs-btn--check:hover:not(:disabled) { background: #6b4fff; }
.scs-btn--primary { background: var(--scs-accent); color: #1C1D1F; }
.scs-btn--primary:hover:not(:disabled) { background: #7DF9E9; }
.scs-btn--secondary { background: transparent; border: 1px solid var(--scs-card-border); color: var(--scs-text); }
.scs-btn--secondary:hover { background: rgba(255,255,255,0.05); }
.scs-btn--nav { background: transparent; border: 1px solid var(--scs-card-border); color: var(--scs-text); }
.scs-btn--nav:hover:not(:disabled) { background: rgba(255,255,255,0.05); }

.scs-status { font-size: 13px; font-weight: 500; }
.scs-status--saved { color: var(--scs-success); }
.scs-status--error { color: var(--scs-error); }

/* ── Light Theme ──────────────────────────────────────────────────────── */

html[data-theme="light"] .scs-widget, html.light .scs-widget {
    --scs-text: #1a1a1e;
    --scs-text-muted: rgba(0,0,0,0.5);
    --scs-bg: #f5f5f7;
    --scs-card-bg: #fff;
    --scs-card-border: rgba(0,0,0,0.1);
}
html[data-theme="light"] .scs-btn--primary, html.light .scs-btn--primary { background: #5333ed; color: #fff; }
html[data-theme="light"] .scs-btn--primary:hover, html.light .scs-btn--primary:hover { background: #6b4fff; }

/* ── Focus Mode ───────────────────────────────────────────────────────── */

.sophicly-focus-mode .scs-widget { max-width: none; margin: 24px 0; }

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .scs-widget { margin: 16px 8px; }
    .scs-card { padding: 16px; }
    .scs-situation { font-size: 14px; }
    .scs-option { padding: 10px 12px; }
    .scs-option-label { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .scs-widget *, .scs-widget *::before, .scs-widget *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
