/* ==================================================================
   quiz-creator.css — Admin Quiz Creator page
   Loaded after styles.css, library.css, player.css, simulator.css,
   quiz-library.css. Designed to feel cohesive with the rest of the
   site (Apple-grade restraint: lots of whitespace, soft shadows,
   tight typography, subtle motion).
   ================================================================== */

/* ── Top-bar breadcrumb ─────────────────────────────────────────── */
.qc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 4px;
}
.qc-breadcrumb-root {
    font-size: 0.95rem;
    font-weight: 700;
    color: #181c1f;
    letter-spacing: -0.2px;
}
.qc-breadcrumb-sep {
    color: #c0c7d2;
    font-size: 14px;
    margin: 0 -2px;
}
.qc-breadcrumb-current {
    font-size: 0.9rem;
    font-weight: 600;
    color: #404750;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Top-bar action buttons ─────────────────────────────────────── */
.qc-hdr-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.qc-hdr-actions.hidden { display: none; }

.qc-hdr-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 9px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #d9dee6;
    background: #fff;
    color: #404750;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
    white-space: nowrap;
    font-family: inherit;
}
.qc-hdr-btn:hover:not(:disabled) {
    background: #f7fafe;
    border-color: #c0c7d2;
    color: #181c1f;
}
.qc-hdr-btn:active:not(:disabled) { transform: translateY(1px); }
.qc-hdr-btn:disabled { opacity: 0.5; cursor: default; }

.qc-hdr-btn-primary {
    background: #26408b;
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px -6px rgba(38,64,139,0.5);
}
.qc-hdr-btn-primary:hover:not(:disabled) {
    background: #1c3070;
    color: #fff;
    box-shadow: 0 6px 18px -6px rgba(38,64,139,0.6);
}

.qc-save-status {
    font-size: 0.78rem;
    color: #2e7d52;
    font-weight: 600;
    margin-right: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}
.qc-save-status.visible { opacity: 1; }

/* ── Hero section (list view) ──────────────────────────────────── */
.qc-hero {
    padding: 22px 28px 0;
}

.qc-hero-inner {
    background: linear-gradient(135deg, #ffffff 0%, #f4f7fc 70%, #eaf3f6 100%);
    border: 1px solid #e0e7ef;
    border-radius: 18px;
    padding: 24px 26px;
    display: flex;
    align-items: stretch;
    gap: 28px;
    flex-wrap: wrap;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.9) inset,
        0 8px 24px -16px rgba(38,64,139,0.18);
    position: relative;
    overflow: hidden;
}
.qc-hero-inner::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(166,207,213,0.22) 0%, transparent 65%);
    pointer-events: none;
}
.qc-hero-text { flex: 1 1 360px; min-width: 0; position: relative; z-index: 1; }

.qc-hero-eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #26408b;
    margin-bottom: 6px;
    opacity: 0.78;
}

.qc-hero-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    color: #181c1f;
    letter-spacing: -0.6px;
    margin: 0 0 6px;
    line-height: 1.1;
}

.qc-hero-sub {
    margin: 0 0 16px;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #5a6573;
    max-width: 56ch;
}

.qc-hero-cta-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.qc-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 11px;
    background: #26408b;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px -4px rgba(38,64,139,0.45);
    font-family: inherit;
}
.qc-cta-primary:hover {
    background: #1c3070;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px -4px rgba(38,64,139,0.55);
}
.qc-cta-primary:active { transform: translateY(0); }

.qc-cta-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 11px;
    background: rgba(255,255,255,0.7);
    color: #26408b;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(38,64,139,0.18);
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    font-family: inherit;
}
.qc-cta-ghost:hover {
    background: #fff;
    border-color: rgba(38,64,139,0.35);
}

