/* WAYLAB-COOKIE-CONSENT (T-1418) — баннер согласия на cookie и веб-аналитику.
   Стили скоупированы под #wl-consent / #wl-consent-open, чтобы не влиять
   на существующие компоненты. Загружается после css/marina.css. */

#wl-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9400;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

#wl-consent[hidden] { display: none !important; }

#wl-consent .wl-consent-card {
  pointer-events: auto;
  width: 100%;
  max-width: 720px;
  background: #ffffff;
  color: #292524;
  border: 1px solid #e7e5e4;
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .18), 0 2px 8px rgba(15, 23, 42, .08);
  padding: 20px 22px 16px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  animation: wl-consent-in .22s ease-out;
}

@keyframes wl-consent-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

#wl-consent .wl-consent-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

#wl-consent .wl-consent-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
  color: #134e4a;
  letter-spacing: -.01em;
}

#wl-consent .wl-consent-text {
  margin: 0 0 14px;
  color: #57534e;
  font-size: 13.5px;
}

#wl-consent .wl-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

#wl-consent .wl-consent-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1;
  min-height: 42px;
  padding: 0 18px;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

#wl-consent .wl-consent-btn-primary {
  background: #0f766e;
  color: #ffffff;
}

#wl-consent .wl-consent-btn-primary:hover { background: #115e59; }

#wl-consent .wl-consent-btn-secondary {
  background: #ffffff;
  border-color: #d6d3d1;
  color: #292524;
}

#wl-consent .wl-consent-btn-secondary:hover {
  background: #fafaf9;
  border-color: #a8a29e;
}

#wl-consent .wl-consent-btn:focus-visible,
#wl-consent .wl-consent-link:focus-visible,
#wl-consent-open:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: 2px;
}

#wl-consent .wl-consent-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 12.5px;
  color: #78716c;
}

#wl-consent .wl-consent-link {
  color: #0f766e;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#wl-consent .wl-consent-link:hover { color: #115e59; }

#wl-consent .wl-consent-link-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

#wl-consent .wl-consent-dot { color: #d6d3d1; }

/* ---- настройки ---- */

#wl-consent .wl-consent-card-settings { max-width: 620px; }

#wl-consent .wl-consent-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 4px 0 14px;
}

#wl-consent .wl-consent-row {
  padding: 10px 0;
  border-top: 1px solid #f5f5f4;
}

#wl-consent .wl-consent-row:first-child { border-top: 0; }

#wl-consent .wl-consent-row-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

#wl-consent .wl-consent-row-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #0f766e;
  flex: 0 0 auto;
}

#wl-consent .wl-consent-row-label input[disabled] { cursor: default; }

#wl-consent .wl-consent-row-name {
  font-weight: 600;
  font-size: 13.5px;
  color: #292524;
}

#wl-consent .wl-consent-chip {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  color: #0f766e;
  background: #ccfbf1;
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
}

#wl-consent .wl-consent-row-desc {
  margin: 4px 0 0 28px;
  font-size: 12.5px;
  color: #78716c;
}

#wl-consent .wl-consent-legal {
  margin: 0 0 12px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #a8a29e;
}

/* ---- постоянная кнопка «Cookie» ---- */

#wl-consent-open {
  position: fixed;
  left: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 9390;
  appearance: none;
  border: 1px solid #e7e5e4;
  background: rgba(255, 255, 255, .94);
  color: #57534e;
  border-radius: 999px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1;
  height: 30px;
  padding: 0 11px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}

#wl-consent-open:hover {
  color: #134e4a;
  border-color: #a8a29e;
  background: #ffffff;
}

html[data-wl-consent="open"] #wl-consent-open { display: none; }

/* ---- мобильные ---- */

@media (max-width: 560px) {
  #wl-consent {
    padding: 0;
    align-items: stretch;
  }

  #wl-consent .wl-consent-card {
    max-width: none;
    border-radius: 16px 16px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    padding: 16px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  }

  #wl-consent .wl-consent-title { font-size: 16px; }
  #wl-consent .wl-consent-text { font-size: 13px; }

  #wl-consent .wl-consent-actions { flex-direction: column-reverse; align-items: stretch; }
  #wl-consent .wl-consent-btn { width: 100%; min-height: 44px; }

  #wl-consent .wl-consent-row-desc { margin-left: 0; }
  #wl-consent-open { height: 34px; padding: 0 12px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  #wl-consent .wl-consent-card { animation: none; }
  #wl-consent .wl-consent-btn,
  #wl-consent-open { transition: none; }
}
