/* =========================================================
   PROX — COOKIE CONSENT
   ========================================================= */

.cookie-consent,
.cookie-consent *,
.cookie-settings-trigger,
.cookie-settings-trigger * {
  box-sizing: border-box;
}

.cookie-consent {
  --cookie-purple: var(--up-purple, #572d7c);
  --cookie-purple-dark: var(--up-purple-dark, #24113b);
  --cookie-gold: var(--up-gold, #e0bb6c);
  --cookie-navy: var(--up-navy, #071f2f);
  --cookie-text: var(--up-text, #233142);
  --cookie-muted: var(--up-muted, #64748b);
  --cookie-border: var(--up-border, #ece7f5);
  --cookie-soft: #fffaf1;

  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 31, 47, 0.48);
  backdrop-filter: blur(5px);
}

.cookie-consent.is-visible {
  display: flex;
}

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

.cookie-consent__box {
  width: min(100%, 1040px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(224, 187, 108, 0.14), transparent 32%),
    #ffffff;
  box-shadow: 0 28px 80px rgba(7, 31, 47, 0.24);
}

.cookie-consent__header {
  margin-bottom: 22px;
}

.cookie-consent__eyebrow {
  margin: 0 0 6px;
  color: var(--cookie-purple);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cookie-consent__title {
  margin: 0 0 10px;
  color: var(--cookie-navy) !important;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.15;
}

.cookie-consent__text {
  max-width: 820px;
  margin: 0;
  color: var(--cookie-text);
  font-size: 15px;
  line-height: 1.7;
}

.cookie-consent__text a {
  color: var(--cookie-purple) !important;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-consent__categories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.cookie-consent__card {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--cookie-border);
  border-radius: 18px;
  background: var(--cookie-soft);
}

.cookie-consent__card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.cookie-consent__card-title {
  margin: 0 0 6px;
  color: var(--cookie-navy) !important;
  font-size: 17px;
  line-height: 1.3;
}

.cookie-consent__card-desc {
  margin: 0;
  color: var(--cookie-muted);
  font-size: 14px;
  line-height: 1.55;
}

.cookie-switch {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  width: 48px;
  height: 26px;
  margin-top: 2px;
  cursor: pointer;
}

.cookie-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.cookie-switch__slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.cookie-switch__slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(7, 31, 47, 0.22);
  transition: transform 0.2s ease;
}

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

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

.cookie-switch input:focus-visible + .cookie-switch__slider {
  box-shadow: 0 0 0 4px rgba(87, 45, 124, 0.18);
}

.cookie-switch input:disabled + .cookie-switch__slider {
  background: var(--cookie-purple);
  opacity: 0.72;
  cursor: not-allowed;
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-btn {
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

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

.cookie-btn:focus-visible,
.cookie-settings-trigger:focus-visible {
  outline: 3px solid rgba(224, 187, 108, 0.75);
  outline-offset: 3px;
}

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

.cookie-btn--primary:hover {
  background: #6a3692;
}

.cookie-btn--ghost {
  border-color: rgba(87, 45, 124, 0.25);
  background: #ffffff;
  color: var(--cookie-purple);
}

.cookie-btn--ghost:hover {
  border-color: var(--cookie-purple);
}

.cookie-btn--secondary {
  border-color: var(--cookie-border);
  background: #f8fafc;
  color: var(--cookie-navy);
}

.cookie-btn--secondary:hover {
  background: #eef2f7;
}

.cookie-consent__note {
  margin: 16px 0 0;
  color: var(--cookie-muted);
  font-size: 12px;
  line-height: 1.5;
}

.cookie-settings-trigger {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 99998;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--up-purple, #572d7c);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(36, 17, 59, 0.28);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.cookie-settings-trigger:hover {
  transform: translateY(-2px);
  background: var(--up-purple-2, #6a3692);
}

.cookie-settings-trigger.is-hidden {
  display: none;
}

.cookie-settings-trigger__icon {
  width: 24px;
  height: 24px;
}

@media (max-width: 767px) {
  .cookie-consent {
    padding: 12px;
  }

  .cookie-consent__box {
    max-height: calc(100vh - 24px);
    padding: 22px 18px;
    border-radius: 22px;
  }

  .cookie-consent__categories {
    grid-template-columns: 1fr;
  }

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

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

@media (prefers-reduced-motion: reduce) {
  .cookie-btn,
  .cookie-switch__slider,
  .cookie-switch__slider::after,
  .cookie-settings-trigger {
    transition: none;
  }
}
