/* Баннер управляет согласием и перекрывает страницу до явного выбора. */
.cookie-consent {
  position: fixed;
  z-index: 12000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding:
    max(18px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  background: rgba(37, 40, 45, 0.62);
  inset: 0;
}

.cookie-consent[hidden] {
  display: none;
}

html[data-cookie-consent="accepted"] .cookie-consent,
html[data-cookie-consent="rejected"] .cookie-consent {
  display: none;
}

html.cookie-consent-open .cookie-consent {
  display: flex;
}

.cookie-consent-lock {
  overflow: hidden;
}

.cookie-consent__panel {
  position: relative;
  display: grid;
  width: min(960px, 100%);
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 28px;
  align-items: end;
  padding: 28px;
  border: 1px solid #e1e4e7;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(20, 23, 27, 0.28);
  color: #52575f;
}

.cookie-consent__copy {
  min-width: 0;
}

.cookie-consent__eyebrow {
  display: block;
  margin-bottom: 8px;
  color: #6f747d;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-transform: uppercase;
}

.cookie-consent__title {
  margin: 0;
  color: #25282d;
  font-size: 25px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 0;
}

.cookie-consent__text {
  max-width: 650px;
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.55;
}

.cookie-consent__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.45;
}

.cookie-consent__link {
  color: #25282d;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: #f4d53b;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.cookie-consent__current {
  margin: 0;
  color: #6f747d;
}

.cookie-consent__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.cookie-consent__button {
  display: inline-flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid #25282d;
  border-radius: 999px;
  cursor: pointer;
  color: #25282d;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.cookie-consent__button:hover {
  transform: translateY(-1px);
}

.cookie-consent__button--accept {
  background: #ffc900;
}

.cookie-consent__button--accept:hover {
  background: #f4d53b;
}

.cookie-consent__button--reject {
  background: #fff;
}

.cookie-consent__button--reject:hover {
  background: #f5f6f6;
}

.cookie-consent__button:focus-visible,
.cookie-consent__link:focus-visible {
  outline: 3px solid #f4d53b;
  outline-offset: 3px;
}

.cookie-consent-revoke__status {
  margin: 12px 0;
  color: #6f747d;
  font-size: 14px;
}

/* Заглушка не допускает загрузку сторонней карты до согласия. */
.cookie-embed-placeholder {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: #fff8d8;
  inset: 0;
}

.cookie-embed-placeholder[hidden] {
  display: none;
}

.cookie-embed-placeholder__content {
  max-width: 430px;
  text-align: center;
}

.cookie-embed-placeholder__content strong {
  display: block;
  color: #25282d;
  font-size: 22px;
  line-height: 1.25;
}

.cookie-embed-placeholder__content p {
  margin: 10px 0 18px;
  color: #52575f;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .cookie-consent {
    padding: 10px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .cookie-consent__panel {
    max-height: calc(100dvh - 20px);
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px 18px 18px;
    overflow-y: auto;
    border-radius: 20px;
  }

  .cookie-consent__title {
    font-size: 22px;
  }

  .cookie-consent__text {
    font-size: 14px;
  }

  .cookie-consent__meta {
    display: grid;
    gap: 8px;
  }

  .cookie-consent__button {
    min-height: 50px;
  }

  .cookie-embed-placeholder {
    padding: 22px;
  }

  .cookie-embed-placeholder__content strong {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent__button {
    transition: none;
  }

  .cookie-consent__button:hover {
    transform: none;
  }
}
