/* Плашка о cookie внизу страницы (assets/site-cookies.js) — по образцу Dolphin{anty}:
 * во всю ширину, белая, с линией сверху; текст и кнопка — по центру. Кнопка — «мягкая»
 * кнопка холста (.ag-btn-soft). Канон docs/MOTION.md: выезжает снизу (300 мс, крупная
 * поверхность); «Принять» гасит её как приложение — уведомление: растворение и сдвиг
 * на 12px вниз по кривой ухода, короче входа (200 мс). Кривые — токены site-motion.css,
 * он есть не на всех страницах, поэтому с запасным значением. */
.ag-ck {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 240;               /* над страницей, под кнопкой и окном чата (250) */
  background: #ffffff;
  border-top: 1px solid #dadce0;
  box-shadow: 0 -8px 24px rgba(31, 31, 31, .06);
  font-family: "Google Sans", Onest, Roboto, Helvetica, Arial, sans-serif;
  transform: translateY(100%);
}

.ag-ck.is-shown {
  transform: none;
  transition: transform .3s var(--ag-ease, cubic-bezier(.2, 0, 0, 1));
}

.ag-ck.is-leaving {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s var(--ag-out, cubic-bezier(.3, 0, 1, 1)),
              transform .2s var(--ag-out, cubic-bezier(.3, 0, 1, 1));
}

.ag-ck-in {
  display: flex;
  align-items: center;
  gap: 40px;
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 24px;
  box-sizing: border-box;
}

.ag-ck-text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: #444746;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
}

.ag-ck-text a {
  color: var(--ag-accent, #0b57d0);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ag-ck-text a:hover { color: #0842a0; }

.ag-ck-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: #d3e3fd;
  color: #0b57d0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.ag-ck-btn:hover { background: #c2d9fb; color: #0842a0; }
.ag-ck-btn:focus-visible { outline: 2px solid var(--ag-accent, #0b57d0); outline-offset: 2px; }

/* Кнопка чата в правом нижнем углу (56px, отступ 24px) — на узком экране плашка
 * оставляет ей 80px и зазор 16px справа, чтобы «Принять» не легла под неё. Шире
 * 1200px поле по бокам от 980px уже больше. */
@media (max-width: 1199px) {
  html:has(.agw-launch) .ag-ck-in { padding-right: 96px; }
}

/* Телефон: текст во всю ширину, кнопка под ним; кнопке чата (52px, отступ 16px) —
 * угол справа от «Принять». */
@media (max-width: 600px) {
  .ag-ck-in {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px;
  }
  html:has(.agw-launch) .ag-ck-in { padding-right: 16px; }
  html:has(.agw-launch) .ag-ck-btn { margin-right: 68px; }
}

/* Без движения — только растворение (как окна приложения под reduced-motion). */
@media (prefers-reduced-motion: reduce) {
  .ag-ck, .ag-ck.is-shown, .ag-ck.is-leaving { transform: none; }
  .ag-ck { opacity: 0; }
  .ag-ck.is-shown { opacity: 1; transition: opacity .15s linear; }
  .ag-ck.is-leaving { opacity: 0; transition: opacity .1s linear; }
  .ag-ck-btn { transition: none; }
}

@media print {
  .ag-ck { display: none; }
}
