/*
 * 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-range-assist
 */
/* Board-friendly slider helpers (see ../js/range-assist.js). Every size rule sits
   behind html:not(.mcr-compete) body.maths-activity:not(.display-mode) so challenge
   (compete) rounds and the teacher display view are never touched. */

.ra-wrap { display: flex; align-items: center; gap: 8px; }
.ra-wrap input[type="range"] { flex: 1 1 auto; min-width: 0; width: auto; }
.ra-btn {
    flex: 0 0 auto; width: 40px; height: 40px; padding: 0; border-radius: 50%;
    border: 2px solid #1565c0; background: #fff; color: #1565c0;
    font-family: 'Nunito', system-ui, sans-serif; font-weight: 800; font-size: 22px; line-height: 1;
    cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.ra-btn:hover:not(:disabled) { background: #e8f1fb; }
.ra-btn:active:not(:disabled) { background: #1565c0; color: #fff; }
.ra-btn:disabled { opacity: .35; cursor: default; }
.ra-btn:focus-visible, .ra-seg-btn:focus-visible { outline: 3px solid #0d3f7a; outline-offset: 2px; }

.ra-seg { display: flex; gap: 6px; }
.ra-seg-btn {
    flex: 1 1 0; min-height: 40px; padding: 4px 6px; border: 2px solid #cbd5e1; border-radius: 10px;
    background: #fff; color: #334155; cursor: pointer; touch-action: manipulation;
    font-family: 'Nunito', system-ui, sans-serif; font-weight: 800; font-size: 14px;
}
.ra-seg-btn.is-on { background: #1565c0; border-color: #1565c0; color: #fff; }

/* Things you can drag in the picture. */
.ra-draggable { touch-action: none; }

@media (min-width: 1500px) and (min-height: 760px) {
    html:not(.mcr-compete) body.maths-activity:not(.display-mode) .ra-wrap { gap: 12px; }
    html:not(.mcr-compete) body.maths-activity:not(.display-mode) .ra-btn { width: 56px; height: 56px; font-size: 30px; }
    html:not(.mcr-compete) body.maths-activity:not(.display-mode) .ra-seg-btn { min-height: 56px; font-size: 18px; border-radius: 12px; }
    html:not(.mcr-compete) body.maths-activity:not(.display-mode) .ra-wrap input[type="range"] {
        -webkit-appearance: none; appearance: none; height: 44px; background: transparent; cursor: pointer;
    }
    html:not(.mcr-compete) body.maths-activity:not(.display-mode) .ra-wrap input[type="range"]::-webkit-slider-runnable-track {
        height: 12px; border-radius: 6px; background: #cbd5e1;
    }
    html:not(.mcr-compete) body.maths-activity:not(.display-mode) .ra-wrap input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none; width: 36px; height: 36px; margin-top: -12px; border-radius: 50%;
        background: #1565c0; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(15,23,42,.45);
    }
    html:not(.mcr-compete) body.maths-activity:not(.display-mode) .ra-wrap input[type="range"]::-moz-range-track {
        height: 12px; border-radius: 6px; background: #cbd5e1;
    }
    html:not(.mcr-compete) body.maths-activity:not(.display-mode) .ra-wrap input[type="range"]::-moz-range-thumb {
        width: 30px; height: 30px; border-radius: 50%; background: #1565c0; border: 3px solid #fff;
        box-shadow: 0 1px 4px rgba(15,23,42,.45);
    }
    html:not(.mcr-compete) body.maths-activity:not(.display-mode) .ra-wrap input[type="range"]:focus-visible { outline: 3px solid #0d3f7a; outline-offset: 2px; }
}
