/* GL Crown Tools — Quiz Frontend Styles
   Minimal premium quiz UI matching the screenshot aesthetic
   ================================================================= */

:root {
    --glcq-primary:      var(--glct-primary,  #2D6A4F);
    --glcq-accent:       var(--glct-secondary, #52B788);
    --glcq-bg:           var(--glct-bg,        #F8F9FA);
    --glcq-card:         var(--glct-card,      #FFFFFF);
    --glcq-radius:       var(--glct-radius,    16px);
    --glcq-btn-radius:   var(--glct-btn-radius,50px);
    --glcq-text:         #1A1A2E;
    --glcq-text-muted:   #6B7280;
    --glcq-border:       #E5E7EB;
    --glcq-option-hover: #F3F4F6;
    --glcq-option-sel:   #EEF2FF;
    --glcq-option-sel-b: #7C3AED;
    --glcq-shadow:       0 4px 32px rgba(0,0,0,.06);
    --glcq-shadow-md:    0 8px 48px rgba(0,0,0,.10);
    --glcq-transition:   all .2s cubic-bezier(.4,0,.2,1);
}

/* ── Wrapper ──────────────────────────────────────────────────────── */

.glct-quiz-wrap {
    font-family: 'DM Sans', -apple-system, sans-serif;
    max-width: var(--glct-form-width, 680px);
    margin: 0 auto;
    padding: 24px 16px;
    color: var(--glcq-text);
    -webkit-font-smoothing: antialiased;
}

/* ── Top Bar ──────────────────────────────────────────────────────── */

.glct-quiz-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--glcq-card);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 4px;
    box-shadow: var(--glcq-shadow);
    border: 1px solid var(--glcq-border);
}

.glct-quiz-topbar__left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.glct-quiz-topbar__badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #EEF2FF;
    color: #5B21B6;
    border-radius: 50px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2px;
}

.glct-quiz-topbar__progress {
    font-size: 13px;
    color: var(--glcq-text-muted);
    font-weight: 500;
}

.glct-quiz-topbar__score {
    font-size: 13px;
    font-weight: 600;
    color: var(--glcq-text);
}

/* ── Progress Bar ─────────────────────────────────────────────────── */

.glct-quiz-progress-wrap {
    padding: 0 2px;
    margin-bottom: 12px;
}

.glct-quiz-progress-bar {
    height: 4px;
    background: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
}

.glct-quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7C3AED, #A78BFA);
    border-radius: 4px;
    transition: width .4s cubic-bezier(.4,0,.2,1);
}

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

.glct-quiz-card {
    background: var(--glcq-card);
    border-radius: var(--glcq-radius);
    box-shadow: var(--glcq-shadow);
    border: 1px solid var(--glcq-border);
    padding: 36px 40px 28px;
    transition: var(--glcq-transition);
}

/* ── Question ─────────────────────────────────────────────────────── */

.glct-quiz-question {
    animation: glcq-fadein .25s ease;
}

@keyframes glcq-fadein {
    from { opacity:0; transform:translateY(8px); }
    to   { opacity:1; transform:translateY(0); }
}

.glct-quiz-question__text {
    font-size: 20px;
    font-weight: 600;
    color: var(--glcq-text);
    line-height: 1.4;
    margin: 0 0 28px 0;
    letter-spacing: -.2px;
}

/* ── Answer Options (MCQ / Radio) ─────────────────────────────────── */

.glct-quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.glct-quiz-option-label {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 1.5px solid var(--glcq-border);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--glcq-transition);
    background: #fff;
    font-size: 14.5px;
    color: var(--glcq-text);
    line-height: 1.4;
    user-select: none;
}

.glct-quiz-option-label:hover {
    border-color: #C4B5FD;
    background: #F5F3FF;
}

.glct-quiz-option-label--selected,
.glct-quiz-option-label:has(input:checked) {
    border-color: #7C3AED;
    background: #EEF2FF;
    color: #4C1D95;
    font-weight: 500;
}

/* Hide the actual radio/checkbox; show styled circle */
.glct-quiz-radio,
.glct-quiz-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #7C3AED;
    flex-shrink: 0;
    cursor: pointer;
}

.glct-quiz-option-text {
    flex: 1;
}

