.bm-cookie-tools {
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto;
  padding: 12px 0;
  border-top: 1px solid var(--line, #d9e0d9);
  color: var(--muted, #527268);
  font:
    13px/1.6 var(--font-reading, system-ui),
    sans-serif;
}
.bm-cookie-tools p {
  flex: 1 1 260px;
  margin: 0;
}
.bm-cookie-tools a {
  color: var(--teal, #205c4c);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-underline-offset: 4px;
}
.bm-cookie-tools button {
  background: transparent;
  border: 1px solid var(--line, #d9e0d9);
  color: var(--ink, #203b32);
  font: inherit;
  font-size: 20px;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  cursor: pointer;
}
.bm-cookie-dialog {
  box-sizing: border-box;
  width: min(560px, calc(100% - 24px));
  max-height: 88dvh;
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line, #d9e0d9);
  border-radius: 12px;
  background: var(--surface, #fff);
  color: var(--ink, #203b32);
  font:
    15px/1.6 var(--font-reading, system-ui),
    sans-serif;
}
.bm-cookie-dialog::backdrop {
  background: rgb(12 30 24 / 55%);
}
.bm-cookie-dialog h2 {
  font-size: 24px;
  line-height: 1.3;
  margin: 0 0 12px;
}
.bm-cookie-dialog h3 {
  font-size: 15px;
  margin: 0 0 4px;
}
.bm-cookie-dialog p {
  margin: 0 0 14px;
}
.bm-cookie-sections section {
  border-top: 1px solid var(--line, #d9e0d9);
  padding-top: 14px;
  margin-top: 14px;
}
.bm-cookie-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-weight: 650;
  cursor: pointer;
}
.bm-cookie-choice input {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  accent-color: var(--teal, #205c4c);
}
.bm-cookie-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.bm-cookie-dialog a {
  color: var(--teal, #205c4c);
  text-underline-offset: 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.bm-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.bm-cookie-actions button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--teal, #205c4c);
  border-radius: 6px;
  background: #225343;
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.bm-cookie-actions .bm-cookie-secondary {
  background: transparent;
  color: var(--teal, #205c4c);
}
.bm-cookie-dialog :focus-visible,
.bm-cookie-tools :focus-visible {
  outline: 3px solid #b7734d;
  outline-offset: 3px;
}
.bm-cookie-tools [hidden] {
  display: none;
}
@media (max-width: 400px) {
  .bm-cookie-dialog {
    padding: 18px;
  }
  .bm-cookie-actions button {
    flex: 1 1 180px;
  }
}

.bm-cookie-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.bm-cookie-head h2 {
  margin: 0;
}
.bm-cookie-close {
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid var(--line, #d9e0d9);
  border-radius: 6px;
  background: transparent;
  color: var(--ink, #203b32);
  font:
    24px/1 system-ui,
    sans-serif;
  padding: 0;
  cursor: pointer;
}

/* First-visit information stays in view; a measured spacer keeps the footer reachable. */
.bm-cookie-banner {
  position: fixed;
  z-index: 110;
  inset: auto 0 0;
  width: 100%;
  margin: 0;
  padding: 18px max(24px, calc((100vw - 1180px) / 2));
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line, #d9e0d9);
  background: var(--surface, #fff);
  color: var(--ink, #203b32);
  box-shadow: 0 -6px 24px rgb(12 30 24 / 12%);
  flex-wrap: nowrap;
  gap: 16px 24px;
  max-height: 45dvh;
  overflow-y: auto;
  font-size: 14px;
}
.bm-cookie-banner-copy {
  flex: 1 1 auto;
}
.bm-cookie-banner-title {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}
.bm-cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.bm-cookie-banner .bm-cookie-banner-actions {
  flex: 0 0 auto;
}
.bm-cookie-banner-actions a,
.bm-cookie-tools .bm-cookie-no-memory {
  box-sizing: border-box;
  min-height: 44px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  border: 1px solid var(--line, #d9e0d9);
  border-radius: 6px;
  color: var(--ink, #203b32);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  justify-content: center;
}
.bm-cookie-banner > button {
  flex: 0 0 44px;
}
.bm-cookie-tools:not(.bm-cookie-banner) .bm-cookie-banner-copy {
  display: none;
}
.bm-cookie-tools:not(.bm-cookie-banner) .bm-cookie-banner-actions a {
  border: none;
  padding: 0;
  text-decoration: underline;
}
.bm-cookie-banner-spacer {
  flex: 0 0 auto;
}
@media (max-width: 760px) {
  .bm-cookie-banner {
    flex-wrap: wrap;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    gap: 12px;
  }
  .bm-cookie-banner .bm-cookie-banner-copy {
    flex: 1 1 calc(100% - 60px);
  }
  .bm-cookie-banner > button {
    order: 1;
    align-self: flex-start;
  }
  .bm-cookie-banner .bm-cookie-banner-actions {
    order: 2;
    width: 100%;
    flex: 1 1 100%;
  }
  .bm-cookie-banner-actions > * {
    flex: 1 1 auto;
  }
}

.bm-cookie-details > summary {
  cursor: pointer;
  min-height: 44px;
  display: list-item;
  align-content: center;
  color: inherit;
  font-weight: 700;
}
.bm-cookie-details {
  margin-block: 12px;
}

.bm-cookie-actions button {
  flex: 1 1 140px;
}
.bm-cookie-feedback {
  position: fixed;
  z-index: 120;
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
  width: min(560px, calc(100% - 24px));
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--line, #d9e0d9);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--ink, #203b32);
  font:
    15px/1.5 var(--font-reading, system-ui),
    sans-serif;
}
.bm-cookie-feedback[hidden] {
  display: none;
}
