/* ================================================================
   higher-angles.css
   ----------------------------------------------------------------
   Styling for the "Higher-Order Reasoning & Applications" skill-quiz
   (J.1-J.6) on the Class 6 Math page. Exactly like compare-angles.css
   and measure-angles.css, every skill here shares ONE generic quiz
   modal (see higher-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 diagram, a fan of angles on a line/around a
   point, a triangle diagram, a clock face, a compass/turn diagram,
   and a parallel-lines-and-transversal diagram.
   Loaded as a plain stylesheet link alongside quiz-popup-theme.css /
   quiz-modal-responsive.css / compare-angles.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 ---- */
.hoa-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;
}
.hoa-diagram-box svg {
    width: 100%;
    max-width: 240px;
    height: auto;
    display: block;
}
.hoa-diagram-caption {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 13px;
    color: #6b7280;
    letter-spacing: 0.02em;
    text-align: center;
}

/* ---- Row of 2-4 diagrams (side by side) ---- */
.hoa-diagram-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 10px;
    margin: 16px auto 8px;
    max-width: 560px;
}
.hoa-diagram-row .hoa-diagram-box {
    flex: 1 1 130px;
    max-width: 190px;
}

/* ---- Single centered diagram (triangle / clock / compass / fan / transversal) ---- */
.hoa-diagram-single {
    display: flex;
    justify-content: center;
    margin: 18px auto 8px;
}
.hoa-diagram-single .hoa-diagram-box {
    max-width: 320px;
    width: 100%;
    padding: 16px 14px 12px;
}

/* ---- Answer chips: reuse the shared quiz-number-opt button, but
   these answers are often words, phrases, degree-values, compass
   directions, or classification labels ("Obtuse", "Angle 6",
   "South-East") 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 compare-angles.css'
   #cmpOptions override. ---- */
.hoa-options-wrap {
    margin: 14px auto 0;
    max-width: 560px;
    box-sizing: border-box;
}

/* Scoped to #hoaOptions 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. */
#hoaOptions.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;
}
#hoaOptions .hoa-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;
}
#hoaOptions .hoa-opt-btn.is-correct-choice {
    border-color: #10b981;
    background: color-mix(in srgb, #10b981 14%, white);
    color: #0d7a53;
}
#hoaOptions .hoa-opt-btn.is-wrong-choice {
    border-color: #ef4444;
    background: color-mix(in srgb, #ef4444 14%, white);
    color: #b91c1c;
}
#hoaOptions .hoa-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. */
#hoaQuizCard .bq-feedback.is-correct { color: #0d7a53; }
#hoaQuizCard .bq-feedback.is-wrong { color: #b91c1c; }
#hoaSummaryCard .bq-star {
    font-size: 28px;
    color: #d1d5db;
    margin: 0 2px;
}
#hoaSummaryCard .bq-star.filled { color: #f5b942; }

/* ---- Mobile responsiveness (incl. Android phone browsers) ---- */
@media (max-width: 560px) {
    .hoa-diagram-row { gap: 8px; }
    .hoa-diagram-row .hoa-diagram-box { flex: 1 1 42%; max-width: 47%; padding: 8px 5px 6px; }
    .hoa-diagram-caption { font-size: 11px; }
    .hoa-diagram-single .hoa-diagram-box { max-width: 100%; padding: 12px 8px 10px; }
    #hoaOptions .hoa-opt-btn {
        min-width: 44%;
        padding: 10px 12px !important;
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .hoa-diagram-row .hoa-diagram-box { min-width: 45%; max-width: 100%; }
    #hoaOptions .hoa-opt-btn { min-width: 100%; }
}