/* Shared visual language for the "Интерактивы для уроков" family (timer +
   wheel). Visually consistent with control/ and certificates/ (Inter font,
   blue accent), but this is its own copy — same reasoning as those two:
   each top-level tool folder is a standalone static subsystem, no
   cross-folder @import. Unlike control/certificates, timer/ and wheel/ DO
   share this one file with each other (loaded via ../css/shared.css) since
   they're explicitly one product family. Light theme only — no dark mode. */

:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #eef1f7;
    --text: #1b2430;
    --muted: #667085;
    --border: #e3e7ef;
    --border-strong: #cdd4e0;
    --primary: #2f66f3;
    --primary-dark: #1f4fce;
    --danger: #c62828;
    --success: #1fb15f;
    --shadow: 0 1px 3px rgba(20, 30, 60, 0.08);
    --shadow-lg: 0 8px 30px rgba(20, 30, 60, 0.16);
    --r: 12px;
    --r-lg: 18px;
    --warn-bg: #fff6dd;
    --warn-border: #f0ddaa;
    --warn-text: #6b5410;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background 0.2s, color 0.2s;
}
a { color: var(--primary); }

/* Browsers paint a black backdrop behind the fullscreened element by
   default (visible as a dark flash during the enter/exit transition since
   the element itself hasn't finished resizing yet) — override it so
   entering fullscreen never looks like dark mode switched on. */
::backdrop { background: #f5f7fb; }

.topbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.topbar h1 { font-size: 16px; margin: 0; }
.topbar .kicker { font-size: 12px; color: var(--muted); margin: 0 0 2px 0; }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.databanner {
    flex: 0 0 auto;
    padding: 8px 24px;
    background: var(--warn-bg);
    border-bottom: 1px solid var(--warn-border);
    color: var(--warn-text);
    font-size: 12.5px;
    line-height: 1.4;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--r);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 15px;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow);
    padding: 16px 18px;
    margin-bottom: 16px;
}
.panel h2 { font-size: 14px; margin: 0 0 12px 0; }
.panel .muted { color: var(--muted); font-size: 12.5px; margin: 0 0 10px 0; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; font-size: 12.5px; min-width: 0; }
.field label:first-child { font-weight: 500; }
.field input[type="text"],
.field input[type="number"],
.field select,
.field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 7px 10px;
    font: inherit;
    font-size: 13px;
    background: var(--surface);
    color: var(--text);
}
.field textarea { resize: vertical; min-height: 100px; font-family: ui-monospace, monospace; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; margin-bottom: 18px; }
.field-grid .field { margin-bottom: 0; }

.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    line-height: 1.4;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    user-select: none;
}
.checkbox-row input[type="checkbox"] {
    flex: none;
    width: 19px;
    height: 19px;
    margin: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.muted { color: var(--muted); }

@media print {
    body { display: none !important; }
}
