/* ================================================================
   integers-numberline.css
   ----------------------------------------------------------------
   Styles for Tier 7, "The Number Line and the Unmarked Number Line",
   in Topic 8, "The Other Side of Zero (Integers)", on the Class 6
   Math page:

     - A.1  From Lift to Number Line        - A.7  How Far Must You Travel?
     - A.2  Complete the Number Ray         - A.8  Quick Line Evaluations
     - A.3  Drop the "+" Sign               - A.9  Meet the Unmarked Number Line
     - A.4  Walk the Number Line            - A.10 UNL: Subtraction as a Missing Addend
     - A.5  Mark and Write                  - A.11 Use a UNL to Evaluate
     - A.6  Why Is 2 > -3?

   Same shared popup shell (quiz-overlay / quiz-modal) as every other
   skill popup, so this file only styles the pictures and answer chips.
   Fully self-contained: every class starts with "nl-" and every popup
   id starts with "nl".

   Finish (kid-friendly, matt + shine): glossy balls and tiles on a matt
   pastel lavender "paper" stage. Warm gold / orange = positive (right),
   fresh mint = zero, cool sky / violet = negative (left).

   Layout: the 4 answer chips ALWAYS stay on ONE row (flex-wrap: nowrap).
   Android-native feel: >=52px touch targets, instant :active press,
   no tap flash, safe-area padding. Desktop: hover states.

     <link rel="stylesheet" th:href="@{/css/integers-numberline.css}" />
   ================================================================ */

