.cookie-banner,
.cookie-modal,
.cookie-banner *,
.cookie-modal * {
  box-sizing: border-box;
}

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

.cookie-banner {
  position: fixed;
  z-index: 5000;
  right: 22px;
  bottom: 22px;
  left: 22px;
  width: min(1120px, calc(100% - 44px));
  margin: 0 auto;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: #f7f0df;
  background: #090806;
  border: 1px solid rgba(199, 155, 75, .56);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .46);
}

.cookie-banner-copy { max-width: 670px; }
.cookie-banner-copy strong { display: block; margin-bottom: 5px; font: 600 1.2rem/1.2 Georgia, serif; }
.cookie-banner-copy p { margin: 0; color: #bcb2a1; font-size: .86rem; line-height: 1.55; }
.cookie-banner-copy a { display: inline-block; margin-top: 7px; color: #e3c47f; font-size: .72rem; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.cookie-banner-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.cookie-button {
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid rgba(227, 196, 127, .4);
  border-radius: 0;
  font: 800 .7rem/1 Arial, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

.cookie-button-primary { color: #090806; background: #d1a34b; border-color: #d1a34b; }
.cookie-button-primary:hover { background: #e3c47f; }
.cookie-button-ghost { color: #f7f0df; background: transparent; }
.cookie-button-ghost:hover { border-color: #e3c47f; background: rgba(227, 196, 127, .08); }

.cookie-modal {
  position: fixed;
  z-index: 5100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.cookie-modal-backdrop { position: absolute; inset: 0; border: 0; background: rgba(0, 0, 0, .76); cursor: pointer; }
.cookie-modal-card {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: clamp(26px, 5vw, 46px);
  color: #f7f0df;
  background: #0b0a08;
  border: 1px solid rgba(199, 155, 75, .56);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .65);
}

.cookie-modal-card h2 { margin: 7px 0 10px; color: #fff; font: 600 clamp(2rem, 6vw, 3.2rem)/1 Georgia, serif; }
.cookie-modal-card > p:not(.cookie-eyebrow) { margin: 0 0 26px; color: #bcb2a1; line-height: 1.55; }
.cookie-eyebrow { margin: 0; color: #d1a34b; font-size: .65rem; font-weight: 800; letter-spacing: .18em; }
.cookie-modal-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; color: #f7f0df; background: transparent; border: 1px solid rgba(227, 196, 127, .28); font-size: 1.5rem; cursor: pointer; }

.cookie-choice {
  position: relative;
  min-height: 78px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(227, 196, 127, .18);
  cursor: pointer;
}

.cookie-choice:last-of-type { border-bottom: 1px solid rgba(227, 196, 127, .18); }
.cookie-choice > div { display: grid; gap: 5px; }
.cookie-choice strong { font-size: .9rem; }
.cookie-choice span { color: #a99f90; font-size: .75rem; line-height: 1.4; }
.cookie-choice input { position: absolute; opacity: 0; pointer-events: none; }
.cookie-required { flex: 0 0 auto; color: #d1a34b !important; font-size: .64rem !important; font-weight: 800; text-transform: uppercase; }

.cookie-switch { position: relative; flex: 0 0 auto; width: 48px; height: 26px; border-radius: 999px; background: #403b33; transition: background .2s ease; }
.cookie-switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.cookie-choice input:checked + .cookie-switch { background: #d1a34b; }
.cookie-choice input:checked + .cookie-switch::after { transform: translateX(22px); background: #090806; }
.cookie-choice input:focus-visible + .cookie-switch { outline: 2px solid #fff; outline-offset: 3px; }
.cookie-modal-actions { margin-top: 25px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
body.cookie-modal-open { overflow: hidden; }

@media (max-width: 760px) {
  .cookie-banner { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); left: 12px; width: calc(100% - 24px); max-height: calc(100dvh - 24px - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; align-items: stretch; flex-direction: column; gap: 16px; padding: 18px; }
  .cookie-banner-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cookie-banner-actions .cookie-button-primary { grid-column: 1 / -1; grid-row: 1; }
  .cookie-modal { padding: 10px; }
  .cookie-modal-card { max-height: calc(100vh - 20px); padding: 32px 18px 22px; }
  .cookie-choice { padding: 15px 4px; }
  .cookie-modal-actions { display: grid; grid-template-columns: 1fr; }
}