/* Stat cluster */
.qc-hero-stats {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 4px 4px 4px 18px;
    border-left: 1px solid rgba(38,64,139,0.10);
    position: relative;
    z-index: 1;
}
.qc-hero-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; }
.qc-hero-stat-num {
    font-size: 1.65rem; font-weight: 800; color: #181c1f; letter-spacing: -0.5px;
    line-height: 1; font-variant-numeric: tabular-nums;
}
.qc-hero-stat-num-ok   { color: #2e7d52; }
.qc-hero-stat-num-warn { color: #c77800; }
.qc-hero-stat-lbl {
    font-size: 9.5px; font-weight: 700; letter-spacing: 1.4px;
    color: #707882; text-transform: uppercase; margin-top: 4px;
}
.qc-hero-stat-divider { width: 1px; height: 28px; background: rgba(38,64,139,0.10); align-self: center; }

/* ── Filter chips ───────────────────────────────────────────────── */
.qc-list-filter-row {
    padding: 18px 28px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.qc-filter-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f1f4f8;
    padding: 4px;
    border-radius: 11px;
    border: 1px solid #e8eaee;
}
.qc-chip {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.81rem;
    font-weight: 600;
    color: #5a6573;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    font-family: inherit;
}
.qc-chip:hover { color: #181c1f; }
.qc-chip-active {
    background: #fff;
    color: #181c1f;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* ── Quiz list ──────────────────────────────────────────────────── */
.qc-quiz-list {
    padding: 18px 28px 60px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
    max-width: 1280px;
}

.qc-list-loading,
.qc-picker-loading {
    grid-column: 1 / -1;
    padding: 60px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #9ea6b0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.qc-spinner {
    width: 22px; height: 22px;
    border: 2.5px solid #e0e7ef;
    border-top-color: #26408b;
    border-radius: 50%;
    animation: qcSpin 0.7s linear infinite;
}
@keyframes qcSpin { to { transform: rotate(360deg); } }

.qc-list-empty {
    grid-column: 1 / -1;
    margin: 12px auto 24px;
    max-width: 480px;
    padding: 48px 32px;
    background: #fff;
    border: 1px solid #e0e7ef;
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 8px 24px -16px rgba(38,64,139,0.12);
}
.qc-list-empty-icon {
    width: 72px; height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eaf3f6 0%, #d9e8ec 100%);
    display: flex; align-items: center; justify-content: center;
}
.qc-list-empty-icon .material-symbols-outlined { font-size: 36px; color: #26408b; }
.qc-list-empty-title { font-size: 1.2rem; font-weight: 700; color: #181c1f; margin: 0 0 6px; letter-spacing: -0.3px; }
.qc-list-empty-msg   { margin: 0 0 20px; font-size: 0.9rem; color: #5a6573; line-height: 1.5; }

/* Individual quiz card */
.qc-quiz-card {
    background: #fff;
    border: 1px solid #e0e7ef;
    border-radius: 14px;
    padding: 16px 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
    cursor: pointer;
    position: relative;
}
.qc-quiz-card:hover {
    box-shadow: 0 8px 24px -10px rgba(38,64,139,0.18);
    transform: translateY(-2px);
    border-color: #c8d3e2;
}

.qc-quiz-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.qc-quiz-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #181c1f;
    letter-spacing: -0.2px;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.qc-quiz-card-desc {
    font-size: 0.825rem;
    color: #707882;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: -4px 0 0;
    min-height: 2.5em;
}
.qc-quiz-card-desc-empty { font-style: italic; color: #c0c7d2; }

.qc-quiz-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    color: #707882;
    padding-top: 8px;
    border-top: 1px solid #f1f4f8;
    margin-top: 2px;
}
.qc-quiz-card-meta-item { display: inline-flex; align-items: center; gap: 4px; }
.qc-quiz-card-meta-item .material-symbols-outlined { font-size: 14px; color: #9ea6b0; }

.qc-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.7px;
    border-radius: 100px;
    padding: 2.5px 8px 2.5px 6px;
    flex-shrink: 0;
    text-transform: uppercase;
}
.qc-status-pub {
    background: linear-gradient(135deg, rgba(46,125,82,0.13) 0%, rgba(46,125,82,0.06) 100%);
    color: #2e7d52;
    border: 1px solid rgba(46,125,82,0.2);
}
.qc-status-pub::before {
    content: '';
    width: 5px; height: 5px;
    background: #2e7d52;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(46,125,82,0.18);
}
.qc-status-draft {
    background: linear-gradient(135deg, rgba(199,120,0,0.13) 0%, rgba(199,120,0,0.06) 100%);
    color: #c77800;
    border: 1px solid rgba(199,120,0,0.2);
}
.qc-status-draft::before {
    content: '';
    width: 5px; height: 5px;
    background: #c77800;
    border-radius: 50%;
}

.qc-quiz-card-actions {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.qc-card-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 11px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #e0e7ef;
    background: #fff;
    color: #404750;
    white-space: nowrap;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    font-family: inherit;
    flex: 1;
    min-width: 0;
}
.qc-card-action-btn .material-symbols-outlined { font-size: 15px; }
.qc-card-action-btn:hover { background: #f7fafe; border-color: #c8d3e2; color: #26408b; }

.qc-card-action-ok    { color: #2e7d52; border-color: rgba(46,125,82,0.25); }
.qc-card-action-ok:hover    { background: rgba(46,125,82,0.07); border-color: rgba(46,125,82,0.45); color: #235f3e; }
.qc-card-action-warn  { color: #c77800; border-color: rgba(199,120,0,0.25); }
.qc-card-action-warn:hover  { background: rgba(199,120,0,0.07); border-color: rgba(199,120,0,0.45); color: #9a5e00; }
.qc-card-action-danger { color: #ba1a1a; border-color: rgba(186,26,26,0.18); flex: 0 0 auto; padding: 6px 8px; }
.qc-card-action-danger:hover { background: rgba(186,26,26,0.06); border-color: rgba(186,26,26,0.4); color: #8a1313; }

/* ── Editor layout ──────────────────────────────────────────────── */
.qc-editor-layout {
    display: flex;
    height: calc(100vh - 62px);
}

.qc-editor-main {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 80px;
    min-width: 0;
    background: #f7fafe;
}

.qc-editor-toolbar {
    padding: 16px 28px 4px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.qc-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #5a6573;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 7px;
    transition: background 0.12s, color 0.12s;
    font-family: inherit;
}
.qc-back-btn:hover { background: #eef2f8; color: #181c1f; }

.qc-editor-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    border-radius: 100px;
    padding: 3px 9px 3px 7px;
    margin-left: auto;
}
.qc-editor-badge::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
}
.qc-editor-badge-draft { background: rgba(199,120,0,0.13); color: #c77800; border: 1px solid rgba(199,120,0,0.2); }
.qc-editor-badge-draft::before { background: #c77800; }
.qc-editor-badge-pub   { background: rgba(46,125,82,0.13); color: #2e7d52; border: 1px solid rgba(46,125,82,0.2); }
.qc-editor-badge-pub::before { background: #2e7d52; box-shadow: 0 0 0 2px rgba(46,125,82,0.18); }

/* ── Quiz metadata card ─────────────────────────────────────────── */
.qc-meta-card {
    margin: 12px 28px 8px;
    background: #fff;
    border: 1px solid #e0e7ef;
    border-radius: 16px;
    padding: 22px 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 4px 14px -10px rgba(38,64,139,0.14);
}

.qc-title-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 1.6rem;
    font-weight: 800;
    font-family: inherit;
    color: #181c1f;
    background: transparent;
    letter-spacing: -0.5px;
    padding: 0 0 4px;
    line-height: 1.2;
}
.qc-title-input::placeholder { color: #c8d3e2; font-weight: 700; }

.qc-desc-input {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 9px;
    outline: none;
    font-size: 0.9rem;
    font-family: inherit;
    color: #404750;
    padding: 8px 10px;
    margin-left: -10px;
    resize: vertical;
    background: transparent;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
    line-height: 1.5;
    min-height: 48px;
}
.qc-desc-input:hover { background: #f7fafe; }
.qc-desc-input:focus {
    border-color: #26408b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(38,64,139,0.08);
}
.qc-desc-input::placeholder { color: #c0c7d2; }

.qc-meta-divider {
    height: 1px;
    background: #f1f4f8;
    margin: 6px 0 4px;
}

.qc-settings-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.qc-setting-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 9px;
    background: #f7fafe;
    border: 1px solid #e8eaee;
    font-size: 0.81rem;
    color: #404750;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, border-color 0.15s;
}
.qc-setting-toggle:hover { background: #eef2f8; border-color: #c8d3e2; }
.qc-setting-toggle input[type="checkbox"] { display: none; }

.qc-toggle-track {
    width: 30px; height: 17px;
    background: #d9dee6;
    border-radius: 999px;
    position: relative;
    transition: background 0.18s;
    flex-shrink: 0;
}
.qc-toggle-thumb {
    position: absolute;
    top: 2px; left: 2px;
    width: 13px; height: 13px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.18);
    transition: left 0.18s, background 0.18s;
}
.qc-setting-toggle input[type="checkbox"]:checked + .qc-toggle-track { background: #26408b; }
.qc-setting-toggle input[type="checkbox"]:checked + .qc-toggle-track .qc-toggle-thumb { left: 15px; }

.qc-toggle-label { font-weight: 600; }

.qc-setting-divider {
    width: 1px;
    height: 22px;
    background: #e0e7ef;
    margin: 0 4px;
}

.qc-setting-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 9px;
    background: #f7fafe;
    border: 1px solid #e8eaee;
    font-size: 0.81rem;
    color: #404750;
}

.qc-pass-input-wrap {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 1px solid #d9dee6;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.qc-pass-input-wrap:focus-within {
    border-color: #26408b;
    box-shadow: 0 0 0 3px rgba(38,64,139,0.08);
}
.qc-pass-input {
    width: 44px;
    padding: 4px 4px 4px 8px;
    border: none;
    font-size: 0.85rem;
    font-family: inherit;
    text-align: center;
    color: #181c1f;
    outline: none;
    font-weight: 700;
    background: transparent;
    -moz-appearance: textfield;
}
.qc-pass-input::-webkit-outer-spin-button,
.qc-pass-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qc-pass-suffix {
    padding-right: 8px;
    font-size: 0.78rem;
    color: #707882;
    font-weight: 600;
}

/* ── Section header (Questions) ─────────────────────────────────── */
.qc-section-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 16px 28px 8px;
}
.qc-section-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.6px;
    color: #181c1f;
    text-transform: uppercase;
}
.qc-section-count {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #9ea6b0;
    background: #eef2f8;
    border-radius: 100px;
    padding: 1.5px 8px;
    font-variant-numeric: tabular-nums;
}

/* ── Questions list ─────────────────────────────────────────────── */
.qc-questions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 28px;
}

.qc-empty-q-prompt {
    margin: 12px 28px 24px;
    padding: 56px 32px;
    background: #fff;
    border: 1.5px dashed #d9e0eb;
    border-radius: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.qc-empty-q-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eaf3f6 0%, #d9e8ec 100%);
    color: #26408b;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    animation: qcArrowNudge 1.6s ease-in-out infinite;
}
.qc-empty-q-icon .material-symbols-outlined { font-size: 28px; }
@keyframes qcArrowNudge {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(8px); }
}
.qc-empty-q-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #181c1f;
    margin: 0;
    letter-spacing: -0.2px;
}
.qc-empty-q-msg {
    margin: 0;
    font-size: 0.875rem;
    color: #5a6573;
    line-height: 1.55;
    max-width: 50ch;
}
.qc-empty-q-msg strong { color: #26408b; font-weight: 700; }

/* ── Question card ──────────────────────────────────────────────── */
.qc-question-card {
    background: #fff;
    border: 1px solid #e0e7ef;
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 0.18s, border-color 0.18s, transform 0.18s;
}
.qc-question-card:hover {
    box-shadow: 0 6px 20px -10px rgba(38,64,139,0.16);
    border-color: #c8d3e2;
}

.qc-question-card.qc-q-dragging {
    opacity: 0.5;
    box-shadow: 0 12px 32px -10px rgba(0,0,0,0.20);
}
.qc-question-card.qc-q-drag-before { box-shadow: 0 -3px 0 0 #26408b; }
.qc-question-card.qc-q-drag-after  { box-shadow: 0  3px 0 0 #26408b; }

.qc-q-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: linear-gradient(180deg, #fafbfd 0%, #f5f7fa 100%);
    border-bottom: 1px solid #f1f4f8;
}

.qc-q-drag-handle {
    cursor: grab;
    color: #c0c7d2;
    font-size: 0.95rem;
    padding: 4px 5px;
    border-radius: 5px;
    user-select: none;
    flex-shrink: 0;
    line-height: 1;
    transition: background 0.12s, color 0.12s;
}
.qc-q-drag-handle:hover { background: #eef2f8; color: #5a6573; }
.qc-q-drag-handle:active { cursor: grabbing; }

.qc-q-num {
    font-size: 0.7rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #26408b 0%, #1c3070 100%);
    border-radius: 7px;
    padding: 3px 8px;
    flex-shrink: 0;
    letter-spacing: 0.4px;
    box-shadow: 0 2px 6px -2px rgba(38,64,139,0.4);
}

.qc-q-clip-name {
    flex: 1;
    min-width: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: #181c1f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qc-q-clip-lib {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #9ea6b0;
    text-transform: uppercase;
    flex-shrink: 0;
}

.qc-q-expand-btn,
.qc-q-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 7px;
    color: #9ea6b0;
    display: flex;
    align-items: center;
    transition: background 0.12s, color 0.12s;
    flex-shrink: 0;
}
.qc-q-expand-btn:hover { background: #eef2f8; color: #404750; }
.qc-q-delete-btn:hover { background: rgba(186,26,26,0.08); color: #ba1a1a; }

.qc-q-body {
    display: flex;
    gap: 0;
    overflow: hidden;
    transition: max-height 0.28s cubic-bezier(0.4,0,0.2,1);
    max-height: 600px;
}
.qc-q-body--collapsed {
    max-height: 0;
}

.qc-q-preview-wrap {
    width: 200px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #fff8e6 0%, #fef3d8 100%);
    border-right: 1px solid #f1e0bb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    position: relative;
}

.qc-q-canvas {
    width: 100%;
    height: 84px;
    display: block;
    border-radius: 6px;
}

.qc-q-fields {
    flex: 1;
    min-width: 0;
    padding: 14px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.qc-q-field-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: #404750;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: -4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.qc-q-suggest-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #26408b 0%, #1c3070 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    padding: 3px 9px 3px 7px;
    font: inherit;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 999px;
    box-shadow: 0 2px 6px -2px rgba(38,64,139,0.45);
    transition: background 0.15s, transform 0.12s, box-shadow 0.15s, opacity 0.15s;
}
.qc-q-suggest-btn:hover {
    background: linear-gradient(135deg, #2e4ca0 0%, #213a85 100%);
    box-shadow: 0 4px 10px -2px rgba(38,64,139,0.55);
}
.qc-q-suggest-btn:active { transform: scale(0.96); }
.qc-q-suggest-btn .material-symbols-outlined {
    font-size: 14px;
    color: #ffd566;
}
.qc-q-suggest-btn:disabled,
.qc-q-suggest-btn--loading {
    cursor: progress;
    opacity: 0.75;
    transform: none;
}
.qc-q-suggest-btn--loading .material-symbols-outlined {
    animation: qcSuggestSpin 1.2s linear infinite;
}
@keyframes qcSuggestSpin {
    from { transform: rotate(0deg);   }
    to   { transform: rotate(360deg); }
}
.qc-q-field-hint {
    font-size: 0.68rem;
    font-weight: 500;
    color: #9ea6b0;
    text-transform: none;
    letter-spacing: 0;
    margin-left: 4px;
}

.qc-q-prompt,
.qc-q-teaching {
    width: 100%;
    border: 1px solid #d9dee6;
    border-radius: 8px;
    padding: 8px 11px;
    font-size: 0.875rem;
    font-family: inherit;
    color: #181c1f;
    resize: vertical;
    outline: none;
    background: #fbfcfd;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    line-height: 1.5;
    box-sizing: border-box;
}
.qc-q-prompt:focus,
.qc-q-teaching:focus {
    border-color: #26408b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(38,64,139,0.07);
}
.qc-q-prompt::placeholder,
.qc-q-teaching::placeholder { color: #c0c7d2; }

.qc-q-choices {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qc-q-choice-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qc-q-choice-radio {
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.qc-q-choice-radio input[type="radio"] { display: none; }

.qc-q-radio-dot {
    width: 16px; height: 16px;
    border: 2px solid #c7cfd9;
    border-radius: 50%;
    background: #fff;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
    display: block;
    box-sizing: border-box;
    position: relative;
}
.qc-q-choice-radio:hover .qc-q-radio-dot { border-color: #2e7d52; }
.qc-q-choice-radio input[type="radio"]:checked + .qc-q-radio-dot {
    border-color: #2e7d52;
    background: #2e7d52;
    box-shadow: 0 0 0 3px rgba(46,125,82,0.15);
}
.qc-q-choice-radio input[type="radio"]:checked + .qc-q-radio-dot::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 5px; height: 5px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.qc-q-choice-ltr {
    width: 16px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #9ea6b0;
    text-align: center;
    flex-shrink: 0;
}

.qc-q-choice-input {
    flex: 1;
    border: 1px solid #d9dee6;
    border-radius: 7px;
    padding: 6px 10px;
    font-size: 0.84rem;
    font-family: inherit;
    color: #181c1f;
    outline: none;
    background: #fbfcfd;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    min-width: 0;
}
.qc-q-choice-input:focus {
    border-color: #26408b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(38,64,139,0.07);
}
.qc-q-choice-input::placeholder { color: #c0c7d2; }

/* ── Clip picker panel ──────────────────────────────────────────── */
.qc-picker-panel {
    width: 340px;
    flex-shrink: 0;
    border-left: 1px solid #e0e7ef;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: -8px 0 22px -16px rgba(38,64,139,0.12);
}

.qc-picker-header {
    padding: 14px 16px 12px;
    border-bottom: 1px solid #e8eaee;
    background: linear-gradient(180deg, #fafbfd 0%, #ffffff 100%);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qc-picker-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.qc-picker-title {
    font-size: 0.81rem;
    font-weight: 800;
    color: #181c1f;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    flex: 1;
}
.qc-picker-count {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #5a6573;
    background: #eef2f8;
    border-radius: 100px;
    padding: 1.5px 8px;
    font-variant-numeric: tabular-nums;
}

.qc-picker-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.qc-picker-search-icon {
    position: absolute;
    left: 11px;
    color: #9ea6b0;
    pointer-events: none;
    display: flex;
}
.qc-picker-search {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1px solid #d9dee6;
    border-radius: 9px;
    font-size: 0.85rem;
    font-family: inherit;
    color: #181c1f;
    outline: none;
    background: #fbfcfd;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.qc-picker-search:focus {
    border-color: #26408b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(38,64,139,0.07);
}
.qc-picker-search::placeholder { color: #c0c7d2; }
.qc-picker-search::-webkit-search-cancel-button { -webkit-appearance: none; }

.qc-picker-rows {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0 24px;
    background: #fafbfd;
}

.qc-picker-section {
    margin-bottom: 6px;
}

.qc-picker-section-label {
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #707882;
    padding: 12px 16px 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fafbfd;
    position: sticky;
    top: 0;
    z-index: 1;
}
.qc-picker-section-label::before {
    content: '';
    width: 4px;
    height: 4px;
    background: #26408b;
    border-radius: 50%;
}

/* Picker clip — mini sim-card */
.qc-picker-clip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: default;
    transition: background 0.1s;
    border-bottom: 1px solid rgba(232,234,238,0.6);
}
.qc-picker-clip:hover { background: #f1f4f8; }

.qc-picker-canvas {
    width: 84px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 6px;
    background: #fff8e6;
    border: 1px solid #f1e0bb;
    display: block;
}

.qc-picker-clip-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.qc-picker-clip-name {
    font-size: 0.83rem;
    font-weight: 600;
    color: #181c1f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qc-picker-clip-lib {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #9ea6b0;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}
.qc-picker-clip-defaults {
    color: #2e7d52;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.qc-picker-clip-defaults .material-symbols-outlined { font-size: 11px; }

.qc-picker-add-btn {
    background: linear-gradient(135deg, #26408b 0%, #1c3070 100%);
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, transform 0.15s, box-shadow 0.12s;
    flex-shrink: 0;
    box-shadow: 0 3px 8px -2px rgba(38,64,139,0.4);
    width: 28px;
    height: 28px;
}
.qc-picker-add-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 12px -2px rgba(38,64,139,0.55);
}
.qc-picker-add-btn:active { transform: scale(0.95); }
.qc-picker-add-btn .material-symbols-outlined { font-size: 16px; }

.qc-picker-add-btn-flash {
    background: linear-gradient(135deg, #2e7d52 0%, #235f3e 100%);
    transform: scale(1.2);
}
.qc-picker-add-btn-used {
    background: #c8cdd6;
    box-shadow: none;
    cursor: default;
    pointer-events: none;
    color: #8a9099;
}

/* Loading state for picker thumbnails */
.qc-picker-canvas:not(.loaded) {
    background: linear-gradient(90deg, #f0f2f5 0%, #f8f9fb 50%, #f0f2f5 100%);
    background-size: 200% 100%;
    animation: qcShimmer 1.4s infinite;
    border-color: transparent;
}
@keyframes qcShimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

/* ── Responsive: collapse the picker on narrow screens ─────────── */
@media (max-width: 900px) {
    .qc-editor-layout { flex-direction: column; height: auto; }
    .qc-picker-panel  {
        width: auto;
        border-left: none;
        border-top: 1px solid #e0e7ef;
        box-shadow: 0 -8px 22px -16px rgba(38,64,139,0.12);
    }
    .qc-picker-rows  { max-height: 50vh; }
    .qc-editor-main  { padding-bottom: 24px; }
}
