#cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 22px;
  max-width: 980px;
  max-height: min(72vh, 520px);
  margin-inline: auto;
  overflow: auto;
  padding: 18px 22px;
  border: 1px solid var(--line, #dce3da);
  border-radius: 16px;
  background: var(--white, #fff);
  color: var(--ink, #113e32);
  box-shadow: 0 16px 48px #0b3a2b29;
  font: 14px/1.55 var(--font, Arial, Helvetica, sans-serif);
}

#cookie-banner[hidden],
#cookie-preferences-dialog[hidden] {
  display: none;
}

#cookie-banner p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted, #64736b);
}

#cookie-banner h2 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -.2px;
}

[data-cookie-settings] {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

[data-cookie-settings]:hover {
  color: var(--emerald, #00a46d);
}

.footer-bottom nav,
.guide-footer nav {
  align-items: center;
}

.footer-bottom nav > a,
.footer-bottom nav > [data-cookie-settings],
.guide-footer nav > a,
.guide-footer nav > [data-cookie-settings] {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  font: inherit;
  text-decoration: none;
}

.footer-bottom nav > a:hover,
.footer-bottom nav > [data-cookie-settings]:hover,
.guide-footer nav > a:hover,
.guide-footer nav > [data-cookie-settings]:hover {
  color: var(--emerald, #00a46d);
  text-decoration: underline;
  text-underline-offset: 3px;
}

#cookie-banner [data-cookie-accept],
#cookie-banner [data-cookie-reject],
#cookie-banner [data-cookie-settings],
#cookie-preferences-form button,
#cookie-preferences-dialog [data-cookie-close] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid var(--green, #075740);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  cursor: pointer;
}

#cookie-banner [data-cookie-accept],
#cookie-preferences-form button:not([data-cookie-close]) {
  flex: 1 1 160px;
  background: var(--green, #075740);
  color: #fff;
}

#cookie-banner [data-cookie-reject] {
  flex: 1 1 160px;
  background: transparent;
  border-color: var(--line, #dce3da);
  color: var(--green, #075740);
}

#cookie-banner [data-cookie-accept]:hover,
#cookie-preferences-form button:not([data-cookie-close]):hover {
  background: #003f2c;
}

#cookie-banner [data-cookie-reject]:hover {
  background: var(--paper, #f8f9f5);
  border-color: var(--green, #075740);
  color: var(--green, #075740);
}

#cookie-banner [data-cookie-settings] {
  flex: 0 1 auto;
  background: transparent;
  color: var(--green, #075740);
  text-decoration: none;
}

#cookie-banner [data-cookie-settings]:hover {
  background: var(--paper, #f8f9f5);
  color: var(--green, #075740);
}

#cookie-preferences-dialog [data-cookie-close] {
  flex: 1 1 150px;
  background: transparent;
  color: var(--green, #075740);
}

#cookie-banner button:focus-visible,
#cookie-preferences-dialog button:focus-visible,
#cookie-preferences-form input:focus-visible,
[data-cookie-settings]:focus-visible {
  outline: 3px solid var(--emerald, #00a46d);
  outline-offset: 3px;
}

#cookie-preferences-dialog {
  box-sizing: border-box;
  width: calc(100% - 32px);
  max-width: 480px;
  max-height: calc(100vh - 32px);
  margin: auto;
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--line, #dce3da);
  border-radius: 20px;
  background: var(--paper, #f8f9f5);
  color: var(--ink, #113e32);
  box-shadow: 0 20px 70px #003b2930;
  font: 14px/1.6 var(--font, Arial, Helvetica, sans-serif);
}

#cookie-preferences-dialog::backdrop {
  background: #072d2375;
  backdrop-filter: blur(4px);
}

#cookie-preferences-dialog h2 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -.6px;
}

#cookie-preferences-dialog p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted, #64736b);
}

#cookie-preferences-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

#cookie-preferences-form .cookie-dialog__options {
  flex: 1 1 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

#cookie-preferences-form .cookie-dialog__options > div {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  column-gap: 12px;
  row-gap: 4px;
  padding: 14px 0;
  border-top: 1px solid var(--line, #dce3da);
}

#cookie-preferences-form .cookie-dialog__options label {
  display: block;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
}

#cookie-preferences-form input[type="checkbox"] {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--green, #075740);
  cursor: pointer;
}

#cookie-preferences-form .cookie-dialog__options input[type="checkbox"] {
  grid-column: 1;
  grid-row: 1;
}

#cookie-preferences-form .cookie-dialog__options p {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  margin: 0;
}

#cookie-preferences-form button {
  flex: 1 1 150px;
}

@media (max-width: 600px) {
  #cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    gap: 12px;
    padding: 16px;
    border-radius: 14px;
  }

  #cookie-banner [data-cookie-accept],
  #cookie-banner [data-cookie-reject],
  #cookie-banner [data-cookie-settings] {
    flex: 1 1 100%;
  }

  #cookie-preferences-dialog {
    width: calc(100% - 24px);
    padding: 22px;
    border-radius: 18px;
  }

  #cookie-preferences-form button,
  #cookie-preferences-dialog [data-cookie-close] {
    flex: 1 1 100%;
  }
}
