/* class3-math-GM-ch11-common.css
   Class 3, Chapter 11 "Filling and Lifting" (topic 11): pictures, the single-line answer chips,
   the drag-and-drop board and the native phone feel for every popup of the chapter
   (all overlays carry the class c11-overlay; element ids start with fl / fm / ...).
   Shared by every tier file (class3-math-GM-ch11-t1.js, -t2.js ...). The popup frame itself
   (overlay, modal, stars, buttons) comes from the shared quiz css. */

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

/* ---------------- the picture card: matt paper, soft inner edge ---------------- */
.c11-overlay .c11-stage {
    margin: 6px auto 12px;
    width: 100%;
    max-width: 560px;
    padding: 10px 10px 12px;
    border-radius: 24px;
    background: linear-gradient(180deg, #FFF9E8 0%, #E8F6FF 100%);
    box-shadow: inset 0 0 0 1.5px rgba(70, 130, 190, .18), 0 8px 18px rgba(60, 58, 110, .10);
    box-sizing: border-box;
}
.c11-overlay .c11-svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 340px;
    overflow: visible;
    font-family: "Nunito", "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    user-select: none;
    -webkit-user-select: none;
}
.c11-overlay .c11-hint {
    margin-top: 6px;
    text-align: center;
    font-size: 13.5px;
    line-height: 1.35;
    font-weight: 700;
    color: #3C6AA6;
}
.c11-overlay .c11-blank {
    display: inline-block;
    min-width: 74px;
    margin: 0 3px;
    border-bottom: 3px dashed #3C8FE0;
    text-align: center;
    color: transparent;
    line-height: 1;
}
.c11-overlay .c11-speak {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 4px 11px;
    min-height: 30px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(180deg, #7CC6FF, #3F8FE0);
    box-shadow: 0 3px 8px rgba(47, 134, 214, .35);
    cursor: pointer;
    touch-action: manipulation;
    vertical-align: middle;
}
.c11-overlay .c11-speak:active { transform: scale(.95); }

/* water rises, hints fade in, Chintu bobs */
.c11-overlay .c11-late { transition: opacity .5s ease; }
.c11-overlay .c11-bob { animation: c11Bob 1.7s ease-in-out infinite; }
.c11-overlay .c11-pulse { animation: c11Pulse 1.8s ease-in-out infinite; }
@keyframes c11Bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes c11Pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* ---------------- the answer chips: ONE line, always ---------------- */
.c11-overlay .c11-picker,
.c11-overlay [id$="Options"] {
    display: flex;
    flex-wrap: nowrap;
    grid-template-columns: none;
    justify-content: center;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    max-width: 620px;
    margin: 8px auto 6px;
    padding: 0;
    box-sizing: border-box;
}
.c11-overlay .c11-opt {
    position: relative;
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
    min-height: 58px;
    margin: 0;
    padding: 8px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    overflow-wrap: anywhere;
    border: 2px solid #B9D8F5;
    border-radius: 16px;
    background: linear-gradient(180deg, #FFFFFF 0%, #EAF4FF 100%);
    color: #1F3A68;
    font-family: "Nunito", "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-weight: 800;
    font-size: clamp(16px, 4.8vw, 22px);
    line-height: 1.12;
    box-shadow: 0 3px 0 #B9D8F5, 0 6px 12px rgba(60, 58, 110, .10);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
}
/* 7-9 letters: a little smaller; longer phrases wrap inside the chip (still one row of chips) */
.c11-overlay .c11-opt.c11-sm { font-size: clamp(14px, 4.1vw, 19px); }
.c11-overlay .c11-opt.c11-wrap { white-space: normal; font-size: clamp(13.5px, 3.8vw, 18px); padding: 8px 5px; text-wrap: balance; }
.c11-overlay .c11-opt.c11-xs { font-size: clamp(12.5px, 3.45vw, 16px); }
.c11-overlay .c11-opt:active:not(:disabled) { transform: translateY(2px) scale(.97); box-shadow: 0 1px 0 #B9D8F5, 0 2px 6px rgba(60, 58, 110, .12); }
.c11-overlay .c11-opt:disabled { cursor: default; }
.c11-overlay .c11-opt:disabled:not(.is-correct):not(.is-wrong) { opacity: .55; }
.c11-overlay .c11-opt.is-correct {
    background: linear-gradient(180deg, #DDFBE8 0%, #9BEBB9 100%);
    border-color: #2FB36A;
    color: #145A36;
    box-shadow: 0 3px 0 #2FB36A, 0 6px 12px rgba(47, 179, 106, .25);
    animation: c11Pop .35s ease;
}
.c11-overlay .c11-opt.is-wrong {
    background: linear-gradient(180deg, #FFE6E1 0%, #FFB8AA 100%);
    border-color: #E5604D;
    color: #8A2616;
    box-shadow: 0 3px 0 #E5604D, 0 6px 12px rgba(229, 96, 77, .22);
    animation: c11Shake .32s ease;
}
@keyframes c11Pop { 0% { transform: scale(.94); } 60% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes c11Shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* picture chips (a small drawing + a letter) */
.c11-overlay .c11-opt.c11-pic { flex-direction: column; gap: 2px; min-height: 104px; padding: 6px 4px 8px; font-size: clamp(16px, 4.6vw, 20px); }
.c11-overlay .c11-opt.c11-pic svg { display: block; width: 100%; height: 72px; overflow: visible; pointer-events: none; }
.c11-overlay .c11-opt .c11-let {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%;
    background: #3F8FE0; color: #fff; font-size: 15px; font-weight: 800;
}

/* ---------------- tap-to-pour (Tier 2) ---------------- */
.c11-overlay .c11-tools { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.c11-overlay .c11-pourbtn {
    min-height: 48px; padding: 8px 22px; border: 0; border-radius: 999px;
    font: inherit; font-size: 17px; font-weight: 800; color: #fff; cursor: pointer; touch-action: manipulation;
    background: linear-gradient(180deg, #7CC6FF, #3F8FE0);
    box-shadow: 0 4px 0 #2F6DB5, 0 8px 14px rgba(47, 134, 214, .30);
}
.c11-overlay .c11-pourbtn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 #2F6DB5; }
.c11-overlay .c11-pourbtn:disabled { opacity: .5; cursor: default; }
.c11-overlay .c11-tally { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; min-height: 26px; max-width: 100%; }
.c11-overlay .c11-tally svg { width: 34px; height: 24px; }

/* ---------------- drag the water level (Tier 4) ---------------- */
.c11-overlay .c11-dragzone { touch-action: none; cursor: ns-resize; outline: none; }
.c11-overlay .c11-dragzone:focus-visible { outline: 3px solid #3F8FE0; outline-offset: 2px; border-radius: 12px; }

/* ---------------- drag and drop board ---------------- */
.c11-overlay .c11-dd { margin-top: 10px; user-select: none; -webkit-user-select: none; }
.c11-overlay .c11-dd-slots, .c11-overlay .c11-tray { display: flex; flex-wrap: nowrap; justify-content: center; gap: 8px; }
.c11-overlay .c11-slot {
    flex: 1 1 0; min-width: 0; max-width: 150px; text-align: center;
    border-radius: 16px; outline: none;
}
.c11-overlay .c11-slot-lab {
    min-height: 34px; display: flex; align-items: flex-end; justify-content: center;
    font-size: clamp(12.5px, 3.5vw, 15px); font-weight: 800; line-height: 1.15; color: #3C6AA6; padding: 0 2px 4px;
}
.c11-overlay .c11-slot-lab svg { width: 100%; height: 70px; }
.c11-overlay .c11-drop {
    min-height: 112px; display: flex; align-items: center; justify-content: center;
    border: 2.5px dashed #8FB9E6; border-radius: 16px; background: rgba(255, 255, 255, .7);
    transition: background .15s ease, border-color .15s ease;
}
.c11-overlay .c11-slot:focus-visible .c11-drop, .c11-overlay .c11-dd.c11-armed .c11-drop { border-color: #3F8FE0; background: #EAF4FF; }
.c11-overlay .c11-drop:has(.c11-tok) { border-style: solid; background: #fff; }
.c11-overlay .c11-slot.is-ok .c11-drop { border-color: #2FB36A; background: #DDFBE8; }
.c11-overlay .c11-slot.is-bad .c11-drop { border-color: #E5604D; background: #FFE6E1; }
.c11-overlay .c11-tray-lab { margin: 12px 0 4px; text-align: center; font-size: 13px; font-weight: 800; color: #6A7FA6; }
.c11-overlay .c11-tray {
    min-height: 118px; padding: 8px 6px; border-radius: 16px;
    background: rgba(60, 130, 200, .08); align-items: center;
}
.c11-overlay .c11-tok {
    flex: 0 1 108px; min-width: 0; width: 100%; margin: 0; padding: 5px 3px 6px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    border: 2px solid #B9D8F5; border-radius: 14px; background: #fff; color: #1F3A68;
    font: inherit; font-size: clamp(13px, 3.7vw, 16px); font-weight: 800; line-height: 1.1; text-align: center;
    box-shadow: 0 3px 0 #B9D8F5; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent;
}
.c11-overlay .c11-tok svg { display: block; width: 100%; height: 76px; pointer-events: none; }
.c11-overlay .c11-tok.c11-word { min-height: 54px; justify-content: center; font-size: clamp(15px, 4.4vw, 19px); }
.c11-overlay .c11-tok.is-sel { border-color: #3F8FE0; background: #EAF4FF; box-shadow: 0 0 0 3px rgba(63, 143, 224, .35); transform: translateY(-2px); }
.c11-overlay .c11-tok.c11-lift { opacity: .35; }
.c11-overlay .c11-drop .c11-tok { width: 100%; flex: 1 1 auto; box-shadow: none; border-color: transparent; background: transparent; }
.c11-ghost { position: fixed; z-index: 100000; width: 104px; pointer-events: none; opacity: .92; transform: scale(1.06) rotate(-2deg);
    box-shadow: 0 10px 20px rgba(30, 60, 110, .3) !important; background: #fff !important; border: 2px solid #3F8FE0 !important; border-radius: 14px; }
.c11-overlay .c11-dd.is-done .c11-tok { cursor: default; }

/* word cards (Tier 2, "Pick the right tool") */
.c11-overlay .c11-cards { display: grid; gap: 8px; margin: 6px 0 4px; }
.c11-overlay .c11-card { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1.5px #CFE4F8; font-size: clamp(14px, 3.9vw, 17px); font-weight: 700; color: #1F3A68; line-height: 1.25; text-align: left; }
.c11-overlay .c11-card svg { flex: 0 0 62px; width: 62px; height: 52px; }

/* ---------------- phones ---------------- */
@media (max-width: 480px) {
    .c11-overlay .c11-stage { border-radius: 20px; padding: 8px 6px 10px; margin-bottom: 10px; }
    .c11-overlay .c11-hint { font-size: 12.5px; }
    .c11-overlay .c11-picker, .c11-overlay [id$="Options"] { gap: 6px; }
    .c11-overlay .c11-opt { min-height: 56px; border-radius: 14px; }
    .c11-overlay .c11-opt.c11-pic { min-height: 100px; }
    .c11-overlay .c11-dd-slots, .c11-overlay .c11-tray { gap: 6px; }
}
@media (max-width: 340px) {
    .c11-overlay .c11-picker, .c11-overlay [id$="Options"] { gap: 4px; }
    .c11-overlay .c11-opt { padding: 8px 2px; }
}
/* ---------------- tablets and desktops: bigger pictures, roomier chips ---------------- */
@media (min-width: 700px) {
    .c11-overlay .c11-stage { max-width: 620px; padding: 14px 14px 16px; }
    .c11-overlay .c11-svg { max-height: 380px; }
    .c11-overlay .c11-hint { font-size: 15px; }
    .c11-overlay .c11-picker, .c11-overlay [id$="Options"] { gap: 12px; }
    .c11-overlay .c11-opt { min-height: 66px; }
    .c11-overlay .c11-opt.c11-pic { min-height: 118px; }
    .c11-overlay .c11-opt:hover:not(:disabled) { background: linear-gradient(180deg, #FFFFFF 0%, #DCEBFF 100%); }
    .c11-overlay .c11-dd { max-width: 620px; margin-left: auto; margin-right: auto; }
    .c11-overlay .c11-tok:hover { border-color: #3F8FE0; }
}
@media (prefers-reduced-motion: reduce) {
    .c11-overlay .c11-late { transition: none; }
    .c11-overlay .c11-bob, .c11-overlay .c11-pulse,
    .c11-overlay .c11-opt.is-correct, .c11-overlay .c11-opt.is-wrong { animation: none; }
}

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