/* ---------- SVG paint ---------- */
.nl-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.nl-o { stroke: rgba(60, 38, 120, 0.60); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.nl-sh { filter: drop-shadow(0 4px 3px rgba(60, 38, 120, 0.25)); }
.nl-gloss { fill: #fff; opacity: 0.38; pointer-events: none; }
.nl-spark { fill: #fff; opacity: 0.9; pointer-events: none; }
.nl-nopt { pointer-events: none; stroke: none; }

.nl-t {
    font: 800 22px/1 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    fill: #34205f; text-anchor: middle; dominant-baseline: central;
    stroke: #fff; stroke-width: 5; paint-order: stroke; stroke-linejoin: round;
    pointer-events: none; user-select: none; -webkit-user-select: none;
}
.nl-t-lbl { font-size: 24px; }
.nl-t-small { font-size: 19px; }
.nl-t-tick { font-size: 15px; stroke: none; fill: #5a3d00; }
.nl-t-badge { font-size: 18px; stroke: none; fill: #34205f; }
.nl-t-white { fill: #fff; stroke: rgba(60, 38, 120, .55); stroke-width: 5; }
.nl-t-pi { font-size: 120px; fill: #fff; stroke: rgba(80, 40, 170, .65); stroke-width: 7; }
.nl-t-digit { font-size: 34px; letter-spacing: 1px; }

/* lines: white underlay + coloured core */
.nl-under { stroke: #fff; stroke-width: 11; stroke-linecap: round; opacity: .9; }
.nl-seg { stroke-width: 6; stroke-linecap: round; fill: none; }
.nl-dia { stroke: #2f7fe8; }
.nl-hot { stroke: #ef3b3b; }
.nl-neu { stroke: #34205f; }
.nl-string { stroke: #e0368a; stroke-width: 7; stroke-linecap: round; fill: none; }
.nl-ring { fill: none; stroke: #e0368a; stroke-width: 6; stroke-dasharray: 2 10; stroke-linecap: round; }
.nl-ring-solid { fill: none; stroke: #e0368a; stroke-width: 6; }
.nl-cdot { fill: #34205f; stroke: #fff; stroke-width: 3; }
.nl-pt-red { fill: #ef3b3b; stroke: #fff; stroke-width: 3; }
.nl-spoke { stroke: rgba(255, 255, 255, .8); stroke-width: 5; stroke-linecap: round; }
.nl-hub { fill: #fff; stroke: rgba(60, 38, 120, .6); stroke-width: 3; }
.nl-start { stroke: #10b981; stroke-width: 4; stroke-dasharray: 5 5; }
.nl-arrow { fill: none; stroke: #7c4dff; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }

/* rulers and bars */
.nl-ruler { fill: #ffe9a8; stroke: rgba(90, 61, 0, .55); stroke-width: 2.5; }
.nl-rtick { stroke: #5a3d00; stroke-width: 2.5; stroke-linecap: round; }
.nl-ground { fill: #d9ccff; stroke: rgba(60, 38, 120, .45); stroke-width: 2.5; }
.nl-bar { stroke: rgba(60, 38, 120, .55); stroke-width: 2.5; }
.nl-bar-faint { opacity: .35; }
.nl-brace { fill: none; stroke: #34205f; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }

/* calculator-style display */
.nl-calc { fill: #2a1b5c; stroke: #7c4dff; stroke-width: 4; }
.nl-calc-t { font: 800 38px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; fill: #c8f7ff; text-anchor: middle; dominant-baseline: central; stroke: none; }
.nl-calc-s { font-size: 26px; fill: #ffd54a; }

/* ---------- picture card ---------- */
.quiz-overlay[id^="nl"] .quiz-modal { --nl-fig: 250px; }
.quiz-overlay[id^="nl"] .quiz-question b { color: var(--secondary, #4b3f8f); }
.quiz-overlay[id^="nl"] .bq-btn,
.quiz-overlay[id^="nl"] .bq-next-btn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.quiz-overlay[id^="nl"] .bq-next-btn { margin-bottom: env(safe-area-inset-bottom, 0px); }
.quiz-overlay[id^="nl"] .bq-summary-buttons { margin-bottom: env(safe-area-inset-bottom, 0px); }
.quiz-overlay[id^="nl"] .quiz-modal { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

.nl-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 8px auto 0; }
.nl-stage {
    position: relative;
    width: var(--nl-fig);
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    padding: 6px;
    border-radius: 20px;
    background:
        radial-gradient(120% 90% at 25% 10%, rgba(255, 255, 255, .92), rgba(255, 255, 255, 0) 60%),
        linear-gradient(180deg, #f7f2ff 0%, #ece3ff 100%);
    border: 2px solid var(--line, #ddd2fb);
    box-shadow: 0 3px 0 rgba(75, 63, 143, 0.08), inset 0 0 22px rgba(167, 139, 250, .16);
}
.nl-stage > svg { width: 100%; height: 100%; }
.nl-stage.nl-wide { width: min(100%, calc(var(--nl-fig) * 1.7)); aspect-ratio: 2 / 1; }
.nl-hint { margin: 0; text-align: center; font-size: 13px; font-weight: 700; color: #7a71a8; line-height: 1.35; max-width: 360px; }
.nl-hint b { color: var(--secondary, #4b3f8f); }
.nl-replay {
    min-height: 44px; padding: 8px 20px; border: 2px solid var(--primary, #6c5ce7); border-radius: 999px;
    background: #fff; color: var(--primary, #6c5ce7); font: inherit; font-weight: 800; font-size: 15px;
    box-shadow: 0 3px 0 rgba(108, 92, 231, 0.20); cursor: pointer;
    touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
    transition: transform .08s ease, box-shadow .15s;
}
.nl-replay:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(108, 92, 231, 0.20); }

/* ================================================================
   Answer chips: ALWAYS a single line (4 chips)
   ================================================================ */
.quiz-number-options.nl-picker {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 480px;
    margin: 16px auto 4px;
}
.quiz-number-options.nl-picker:empty { display: none; }
.quiz-number-opt.nl-opt {
    display: inline-flex;
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: auto !important;
    min-height: 54px !important;
    max-height: none !important;
    box-sizing: border-box !important;
    padding: 10px 5px;
    white-space: normal !important;
    overflow: hidden;
    overflow-wrap: break-word;
    font-weight: 800;
    font-size: 15.5px;
    line-height: 1.2;
    text-align: center;
    color: var(--secondary, #4b3f8f);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    transition: transform .08s ease, box-shadow .15s, border-color .15s, background .15s;
}
.quiz-number-opt.nl-opt.nl-sym { font-size: 30px; line-height: 1; }
.quiz-number-opt.nl-opt:active:not(:disabled) { transform: scale(.96); background: rgba(124, 77, 255, 0.10); }
@media (hover: hover) {
    .quiz-number-opt.nl-opt:hover:not(:disabled) { border-color: var(--primary, #6c5ce7); }
}
.quiz-number-opt.nl-opt.is-correct { border-color: #10b981; background: rgba(16, 185, 129, 0.08); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18); }
.quiz-number-opt.nl-opt.is-wrong { border-color: #ef4444; background: rgba(239, 68, 68, 0.08); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18); }
.quiz-number-opt.nl-opt.has-thumb { padding: 6px 4px 8px; }
.nl-opt-thumb { display: block; width: 100%; max-width: 78px; aspect-ratio: 1 / 1; }
.nl-opt-letter { font-size: 13px; font-weight: 800; opacity: .85; }

/* ================================================================
   Responsive (phones): shrink the drawings and chips only
   ================================================================ */
@media (max-width: 560px) {
    .quiz-overlay[id^="nl"] .quiz-modal { --nl-fig: 232px; }
    .quiz-number-options.nl-picker { gap: 8px; margin-top: 14px; }
    .quiz-number-opt.nl-opt { font-size: 12.5px; padding: 8px 3px; min-height: 52px !important; letter-spacing: -0.1px; }
    .nl-opt-thumb { max-width: 68px; }

}
@media (max-width: 380px) {
    .quiz-overlay[id^="nl"] .quiz-modal { --nl-fig: 204px; }
    .quiz-number-opt.nl-opt { font-size: 11.5px; padding: 7px 2px; }
    .quiz-number-opt.nl-opt.nl-sym { font-size: 26px; }
    .quiz-number-opt.nl-opt.has-thumb { padding: 5px 2px 6px; }
    .quiz-number-options.nl-picker { gap: 6px; }
    .nl-opt-thumb { max-width: 58px; }
    .nl-hint { font-size: 12.5px; }

}
@media (pointer: coarse) {
    .quiz-number-opt.nl-opt { min-height: 56px !important; }
}
@media (max-height: 560px) and (orientation: landscape) {
    .quiz-overlay[id^="nl"] .quiz-modal { --nl-fig: 176px; }
}
@media (prefers-reduced-motion: reduce) {
    .quiz-number-opt.nl-opt, .nl-replay { transition: none; }
}

/* ---------- Tier 1 pictures: lines, floors, lift, buttons ---------- */
.nl-tick { stroke: #34205f; stroke-width: 3; stroke-linecap: round; }
.nl-seg { fill: none; stroke-width: 6; stroke-linecap: round; }
.nl-seg-dashed { stroke-dasharray: 2 12; }
.nl-thin { stroke-width: 1.8; }
.nl-t-floor { font-weight: 800; }
.nl-t-dark { fill: #34205f; stroke: #fff; }
.nl-t-light { fill: #fff; stroke: rgba(60, 38, 120, .60); stroke-width: 4.5; }
.nl-pill { fill: rgba(255, 255, 255, .92); stroke: rgba(60, 38, 120, .45); stroke-width: 2; }
.nl-pill-q { fill: #ffe3f5; stroke: #c4208a; stroke-width: 3; }
.nl-shaft { fill: #efe6ff; stroke: rgba(60, 38, 120, .55); stroke-width: 2.5; }
.nl-level { stroke: #b69cff; stroke-width: 2; }
.nl-ghostbox { fill: none; stroke: #7c4dff; stroke-width: 3; stroke-dasharray: 5 5; opacity: .75; }
.nl-hilite { fill: none; stroke: #ffb300; stroke-width: 4.5; }
.nl-ground { fill: #35c27a; stroke: rgba(30, 90, 60, .6); stroke-width: 2.5; }
.nl-door { stroke: rgba(255, 255, 255, .85); stroke-width: 3; stroke-linecap: round; }
.nl-bubble { fill: #fff; stroke: rgba(60, 38, 120, .55); stroke-width: 3; }
.nl-skin { fill: #ffd9a8; stroke: rgba(60, 38, 120, .55); stroke-width: 2.5; }
.nl-glow { fill: none; stroke: #ffd54a; stroke-width: 6; opacity: .95; }

/* ---------- Extra phone polish for this file ---------- */
.quiz-overlay[id^="nl"] .nl-stage.nl-wide { min-height: 0; }
@media (max-width: 380px) {
    .quiz-overlay[id^="nl"] .quiz-question { font-size: 15.5px; }
}
.nl-t-btn { font-size: 34px; stroke: rgba(60, 38, 120, .55); stroke-width: 4; }
.nl-t-lbl { font-size: 24px; }
/* ---------- Tier 7 extras: number line, hop arrows, tick labels ---------- */
.nl-t-tick { font-size: 16px; fill: #34205f; stroke: #fff; stroke-width: 4px; }
.nl-hop { fill: none; stroke-width: 6; stroke-linecap: round; }
.nl-hop-u { fill: none; stroke: #fff; stroke-width: 11; stroke-linecap: round; opacity: .9; }
.nl-dash { stroke-dasharray: 3 11; }
.nl-t-hl { font-size: 26px; }
.nl-t-white-ish { fill: #34205f; }
.quiz-overlay[id^="nl"] .nl-stage.nl-wide { overflow: hidden; }