/* Checkbox variant */
.glct-quiz-options--checkbox .glct-quiz-option-label {
    padding: 12px 16px;
}

/* ── Dropdown ─────────────────────────────────────────────────────── */

.glct-quiz-select {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--glcq-border);
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14.5px;
    color: var(--glcq-text);
    background: #fff;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    transition: var(--glcq-transition);
}

.glct-quiz-select:focus {
    border-color: #7C3AED;
    box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}

/* ── Text / Number / Textarea inputs ─────────────────────────────── */

.glct-quiz-input,
.glct-quiz-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 16px;
    border: 1.5px solid var(--glcq-border);
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14.5px;
    color: var(--glcq-text);
    background: #fff;
    outline: none;
    transition: var(--glcq-transition);
    -webkit-appearance: none;
}

.glct-quiz-input:focus,
.glct-quiz-textarea:focus {
    border-color: #7C3AED;
    box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}

.glct-quiz-input::placeholder,
.glct-quiz-textarea::placeholder {
    color: #C4B5FD;
}

.glct-quiz-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ── Contact step grid ────────────────────────────────────────────── */

.glct-quiz-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.glct-quiz-field-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.glct-quiz-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--glcq-text);
}

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

.glct-quiz-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--glcq-border);
}

.glct-quiz-nav__right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ── Quiz Buttons ─────────────────────────────────────────────────── */

.glct-quiz-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--glcq-btn-radius);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--glcq-transition);
    border: none;
    outline: none;
}

.glct-quiz-btn:not(.glct-quiz-btn--ghost) {
    background: #7C3AED;
    color: #fff;
}

.glct-quiz-btn:not(.glct-quiz-btn--ghost):hover {
    background: #6D28D9;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124,58,237,.3);
}

.glct-quiz-btn--ghost {
    background: transparent;
    color: var(--glcq-text-muted);
    border: 1.5px solid var(--glcq-border);
}

.glct-quiz-btn--ghost:hover {
    background: #F3F4F6;
    color: var(--glcq-text);
}

.glct-quiz-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Error Message ────────────────────────────────────────────────── */

.glct-quiz-error-msg {
    font-size: 13px;
    color: #DC2626;
    font-weight: 500;
}

/* ── Result Screen ────────────────────────────────────────────────── */

.glct-quiz-result {
    text-align: center;
    animation: glcq-fadein .35s ease;
}

.glct-quiz-result__score-ring {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7C3AED, #A78BFA);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #fff;
    box-shadow: 0 8px 32px rgba(124,58,237,.3);
}

.glct-quiz-result__percent {
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
}

.glct-quiz-result__pts {
    font-size: 12px;
    opacity: .85;
    margin-top: 4px;
}

.glct-quiz-result__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--glcq-text);
    margin: 0 0 10px 0;
}

.glct-quiz-result__msg {
    font-size: 15px;
    color: var(--glcq-text-muted);
    line-height: 1.6;
    max-width: 360px;
    margin: 0 auto 20px;
}

.glct-quiz-result__badge {
    display: inline-block;
    padding: 5px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
}

.glct-quiz-result__badge--pass {
    background: #D1FAE5;
    color: #065F46;
}

.glct-quiz-result__badge--fail {
    background: #FEF3C7;
    color: #92400E;
}

/* ── Error page ───────────────────────────────────────────────────── */

.glct-quiz-error {
    color: #DC2626;
    font-size: 14px;
    padding: 12px 16px;
    background: #FEF2F2;
    border-radius: 8px;
    border: 1px solid #FECACA;
}

/* ── Spinner ──────────────────────────────────────────────────────── */

@keyframes glcq-spin {
    to { transform: rotate(360deg); }
}
.glct-quiz-wrap .glct-spin {
    animation: glcq-spin .7s linear infinite;
}

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

@media (max-width: 600px) {
    .glct-quiz-card { padding: 24px 20px 20px; }
    .glct-quiz-question__text { font-size: 17px; }
    .glct-quiz-contact-grid { grid-template-columns: 1fr; }
    .glct-quiz-topbar { flex-direction: column; gap: 8px; align-items: flex-start; }
    .glct-quiz-btn { padding: 11px 18px; font-size: 13px; }
}
