/* =====================================================================
   Баннер cookie и окно настроек. По ТЗ Политики cookie: кнопки
   «Принять все» и «Только необходимые» одинаковые по размеру и
   контрасту; баннер не перекрывает страницу для экранного диктора
   (aria-modal="false"), окно настроек – модальное.
   ===================================================================== */

.ala-consent {
  position: fixed;
  z-index: 1150;
  left: 24px;
  bottom: 24px;
  width: min(460px, calc(100vw - 48px));
  padding: 26px 26px 22px;
  border-radius: 4px 4px 28px 4px;
  background: var(--ala-brand-deep);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 48px rgba(0, 20, 30, 0.45);
  font-family: var(--ala-font-body);
}
.ala-consent[hidden], .ala-consent-modal[hidden] { display: none; }

.ala-consent__title { margin: 0 32px 10px 0; font-family: var(--ala-font-heading); font-size: 19px; font-weight: 800; line-height: 1.25; }
.ala-consent__text { margin: 0; font-size: 14px; line-height: 1.55; color: rgba(255, 255, 255, 0.82); }
.ala-consent__links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 12px 0 0; font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.ala-consent__links a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.ala-consent__links a:hover { color: var(--ala-brand-steel); }

.ala-consent__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.ala-consent__btn {
  min-height: 46px;
  padding: 10px 14px;
  border: 1.5px solid #fff;
  border-radius: var(--ala-radius-pill);
  background: #fff;
  color: var(--ala-brand-deep);
  font: 700 14px/1.2 var(--ala-font-heading);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}
.ala-consent__btn:hover { background: #dce6eb; border-color: #dce6eb; }
.ala-consent__btn:focus-visible, .ala-consent__more:focus-visible, .ala-consent__close:focus-visible {
  outline: 2px solid var(--ala-brand-steel);
  outline-offset: 3px;
}
.ala-consent__more {
  grid-column: 1 / -1;
  justify-self: center;
  padding: 6px 10px;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.85);
  font: 700 13px/1.2 var(--ala-font-heading);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ala-consent__more:hover { color: #fff; }

.ala-consent__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
}
.ala-consent__close:hover { opacity: 1; background: rgba(255, 255, 255, 0.08); }

/* ------------------------------------------------------ окно настроек */
.ala-consent-open { overflow: hidden; }
.ala-consent-modal { position: fixed; z-index: 1300; inset: 0; display: grid; place-items: center; padding: 16px; }
.ala-consent-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 20, 30, 0.55); }
.ala-consent-modal__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 30px 30px 26px;
  border-radius: 4px 4px 32px 4px;
  background: var(--ala-surface);
  color: var(--ala-text);
  box-shadow: 0 24px 64px rgba(0, 20, 30, 0.35);
  font-family: var(--ala-font-body);
}
.ala-consent-modal__panel:focus { outline: none; }
.ala-consent-modal__panel .ala-consent__title { font-size: 22px; margin-bottom: 18px; }
.ala-consent-modal__panel .ala-consent__close { color: var(--ala-text); }
.ala-consent-modal__panel .ala-consent__close:hover { background: var(--ala-surface-tint); }

.ala-consent-cat { padding: 16px 0; border-top: 1px solid var(--ala-border-light); }
.ala-consent-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
label.ala-consent-cat__head { cursor: pointer; }
.ala-consent-cat__head strong { font-size: 16px; }
.ala-consent-cat__state { font-size: 13px; font-weight: 700; color: var(--ala-accent); white-space: nowrap; }
.ala-consent-cat p { margin: 8px 0 0; font-size: 14px; line-height: 1.55; color: var(--ala-text-muted); }

.ala-switch {
  appearance: none;
  flex: 0 0 auto;
  position: relative;
  width: 46px;
  height: 26px;
  margin: 0;
  border-radius: 999px;
  background: #cfd9de;
  cursor: pointer;
  transition: background 0.16s ease;
}
.ala-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.16s ease;
}
.ala-switch:checked { background: var(--ala-brand-core); }
.ala-switch:checked::after { transform: translateX(20px); }
.ala-switch:focus-visible { outline: 2px solid var(--ala-brand-steel); outline-offset: 3px; }

/* три равнозначные кнопки столбиком: длинные подписи (казахская, английская) не ломаются на три строки */
.ala-consent__actions--settings { grid-template-columns: 1fr; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--ala-border-light); }
.ala-consent__actions--settings .ala-consent__btn { border-color: var(--ala-brand-core); background: var(--ala-brand-core); color: #fff; }
.ala-consent__actions--settings .ala-consent__btn:hover { border-color: var(--ala-brand-deep); background: var(--ala-brand-deep); }

/* кнопка «Настройки cookie» в подвале выглядит как соседние ссылки */
.ala-footer-cookie {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--ala-t-ui);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: color var(--ala-transition);
}
.ala-footer-cookie:hover { color: var(--ala-white); }

@media (max-width: 640px) {
  .ala-consent { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 22px 18px 16px; }
  .ala-consent__title { font-size: 17px; }
  .ala-consent__text { font-size: 13px; }
  .ala-consent-modal__panel { padding: 24px 20px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .ala-switch, .ala-switch::after, .ala-consent__btn { transition: none; }
}
