/* =========================================
   COOKIE CONSENT
========================================= */

:root {
  --cookie-primary: #0b4f82;
  --cookie-primary-dark: #07395f;
  --cookie-text: #17344e;
  --cookie-muted: #5d6f7e;
  --cookie-border: #dce5ec;
  --cookie-background: #ffffff;
  --cookie-soft-background: #f4f8fb;
  --cookie-shadow: 0 24px 70px rgba(4, 35, 60, 0.22);
}

.cookie-banner[hidden],
.cookie-preferences[hidden] {
  display: none !important;
}

.cookie-banner {
  position: fixed;
  right: 24px;
  bottom: 24px;
  left: 24px;
  z-index: 99990;
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0.25s ease;
}

.cookie-banner.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cookie-banner__inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 26px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: var(--cookie-background);
  border: 1px solid rgba(11, 79, 130, 0.14);
  border-radius: 20px;
  box-shadow: var(--cookie-shadow);
}

.cookie-banner__content {
  max-width: 690px;
}

.cookie-banner__eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--cookie-primary);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cookie-banner__title {
  margin: 0 0 8px;
  color: var(--cookie-text);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 800;
  line-height: 1.2;
}

.cookie-banner__text {
  margin: 0 0 10px;
  color: var(--cookie-muted);
  font-size: 0.96rem;
  line-height: 1.65;
}

.cookie-banner__policy-link {
  color: var(--cookie-primary);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-banner__policy-link:hover {
  color: var(--cookie-primary-dark);
}

.cookie-banner__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  min-height: 46px;
  padding: 11px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 11px;
  font-family: inherit;
  font-size: 0.91rem;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

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

.cookie-btn:focus-visible {
  outline: 3px solid rgba(11, 79, 130, 0.24);
  outline-offset: 2px;
}

.cookie-btn--primary {
  color: #ffffff;
  background: var(--cookie-primary);
  border-color: var(--cookie-primary);
}

.cookie-btn--primary:hover {
  color: #ffffff;
  background: var(--cookie-primary-dark);
  border-color: var(--cookie-primary-dark);
}

.cookie-btn--secondary {
  color: var(--cookie-text);
  background: var(--cookie-soft-background);
  border-color: var(--cookie-border);
}

.cookie-btn--secondary:hover {
  color: var(--cookie-text);
  background: #e8f0f6;
}

.cookie-btn--outline {
  color: var(--cookie-primary);
  background: #ffffff;
  border-color: var(--cookie-primary);
}

.cookie-btn--outline:hover {
  color: #ffffff;
  background: var(--cookie-primary);
}

/* Preferences modal */

body.cookie-preferences-open {
  overflow: hidden;
}

.cookie-preferences {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.cookie-preferences.is-visible {
  opacity: 1;
  visibility: visible;
}

.cookie-preferences__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 22, 36, 0.7);
  backdrop-filter: blur(4px);
}

.cookie-preferences__panel {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  padding: 34px;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: var(--cookie-shadow);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.25s ease;
}

.cookie-preferences.is-visible
.cookie-preferences__panel {
  transform: translateY(0) scale(1);
}

.cookie-preferences__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cookie-text);
  background: var(--cookie-soft-background);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.cookie-preferences__title {
  margin: 0 50px 10px 0;
  color: var(--cookie-text);
  font-size: 1.8rem;
  font-weight: 800;
}

.cookie-preferences__intro {
  margin: 0 0 26px;
  color: var(--cookie-muted);
  line-height: 1.65;
}

.cookie-preference-item {
  padding: 22px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--cookie-border);
}

.cookie-preference-item:last-of-type {
  border-bottom: 1px solid var(--cookie-border);
}

.cookie-preference-item__content {
  flex: 1;
}

.cookie-preference-item__heading {
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-preference-item h3 {
  margin: 0;
  color: var(--cookie-text);
  font-size: 1.05rem;
  font-weight: 800;
}

.cookie-preference-item p {
  margin: 0;
  color: var(--cookie-muted);
  font-size: 0.91rem;
  line-height: 1.6;
}

.cookie-status {
  padding: 4px 8px;
  color: var(--cookie-primary);
  background: rgba(11, 79, 130, 0.09);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cookie-status--required {
  color: #39704b;
  background: #edf7f0;
}

/* Toggle */

.cookie-switch {
  position: relative;
  width: 52px;
  min-width: 52px;
  height: 30px;
  margin-top: 2px;
  display: inline-block;
}

.cookie-switch input {
  width: 0;
  height: 0;
  opacity: 0;
}

.cookie-switch__slider {
  position: absolute;
  inset: 0;
  background: #b9c4cc;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.cookie-switch__slider::before {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 4px;
  width: 22px;
  height: 22px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.cookie-switch input:checked +
.cookie-switch__slider {
  background: var(--cookie-primary);
}

.cookie-switch input:checked +
.cookie-switch__slider::before {
  transform: translateX(22px);
}

.cookie-switch input:focus-visible +
.cookie-switch__slider {
  outline: 3px solid rgba(11, 79, 130, 0.24);
  outline-offset: 2px;
}

.cookie-switch--disabled {
  opacity: 0.72;
}

.cookie-switch--disabled
.cookie-switch__slider {
  cursor: not-allowed;
}

.cookie-preferences__footer {
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

/* Responsive */

@media (max-width: 991px) {
  .cookie-banner {
    right: 14px;
    bottom: 14px;
    left: 14px;
  }

  .cookie-banner__inner {
    padding: 22px;
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
  }

  .cookie-banner__content {
    max-width: none;
  }

  .cookie-banner__actions {
    justify-content: stretch;
  }

  .cookie-banner__actions .cookie-btn {
    flex: 1 1 180px;
  }
}

@media (max-width: 575px) {
  .cookie-banner {
    right: 10px;
    bottom: 10px;
    left: 10px;
  }

  .cookie-banner__inner {
    padding: 20px 18px;
    border-radius: 16px;
  }

  .cookie-banner__actions {
    flex-direction: column;
  }

  .cookie-banner__actions .cookie-btn {
    width: 100%;
    flex: none;
  }

  .cookie-preferences {
    padding: 10px;
    align-items: flex-end;
  }

  .cookie-preferences__panel {
    width: 100%;
    max-height: calc(100vh - 20px);
    padding: 28px 20px 22px;
    border-radius: 20px 20px 14px 14px;
  }

  .cookie-preferences__title {
    font-size: 1.5rem;
  }

  .cookie-preference-item {
    gap: 14px;
  }

  .cookie-preferences__footer {
    flex-direction: column-reverse;
  }

  .cookie-preferences__footer .cookie-btn {
    width: 100%;
  }
}