.cookie-consent[hidden],
.cookie-consent__settings[hidden],
.cookie-consent__actions [hidden],
.cookie-consent__manage-link[hidden] {
  display: none !important;
}

.cookie-consent {
  position: fixed;
  z-index: 1000;
  inset: auto 0 0;
  padding: 20px var(--gutter) max(20px, env(safe-area-inset-bottom));
  background: rgb(38 37 32 / 14%);
  backdrop-filter: blur(5px);
}

.cookie-consent__panel {
  width: min(100%, 1080px);
  margin-inline: auto;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid rgb(38 37 32 / 12%);
  border-radius: 18px;
  background: var(--background, #f5f2eb);
  color: var(--text, #262520);
  box-shadow: 0 20px 70px rgb(24 23 20 / 20%);
}

.cookie-consent__copy { max-width: 720px; }
.cookie-consent__eyebrow {
  margin: 0 0 8px;
  color: var(--accent, #b73723);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.cookie-consent h2 {
  margin: 0;
  font-size: clamp(23px, 3vw, 32px);
  line-height: 1.2;
  letter-spacing: -.04em;
}
.cookie-consent__intro,
.cookie-consent__settings-intro {
  margin: 12px 0 0;
  color: #5e5b53;
  font-size: 14px;
  line-height: 1.65;
}
.cookie-consent__settings { margin-top: 22px; }
.cookie-consent__settings h3 { margin: 0; font-size: 17px; }
.cookie-consent__category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  padding: 15px 16px;
  border: 1px solid rgb(38 37 32 / 12%);
  border-radius: 12px;
  background: rgb(255 255 255 / 42%);
}
.cookie-consent__category strong { display: block; font-size: 14px; }
.cookie-consent__category p,
.cookie-consent__analytics-description,
.cookie-consent__services {
  display: block;
  margin: 4px 0 0;
  color: #625f57;
  font-size: 12px;
  line-height: 1.5;
}
.cookie-consent__always-on { flex: 0 0 auto; color: #625f57; font-size: 12px; }
.cookie-consent__category--toggle { cursor: pointer; }
.cookie-consent__analytics-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.cookie-consent__switch {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 26px;
  border-radius: 99px;
  background: #a5a198;
  transition: background-color .18s ease;
}
.cookie-consent__switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  content: '';
  transition: transform .18s ease;
}
.cookie-consent__analytics-toggle:checked + .cookie-consent__switch { background: var(--accent, #b73723); }
.cookie-consent__analytics-toggle:checked + .cookie-consent__switch::after { transform: translateX(18px); }
.cookie-consent__analytics-toggle:focus-visible + .cookie-consent__switch {
  outline: 2px solid var(--accent, #b73723);
  outline-offset: 4px;
}
.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.cookie-consent__button,
.cookie-consent__manage-link {
  min-height: 44px;
  padding: 11px 17px;
  border: 1px solid var(--accent, #b73723);
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.cookie-consent__button:hover,
.cookie-consent__manage-link:hover { transform: translateY(-1px); }
.cookie-consent__button--reject,
.cookie-consent__button--manage {
  background: transparent;
  color: var(--text, #262520);
}
.cookie-consent__button--accept {
  background: var(--accent, #b73723);
  color: #fff;
}
.cookie-consent__button--reject:hover,
.cookie-consent__button--manage:hover { background: rgb(183 55 35 / 8%); }
.cookie-consent__button--accept:hover { background: #982b1b; }
.cookie-consent__status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.cookie-consent__manage-link {
  position: fixed;
  z-index: 999;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  background: var(--background, #f5f2eb);
  color: var(--text, #262520);
  box-shadow: 0 5px 20px rgb(24 23 20 / 14%);
}
.cookie-consent__manage-link:hover { background: #fff; }

@media (max-width: 620px) {
  .cookie-consent { padding: 10px 10px max(10px, env(safe-area-inset-bottom)); }
  .cookie-consent__panel { max-height: min(88dvh, 760px); overflow: auto; padding: 21px 18px; border-radius: 15px; }
  .cookie-consent__actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 19px; }
  .cookie-consent__button { width: 100%; }
  .cookie-consent__button--accept { grid-row: 1; }
  .cookie-consent__button--reject { grid-row: 2; }
  .cookie-consent__button--manage { grid-row: 3; }
  .cookie-consent__manage-link { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent__button,
  .cookie-consent__manage-link,
  .cookie-consent__switch,
  .cookie-consent__switch::after { transition: none; }
}
