:root {
  --dorosh-cmp-teal: #092f31;
  --dorosh-cmp-teal-soft: #16494b;
  --dorosh-cmp-gold: #c89a4b;
  --dorosh-cmp-paper: #fffdf8;
  --dorosh-cmp-text: #172526;
  --dorosh-cmp-muted: #5f6d6e;
  --dorosh-cmp-border: #d9d8d1;
  --dorosh-cmp-danger: #a62929;
}

.dorosh-cmp[hidden] {
  display: none !important;
}

.dorosh-cmp {
  position: fixed;
  z-index: 2147483000;
  inset: auto 0 0;
  padding: 16px;
  color: var(--dorosh-cmp-text);
  font-family: inherit;
}

.dorosh-cmp::before {
  content: '';
  position: fixed;
  z-index: -1;
  inset: 0;
  background: rgba(5, 24, 25, 0.34);
  backdrop-filter: blur(2px);
}

.dorosh-cmp__panel {
  position: relative;
  width: min(960px, 100%);
  max-height: min(78vh, 720px);
  margin: 0 auto;
  padding: 28px 30px 24px;
  overflow: auto;
  background: var(--dorosh-cmp-paper);
  border: 1px solid rgba(200, 154, 75, 0.58);
  border-radius: 18px;
  box-shadow: 0 24px 72px rgba(5, 24, 25, 0.34);
  outline: none;
}

.dorosh-cmp__panel::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 18px 0 0 18px;
  background: var(--dorosh-cmp-gold);
}

.dorosh-cmp h2 {
  margin: 0 42px 10px 0;
  color: var(--dorosh-cmp-teal);
  font-size: clamp(1.25rem, 2.4vw, 1.72rem);
  line-height: 1.2;
}

.dorosh-cmp p {
  margin: 0;
  color: var(--dorosh-cmp-muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

.dorosh-cmp__close {
  position: absolute;
  top: 16px;
  right: 18px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  color: var(--dorosh-cmp-teal);
  font: inherit;
  font-size: 1.65rem;
  line-height: 1;
  background: transparent;
  border: 1px solid var(--dorosh-cmp-border);
  border-radius: 50%;
  cursor: pointer;
}

.dorosh-cmp__close:hover,
.dorosh-cmp__close:focus-visible {
  color: #fff;
  background: var(--dorosh-cmp-teal);
  border-color: var(--dorosh-cmp-teal);
}

.dorosh-cmp__privacy {
  display: inline-block;
  margin-top: 12px;
  color: var(--dorosh-cmp-teal-soft);
  font-weight: 700;
  text-underline-offset: 3px;
}

.dorosh-cmp__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.dorosh-cmp__button {
  min-height: 46px;
  padding: 10px 16px;
  color: var(--dorosh-cmp-teal);
  font: inherit;
  font-weight: 750;
  background: transparent;
  border: 1px solid var(--dorosh-cmp-teal);
  border-radius: 999px;
  cursor: pointer;
}

.dorosh-cmp__button--primary {
  color: #fff;
  background: var(--dorosh-cmp-teal);
}

.dorosh-cmp__button:hover,
.dorosh-cmp__button:focus-visible {
  color: #fff;
  background: var(--dorosh-cmp-teal-soft);
  border-color: var(--dorosh-cmp-teal-soft);
  outline: 3px solid rgba(200, 154, 75, 0.34);
  outline-offset: 2px;
}

.dorosh-cmp__category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-top: 14px;
  padding: 16px;
  background: #f5f3ec;
  border: 1px solid var(--dorosh-cmp-border);
  border-radius: 12px;
}

.dorosh-cmp__category strong {
  display: block;
  margin-bottom: 4px;
  color: var(--dorosh-cmp-teal);
}

.dorosh-cmp__switch {
  position: relative;
  display: inline-flex;
  width: 50px;
  height: 28px;
  flex: 0 0 auto;
}

.dorosh-cmp__switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.dorosh-cmp__switch span {
  position: absolute;
  inset: 0;
  background: #919a9a;
  border-radius: 999px;
  cursor: pointer;
  transition: background 160ms ease;
}

.dorosh-cmp__switch span::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.24);
  transition: transform 160ms ease;
}

.dorosh-cmp__switch input:checked + span {
  background: var(--dorosh-cmp-teal);
}

.dorosh-cmp__switch input:checked + span::after {
  transform: translateX(22px);
}

.dorosh-cmp__switch input:focus-visible + span {
  outline: 3px solid rgba(200, 154, 75, 0.5);
  outline-offset: 3px;
}

.dorosh-cmp__switch input:disabled + span {
  cursor: not-allowed;
  opacity: 0.72;
}

.dorosh-cookie-settings {
  position: fixed;
  z-index: 2147482000;
  left: 14px;
  bottom: 14px;
  max-width: calc(100vw - 28px);
  min-height: 38px;
  padding: 8px 14px;
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--dorosh-cmp-teal);
  border: 1px solid var(--dorosh-cmp-gold);
  border-radius: 999px;
  box-shadow: 0 6px 22px rgba(5, 24, 25, 0.25);
  cursor: pointer;
}

.dorosh-cookie-settings:hover,
.dorosh-cookie-settings:focus-visible {
  background: var(--dorosh-cmp-teal-soft);
  outline: 3px solid rgba(200, 154, 75, 0.36);
  outline-offset: 2px;
}

@media (max-width: 680px) {
  .dorosh-cmp {
    padding: 8px;
  }

  .dorosh-cmp__panel {
    max-height: 88vh;
    padding: 22px 18px 18px;
    border-radius: 14px;
  }

  .dorosh-cmp__actions {
    grid-template-columns: 1fr;
  }

  .dorosh-cmp__button--primary {
    order: -1;
  }

  .dorosh-cmp__category {
    gap: 12px;
    padding: 13px;
  }

  .dorosh-cookie-settings {
    bottom: 76px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dorosh-cmp *,
  .dorosh-cookie-settings {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
