.zenta-cookie-banner[hidden],
.zenta-cookie-backdrop[hidden] {
  display: none;
}

.zenta-cookie-banner,
.zenta-cookie-backdrop {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.zenta-cookie-banner {
  position: fixed;
  z-index: 10000;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  left: auto;
  width: min(420px, calc(100vw - 32px));
  max-height: min(72vh, 620px);
  margin: 0;
  overflow: auto;
  color: #eaf2ff;
  border: 1px solid rgba(115, 160, 213, .32);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(15, 34, 58, .98), rgba(7, 20, 37, .99));
  box-shadow: 0 22px 70px rgba(0, 0, 0, .48);
  animation: zenta-cookie-rise .32s cubic-bezier(.2, .75, .3, 1) both;
}

.zenta-cookie-banner__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 19px 20px;
}

.zenta-cookie-banner__copy {
  min-width: 0;
}

.zenta-cookie-banner__title,
.zenta-cookie-dialog__title {
  margin: 0;
  color: #f5f8ff;
  font-size: 19px;
  font-weight: 750;
  line-height: 1.3;
}

.zenta-cookie-banner__message,
.zenta-cookie-dialog__intro,
.zenta-cookie-dialog__note {
  margin: 9px 0 0;
  color: #b7c8df;
  font-size: 14px;
  line-height: 1.6;
}

.zenta-cookie-banner__error {
  grid-column: 1 / -1;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid rgba(238, 120, 120, .44);
  border-radius: 10px;
  background: rgba(130, 35, 44, .24);
  font-size: 12px;
  line-height: 1.45;
}

.zenta-cookie-banner__error[hidden] {
  display: none;
}

.zenta-cookie-banner__error,
.zenta-cookie-dialog__error {
  color: #ffd1d1;
}

.zenta-cookie-banner__error[hidden] {
  display: none;
}

.zenta-cookie-banner__links,
.zenta-cookie-banner__actions,
.zenta-cookie-dialog__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.zenta-cookie-banner__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.zenta-cookie-banner__actions button {
  min-width: 0;
  width: 100%;
}

.zenta-cookie-banner__links {
  margin-top: 12px;
  gap: 16px;
}

