.cookie-consent[hidden] { display: none !important; }

.cookie-consent {
  box-sizing: border-box;
  position: fixed;
  z-index: 10050;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 22px max(24px, calc((100vw - 1240px) / 2));
  padding-bottom: max(22px, env(safe-area-inset-bottom));
  border-top: 1px solid #e1e5e9;
  background: #fff;
  box-shadow: 0 -8px 28px rgba(15, 23, 42, .12);
  color: #152033;
  font: 14px/1.5 Inter, system-ui, sans-serif;
  color-scheme: light;
}

.cookie-consent-copy { flex: 1 1 auto; min-width: 0; }
.cookie-consent h2 { margin: 0 0 10px; color: #101827; font: inherit; font-size: 18px; font-weight: 700; line-height: 1.4; }
.cookie-consent p { margin: 0; color: #475569; font: inherit; }
.cookie-consent-copy p + p { margin-top: 10px; }
.cookie-consent a { color: #005f78; text-decoration: underline; text-underline-offset: 3px; }
.cookie-consent a:hover { color: #003e50; }

.cookie-consent-actions { display: flex; flex: 0 0 auto; align-items: stretch; gap: 10px; }
.cookie-consent-actions button { appearance: none; min-height: 44px; padding: 10px 16px; border: 1px solid #9aa8b6; border-radius: 9px; background: #fff; color: #152033; font: inherit; font-weight: 700; line-height: 1.4; cursor: pointer; white-space: nowrap; }
.cookie-consent-actions button:hover { border-color: #475569; background: #f1f5f9; }
.cookie-consent-actions button[data-cookie-action="accept"] { border-color: #c8ff00; background: #c8ff00; color: #111; }
.cookie-consent-actions button[data-cookie-action="accept"]:hover { border-color: #aad900; background: #d8ff4d; }
.cookie-consent-actions button[data-cookie-action="save"] { border-color: #475569; }
.cookie-consent button:focus-visible, .cookie-consent a:focus-visible, .cookie-consent input:focus-visible { outline: 3px solid #005f78; outline-offset: 3px; }

.cookie-preferences { z-index: 10051; display: block; }
.cookie-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.cookie-panel-heading h2 { margin: 0; }
.cookie-panel-heading button { appearance: none; display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #475569; font: inherit; font-size: 26px; line-height: 1; cursor: pointer; }
.cookie-panel-heading button:hover { background: #f1f5f9; color: #152033; }
.cookie-preferences-copy { max-width: 960px; }
.cookie-categories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 24px 0; }
.cookie-category { min-width: 0; }
.cookie-category + .cookie-category { padding-left: 32px; border-left: 1px solid #e1e5e9; }
.cookie-category-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
.cookie-category h3, .cookie-category label { display: block; margin: 0; color: #152033; font: inherit; font-size: 14px; font-weight: 700; line-height: 1.4; }
.cookie-category label { cursor: pointer; }
.cookie-category-description { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.cookie-always-active { flex-shrink: 0; color: #64748b; font-size: 12px; line-height: 1.5; }
.cookie-category input[type="checkbox"] { appearance: none; position: relative; display: block; flex: 0 0 44px; width: 44px; height: 26px; margin: 0; border: 1px solid #9aa8b6; border-radius: 999px; background: #cbd5e1; background-image: none; cursor: pointer; }
.cookie-category input[type="checkbox"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .15); }
.cookie-category input[type="checkbox"]:checked { border-color: #adc62c; background: #c8ff00; background-image: none; }
.cookie-category input[type="checkbox"]:checked::after { transform: translateX(18px); background: #152033; }
.cookie-preferences .cookie-consent-actions { justify-content: flex-end; padding-top: 16px; border-top: 1px solid #e1e5e9; }

@media (max-width: 800px) {
  .cookie-consent { align-items: stretch; flex-direction: column; gap: 18px; }
  .cookie-consent-actions { justify-content: flex-end; }
  .cookie-categories { grid-template-columns: 1fr; gap: 0; margin: 16px 0; }
  .cookie-category { padding: 10px 0; }
  .cookie-category + .cookie-category { padding-left: 0; border-left: 0; border-top: 1px solid #edf0f3; }
}

@media (max-width: 480px) {
  .cookie-consent { padding: 18px 16px; padding-bottom: max(18px, env(safe-area-inset-bottom)); font-size: 13px; }
  .cookie-consent h2 { font-size: 17px; }
  .cookie-consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .cookie-consent-actions button { padding: 10px 8px; font-size: 12px; white-space: normal; }
  .cookie-preferences .cookie-consent-actions { position: sticky; bottom: -18px; padding-bottom: max(0px, calc(env(safe-area-inset-bottom) - 18px)); background: #fff; }
  .cookie-preferences .cookie-consent-actions button[data-cookie-action="accept"] { grid-column: 1 / -1; }
  .cookie-category h3, .cookie-category label { font-size: 13px; }
}

/* The first view is a simple two-action bar; category controls live in settings. */
.cookie-banner {
  display: block;
  padding-top: 28px;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}
.cookie-banner h2 {
  margin-bottom: 12px;
  color: #161616;
  font-size: clamp(26px, 2.4vw, 36px);
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.15;
}
.cookie-banner p { max-width: 1060px; font-size: 16px; line-height: 1.65; color: #454545; }
.cookie-banner a { color: inherit; }
.cookie-banner .cookie-consent-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.cookie-banner .cookie-consent-actions button {
  flex: 0 0 auto;
  width: auto;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 9px;
  border-width: 1px;
  border-color: #6b7280;
  color: #282828;
  font-size: 14px;
  letter-spacing: normal;
  text-transform: none;
  white-space: normal;
}
.cookie-banner .cookie-consent-actions button[data-cookie-action="accept"] { border-color: #c8ff00; color: #111; }
.cookie-preferences .cookie-panel-heading h2 { font-size: 26px; letter-spacing: -.025em; }
.cookie-preferences .cookie-consent-actions button { border-radius: 9px; white-space: normal; }

@media (max-width: 600px) {
  .cookie-banner { padding: 22px 20px; padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  .cookie-banner p { font-size: 14px; line-height: 1.55; }
  .cookie-banner .cookie-consent-actions { gap: 8px; margin-top: 18px; }
  .cookie-banner .cookie-consent-actions button { min-height: 44px; max-width: 100%; padding: 10px 12px; font-size: 13px; }
  .cookie-preferences .cookie-panel-heading h2 { font-size: 22px; }
}
