/* shape-inspector-2d — display and explain 2D shape properties. */

.si2d-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;
}

.si2d-shape-picker,
.si2d-feature-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 10px auto;
    max-width: 760px;
}

.si2d-shape-pick {
    border: 2px solid #cbd5e1;
    background: #fff;
    color: #1e293b;
    border-radius: 999px;
    padding: 6px 16px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.si2d-shape-pick:hover { border-color: #6366f1; }
.si2d-shape-pick.is-active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}

/* Feature buttons reuse the shared .btn-control base; add an active tint. */
.si2d-feature.is-active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}

.si2d-display-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 6px;
}

.si2d-stage {
    flex: 1 1 420px;
    max-width: 520px;
    min-width: 300px;
}
.si2d-stage-inner { position: relative; width: 100%; }
.si2d-shape-svg {
    display: block;
    width: 100%;
    max-width: 520px;
    height: auto;
    margin: 0 auto;
}

/* ---- Shape + overlay styling ---- */

.si2d-shape-fill {
    fill: #eef2ff;
    stroke: #1e293b;
    stroke-width: 3;
    stroke-linejoin: round;
}

.si2d-symmetry-line {
    stroke: #db2777;
    stroke-width: 2.5;
    stroke-dasharray: 9 7;
    stroke-linecap: round;
}

.si2d-parallel-side {
    stroke-width: 7;
    stroke-linecap: round;
    opacity: 0.9;
}
.si2d-chevron {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.si2d-side-badge {
    fill: #1e293b;
    stroke: #fff;
    stroke-width: 2;
}
.si2d-badge-text {
    fill: #fff;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 16px;
    text-anchor: middle;
    dominant-baseline: central;
}

.si2d-vertex-dot { fill: #2563eb; stroke: #fff; stroke-width: 2; }
.si2d-vertex-num {
    fill: #1e3a8a;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 16px;
    text-anchor: middle;
    dominant-baseline: central;
}

.si2d-curved-highlight {
    fill: none;
    stroke: #2563eb;
    stroke-width: 6;
}

/* ---- Readout ---- */

.si2d-readout {
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.si2d-shape-name {
    font-weight: 800;
    font-size: 1.2rem;
    color: #1e293b;
    margin-bottom: 2px;
}
.si2d-counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    transition: border-color 0.15s, background 0.15s;
}
.si2d-counter.is-active {
    border-color: #4f46e5;
    background: #eef2ff;
}
.si2d-counter-label { font-weight: 600; color: #475569; font-size: 0.92rem; }
.si2d-counter-val {
    font-weight: 800;
    font-size: 1.5rem;
    color: #1e293b;
    min-width: 1.4em;
    text-align: center;
}

.si2d-caption {
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    margin: 12px auto 4px;
    max-width: 640px;
}

/* ---- Challenge mode ---- */

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

.si2d-answer-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    flex: 1 1 100%;
    margin-top: 0.4rem;
}

.si2d-answer-chip {
    min-width: 2.6rem;
    min-height: 2.6rem;
    padding: 0.3rem 0.6rem;
    background: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: #3730a3;
    cursor: pointer;
    transition: background-color 140ms ease, transform 80ms ease;
}
.si2d-answer-chip:hover { background: #eef2ff; }
.si2d-answer-chip:active { transform: scale(0.96); }
.si2d-answer-chip.is-active {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

/* In display mode the shared CSS hides .activity-header; keep the picker,
   feature bar, stage and readout — they ARE the teacher's explain surface. */
body.display-mode .si2d-caption { margin-bottom: 0; }
