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

.cookie-consent {
  position: fixed;
  inset: 0;
  z-index: 1800;
  display: grid;
  place-items: end center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.cookie-consent.is-visible { opacity: 1; pointer-events: auto; }

.cookie-consent__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 3, 0.58);
  backdrop-filter: blur(5px);
}

.cookie-consent__shell {
  position: relative;
  width: min(1120px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 20px;
  color: #f7f3eb;
  border: 1px solid rgba(214, 181, 134, 0.26);
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 0, rgba(214, 181, 134, 0.14), transparent 35%),
    linear-gradient(145deg, rgba(18, 16, 13, 0.985), rgba(7, 7, 6, 0.985));
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.58);
  transform: translateY(18px);
  transition: transform 220ms ease;
}

.cookie-consent.is-visible .cookie-consent__shell { transform: translateY(0); }
.cookie-consent__shell section[data-cookie-view="summary"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 24px;
  row-gap: 8px;
  align-items: center;
}
.cookie-consent__shell section[hidden] { display: none !important; }
.cookie-consent__eyebrow { margin: 0; color: #d6b586; font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.cookie-consent__title { margin: 0; color: #f7f3eb; font-family: "Federo", "Cormorant Garamond", Georgia, serif; font-size: clamp(1.15rem, 2vw, 1.62rem); font-weight: 400; line-height: 1.12; text-wrap: balance; }
.cookie-consent__text { margin: 0; max-width: 780px; color: rgba(247, 243, 235, .78); font-size: .84rem; line-height: 1.55; }
.cookie-consent__legal { margin: 0; font-size: .78rem; }
.cookie-consent__legal a { color: #d6b586; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.cookie-consent__legal span { margin: 0 7px; color: rgba(214, 181, 134, .38); }

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  grid-column: 2;
  grid-row: 1 / span 4;
  justify-content: flex-end;
  align-self: center;
  gap: 9px;
  width: min(410px, 38vw);
}
.cookie-consent__button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 17px; border-radius: 999px; font: inherit; font-size: .78rem; font-weight: 900; line-height: 1.15; text-align: center; cursor: pointer; transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease; }
.cookie-consent__button:hover { transform: translateY(-1px); }
.cookie-consent__button--primary { color: #080706; border: 1px solid #d6b586; background: #d6b586; }
.cookie-consent__button--secondary { color: #f7f3eb; border: 1px solid rgba(214,181,134,.32); background: rgba(255,255,255,.05); }
.cookie-consent__button--ghost { color: #d6b586; border: 1px solid transparent; background: transparent; text-decoration: underline; text-underline-offset: 3px; }

.cookie-preferences { display: grid; gap: 10px; }
.cookie-preferences__list { display: grid; gap: 9px; margin-top: 8px; }
.cookie-preferences__item { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 18px; padding: 14px 15px; border: 1px solid rgba(214,181,134,.16); border-radius: 14px; background: rgba(255,255,255,.035); }
.cookie-preferences__item strong { display: block; margin-bottom: 3px; color: #f7f3eb; font-size: .88rem; }
.cookie-preferences__item p { margin: 0; color: rgba(247,243,235,.68); font-size: .77rem; line-height: 1.42; }
.cookie-preferences__fixed { color: #d6b586; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.cookie-switch { position: relative; display: inline-flex; flex: 0 0 auto; }
.cookie-switch input { position: absolute; opacity: 0; pointer-events: none; }
.cookie-switch span { display: block; width: 48px; height: 27px; border: 1px solid rgba(214,181,134,.35); border-radius: 999px; background: rgba(255,255,255,.08); cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease; }
.cookie-switch span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 19px; height: 19px; border-radius: 50%; background: #f7f3eb; transition: transform 160ms ease; }
.cookie-switch input:checked + span { border-color: #d6b586; background: #d6b586; }
.cookie-switch input:checked + span::after { transform: translateX(21px); background: #090806; }
.cookie-switch input:focus-visible + span { outline: 2px solid #f3dfbc; outline-offset: 3px; }
.cookie-consent__actions--preferences { grid-column: auto; grid-row: auto; justify-content: flex-start; width: auto; margin-top: 6px; }

.cookie-manage { display: inline-flex; align-items: center; gap: 10px; margin-left: 2px; }
.cookie-manage__divider { color: rgba(214,181,134,.34); }
.cookie-manage-link { appearance: none; padding: 0; border: 0; color: #d6b586; background: transparent; font: inherit; font-weight: 700; line-height: inherit; text-decoration: underline; text-decoration-color: rgba(214,181,134,.56); text-underline-offset: 3px; cursor: pointer; }
.cookie-manage-link:hover { color: #f3dfbc; }

@media (max-width: 980px) {
  .cookie-consent__shell section[data-cookie-view="summary"] { grid-template-columns: 1fr; }
  .cookie-consent__actions { grid-column: 1; grid-row: auto; justify-content: flex-start; width: auto; }
}

@media (max-width: 640px) {
  .cookie-consent { padding: 8px; }
  .cookie-consent__shell { max-height: calc(100dvh - 16px); padding: 15px 14px; border-radius: 17px; }
  .cookie-consent__title { font-size: 1.08rem; }
  .cookie-consent__text { font-size: .78rem; line-height: 1.45; }
  .cookie-consent__actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .cookie-consent__button { width: 100%; min-height: 40px; }
  .cookie-preferences__item { gap: 10px; padding: 12px; }
  .cookie-preferences__item p { font-size: .73rem; }
  .cookie-preferences__fixed { white-space: normal; text-align: right; }
  .cookie-manage { display: block; margin: 8px 0 0; }
  .cookie-manage__divider { display: none; }
}
