/*
 * Coding Ireland proprietary interactive activity
 * Copyright (c) 2017-2026 Coding Ireland. All rights reserved.
 *
 * Part of the Coding Ireland online learning platform. Licensed for use only
 * as delivered on the platform. Copying, redistributing, or adapting this
 * file, in whole or in part, for use in any other product or service is not
 * permitted. Ref: CI-maths-volume-builder
 */
/*
 * volume-builder activity skin. Layered on the shared maths-activity.css.
 * A row of readouts (cube count / dimensions / volume), the isometric solid,
 * and three dimension steppers. Display mode hides the steppers and fills the
 * solid layer by layer.
 */

.vb-mode-chip {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: var(--maths-surface-alt);
    color: var(--maths-primary-dark);
    font-weight: 800;
    font-size: 0.8rem;
}

/* ---- Readouts ---- */
.vb-readouts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.vb-readout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    min-width: 120px;
    padding: 0.6rem 1rem;
    background: var(--maths-surface);
    border: 1px solid var(--maths-border);
    border-radius: 12px;
}

.vb-readout-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--maths-ink-muted);
}

.vb-readout-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--maths-primary);
    font-variant-numeric: tabular-nums;
}

.vb-readout-volume {
    background: var(--maths-primary);
    border-color: var(--maths-primary);
}
.vb-readout-volume .vb-readout-label { color: rgba(255, 255, 255, 0.85); }
.vb-readout-volume .vb-readout-value { color: #fff; }

/* ---- Solid ---- */
.vb-stage {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
}

.vb-solid-svg {
    width: 100%;
    max-width: 520px;
    max-height: 360px;
    height: auto;
}

.vb-face { stroke: #1f3d5c; stroke-width: 1.2; stroke-linejoin: round; }
.vb-face-top   { fill: #7ec4f2; }
.vb-face-left  { fill: #4a97d6; }
.vb-face-right { fill: #2f6fa8; }
.vb-cube { transition: opacity 220ms ease-out; }

/* ---- Steppers ---- */
.vb-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.75rem;
}

.vb-controls[hidden] { display: none; }

.vb-stepper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: var(--maths-surface);
    border: 1px solid var(--maths-border);
    border-radius: 12px;
}

.vb-stepper-label {
    font-weight: 700;
    color: var(--maths-ink-muted);
    min-width: 3.4rem;
}

.vb-step-btn {
    width: 42px;
    height: 42px;
    border: 2px solid var(--maths-border);
    border-radius: 10px;
    background: var(--maths-surface);
    color: var(--maths-primary);
    font-size: 1.4rem;
    font-weight: 800;
    cursor: pointer;
    line-height: 1;
}

.vb-step-btn:hover { background: var(--maths-surface-alt); border-color: var(--maths-primary); }

.vb-step-value {
    min-width: 2rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--maths-ink);
    font-variant-numeric: tabular-nums;
}

/* ---- Target panel ---- */
.vb-target-prompt {
    font-weight: 800;
    color: #6b4500;
    flex: 1 1 220px;
}

.vb-check-btn { white-space: nowrap; }

/* ---- Your turn ---- */
.vb-your-turn {
    max-width: 620px;
    margin: 1rem auto 0;
    background: #fff8e1;
    border: 1px solid #f0c14b;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
}

.vb-your-turn[hidden] { display: none; }

.vb-your-turn-label { font-weight: 800; color: #8a5a00; margin-bottom: 0.4rem; }
.vb-your-turn-list { margin: 0; padding-left: 1.2rem; color: var(--maths-ink); }
.vb-your-turn-list li { margin: 0.2rem 0; }

/* ---- Display mode ---- */
body.display-mode .vb-controls { display: none; }
body.display-mode .vb-stage { padding: 0; }
body.display-mode .vb-solid-svg { max-height: 320px; }

@media (prefers-reduced-motion: reduce) {
    .vb-cube { transition: none; }
}

@media (max-width: 640px) {
    .vb-readout { min-width: 96px; padding: 0.5rem 0.7rem; }
    .vb-readout-value { font-size: 1.25rem; }
}
