/*
 * 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-rotational-symmetry
 */
/*
 * rotational-symmetry activity styles.
 *
 * A circular tray with the shape at its centre. A dial handle on the
 * tray's edge sets the current rotation. Tick marks around the edge
 * show 30°/60°/90° increments. Match positions are highlighted with
 * a green pulse when the shape lines up with its start outline.
 */

.rs-mode-chip {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    background: var(--maths-surface-alt);
    color: var(--maths-primary-dark);
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rs-target-label {
    font-weight: 800;
    color: #8a5a00;
    font-size: 0.95rem;
    margin-right: 0.5rem;
}

.rs-target-prompt {
    flex: 1 1 auto;
    color: #6b4500;
    font-weight: 700;
    font-size: 1rem;
}

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

.rs-order-chip {
    min-width: 2.6rem;
    min-height: 2.6rem;
    padding: 0.3rem 0.6rem;
    background: var(--maths-surface);
    border: 2px solid var(--maths-border);
    border-radius: 10px;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--maths-primary-dark);
    cursor: pointer;
    transition: background-color 140ms ease, transform 80ms ease;
}

.rs-order-chip:hover { background: var(--maths-surface-alt); }
.rs-order-chip:active { transform: scale(0.96); }
.rs-order-chip.is-active {
    background: var(--maths-primary);
    color: #fff;
    border-color: var(--maths-primary-dark);
}

.rs-rotation-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
    padding: 0.4rem 0.6rem;
    background: var(--maths-surface-alt);
    border: 1px solid var(--maths-border);
    border-radius: 10px;
}

.rs-rotation-label {
    font-weight: 800;
    font-size: 1rem;
    color: var(--maths-primary-dark);
    margin-right: 0.3rem;
}

.rs-turn-btn {
    min-width: 64px;
    min-height: 44px;
    font-size: 1.05rem;
    font-weight: 700;
}

.rs-turn-back { min-width: 130px; }

.rs-stage {
    background: var(--maths-surface);
    border: 1px solid var(--maths-border);
    border-radius: 12px;
    padding: 0.6rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.rs-tray-svg {
    width: 100%;
    height: auto;
    max-width: 620px;
    max-height: 620px;
    display: block;
    touch-action: none;
    user-select: none;
}

.rs-tray-circle {
    fill: #FAFCFE;
    stroke: var(--maths-border);
    stroke-width: 2;
}

.rs-tray-tick {
    stroke: var(--maths-ink-muted);
    stroke-width: 1.5;
}

.rs-tray-tick-major {
    stroke: var(--maths-ink);
    stroke-width: 2;
}

.rs-shape-original {
    fill: var(--maths-primary);
    opacity: 0.15;
    stroke: var(--maths-primary-dark);
    stroke-width: 2;
    stroke-dasharray: 4 3;
}

.rs-shape-current {
    fill: var(--maths-accent);
    stroke: var(--maths-accent-dark);
    stroke-width: 2.5;
    opacity: 0.95;
}

.rs-shape-current.is-matched {
    fill: var(--maths-success);
    stroke: #1f6f5f;
}

.rs-match-overlay {
    fill: var(--maths-success);
    opacity: 0.18;
    stroke: var(--maths-success);
    stroke-width: 1.5;
    stroke-dasharray: 3 3;
}

.rs-dial-handle {
    fill: var(--maths-primary);
    stroke: var(--maths-primary-dark);
    stroke-width: 2;
    cursor: grab;
}

.rs-dial-handle.is-grabbing { cursor: grabbing; }

.rs-readouts {
    background: var(--maths-surface);
    border: 1px solid var(--maths-border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.rs-readout {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

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

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

.rs-your-turn {
    background: #FFF7DE;
    border: 1px solid #F0C14B;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    margin-top: 1rem;
}

.rs-your-turn-label { font-weight: 800; color: #8a5a00; margin-bottom: 0.4rem; }
.rs-your-turn-list { margin: 0; padding-left: 1.2rem; color: #5e3c00; font-weight: 600; }

body.display-mode .rs-dial-handle { cursor: default; }
body.display-mode .rs-rotation-bar { display: none; }
body.display-mode #spinButton,
body.display-mode #revealButton,
body.display-mode #resetButton { pointer-events: none; opacity: 0.6; }
