.capilyst-consent-root {
  position: relative;
  z-index: 5000;
}

html.consent-pending body {
  overflow: hidden;
}

html.consent-pending body > *:not(.capilyst-consent-root) {
  filter: grayscale(0.42) brightness(0.78);
  pointer-events: none;
  user-select: none;
}

.capilyst-consent-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 5001;
}

.capilyst-consent-overlay.is-open {
  display: flex;
}

.capilyst-consent-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(92, 98, 106, 0.58);
}

.capilyst-consent-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 560px);
  border-radius: 16px;
  border: 1px solid rgba(16, 24, 40, 0.16);
  background: #ffffff;
  box-shadow: 0 28px 66px rgba(16, 24, 40, 0.2);
  padding: clamp(20px, 3.8vw, 30px);
  outline: none;
}

.capilyst-consent-title {
  margin: 0;
  color: #10391d;
  font-size: clamp(1.28rem, 3.2vw, 1.62rem);
  line-height: 1.15;
}

.capilyst-consent-body {
  margin: 14px 0 0;
  color: rgba(16, 24, 40, 0.86);
  font-size: 1rem;
  line-height: 1.6;
}

.capilyst-consent-actions {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.capilyst-consent-button {
  min-height: 46px;
  border-radius: 10px;
  border: 1px solid #10391d;
  background: #ffffff;
  color: #10391d;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.capilyst-consent-button:hover,
.capilyst-consent-button:focus-visible {
  background: #f2f7ee;
}

.capilyst-consent-dialog .capilyst-consent-button[data-consent-choice="accept"],
.capilyst-consent-dialog .capilyst-consent-button[data-settings-choice="accept"] {
  background: #10391d !important;
  border-color: #10391d !important;
  color: #eaf0ce !important;
}

.capilyst-consent-dialog .capilyst-consent-button[data-consent-choice="accept"]:hover,
.capilyst-consent-dialog .capilyst-consent-button[data-consent-choice="accept"]:focus-visible,
.capilyst-consent-dialog .capilyst-consent-button[data-settings-choice="accept"]:hover,
.capilyst-consent-dialog .capilyst-consent-button[data-settings-choice="accept"]:focus-visible {
  background: #0d2f18 !important;
  border-color: #0d2f18 !important;
}

.capilyst-consent-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(16, 24, 40, 0.18);
  border-radius: 999px;
  background: #ffffff;
  color: #10391d;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.capilyst-cookie-settings-button {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 5002;
  border: 1px solid rgba(16, 24, 40, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #10391d;
  min-height: 38px;
  padding: 0 14px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.16);
}

.capilyst-cookie-settings-button:hover,
.capilyst-cookie-settings-button:focus-visible {
  background: #f3f7f0;
}

@media (max-width: 767px) {
  .capilyst-consent-overlay {
    align-items: flex-end;
  }

  .capilyst-consent-dialog {
    width: 100%;
    border-radius: 16px 16px 0 0;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }

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

  .capilyst-consent-dialog .capilyst-consent-button[data-consent-choice="accept"],
  .capilyst-consent-dialog .capilyst-consent-button[data-settings-choice="accept"] {
    order: -1;
    grid-row: 1;
  }

  .capilyst-consent-dialog .capilyst-consent-button[data-consent-choice="reject"],
  .capilyst-consent-dialog .capilyst-consent-button[data-settings-choice="reject"] {
    grid-row: 2;
  }

  .capilyst-cookie-settings-button {
    right: 12px;
    bottom: 12px;
  }
}
