.cookie-settings-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sage-dark, #304232);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(48, 66, 50, 0.36);
  text-underline-offset: 4px;
}

.nf-cookie-banner {
  position: fixed;
  z-index: 10000;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: none;
  width: min(760px, calc(100% - 36px));
  margin-inline: auto;
  padding: 22px;
  border: 1px solid rgba(48, 66, 50, 0.2);
  border-radius: 8px;
  background: #fffdf8;
  color: #253126;
  box-shadow: 0 24px 70px rgba(37, 49, 38, 0.24);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.nf-cookie-banner.is-visible {
  display: block;
}

.nf-cookie-banner h2,
.nf-cookie-dialog h2,
.nf-cookie-dialog h3 {
  margin-top: 0;
  color: #253126;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.nf-cookie-banner h2 {
  margin-bottom: 8px;
  font-size: 1.45rem;
}

.nf-cookie-banner p {
  margin: 0;
  color: #66705f;
  line-height: 1.5;
}

.nf-cookie-banner a,
.nf-cookie-dialog a {
  color: #304232;
  text-underline-offset: 4px;
}

.nf-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.nf-cookie-button {
  min-height: 44px;
  cursor: pointer;
  padding: 10px 16px;
  border: 1px solid #304232;
  border-radius: 999px;
  background: #304232;
  color: #fffdf8;
  font: inherit;
  font-weight: 750;
}

.nf-cookie-button:hover {
  background: #243326;
}

.nf-cookie-button.is-secondary {
  background: #fffdf8;
  color: #304232;
}

.nf-cookie-button.is-secondary:hover {
  background: #f2eee6;
}

.nf-cookie-dialog {
  width: min(620px, calc(100% - 28px));
  max-height: min(760px, calc(100vh - 28px));
  padding: 0;
  border: 1px solid rgba(48, 66, 50, 0.2);
  border-radius: 8px;
  background: #fffdf8;
  color: #253126;
  box-shadow: 0 26px 90px rgba(37, 49, 38, 0.3);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.nf-cookie-dialog::backdrop {
  background: rgba(37, 49, 38, 0.55);
  backdrop-filter: blur(3px);
}

.nf-cookie-dialog-inner {
  max-height: inherit;
  overflow-y: auto;
  padding: 26px;
}

.nf-cookie-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.nf-cookie-dialog-head h2 {
  margin-bottom: 8px;
  font-size: 1.8rem;
}

.nf-cookie-dialog-head p {
  margin: 0;
  color: #66705f;
}

.nf-cookie-close {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  cursor: pointer;
  border: 1px solid rgba(48, 66, 50, 0.16);
  border-radius: 50%;
  background: #f5f0e8;
  color: #304232;
  font-size: 1.35rem;
}

.nf-cookie-categories {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.nf-cookie-category {
  padding: 16px;
  border: 1px solid rgba(48, 66, 50, 0.16);
  border-radius: 8px;
  background: rgba(251, 247, 239, 0.68);
}

.nf-cookie-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nf-cookie-category h3 {
  margin-bottom: 4px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 780;
}

.nf-cookie-category p {
  margin: 0;
  color: #66705f;
  font-size: 0.92rem;
  line-height: 1.45;
}

.nf-cookie-required {
  color: #5a6d53;
  font-size: 0.85rem;
  font-weight: 780;
}

.nf-cookie-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 48px;
}

.nf-cookie-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nf-cookie-switch span {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border-radius: 999px;
  background: #c7c9c2;
  transition: background 160ms ease;
}

.nf-cookie-switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(37, 49, 38, 0.25);
  transition: transform 160ms ease;
}

.nf-cookie-switch input:checked + span {
  background: #304232;
}

.nf-cookie-switch input:checked + span::after {
  transform: translateX(20px);
}

.nf-cookie-switch input:focus-visible + span {
  outline: 3px solid rgba(169, 143, 192, 0.5);
  outline-offset: 2px;
}

.nf-cookie-dialog-footer {
  padding-top: 18px;
  border-top: 1px solid rgba(48, 66, 50, 0.16);
}

.nf-cookie-dialog-footer .nf-cookie-actions {
  margin-top: 0;
}

@media (max-width: 640px) {
  .nf-cookie-banner {
    right: 10px;
    bottom: 88px;
    left: 10px;
    width: calc(100% - 20px);
    padding: 18px;
  }

  .nf-cookie-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .nf-cookie-button {
    width: 100%;
  }

  .nf-cookie-dialog-inner {
    padding: 20px;
  }
}
