/* class3-math-GM-ch14-common.css
   Class 3 Maths Mela Ch.14 "Symmetry, Tiling, and Maps" (Topic 14): pictures, the single-line answer chips
   and the native phone feel for every popup of the chapter (overlay class "c3s-overlay", ids start with "sf").
   One file for all tiers. The popup frame itself (overlay, modal, stars, buttons) comes from the shared quiz css. */

.c3s-overlay .quiz-modal { -webkit-tap-highlight-color: transparent !important; overscroll-behavior: contain !important; }

/* ---------------- the picture card: matt paper, soft inner edge ---------------- */
.c3s-overlay .sf-stage {
    margin: 6px auto 12px !important;
    width: 100% !important;
    max-width: 560px !important;
    padding: 10px 10px 12px !important;
    border-radius: 24px !important;
    background: linear-gradient(180deg, #FFFAEB 0%, #EEF7FF 100%) !important;
    box-shadow: inset 0 0 0 1.5px rgba(122, 104, 214, .16), 0 8px 18px rgba(60, 58, 110, .10) !important;
    box-sizing: border-box !important;
}
.c3s-overlay .sf-svg {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: 380px !important;
    overflow: visible !important;
    font-family: "Nunito", "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
}
.c3s-overlay .sf-svg.sf-drag { touch-action: none !important; cursor: ew-resize; outline: none; }
.c3s-overlay .sf-hint {
    margin-top: 6px !important;
    text-align: center !important;
    font-size: 13.5px !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
    color: #5A4FA0 !important;
}
.c3s-overlay .sf-speak {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin-left: 6px !important;
    padding: 5px 12px !important;
    min-height: 32px !important;
    border: 0 !important;
    border-radius: 999px !important;
    font: inherit !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #fff !important;
    background: linear-gradient(180deg, #7CC6FF, #3F8FE0) !important;
    box-shadow: 0 3px 8px rgba(47, 134, 214, .35) !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    vertical-align: middle !important;
}
.c3s-overlay .sf-speak:active { transform: scale(.95) !important; }

/* ---------------- pictures: tiles, cards, rings (SVG parts) ---------------- */
.c3s-overlay .sf-tile { fill: #fff; fill-opacity: .62; stroke: #D9D2F6; stroke-width: 1.5; transition: fill .15s ease, stroke .15s ease; }
.c3s-overlay .sf-tap { cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.c3s-overlay .sf-tap:hover .sf-tile { stroke: #9A86E8; }
.c3s-overlay .sf-tap:focus-visible .sf-tile { stroke: #7B5CE0; stroke-width: 3; }
.c3s-overlay .sf-tap.is-on .sf-tile { fill: #E6F3FF; fill-opacity: 1; stroke: #3F8FE0; stroke-width: 4; }
.c3s-overlay .sf-tap.is-right .sf-tile { fill: #E4FBEE; fill-opacity: 1; stroke: #2FB36A; stroke-width: 4; }
.c3s-overlay .sf-tap.is-wrong .sf-tile { fill: #FFE6E1; fill-opacity: 1; stroke: #E5604D; stroke-width: 4; }
.c3s-overlay .sf-tap.is-dim { opacity: .55; }
.c3s-overlay .sf-tap.wob { animation: sfShake .36s ease; }
.c3s-overlay .sf-axis { stroke: #7B5CE0; stroke-width: 2.6; stroke-dasharray: 6 5; stroke-linecap: round; opacity: 0; transition: opacity .4s ease; pointer-events: none; }
.c3s-overlay .sf-tap.show-axis .sf-axis { opacity: .9; }
.c3s-overlay .sf-mid { stroke: #7B5CE0; stroke-width: 2.6; stroke-dasharray: 6 5; stroke-linecap: round; }
.c3s-overlay .sf-dash { stroke: #E5604D; stroke-width: 3.4; stroke-dasharray: 7 5; stroke-linecap: round; }
.c3s-overlay .sf-cardbg { fill: #fff; fill-opacity: .82; stroke: #CFC6F5; stroke-width: 2; transition: stroke .15s ease, fill .15s ease; }
.c3s-overlay .sf-card.is-right .sf-cardbg { fill: #E4FBEE; fill-opacity: 1; stroke: #2FB36A; stroke-width: 4; }
.c3s-overlay .sf-card.is-wrong .sf-cardbg { fill: #FFE6E1; fill-opacity: 1; stroke: #E5604D; stroke-width: 4; }
.c3s-overlay .sf-pulse { animation: sfPulse 1.8s ease-in-out infinite; }
@keyframes sfPulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* the cut / fold line and its handle */
.c3s-overlay .sf-cutline { stroke: #E5604D; stroke-width: 2.4; stroke-dasharray: 5 4; stroke-linecap: round; pointer-events: none; }
.c3s-overlay .sf-knob { pointer-events: none; }
.c3s-overlay .sf-knob circle { fill: #E5604D; stroke: #fff; stroke-width: 2.2; }
.c3s-overlay .sf-svg.is-good .sf-cutline, .c3s-overlay .sf-svg.is-good .sf-knob { opacity: 0; }
.c3s-overlay .sf-svg.is-bad { animation: sfShake .4s ease; }

/* the Check / Done button (only on questions that need one) */
.c3s-overlay .sf-actions { display: flex !important; justify-content: center !important; margin-top: 10px !important; }
.c3s-overlay .sf-go {
    min-height: 48px !important;
    min-width: 150px !important;
    padding: 10px 26px !important;
    border: 0 !important;
    border-radius: 999px !important;
    font-family: "Nunito", "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    color: #fff !important;
    background: linear-gradient(180deg, #7DE0A8, #2FB36A) !important;
    box-shadow: 0 4px 0 #23915A, 0 8px 14px rgba(47, 179, 106, .28) !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
}
.c3s-overlay .sf-go:active:not(:disabled) { transform: translateY(2px) !important; box-shadow: 0 2px 0 #23915A !important; }
.c3s-overlay .sf-go:disabled { opacity: .45 !important; cursor: default !important; box-shadow: 0 4px 0 #23915A !important; }

/* ---------------- the answer chips: ONE line, always (2, 4 or any number) ---------------- */
.c3s-overlay .sf-picker,
.c3s-overlay [id$="Options"] {
    display: flex !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 620px !important;
    margin: 8px auto 6px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}
.c3s-overlay [id$="Options"]:empty { display: none !important; }   /* tap / drag questions have no chips */
.c3s-overlay .sf-opt {
    position: relative !important;
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 58px !important;
    margin: 0 !important;
    padding: 8px 2px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    border: 2px solid #CFC6F5 !important;
    border-radius: 16px !important;
    background: linear-gradient(180deg, #FFFFFF 0%, #F3EEFF 100%) !important;
    color: #2A2858 !important;
    font-family: "Nunito", "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
    font-weight: 800 !important;
    font-size: clamp(15px, 4.6vw, 24px) !important;
    line-height: 1.1 !important;
    box-shadow: 0 3px 0 #CFC6F5, 0 6px 12px rgba(60, 58, 110, .10) !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
}
.c3s-overlay .sf-opt.sf-sm { font-size: clamp(12px, 3.6vw, 19px) !important; }
.c3s-overlay .sf-opt.sf-xs { font-size: clamp(10px, 2.9vw, 16px) !important; letter-spacing: -.2px !important; }
.c3s-overlay .sf-opt.sf-wrap { white-space: normal !important; font-size: clamp(12px, 3.5vw, 18px) !important; line-height: 1.15 !important; padding: 8px 4px !important; }
.c3s-overlay .sf-opt.sf-rich { padding: 4px !important; min-height: 68px !important; }
.c3s-overlay .sf-chipsvg { display: block !important; width: 100% !important; height: auto !important; max-height: 60px !important; pointer-events: none !important; }
.c3s-overlay .sf-opt:active:not(:disabled) { transform: translateY(2px) scale(.97) !important; box-shadow: 0 1px 0 #CFC6F5, 0 2px 6px rgba(60, 58, 110, .12) !important; }
.c3s-overlay .sf-opt:disabled { cursor: default !important; }
.c3s-overlay .sf-opt:disabled:not(.is-correct):not(.is-wrong) { opacity: .55 !important; }
.c3s-overlay .sf-opt.is-correct {
    background: linear-gradient(180deg, #DDFBE8 0%, #9BEBB9 100%) !important;
    border-color: #2FB36A !important;
    color: #145A36 !important;
    box-shadow: 0 3px 0 #2FB36A, 0 6px 12px rgba(47, 179, 106, .25) !important;
    animation: sfPop .35s ease !important;
}
.c3s-overlay .sf-opt.is-wrong {
    background: linear-gradient(180deg, #FFE6E1 0%, #FFB8AA 100%) !important;
    border-color: #E5604D !important;
    color: #8A2616 !important;
    box-shadow: 0 3px 0 #E5604D, 0 6px 12px rgba(229, 96, 77, .22) !important;
    animation: sfShake .32s ease !important;
}
@keyframes sfPop { 0% { transform: scale(.94); } 60% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes sfShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------------- phones ---------------- */
@media (max-width: 480px) {
    .c3s-overlay .sf-stage { border-radius: 20px !important; padding: 8px 6px 10px !important; margin-bottom: 10px !important; }
    .c3s-overlay .sf-hint { font-size: 12.5px !important; }
    .c3s-overlay .sf-picker, .c3s-overlay [id$="Options"] { gap: 6px !important; }
    .c3s-overlay .sf-opt { min-height: 56px !important; border-radius: 14px !important; }
    .c3s-overlay .sf-go { width: 100% !important; max-width: 320px !important; }
}
@media (max-width: 340px) {
    .c3s-overlay .sf-picker, .c3s-overlay [id$="Options"] { gap: 4px !important; }
}
/* ---------------- tablets and desktops: bigger pictures, roomier chips ---------------- */
@media (min-width: 700px) {
    .c3s-overlay .sf-stage { max-width: 620px !important; padding: 14px 14px 16px !important; }
    .c3s-overlay .sf-svg { max-height: 420px !important; }
    .c3s-overlay .sf-hint { font-size: 15px !important; }
    .c3s-overlay .sf-picker, .c3s-overlay [id$="Options"] { gap: 12px !important; }
    .c3s-overlay .sf-opt { min-height: 66px !important; }
    .c3s-overlay .sf-opt:hover:not(:disabled) { background: linear-gradient(180deg, #FFFFFF 0%, #E9E0FF 100%) !important; }
}
@media (prefers-reduced-motion: reduce) {
    .c3s-overlay .sf-pulse, .c3s-overlay .sf-tap.wob, .c3s-overlay .sf-svg.is-bad,
    .c3s-overlay .sf-opt.is-correct, .c3s-overlay .sf-opt.is-wrong { animation: none !important; }
    .c3s-overlay .sf-axis, .c3s-overlay .sf-tile { transition: none; }
}

/* probe: lets class3-math-GM-ch14-common.js know this file really loaded */
.sf-probe { --sf-loaded: 1; }
