/* MA Cookie Preference Center (Reiss-style) */

.cookie-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(14, 26, 43, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.cookie-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cookie-modal {
  width: min(100%, 520px);
  max-height: min(92vh, 720px);
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cookie-modal-head {
  text-align: center;
  padding: 1.35rem 1.25rem 0.85rem;
  border-bottom: 1px solid rgba(11, 31, 58, 0.1);
  flex-shrink: 0;
}

.cookie-brand {
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--navy);
  margin: 0;
}

.cookie-modal-title {
  margin: 0.55rem 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.cookie-modal-body {
  overflow-y: auto;
  padding: 1rem 1.25rem 1.25rem;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.cookie-intro {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 1.15rem;
}

.cookie-intro a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.cookie-cat {
  border-top: 1px solid rgba(11, 31, 58, 0.12);
  padding: 1rem 0 0.85rem;
}

.cookie-cat-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-cat-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

.cookie-cat-hint {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.cookie-cat-desc {
  margin: 0.65rem 0 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink);
}

.cookie-always {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.15rem;
}

/* Toggle — grey off / black on */
.cookie-toggle {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  background: #c5c5c5;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease;
}

.cookie-toggle.on {
  background: #1a1a1a;
}

.cookie-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.cookie-toggle.on::after {
  transform: translateX(20px);
}

.cookie-modal-actions {
  padding: 0.85rem 1.25rem 1.15rem;
  border-top: 1px solid rgba(11, 31, 58, 0.1);
  display: grid;
  gap: 0.55rem;
  flex-shrink: 0;
  background: #fff;
}

.cookie-btn {
  display: block;
  width: 100%;
  border: 0;
  min-height: 48px;
  padding: 0.85rem 1rem;
  background: #1a1a1a;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-align: center;
}

.cookie-btn:hover {
  background: #000;
}

.cookie-btn-primary {
  background: var(--navy, #0b1f3a);
}

.cookie-btn-primary:hover {
  background: #08162b;
}

.cookie-btn-ghost {
  background: transparent;
  color: #1a1a1a;
  border: 1px solid rgba(11, 31, 58, 0.25);
}

.cookie-btn-ghost:hover {
  background: rgba(11, 31, 58, 0.06);
}

/* First-visit consent banner */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10040;
  padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  background: rgba(11, 31, 58, 0.97);
  color: #fff;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.28);
  transform: translateY(110%);
  transition: transform 0.35s ease;
  pointer-events: none;
}

.cookie-banner.open {
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-banner-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
}

.cookie-banner-copy {
  flex: 1 1 280px;
  min-width: 0;
}

.cookie-banner-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cookie-banner-text {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.cookie-banner-text a {
  color: #d4b262;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex: 0 1 auto;
}

.cookie-banner-actions .cookie-btn {
  width: auto;
  min-width: 7.5rem;
  min-height: 44px;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
}

.cookie-banner-actions .cookie-btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.cookie-banner-actions .cookie-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cookie-page-hero {
  text-align: center;
  padding: 2rem 0 1rem;
}

.cookie-page-hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cookie-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.25rem 0 2rem;
}

@media (max-width: 640px) {
  .cookie-banner-actions {
    width: 100%;
  }
  .cookie-banner-actions .cookie-btn {
    flex: 1 1 auto;
  }
  .cookie-modal {
    max-height: 96vh;
  }
  .cookie-cat-row {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .cookie-cat-row {
    flex-wrap: wrap;
  }
}
