.hestya-cookie-consent {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: max(0.9rem, env(safe-area-inset-bottom));
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 0.5rem);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.hestya-cookie-consent[hidden] {
  display: none !important;
}

.hestya-cookie-consent.is-active {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hestya-cookie-consent__card {
  width: min(calc(100vw - 1.8rem), 40rem);
  margin-inline: auto;
  padding: 1rem 1.15rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.05rem;
  background:
    linear-gradient(180deg, rgba(15, 20, 26, 0.96) 0%, rgba(17, 23, 30, 0.96) 100%);
  box-shadow: 0 0.8rem 2rem rgba(15, 20, 26, 0.18);
  color: #f7f4ef;
  pointer-events: auto;
}

.hestya-cookie-consent__summary,
.hestya-cookie-consent__panel {
  display: grid;
  gap: 0.75rem;
}

.hestya-cookie-consent__summary {
  padding-bottom: 0.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.hestya-cookie-consent__title,
.hestya-cookie-consent__panel-title {
  margin: 0;
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.2;
}

.hestya-cookie-consent__text,
.hestya-cookie-consent__panel-text,
.hestya-cookie-consent__option-text {
  margin: 0;
  color: rgba(247, 244, 239, 0.78);
  font-size: 0.88rem;
  line-height: 1.45;
}

.hestya-cookie-consent__meta {
  margin: 0.2rem 0 0;
}

.hestya-cookie-consent__meta a {
  color: #ffd6b7;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.hestya-cookie-consent__actions {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hestya-cookie-consent__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.hestya-cookie-consent__button:hover,
.hestya-cookie-consent__button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(239, 124, 36, 0.18);
}

.hestya-cookie-consent__button--primary {
  background: #ef7c24;
  color: #10161d;
}

.hestya-cookie-consent__button--primary:hover,
.hestya-cookie-consent__button--primary:focus-visible {
  background: #ff8d3a;
}

.hestya-cookie-consent__button--secondary {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.hestya-cookie-consent__button--secondary:hover,
.hestya-cookie-consent__button--secondary:focus-visible,
.hestya-cookie-consent__button--ghost:hover,
.hestya-cookie-consent__button--ghost:focus-visible {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.hestya-cookie-consent__button--ghost {
  border-color: rgba(255, 255, 255, 0.12);
}

.hestya-cookie-consent__button.is-active {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.hestya-cookie-consent__panel {
  margin-top: 0.65rem;
  padding-top: 0.05rem;
}

.hestya-cookie-consent__panel-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.35rem;
}

.hestya-cookie-consent__panel[hidden] {
  display: none !important;
}

.hestya-cookie-consent__options {
  display: grid;
  gap: 0.5rem;
}

.hestya-cookie-consent__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.025);
}

.hestya-cookie-consent__option-copy {
  display: grid;
  gap: 0.2rem;
}

.hestya-cookie-consent__option-title {
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 600;
}

.hestya-cookie-consent__toggle {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

.hestya-cookie-consent__toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
}

.hestya-cookie-consent__toggle-ui {
  position: relative;
  display: inline-flex;
  width: 2.55rem;
  height: 1.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  transition: background-color 0.18s ease;
}

.hestya-cookie-consent__toggle-ui::after {
  content: "";
  position: absolute;
  top: 0.13rem;
  left: 0.13rem;
  width: 1.18rem;
  height: 1.18rem;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.18s ease;
}

.hestya-cookie-consent__toggle input:checked + .hestya-cookie-consent__toggle-ui {
  background: rgba(239, 124, 36, 0.95);
}

.hestya-cookie-consent__toggle input:checked + .hestya-cookie-consent__toggle-ui::after {
  transform: translateX(1.08rem);
}

@media (min-width: 840px) {
  .hestya-cookie-consent__summary {
    gap: 0.75rem;
  }
}

@media (max-width: 767px) {
  .hestya-cookie-consent {
    left: max(0.75rem, env(safe-area-inset-left));
    right: max(0.75rem, env(safe-area-inset-right));
    transform: translateY(0.5rem);
  }

  .hestya-cookie-consent__card {
    width: 100%;
    padding: 0.85rem 0.85rem 0.75rem;
    border-radius: 0.85rem;
  }

  .hestya-cookie-consent__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .hestya-cookie-consent__panel-actions .hestya-cookie-consent__button {
    width: 100%;
  }

  .hestya-cookie-consent.is-active {
    transform: translateY(0);
  }

  .hestya-cookie-consent__option {
    align-items: flex-start;
  }
}
