/* Cameras of the yard – client page in the brand of dolgov-auto.ru, same look as promo.dolgov-auto.ru
   (dark hero, white header, red main button, Unbounded headings, Onest text). Fonts: shared/brand (OFL). */
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/unbounded-600.woff2) format("woff2"); }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/onest-400.woff2) format("woff2"); }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/onest-600.woff2) format("woff2"); }

:root {
  --c-dark: #2b2a29; --c-red: #ef1313; --c-red-dark: #c90f0f;
  --c-white: #fff; --c-gray: #ededed; --c-gray-2: #f6f6f6; --c-gray-3: #dcdcdc;
  --c-text: #2b2a29; --c-text-2: #6b6968; --c-green: #1d9e4f;
  --r-sm: 8px; --r-md: 12px;
  --shadow-1: 0 2px 8px rgba(43, 42, 41, .08); --shadow-2: 0 8px 28px rgba(43, 42, 41, .14);
  --f-head: "Unbounded", "Arial Black", sans-serif;
  --f-body: "Onest", "Segoe UI", Arial, sans-serif;
  --tr: .18s ease;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--f-body); font-size: 17px; line-height: 1.55; color: var(--c-text); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--c-red-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--c-red); outline-offset: 2px; border-radius: var(--r-sm); }

/* page frame (as promo) */
.pr { min-height: 100vh; display: flex; flex-direction: column; background: var(--c-gray-2); }
.pr-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.pr-head { position: sticky; top: 0; z-index: 10; background: var(--c-white); box-shadow: var(--shadow-1); }
.pr-head .pr-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.pr-brand { display: inline-flex; flex-shrink: 0; }
.pr-brand img { display: block; height: 35px; width: auto; }
.pr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--r-sm);
  min-height: 48px; padding: 0 20px; font-weight: 600; font-size: 16px; line-height: 1.2; text-align: center;
  background: var(--c-dark); color: #fff; white-space: nowrap; transition: background var(--tr);
}
.pr-btn:hover { text-decoration: none; background: #000; }
.pr-btn--red { background: var(--c-red); }
.pr-btn--red:hover { background: var(--c-red-dark); }
.pr-btn--sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.pr-btn.is-done, .pr-btn.is-done:hover { background: var(--c-green); }
.pr h1 { font-family: var(--f-head); font-weight: 600; line-height: 1.15; margin: 0; }
.pr-hero { background: var(--c-dark); color: #fff; padding: 28px 0 32px; }
.pr-hero h1 { font-size: clamp(24px, 6.4vw, 44px); text-transform: uppercase; }
.pr-hero h1 span { color: var(--c-red); }
.pr-lead { margin: 14px 0 0; max-width: 640px; font-size: 18px; color: rgba(255, 255, 255, .82); }
.pr-main { flex: 1; padding-top: 20px; padding-bottom: 32px; }
.pr-foot { background: var(--c-dark); color: rgba(255, 255, 255, .7); padding: 24px 0; }
.pr-foot .pr-wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.pr-foot-name { font-family: var(--f-head); font-weight: 600; color: #fff; }
.pr-foot a { color: #fff; font-weight: 600; font-size: 18px; }

/* camera grid: one column on a phone, two on a computer */
.cam-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.cam-card { background: var(--c-white); border-radius: var(--r-md); box-shadow: var(--shadow-1); overflow: hidden; }
.cam-body { padding: 16px; display: grid; gap: 14px; }
.cam-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.cam-head h2 { margin: 0; font-family: var(--f-head); font-weight: 600; font-size: 20px; line-height: 1.2; }
.cam-time { color: var(--c-text-2); font-size: 15px; font-variant-numeric: tabular-nums; }
.cam-status { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; color: var(--c-text); }
.cam-status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c-text-2); flex-shrink: 0; }
.cam-status.is-online::before, .cam-status.is-snapshot::before { background: var(--c-green); }
.cam-status.is-offline { color: var(--c-red-dark); }
.cam-status.is-offline::before { background: var(--c-red); }
.cam-media.is-offline .cam-snap { filter: grayscale(1) brightness(.7); }
.cam-code { display: grid; gap: 6px; }
.cam-code label { font-size: 15px; font-weight: 600; color: var(--c-text-2); }
.cam-code-text {
  width: 100%; resize: none; border: 1px solid var(--c-gray-3); border-radius: var(--r-sm); background: var(--c-gray-2);
  padding: 10px 12px; font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--c-text);
}
.cam-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.cam-link { font-weight: 600; font-size: 16px; }

/* media box: snapshot, video and the play button share one 16:9 area */
.cam-media { position: relative; aspect-ratio: 16 / 9; background: #1d1c1b; overflow: hidden; }
.cam-snap, .cam-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #1d1c1b; }
.cam-video { object-fit: contain; background: #000; }
.cam-empty { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px 14%; color: rgba(255, 255, 255, .7); font-size: 17px; text-align: center; }
.cam-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 12px;
  border: 0; border-radius: 999px; padding: 12px 24px 12px 14px; background: var(--c-red); color: #fff; font-weight: 600; font-size: 18px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35); transition: background var(--tr), transform var(--tr);
}
.cam-play:hover { background: var(--c-red-dark); }
.cam-play-ico { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .2); position: relative; }
.cam-play-ico::after { content: ""; position: absolute; left: 14px; top: 10px; border-left: 13px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.cam-media.is-loading .cam-play { pointer-events: none; background: var(--c-dark); }
.cam-msg {
  position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 10px 14px; border-radius: var(--r-sm);
  background: rgba(20, 20, 20, .82); color: #fff; font-size: 16px; line-height: 1.35;
}
.cam-live {
  position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 6px; background: var(--c-red); color: #fff;
  font-size: 13px; font-weight: 600; letter-spacing: .02em; pointer-events: none;
}

/* embed: only the player, full width of the iframe, no margins */
.emb { margin: 0; background: #000; overflow: hidden; }
.emb .cam-media { width: 100vw; height: 100vh; aspect-ratio: auto; }
.emb .cam-snap { object-fit: contain; background: #000; }
.emb-cap {
  position: fixed; right: 10px; top: 10px; display: flex; gap: 8px; align-items: baseline; padding: 4px 10px; border-radius: 6px;
  background: rgba(20, 20, 20, .66); color: #fff; font-size: 13px; pointer-events: none;
}
.emb-cap .cam-time { color: rgba(255, 255, 255, .75); font-size: 12px; }
.emb-cap .cam-status { color: #fff; font-size: 12px; }
.emb-cap .cam-status.is-offline { color: #ffb4b4; }
.emb-title { font-weight: 600; }
.emb.is-playing .emb-cap { display: none; }

@media (min-width: 720px) {
  .pr-wrap { padding-left: 24px; padding-right: 24px; }
  .pr-head .pr-wrap { min-height: 72px; }
  .pr-hero { padding: 34px 0 38px; }
  .pr-main { padding-top: 28px; padding-bottom: 48px; }
  .cam-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .cam-body { padding: 18px 20px 20px; }
}
@media (max-width: 420px) {
  .cam-play { font-size: 16px; padding: 10px 18px 10px 10px; }
  .emb-cap { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
