/* Кабинет записи. Палитра — солёное розовое озеро Торревьехи и море. */
:root {
  color-scheme: light;
  --bg: #F6F3F1;
  --surface: #FFFFFF;
  --ink: #1D3A4A;
  --muted: #5A7380;
  --line: #D6DFE3;
  --sea: #1D3A4A;
  --pink: #E59AB0;
  --pink-ink: #3A1622;
  --ok: #2F7A5B;
  --warn: #A8620E;
  --bad: #B03A48;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #10212A;
    --surface: #18303C;
    --ink: #E9F0F2;
    --muted: #9DB3BC;
    --line: #2B4654;
    --sea: #0B1820;
    --ok: #6CC49B;
    --warn: #E7A851;
    --bad: #F08A97;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
a { color: inherit; text-underline-offset: 3px; }

.top {
  background: var(--sea);
  color: #F6F3F1;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.top a { text-decoration: none; font-weight: 600; font-size: 17px; }
.top form { margin: 0; }
.link-btn { background: none; border: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }

main { max-width: 680px; margin: 0 auto; padding: 18px 18px 120px; }
h1 { font-size: 22px; line-height: 1.25; margin: 6px 0 14px; }
h2 { font-size: 17px; margin: 0 0 8px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); font-size: 14px; }

section { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 0 0 14px; }

.state { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.state::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.state[data-s=AVAILABLE]::before, .state[data-s=READY]::before, .state[data-s=CONFIRMED]::before { background: var(--ok); }
.state[data-s=UNKNOWN]::before, .state[data-s=PREPARING]::before, .state[data-s=CONFIRMING]::before { background: var(--warn); }
.state[data-s=FAILED]::before { background: var(--bad); }

.notice { border-left: 4px solid var(--ok); padding: 10px 12px; background: var(--surface); margin: 0 0 14px; border-radius: 4px; }
.notice.bad { border-left-color: var(--bad); }

label { display: block; font-size: 14px; color: var(--muted); margin: 0 0 12px; }
input[type=text], input[type=email], input[type=tel], input[type=password], textarea {
  display: block; width: 100%; margin-top: 4px;
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
textarea { min-height: 84px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-size: 15px; }
.check input { margin-top: 4px; width: 18px; height: 18px; }
.err { color: var(--bad); font-size: 13px; display: block; margin-top: 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 14px; }

.btn {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  border-radius: 8px; padding: 11px 18px; border: 1px solid var(--ink); background: transparent; color: var(--ink);
}
.btn.primary { background: var(--sea); color: #F6F3F1; border-color: var(--sea); }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 600; }

.shot { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* Главный элемент: панель подтверждения внизу экрана */
.confirm-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--sea); color: #F6F3F1;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap;
}
.confirm-bar form { margin: 0; }
.confirm-bar .go {
  font: inherit; font-size: 18px; font-weight: 700; cursor: pointer;
  background: var(--pink); color: var(--pink-ink); border: 0; border-radius: 10px;
  padding: 14px 26px; min-width: min(100%, 320px);
}
.confirm-bar .go:disabled { opacity: .6; cursor: progress; }
.confirm-bar .stop { background: none; border: 0; color: #F6F3F1; font: inherit; text-decoration: underline; cursor: pointer; }
.timer { font-variant-numeric: tabular-nums; }

ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 8px 0; border-top: 1px solid var(--line); }
ul.plain li:first-child { border-top: 0; }

.login { max-width: 380px; margin: 10vh auto 0; }

/* Страница «Данные для вставки» */
.copy-list { padding: 0; overflow: hidden; }
.copy-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.copy-row:first-child { border-top: 0; }
.copy-row.last { background: color-mix(in srgb, var(--pink) 14%, transparent); }
.copy-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.copy-label { font-size: 13px; color: var(--muted); }
.copy-value { font-weight: 600; overflow-wrap: anywhere; }
.copy-btn {
  flex: none; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--sea); color: #F6F3F1; border: 0; border-radius: 8px; padding: 10px 14px; min-width: 120px;
}
.copy-btn.done { background: var(--pink); color: var(--pink-ink); }
.top a + a { font-weight: 400; font-size: 15px; text-decoration: underline; }
