/*
 * 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-isometric-builder
 */
/* isometric-builder — drawing a cuboid on a dot grid. */

.iso-mode-chip {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #e0e7ff;
    color: #3730a3;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.iso-stage {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}
.iso-svg {
    display: block;
    width: 100%;
    max-width: 460px;
    height: auto;
    touch-action: manipulation;
}

/* ---- Dots ---- */

.iso-dot { fill: #94a3b8; }
.iso-dot-hit { fill: transparent; cursor: pointer; }
.iso-dot-hit:hover { fill: rgba(99, 102, 241, 0.18); }
.iso-dot-pip { fill: #94a3b8; pointer-events: none; }
.iso-dot-selected { fill: none; stroke: #4f46e5; stroke-width: 3; }

/* ---- Cuboid edges ---- */

.iso-edge {
    stroke-width: 4;
    stroke-linecap: round;
    fill: none;
}
.iso-edge-front { stroke: #2563eb; }
.iso-edge-depth { stroke: #db2777; }
.iso-edge-back { stroke: #1e3a8a; }
.iso-edge-hidden {
    stroke: #94a3b8;
    stroke-width: 2.5;
    stroke-dasharray: 7 6;
}
.iso-edge-drawn { stroke: #4f46e5; stroke-width: 4; }

/* ---- Narration / caption ---- */

.iso-narration {
    text-align: center;
    color: #334155;
    font-weight: 700;
    font-size: 1rem;
    max-width: 620px;
    margin: 10px auto 0;
    min-height: 1.4rem;
}
.iso-caption {
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    margin: 10px auto 4px;
    max-width: 620px;
}

.iso-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

/* ---- Challenge build panel ---- */

.iso-target-label { font-weight: 800; color: #8a5a00; font-size: 0.95rem; margin-right: 0.5rem; }
.iso-target-prompt { flex: 1 1 auto; color: #6b4500; font-weight: 700; font-size: 1rem; }

.iso-steppers {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    flex: 1 1 100%;
    margin-top: 0.5rem;
    justify-content: center;
}
.iso-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 4px 10px;
}
.iso-stepper-label { font-weight: 700; color: #475569; font-size: 0.9rem; min-width: 3.4rem; }
.iso-stepper-val {
    font-weight: 800;
    font-size: 1.3rem;
    color: #1e293b;
    min-width: 1.4em;
    text-align: center;
}
.iso-step-btn {
    width: 2.1rem;
    height: 2.1rem;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    color: #3730a3;
    cursor: pointer;
    line-height: 1;
}
.iso-step-btn:hover { background: #eef2ff; }
.iso-step-btn:active { transform: scale(0.94); }

/* ---- Display mode: keep the grid, cuboid and the Replay control; the
   shared CSS already hides .activity-header, so just tighten spacing. ---- */

body.display-mode .iso-narration { margin-top: 6px; }
body.display-mode .iso-caption { margin-bottom: 0; }
