/* Prompter Remote – shared styles */
:root {
  --bg: #0b0d12;
  --panel: #151925;
  --panel2: #1d2231;
  --line: #2a3144;
  --text: #e9edf5;
  --muted: #94a0b8;
  --accent: #19c6a6;
  --accent2: #0fa88c;
  --danger: #ff5c5c;
  --warn: #ffb020;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Hebrew", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; }
h1, h2, h3 { margin: 0 0 .5rem; font-weight: 700; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.2rem; border-radius: var(--radius); background: var(--panel2); color: var(--text);
  border: 1px solid var(--line); font-weight: 600; min-height: 48px; user-select: none;
  transition: transform .06s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: #04221c; border-color: transparent; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.on { background: var(--accent); color: #04221c; border-color: transparent; }
.btn[disabled] { opacity: .5; cursor: default; }

.input {
  width: 100%; padding: .85rem 1rem; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--panel); color: var(--text); outline: none; min-height: 48px;
}
.input:focus { border-color: var(--accent); }
.code-input { font-size: 2rem; letter-spacing: .5rem; text-align: center; text-transform: uppercase; font-weight: 700; font-family: ui-monospace, Menlo, monospace; direction: ltr; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.row { display: flex; gap: .6rem; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.center { text-align: center; }

.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .6rem; border-radius: 999px; font-size: .8rem; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.chip.ok .dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.chip.bad .dot { background: var(--danger); }
.chip.warn .dot { background: var(--warn); }

.code-big { font-family: ui-monospace, Menlo, monospace; font-size: clamp(2.5rem, 10vw, 6rem); letter-spacing: .3em; font-weight: 800; direction: ltr; color: var(--accent); margin: .25rem 0; }

/* range sliders */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; direction: ltr; }
input[type=range]::-webkit-slider-runnable-track { height: 10px; border-radius: 5px; background: var(--panel2); border: 1px solid var(--line); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); margin-top: -12px; border: 3px solid var(--bg); box-shadow: 0 2px 10px rgba(0,0,0,.5); }
input[type=range]::-moz-range-track { height: 10px; border-radius: 5px; background: var(--panel2); border: 1px solid var(--line); }
input[type=range]::-moz-range-thumb { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); }

/* toggle switch */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.switch:last-child { border-bottom: 0; }
.switch input { display: none; }
.switch .track { width: 52px; height: 30px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); position: relative; flex: none; transition: background .15s; }
.switch .track::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(22px); }
[dir=rtl] .switch input:checked + .track::after { transform: translateX(-22px); }

.seg { display: flex; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg button { flex: 1; padding: .7rem .5rem; background: transparent; color: var(--muted); font-weight: 600; min-height: 44px; }
.seg button.on { background: var(--accent); color: #04221c; }

.toast { position: fixed; bottom: calc(1rem + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--accent); color: #04221c; padding: .6rem 1.2rem; border-radius: 999px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 50; }
.toast.show { opacity: 1; }
