/* ============================================================
   GP Quiz — Frontend Styles v2
   ============================================================ */

:root {
    --gp-navy:        #0C4A68;
    --gp-navy-dark:   #161A26;
    --gp-correct:     #58B3CC;
    --gp-incorrect:   #E40000;
    --gp-missed:      #059669;   /* same green — correct but not picked */
    --gp-border:      #e5e7eb;
    --gp-bg:          #f9fafb;
    --gp-text:        #111827;
    --gp-muted:       #6b7280;
    --gp-radius:      10px;
}

.gp-quiz-container *,
.gp-results-container * { box-sizing: border-box; }

.gp-error {
    padding: 12px 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: var(--gp-radius);
    color: #664d03;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.gp-quiz-container {
    display: flex;
    min-height: 600px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #fff;
    color: var(--gp-text);
}

/* ── Sidebar ── */
.gp-sidebar {
    width: 220px;
    min-width: 220px;
    background: #fff;
    border-right: 1px solid var(--gp-border);
    padding: 24px 0 20px;
    flex-shrink: 0;
}

.gp-sidebar-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--gp-navy);
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 0 20px 18px;
    display: block;
}

.gp-sidebar-list { list-style: none; margin: 0; padding: 0; }

.gp-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 20px;
    font-size: 13.5px;
    color: var(--gp-muted);
    cursor: default;
    transition: color .15s;
}

.gp-sidebar-item.is-active    { color: var(--gp-navy);      font-weight: 700; }
.gp-sidebar-item.is-correct   { color: var(--gp-correct);   font-weight: 600; }
.gp-sidebar-item.is-incorrect { color: var(--gp-incorrect); font-weight: 600; }

.gp-sidebar-dot {
    width: 11px; height: 11px;
    border-radius: 50%;
    background: #d1d5db;
    flex-shrink: 0;
    transition: background .2s;
}

.gp-sidebar-item.is-active    .gp-sidebar-dot { background: var(--gp-navy); }
.gp-sidebar-item.is-correct   .gp-sidebar-dot { background: var(--gp-correct); }
.gp-sidebar-item.is-incorrect .gp-sidebar-dot { background: var(--gp-incorrect); }

/* ── Main ── */
.gp-quiz-main { flex: 1; padding: 32px 40px; overflow-y: auto; }

.gp-quiz-title { font-size: 28px; font-weight: 800; color: var(--gp-navy); margin: 0 0 4px; line-height: 1.2; }
.gp-quiz-desc  { font-size: 13px; color: var(--gp-muted); margin: 0 0 20px; }

/* ── Progress ── */
.gp-progress-wrap { margin: 20px 0 28px; }

.gp-progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
}

.gp-progress-label { font-weight: 500; color: var(--gp-text); }
.gp-progress-pct   { font-size: 12px; color: var(--gp-muted); }

.gp-progress-track { height: 5px; background: var(--gp-border); border-radius: 99px; overflow: hidden; }
.gp-progress-bar   { height: 100%; background: var(--gp-navy); border-radius: 99px; transition: width .4s ease; min-width: 4px; }

/* ============================================================
   QUESTION SLIDES
   ============================================================ */

.gp-question-slide            { display: none; }
.gp-question-slide.is-active  { display: block; }

/* Question image */
.gp-question-image {
    margin-bottom: 16px;
    border-radius: var(--gp-radius);
    overflow: hidden;
    border: 1.5px solid var(--gp-border);
}
.gp-question-image img { display: block; width: 100%; max-height: 360px; object-fit: contain; background: #f9f9f9; }

/* Question text */
.gp-question-text {
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--gp-text);
    border: 1.5px solid var(--gp-border);
    border-radius: var(--gp-radius);
    padding: 20px 24px;
    margin: 0 0 16px;
    background: #fff;
}

/* Checkbox hint */
.gp-checkbox-hint {
    font-size: 12px;
    color: var(--gp-muted);
    font-style: italic;
    margin: 0 0 12px;
}

/* ── Options ── */
.gp-options { display: flex; flex-direction: column; gap: 10px; margin: 0 0 22px; }

.gp-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 1.5px solid var(--gp-border);
    border-radius: var(--gp-radius);
    cursor: pointer;
    transition: border-color .15s, background .15s;
    outline: none;
    background: #fff;
}

