:root {
  --kin-consent-ink: #1f322b;
  --kin-consent-muted: #617069;
  --kin-consent-paper: #f5f8f2;
  --kin-consent-surface: rgba(233, 240, 226, 0.97);
  --kin-consent-chrome: rgba(245, 248, 242, 0.98);
  --kin-consent-line: rgba(43, 122, 107, 0.2);
  --kin-consent-control-line: rgba(43, 122, 107, 0.34);
  --kin-consent-focus: rgba(43, 122, 107, 0.3);
  --kin-consent-shadow: rgba(31, 84, 73, 0.4);
  --kin-consent-teal: #2b7a6b;
  --kin-consent-teal-hover: #1f5449;
}

html[data-kin-consent-theme="lasne"] {
  --kin-consent-paper: #f5f8f2;
  --kin-consent-surface: rgba(233, 240, 226, 0.97);
  --kin-consent-chrome: rgba(245, 248, 242, 0.98);
  --kin-consent-line: rgba(43, 122, 107, 0.2);
  --kin-consent-control-line: rgba(43, 122, 107, 0.34);
  --kin-consent-focus: rgba(43, 122, 107, 0.3);
  --kin-consent-shadow: rgba(31, 84, 73, 0.4);
  --kin-consent-teal: #2b7a6b;
  --kin-consent-teal-hover: #1f5449;
}

html[data-kin-consent-theme="rhode"] {
  --kin-consent-paper: #fcf7f0;
  --kin-consent-surface: rgba(246, 233, 220, 0.97);
  --kin-consent-chrome: rgba(252, 247, 240, 0.98);
  --kin-consent-line: rgba(197, 106, 30, 0.2);
  --kin-consent-control-line: rgba(197, 106, 30, 0.34);
  --kin-consent-focus: rgba(197, 106, 30, 0.3);
  --kin-consent-shadow: rgba(138, 64, 15, 0.38);
  --kin-consent-teal: #c56a1e;
  --kin-consent-teal-hover: #8a400f;
}

html[data-kin-consent-theme="kraainem"] {
  --kin-consent-paper: #f4f8fc;
  --kin-consent-surface: rgba(227, 237, 247, 0.97);
  --kin-consent-chrome: rgba(244, 248, 252, 0.98);
  --kin-consent-line: rgba(37, 99, 168, 0.2);
  --kin-consent-control-line: rgba(37, 99, 168, 0.34);
  --kin-consent-focus: rgba(37, 99, 168, 0.3);
  --kin-consent-shadow: rgba(22, 64, 110, 0.38);
  --kin-consent-teal: #2563a8;
  --kin-consent-teal-hover: #16406e;
}

.kin-consent-banner,
.kin-consent-backdrop {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.kin-consent-banner[hidden],
.kin-consent-backdrop[hidden] {
  display: none !important;
}

.kin-consent-banner {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  left: max(14px, env(safe-area-inset-left));
  z-index: 1400;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  width: min(820px, calc(100vw - 28px));
  margin-inline: auto;
  padding: 20px;
  border: 1px solid var(--kin-consent-line);
  border-radius: 20px;
  background: var(--kin-consent-surface);
  color: var(--kin-consent-ink);
  box-shadow: 0 28px 72px -24px var(--kin-consent-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
  backdrop-filter: blur(18px) saturate(115%);
  opacity: 0;
  transform: translateY(calc(100% + 28px));
  transition:
    opacity 0.25s ease,
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.kin-consent-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.kin-consent-copy {
  min-width: 0;
}

.kin-consent-copy strong {
  display: block;
  margin-bottom: 5px;
  font-family: "Newsreader", Georgia, serif;
  color: var(--kin-consent-teal-hover);
  font-size: 1.22rem;
  font-weight: 600;
}

.kin-consent-copy p {
  max-width: 62ch;
  margin: 0;
  color: var(--kin-consent-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.kin-consent-copy a {
  color: var(--kin-consent-teal);
  font-weight: 650;
  text-underline-offset: 3px;
}

.kin-consent-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(132px, 1fr));
  align-items: center;
  gap: 9px;
}

.kin-consent-btn {
  min-height: 46px;
  border: 1px solid var(--kin-consent-line);
  border-radius: 999px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--kin-consent-ink);
  font: 750 0.78rem/1.2 "Inter", system-ui, sans-serif;
  text-align: center;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.kin-consent-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -15px rgba(18, 57, 47, 0.6);
}

.kin-consent-btn:focus-visible,
.kin-cookie-settings-link:focus-visible {
  outline: 3px solid var(--kin-consent-focus);
  outline-offset: 3px;
}

.kin-consent-btn.is-accept,
.kin-consent-btn.is-reject {
  color: var(--kin-consent-ink);
}

.kin-consent-btn.is-accept {
  border-color: var(--kin-consent-teal);
  background: var(--kin-consent-teal);
  color: #fff;
}

.kin-consent-btn.is-reject {
  border-color: var(--kin-consent-control-line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--kin-consent-teal);
}

.kin-consent-btn.is-customize {
  border-color: var(--kin-consent-control-line);
  background: rgba(255, 255, 255, 0.44);
  color: var(--kin-consent-teal-hover);
}

.kin-consent-btn.is-accept:hover {
  background: var(--kin-consent-teal-hover);
}

.kin-consent-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background: rgba(19, 35, 30, 0.48);
  backdrop-filter: blur(8px);
}

.kin-consent-dialog {
  width: min(720px, 100%);
  max-height: min(820px, calc(100dvh - 32px));
  overflow: auto;
  border: 1px solid var(--kin-consent-line);
  border-radius: 25px;
  background: var(--kin-consent-paper);
  color: var(--kin-consent-ink);
  box-shadow: 0 34px 92px -22px rgba(15, 35, 29, 0.42);
}

.kin-consent-dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--kin-consent-line);
  background: var(--kin-consent-chrome);
}

