/* «عجلة الأسماء» (teacher-wheel.js): the class chips, the wheel with its pointer and hub, the picked name. */
.wh-panel { padding: var(--s4, 16px); display: flex; flex-direction: column; gap: 10px; }
.wh-empty { color: var(--muted); font-size: 15.5px; margin: 0; }

.wh-stage {
    position: relative; padding: 20px 16px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px;
    background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--primary) 9%, var(--surface)), var(--surface) 70%);
}
.wh-full { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 3; }
.wh-wheel-box { position: relative; width: min(100%, 520px, 60vh); aspect-ratio: 1; }
.wh-svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 10px 22px rgb(0 0 0 / .18)); }
.wh-rot { transform-origin: 260px 260px; transform-box: view-box; will-change: transform; }
.wh-slice { stroke: #fff; stroke-width: 2; }
.wh-slice.is-picked { filter: brightness(1.18) saturate(1.1); }
.wh-name { fill: #fff; font-family: var(--f-head); font-weight: 700; }
.wh-rim { fill: none; stroke: var(--reward, #d4a63c); stroke-width: 8; }
.wh-blank { fill: var(--surface-2); stroke: var(--border); stroke-width: 2; }
.wh-blank-t { fill: var(--muted); font-family: var(--f-head); font-weight: 700; font-size: 24px; }

/* the pointer: a gold drop at the top, pointing down into the wheel */
.wh-pointer {
    position: absolute; top: -6px; left: 50%; z-index: 2; width: 38px; height: 50px; transform: translateX(-50%);
    background: var(--reward, #d4a63c); clip-path: polygon(50% 100%, 0 0, 100% 0); filter: drop-shadow(0 3px 4px rgb(0 0 0 / .3));
}
.wh-stage.is-spinning .wh-pointer { animation: wh-tick .18s ease-in-out infinite alternate; }
@keyframes wh-tick { from { transform: translateX(-50%) rotate(-7deg); } to { transform: translateX(-50%) rotate(7deg); } }

.wh-hub {
    position: absolute; top: 50%; left: 50%; z-index: 2; width: 19%; aspect-ratio: 1; transform: translate(-50%, -50%);
    border-radius: 50%; border: 5px solid #fff; background: var(--primary); color: var(--on-primary, #fff);
    font-size: clamp(22px, 5vw, 38px); display: flex; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 6px 16px rgb(0 0 0 / .28);
}
.wh-hub:disabled { opacity: .55; cursor: default; }
.wh-hub:not(:disabled):hover { filter: brightness(1.08); }

.wh-count { margin: 0; color: var(--muted); font-size: 15.5px; font-weight: 600; }
.wh-acts { display: flex; gap: 10px; }
.wh-spin { min-height: 56px; padding-inline: 32px; font-size: 20px; }

/* the girl the wheel picked: over the wheel, big enough for the class to read */
.wh-result {
    position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    padding: 20px; text-align: center; border-radius: inherit;
    background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    animation: wh-pop .35s var(--spring, ease-out) both;
}
.wh-result[hidden] { display: none; }
.wh-r-kicker { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-head); font-weight: 700; font-size: 20px; color: var(--muted); }
.wh-r-kicker i { color: var(--reward, #d4a63c); }
.wh-r-name { margin: 0; font-family: var(--f-head); font-weight: 800; font-size: clamp(34px, 8vw, 72px); line-height: 1.2; color: var(--primary); }
.wh-r-acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
@keyframes wh-pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }

.wh-asked-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.wh-asked-head h2 { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 19px; font-family: var(--f-head); }
.wh-asked { display: flex; flex-wrap: wrap; gap: 8px; }
.wh-chip {
    display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 14px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 15.5px; font-weight: 600; cursor: pointer;
}
.wh-chip:hover { border-color: var(--primary); }
.wh-chip i { color: var(--muted); }

/* the classroom screen: the stage alone, as big as the screen allows */
.wh-stage:fullscreen, .wh-stage.is-big { justify-content: center; padding: 24px; border-radius: 0; }
.wh-stage.is-big { position: fixed; inset: 0; z-index: 60; }
.wh-stage:fullscreen .wh-wheel-box, .wh-stage.is-big .wh-wheel-box { width: min(92vw, 78vh); }
.wh-stage:-webkit-full-screen .wh-wheel-box { width: min(92vw, 78vh); }


/* sound on the wheel, beside «ملء الشاشة» */
.wh-snd { position: absolute; top: 12px; inset-inline-start: 64px; z-index: 3; }

/* the confetti over her name, inside the stage */
.wh-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.wh-result > :not(.wh-fx) { position: relative; z-index: 4; }
