/*
 * angle-tool — half-circle protractor with a draggable ray. Live degree
 * readout and classification (acute / right / obtuse / straight / reflex);
 * optional dual scale and optional turn description for the introductory
 * "what is an angle" lesson.
 */

.maths-activity .ang-mode-chip {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.3rem 0.75rem;
    background: var(--maths-surface-alt);
    color: var(--maths-primary-dark);
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Stage layout: protractor SVG + side readout */
.maths-activity .ang-stage {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(220px, 280px);
    gap: 1rem;
    align-items: start;
}

.maths-activity .ang-svg {
    width: 100%;
    height: auto;
    max-height: 460px;
    background: var(--maths-surface);
    border: 1px solid var(--maths-border);
    border-radius: 10px;
    touch-action: none;
    user-select: none;
}

/* Readout panel */
.maths-activity .ang-readout {
    background: var(--maths-surface);
    border: 1px solid var(--maths-border);
    border-radius: 10px;
    padding: 1rem 1.1rem;
}

.maths-activity .ang-readout-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--maths-ink-muted);
    margin-bottom: 0.55rem;
}

.maths-activity .ang-readout-value {
    display: flex;
    align-items: baseline;
    gap: 0.15rem;
    margin-bottom: 0.4rem;
}

.maths-activity .ang-readout-number {
    font-weight: 800;
    font-size: 2.6rem;
    color: var(--maths-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.maths-activity .ang-readout-unit {
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--maths-primary);
}

.maths-activity .ang-readout-classify {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--maths-accent);
    text-transform: lowercase;
    margin-bottom: 0.55rem;
}

.maths-activity .ang-readout-turn {
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--maths-border);
    font-size: 0.95rem;
    color: var(--maths-ink-muted);
}

.maths-activity .ang-readout-turn i {
    margin-right: 0.45rem;
    color: var(--maths-success);
}

/* Target panel label-and-prompt layout (the shared .maths-target-panel
 * handles the yellow banner styling; this just colours the inner label
 * and prompt to match the rest of the activity). */
.maths-activity .ang-target-label {
    font-weight: 800;
    color: var(--maths-primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.85rem;
}

.maths-activity .ang-target-label i {
    margin-right: 0.35rem;
    color: var(--maths-accent);
}

.maths-activity .ang-target-prompt {
    font-weight: 700;
    color: var(--maths-ink);
    font-size: 1.05rem;
    flex: 1 1 auto;
}

/* SVG element classes used by the JS renderer */
.ang-protractor-arc {
    fill: rgba(31, 111, 178, 0.06);
    stroke: var(--maths-primary, #1F6FB2);
    stroke-width: 2;
}

.ang-tick {
    stroke: var(--maths-primary, #1F6FB2);
    stroke-width: 1;
}

.ang-tick.is-major {
    stroke-width: 1.8;
}

.ang-tick-label {
    font: 600 12px Nunito, sans-serif;
    fill: var(--maths-ink, #1F2933);
    text-anchor: middle;
    dominant-baseline: middle;
}

.ang-tick-label.is-outer {
    fill: var(--maths-primary, #1F6FB2);
}

.ang-tick-label.is-inner {
    fill: var(--maths-accent, #E86A33);
}

.ang-ray {
    stroke: var(--maths-accent, #E86A33);
    stroke-width: 4;
    stroke-linecap: round;
}

.ang-ray.is-fixed {
    stroke: var(--maths-primary, #1F6FB2);
}

.ang-sweep {
    fill: rgba(232, 106, 51, 0.18);
    stroke: var(--maths-accent, #E86A33);
    stroke-width: 1.5;
    stroke-dasharray: 4 3;
}

.ang-vertex {
    fill: var(--maths-ink, #1F2933);
}

.ang-handle {
    fill: #fff;
    stroke: var(--maths-accent, #E86A33);
    stroke-width: 2.5;
    cursor: grab;
}

.ang-handle:active {
    cursor: grabbing;
}

@media (max-width: 760px) {
    .maths-activity .ang-stage {
        grid-template-columns: 1fr;
    }
    .maths-activity .ang-readout-number {
        font-size: 2rem;
    }
}

/* Display mode strips drag handles + the challenge target panel. The
 * draggable ray remains visible as a static labelled snapshot. */
body.display-mode .ang-handle,
body.display-mode .ang-target-panel {
    display: none !important;
}

body.display-mode .ang-svg {
    pointer-events: none;
}