.kin-consent-dialog-header h2 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  color: var(--kin-consent-teal-hover);
  font-size: clamp(1.8rem, 5vw, 2.35rem);
  line-height: 1.05;
}

.kin-consent-dialog-header p {
  max-width: 55ch;
  margin: 7px 0 0;
  color: var(--kin-consent-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.kin-consent-close {
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--kin-consent-line);
  border-radius: 50%;
  background: #fff;
  color: var(--kin-consent-ink);
  font-size: 1.45rem;
  cursor: pointer;
}

.kin-consent-close:focus-visible {
  outline: 3px solid var(--kin-consent-focus);
  outline-offset: 3px;
}

.kin-consent-categories {
  display: grid;
  gap: 10px;
  padding: 20px 24px;
}

.kin-consent-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--kin-consent-line);
  border-radius: 16px;
  background: #fff;
}

.kin-consent-category strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.94rem;
}

.kin-consent-category p {
  margin: 0;
  color: var(--kin-consent-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.kin-consent-switch {
  position: relative;
  display: inline-flex;
  width: 50px;
  height: 30px;
  align-items: center;
}

.kin-consent-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.kin-consent-switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cfd5ca;
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.kin-consent-switch span::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(31, 84, 73, 0.2);
  content: "";
  transition: transform 0.18s ease;
}

.kin-consent-switch input:checked + span {
  background: var(--kin-consent-teal);
}

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

.kin-consent-switch input:focus-visible + span {
  outline: 3px solid var(--kin-consent-focus);
  outline-offset: 3px;
}

.kin-consent-switch input:disabled + span {
  background: var(--kin-consent-teal);
  cursor: not-allowed;
}

.kin-consent-dialog-footer {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 18px 24px 24px;
  border-top: 1px solid var(--kin-consent-line);
  background: var(--kin-consent-chrome);
}

.kin-consent-dialog .kin-consent-btn {
  border-color: var(--kin-consent-line);
}

.kin-consent-dialog .kin-consent-btn.is-customize {
  border-color: var(--kin-consent-teal);
  background: var(--kin-consent-teal);
  color: #fff;
}

.kin-consent-dialog .kin-consent-btn.is-reject {
  border-color: var(--kin-consent-control-line);
  background: #fff;
  color: var(--kin-consent-teal);
}

.kin-cookie-settings-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.kin-map-consent {
  position: absolute;
  inset: 14px;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px solid rgba(31, 84, 73, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 20%, rgba(134, 194, 74, 0.16), transparent 46%),
    rgba(250, 247, 239, 0.96);
  color: var(--kin-consent-ink);
  text-align: center;
}

.kin-map-consent > div {
  max-width: 470px;
}

.kin-map-consent strong {
  display: block;
  margin-bottom: 7px;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.4rem, 5vw, 2rem);
}

.kin-map-consent p {
  margin: 0 0 14px;
  color: var(--kin-consent-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .kin-consent-banner {
    grid-template-columns: 1fr;
    gap: 14px;
    max-height: calc(100dvh - 28px);
    overflow: auto;
    padding: 17px;
    border-radius: 19px;
  }

  .kin-consent-actions {
    grid-template-columns: 1fr 1fr;
  }

  .kin-consent-btn.is-customize {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .kin-consent-dialog-header,
  .kin-consent-categories {
    padding-right: 17px;
    padding-left: 17px;
  }

  .kin-consent-dialog-footer {
    grid-template-columns: 1fr;
    padding: 14px 17px max(17px, env(safe-area-inset-bottom));
  }

  .kin-consent-dialog-footer .is-customize {
    grid-column: auto;
    grid-row: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kin-consent-banner,
  .kin-consent-btn,
  .kin-consent-switch span,
  .kin-consent-switch span::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