.gp-option:hover         { border-color: #9ca3af; background: var(--gp-bg); }
.gp-option:focus-visible { outline: 2px solid var(--gp-navy); outline-offset: 2px; }

/* Before submit — selected */
.gp-option.is-selected { border-color: var(--gp-navy); background: #eef2f8; }

/* Lock all options after submit */
.gp-question-slide.is-submitted .gp-option {
    cursor: default;
    pointer-events: none;
}

/* After submit — reset to plain */
.gp-question-slide.is-submitted .gp-option {
    background: #fff !important;
    border-color: var(--gp-border) !important;
}

/* ─── Post-submit states ─── */

/* Selected + Wrong → red icon, bold text */
.gp-option.is-incorrect .gp-option-text { font-weight: 700; }
.gp-option.is-incorrect .gp-option-letter { background: var(--gp-navy); color: #fff; }

/* Correct answer (user got it or it was the right one) → green letter */
.gp-option.is-correct .gp-option-text   { font-weight: 700; }
.gp-option.is-correct .gp-option-letter { background: var(--gp-correct); color: #fff; }

/* Missed (correct but not selected) → green outlined letter only */
.gp-option.is-missed .gp-option-text   { font-weight: 600; color: var(--gp-correct); }
.gp-option.is-missed .gp-option-letter { background: transparent; color: var(--gp-correct); border: 2px solid var(--gp-correct); }

/* ── Letter circle ── */
.gp-option-letter {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; color: #374151;
    flex-shrink: 0;
    transition: background .15s, color .15s;
    border: 2px solid transparent;
}

.gp-option.is-selected:not(.is-submitted *) .gp-option-letter { background: var(--gp-navy); color: #fff; }

/* ── Option text ── */
.gp-option-text { flex: 1; font-size: 14.5px; line-height: 1.4; color: var(--gp-text); }

/* ── Right icon ── */
.gp-option-icon {
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    visibility: hidden;
}

.gp-question-slide.is-submitted .gp-option.is-incorrect .gp-option-icon { visibility: visible; background: var(--gp-incorrect); }
/* .gp-question-slide.is-submitted .gp-option.is-incorrect .gp-option-icon::after { content: '\00D7'; } */

.gp-question-slide.is-submitted .gp-option.is-correct   .gp-option-icon { visibility: visible; background: var(--gp-correct); }
/* .gp-question-slide.is-submitted .gp-option.is-correct   .gp-option-icon::after { content: '\2713'; } */

.gp-question-slide.is-submitted .gp-option.is-missed    .gp-option-icon { visibility: visible; background: var(--gp-correct); }
/* .gp-question-slide.is-submitted .gp-option.is-missed    .gp-option-icon::after { content: '\2713'; } */

/* ── Buttons ── */
.gp-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 28px;
    border-radius: 8px; font-size: 14px; font-weight: 600;
    cursor: pointer; border: 2px solid transparent;
    transition: background .15s, opacity .15s;
    text-decoration: none; font-family: inherit; line-height: 1;
}

.gp-btn-primary { background: var(--gp-navy); color: #fff; border-color: var(--gp-navy); }
.gp-btn-primary:hover:not(:disabled) { background: var(--gp-navy-dark); border-color: var(--gp-navy-dark); }
.gp-btn-primary:disabled { opacity: .4; cursor: not-allowed; }

.gp-btn-outline { background: transparent; color: var(--gp-navy); border-color: var(--gp-navy); }
.gp-btn-outline:hover { background: #eef2f8; }

/* ── Feedback ── */
.gp-feedback { margin-top: 24px; }

.gp-feedback-result {
    display: flex; align-items: center;
    gap: 12px; font-size: 15px; font-weight: 700;
    margin: 0 0 16px;
}
.gp-feedback-result.is-correct   { color: var(--gp-correct); }
.gp-feedback-result.is-incorrect { color: var(--gp-incorrect); }

.gp-feedback-icon {
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.gp-feedback-result.is-correct   .gp-feedback-icon { background: var(--gp-correct); }
.gp-feedback-result.is-incorrect .gp-feedback-icon { background: var(--gp-incorrect); }

.gp-explanation {
    background: var(--gp-bg);
    border: 1.5px solid var(--gp-border);
    border-radius: var(--gp-radius);
    padding: 16px 20px; margin: 0 0 20px;
}

.gp-explanation strong {
    display: block; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em;
    color: var(--gp-muted); margin: 0 0 8px;
}

/* Rich text content from wp_editor */
.gp-explanation-text { font-size: 14px; line-height: 1.65; color: var(--gp-text); }
.gp-explanation-text p  { margin: 0 0 10px; }
.gp-explanation-text p:last-child { margin-bottom: 0; }
.gp-explanation-text ul,
.gp-explanation-text ol { padding-left: 20px; margin: 0 0 10px; }
.gp-explanation-text li { margin-bottom: 4px; }
.gp-explanation-text strong { font-weight: 700; }
.gp-explanation-text em     { font-style: italic; }
.gp-explanation-text a      { color: var(--gp-navy); }

.gp-feedback-actions { margin-top: 4px; }

/* ============================================================
   RESULTS PAGE
   ============================================================ */

.gp-results-container {
    /* font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; */
    max-width: 1024px; padding: 20px 0; color: var(--gp-text);
}

.gp-results-header { margin: 0 0 24px; }
.gp-results-header h2 { font-size: 26px; font-weight: 800; color: var(--gp-navy); margin: 0 0 6px; }
.gp-results-header p  { color: var(--gp-muted); font-size: 14px; margin: 0; }

.gp-results-body {
    display: flex; align-items: strech; gap: 40px;
    background: #fff;
    border-radius: var(--gp-radius); margin: 0 0 20px;
}

.gp-score-chart  { position: relative; flex-shrink: 0;
padding: 90px 70px;
    border: 1px solid #C2C7D11A;
    border-radius: 12px;
    box-shadow: 0px 12px 40px 0px rgba(24, 28, 32, 0.04);
 }
 .gp-score-chart svg{
    width: 256px;
    height: 256px;
 }

.gp-score-chart svg circle{
    stroke-width: 6 !important;
} 
.gp-score-inner  { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.gp-score-fraction {   font-size: 48px;
    font-weight: 900;
    color: #00355F;
    line-height: 48px;}
.gp-score-pct      {  font-size: 18px;
    color: #42474F;
    margin-top: 5px;
    font-weight: 600;
    line-height: 28px; }

.gp-results-stats { flex: 1; display: flex; flex-direction: column; gap: 12px; justify-content: space-between;}

.gp-stat-card {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px;
     height: 130px;
    background: white;
    border: 1px solid #C2C7D11A;
    box-shadow: 0px 1px 2px 0px #0000000D;
    border-radius: 8px;
}

.gp-stat-icon {
    /* width: 38px; height: 38px; border-radius: 50%; */
     border-radius: 8px;
    width: 64px;
    height: 64px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700; color: #fff; flex-shrink: 0;
}

.gp-stat-score     .gp-stat-icon { background: var(--gp-navy); }
.gp-stat-correct   .gp-stat-icon {  background: #F0FDF4;
    color: #16A34A;}
.gp-stat-incorrect .gp-stat-icon { background: #FEF2F2; }
.gp-stat-time      .gp-stat-icon { background: #EFF6FF; }

.gp-stat-content { display: flex; flex-direction: column; gap: 3px; }
.gp-stat-label   { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--gp-muted); }
.gp-stat-value   { font-size: 22px; font-weight: 800; color: var(--gp-navy); line-height: 1; }

.gp-results-footer { display: flex; gap: 12px; margin-top: 8px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .gp-quiz-container { flex-direction: column; }

    .gp-sidebar {
        width: 100%; min-width: unset;
        border-right: none; border-bottom: 1px solid var(--gp-border);
        padding: 14px 0 10px;
    }

    .gp-sidebar-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px; }

    .gp-sidebar-item {
        padding: 5px 10px; border-radius: 20px;
        border: 1px solid var(--gp-border); gap: 6px; font-size: 12px;
    }

    .gp-sidebar-item.is-active { border-color: var(--gp-navy); background: #eef2f8; }
    .gp-sidebar-label { display: none; }

    .gp-quiz-main     { padding: 20px 16px; }
    .gp-quiz-title    { font-size: 22px; }
    .gp-question-text { font-size: 14px; padding: 16px; }
    .gp-option        { padding: 14px 16px; gap: 12px; }
    .gp-option-letter { width: 30px; height: 30px; font-size: 12px; }
    .gp-results-body  { flex-direction: column; align-items: flex-start; gap: 24px; padding: 20px; }


        .gp-results-container{
    max-width: 100% !important;
}
.gp-score-chart{
    padding: 40px;
}
.gp-score-chart svg{
    width: 200px;
    height: 200px;
}
.gp-score-fraction{
    font-size: 28px;
}
.gp-score-pct{
    font-size: 16px;
}
}
