/* ================================================================
   measure-angles.css
   ----------------------------------------------------------------
   Styling for the "Measuring & Classifying Angles" skill-quiz
   (H.1-H.8) on the Class 6 Math page. Exactly like angles.css,
   every skill here shares ONE generic quiz modal (see
   measure-angles.js) instead of one bespoke widget per skill — this
   file only styles the small set of reusable "visual" building
   blocks a question can show above its answer chips: a single
   labelled-angle / protractor diagram, a row of 2-3 diagrams side
   by side (comparing angles), and a row of real-world icon cards
   for the "hunt for right angles" style questions.
   Loaded as a plain stylesheet link alongside quiz-popup-theme.css /
   quiz-modal-responsive.css, which already supply the shared
   .quiz-overlay / .quiz-modal / .card / .bq-* / .quiz-number-opt /
   .slot-dot rules every skill popup on the site uses.
   ================================================================ */

/* ---- Shared diagram frame ---- */
.mea-diagram-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: #f8f9fb;
    border: 2px solid var(--line, #e2e8f0);
    border-radius: 14px;
    padding: 10px 8px 8px;
}
.mea-diagram-box svg {
    width: 100%;
    max-width: 220px;
    height: auto;
    display: block;
}
.mea-diagram-caption {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 13px;
    color: #6b7280;
    letter-spacing: 0.02em;
}

/* ---- Row of 2-3 diagrams (comparing angles side by side) ---- */
.mea-diagram-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 12px;
    margin: 16px auto 8px;
    max-width: 480px;
}
.mea-diagram-row .mea-diagram-box {
    flex: 1 1 160px;
    max-width: 210px;
}

/* ---- Single centered diagram (protractor / one angle) ---- */
.mea-diagram-single {
    display: flex;
    justify-content: center;
    margin: 18px auto 8px;
}
.mea-diagram-single .mea-diagram-box {
    max-width: 300px;
    width: 100%;
    padding: 16px 14px 12px;
}

/* ---- Real-world icon-spotting cards (right-angle hunt, etc.) ---- */
.mea-icon-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 12px;
    margin: 16px auto 8px;
    max-width: 480px;
}
.mea-icon-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 120px;
    max-width: 150px;
    background: #f8f9fb;
    border: 2px solid var(--line, #e2e8f0);
    border-radius: 14px;
    padding: 18px 8px 12px;
}
.mea-icon-box i {
    font-size: 34px;
    color: var(--secondary, #1d4ed8);
}
.mea-icon-label {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    letter-spacing: 0.02em;
}

/* ---- Notation pill text used inside answer options (90°, etc.) ---- */
.mea-notation {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
}

/* ---- Answer chips: reuse the shared quiz-number-opt button, but
   these answers are often labels/degree-values/words ("Obtuse",
   "90°", "True") rather than a single digit, so override the shared
   fixed circle sizing to a pill that grows to fit its own text and
   wraps if needed — same pattern as angles.css' #angleOptions
   override. ---- */
.mea-options-wrap {
    margin: 14px auto 0;
    max-width: 480px;
    box-sizing: border-box;
}

/* Scoped to #measOptions so these out-specificity the shared quiz
   theme's ".quiz-number-opt" / ".quiz-number-options" rules (built
   for single-digit 0-9 answers). !important guards against any
   theme rule loaded after this file. */
#measOptions.quiz-number-options {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100%;
    box-sizing: border-box;
}
#measOptions .mea-opt-btn {
    width: auto !important;
    height: auto !important;
    min-width: 64px !important;
    min-height: 48px !important;
    max-width: 100%;
    flex: 0 1 auto !important;
    border-radius: 16px !important;
    padding: 10px 18px !important;
    white-space: normal !important;
    overflow-wrap: break-word;
    word-break: normal !important;
    line-height: 1.25 !important;
    text-align: center !important;
    box-sizing: border-box;
}
#measOptions .mea-opt-btn.is-correct-choice {
    border-color: #10b981;
    background: color-mix(in srgb, #10b981 14%, white);
    color: #0d7a53;
}
#measOptions .mea-opt-btn.is-wrong-choice {
    border-color: #ef4444;
    background: color-mix(in srgb, #ef4444 14%, white);
    color: #b91c1c;
}
#measOptions .mea-opt-btn:disabled {
    cursor: default;
    transform: none;
}

/* Feedback + summary stars, scoped so they render correctly even if
   the shared theme file doesn't already style these modifier
   classes. */
#measQuizCard .bq-feedback.is-correct { color: #0d7a53; }
#measQuizCard .bq-feedback.is-wrong { color: #b91c1c; }
#measSummaryCard .bq-star {
    font-size: 28px;
    color: #d1d5db;
    margin: 0 2px;
}
#measSummaryCard .bq-star.filled { color: #f5b942; }

/* ---- Mobile responsiveness (incl. Android phone browsers) ---- */
@media (max-width: 560px) {
    .mea-diagram-row { gap: 8px; }
    .mea-diagram-row .mea-diagram-box { flex: 1 1 130px; max-width: 47%; padding: 8px 5px 6px; }
    .mea-diagram-caption { font-size: 11px; }
    .mea-diagram-single .mea-diagram-box { max-width: 100%; padding: 12px 8px 10px; }
    .mea-icon-row { gap: 8px; }
    .mea-icon-box { flex: 1 1 90px; max-width: 32%; padding: 12px 6px 8px; }
    .mea-icon-box i { font-size: 26px; }
    .mea-icon-label { font-size: 10.5px; }
    #measOptions .mea-opt-btn {
        min-width: 44%;
        padding: 10px 12px !important;
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .mea-diagram-row .mea-diagram-box { min-width: 130px; max-width: 100%; }
    .mea-icon-box { min-width: 85px; }
    #measOptions .mea-opt-btn { min-width: 100%; }
}