.zenta-cookie-banner a,
.zenta-cookie-dialog a {
  color: #77d7ff;
  font-size: 13px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.zenta-cookie-banner button,
.zenta-cookie-dialog button {
  min-height: 42px;
  padding: 10px 14px;
  color: #eaf2ff;
  border: 1px solid rgba(125, 160, 205, .42);
  border-radius: 11px;
  background: #142a47;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.zenta-cookie-banner button:hover,
.zenta-cookie-dialog button:hover {
  border-color: #54c9f5;
  background: #1b385b;
}

.zenta-cookie-banner button:active,
.zenta-cookie-dialog button:active {
  transform: translateY(1px);
}

.zenta-cookie-banner button:focus-visible,
.zenta-cookie-dialog button:focus-visible,
.zenta-cookie-dialog a:focus-visible,
.zenta-cookie-dialog input:focus-visible,
.zenta-cookie-dialog summary:focus-visible {
  outline: 2px solid #65d8ff;
  outline-offset: 3px;
}

.zenta-cookie-banner .zenta-cookie-button--primary,
.zenta-cookie-dialog .zenta-cookie-button--primary {
  color: #062035;
  border-color: #43cdf4;
  background: linear-gradient(130deg, #51d6f5, #61aaff);
}

.zenta-cookie-banner .zenta-cookie-button--primary:hover,
.zenta-cookie-dialog .zenta-cookie-button--primary:hover {
  border-color: #9cecff;
  background: linear-gradient(130deg, #75e3fa, #82bbff);
}

.zenta-cookie-backdrop {
  position: fixed;
  z-index: 10002;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: rgba(1, 8, 17, .72);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.zenta-cookie-dialog {
  width: min(100%, 760px);
  max-height: min(92dvh, 820px);
  overflow: auto;
  padding: clamp(20px, 4vw, 32px);
  color: #eaf2ff;
  border: 1px solid rgba(120, 166, 218, .35);
  border-radius: 22px;
  background: linear-gradient(150deg, #142945, #09182b 78%);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .58);
  animation: zenta-cookie-rise .22s ease-out both;
}

.zenta-cookie-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.zenta-cookie-dialog__close {
  flex: 0 0 auto;
  width: 40px;
  min-height: 40px !important;
  padding: 6px !important;
  font-size: 20px !important;
  line-height: 1;
}

.zenta-cookie-dialog__policy {
  display: inline-block;
  margin-top: 12px;
}

.zenta-cookie-dialog__note {
  margin-top: 16px;
  padding: 11px 13px;
  border: 1px solid rgba(91, 174, 218, .2);
  border-radius: 12px;
  background: rgba(45, 99, 145, .14);
  font-size: 12px;
}

.zenta-cookie-dialog__categories {
  display: grid;
  gap: 9px;
  margin-top: 20px;
}

.zenta-cookie-dialog__categories-title {
  margin: 20px 0 -10px;
  color: #f0f5ff;
  font-size: 15px;
  font-weight: 700;
}

.zenta-cookie-category {
  padding: 13px 15px;
  border: 1px solid rgba(121, 155, 195, .23);
  border-radius: 14px;
  background: rgba(7, 19, 34, .42);
}

.zenta-cookie-category__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.zenta-cookie-category details {
  min-width: 0;
}

.zenta-cookie-category summary {
  color: #f0f5ff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.zenta-cookie-category__description {
  margin: 9px 0 2px;
  color: #afc1d9;
  font-size: 12px;
  line-height: 1.55;
}

.zenta-cookie-category__control {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #b8c9de;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.zenta-cookie-switch {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 25px;
  flex: 0 0 auto;
}

.zenta-cookie-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.zenta-cookie-switch__track {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(145, 169, 197, .65);
  border-radius: 999px;
  background: #263a52;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease;
}

.zenta-cookie-switch__track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #d3deea;
  content: "";
  transition: transform .16s ease, background-color .16s ease;
}

.zenta-cookie-switch input:checked + .zenta-cookie-switch__track {
  border-color: #50c8ef;
  background: #1687b1;
}

.zenta-cookie-switch input:checked + .zenta-cookie-switch__track::after {
  transform: translateX(19px);
  background: white;
}

.zenta-cookie-switch input:focus-visible + .zenta-cookie-switch__track {
  outline: 2px solid #65d8ff;
  outline-offset: 3px;
}

.zenta-cookie-switch input:disabled + .zenta-cookie-switch__track {
  border-color: #357f9d;
  background: #176f8d;
  cursor: not-allowed;
  opacity: .8;
}

.zenta-cookie-always--hidden {
  display: none;
}

.zenta-cookie-dialog__error {
  margin: 14px 0 0;
  padding: 10px 12px;
  color: #ffd1d1;
  border: 1px solid rgba(238, 120, 120, .44);
  border-radius: 10px;
  background: rgba(130, 35, 44, .24);
  font-size: 13px;
  line-height: 1.45;
}

.zenta-cookie-dialog__actions {
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(121, 155, 195, .2);
}

@keyframes zenta-cookie-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .zenta-cookie-banner {
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
    width: calc(100% - 16px);
    max-height: min(82dvh, 620px);
    border-radius: 16px;
  }

  .zenta-cookie-banner__inner {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 17px;
  }

  .zenta-cookie-banner__title,
  .zenta-cookie-dialog__title {
    font-size: 17px;
  }

  .zenta-cookie-banner__message,
  .zenta-cookie-dialog__intro {
    font-size: 13px;
  }

  .zenta-cookie-banner__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .zenta-cookie-banner__actions button {
    min-height: 44px;
    width: 100%;
    padding: 9px 10px;
    font-size: 12px;
  }

  .zenta-cookie-dialog {
    width: 100%;
    max-height: min(94dvh, 860px);
    padding: 19px 16px;
    border-radius: 18px;
  }

  .zenta-cookie-category {
    padding: 12px;
  }

  .zenta-cookie-category__row {
    gap: 8px;
  }

  .zenta-cookie-category__control {
    flex-direction: column-reverse;
    gap: 4px;
    font-size: 10px;
  }

  .zenta-cookie-dialog__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .zenta-cookie-dialog__actions button {
    width: 100%;
  }

  .zenta-cookie-dialog__actions button:last-child {
    grid-column: auto;
  }

}

@media (prefers-reduced-motion: reduce) {
  .zenta-cookie-banner,
  .zenta-cookie-dialog {
    animation: none;
  }

  .zenta-cookie-banner button,
  .zenta-cookie-dialog button,
  .zenta-cookie-switch__track,
  .zenta-cookie-switch__track::after {
    transition: none;
  }
}
