.consent-panel,
.consent-panel *,
.cookie-settings {
  box-sizing: border-box;
}

.consent-panel {
  position: fixed;
  z-index: 100;
  left: max(24px, env(safe-area-inset-left));
  bottom: calc(24px + env(safe-area-inset-bottom));
  width: min(400px, calc(100% - 48px));
  max-height: calc(100dvh - 48px - env(safe-area-inset-bottom));
  overflow-y: auto;
  padding: 24px;
  border: 1px solid #dedbe5;
  border-radius: 18px;
  background: #ffffff;
  color: #17151e;
  box-shadow: 0 8px 40px rgba(23, 21, 30, .12);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}

.consent-panel[hidden],
.consent-panel [hidden],
.cookie-settings[hidden] {
  display: none;
}

.consent-panel h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.4;
  text-wrap: balance;
}

.consent-panel:has(.consent-close:not([hidden])) h2 {
  padding-right: 28px;
}

.consent-panel p {
  margin: 0;
  color: #575260;
}

.consent-panel .consent-privacy {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #5945c7;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.consent-actions button {
  min-height: 46px;
  padding: 10px 8px;
  border: 1px solid #b8b2c2;
  border-radius: 9px;
  background: #ffffff;
  color: #3f326e;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

.consent-actions button:hover {
  border-color: #5945c7;
  background: #f3f0fb;
}

.consent-panel .consent-hint {
  margin-top: 14px;
  font-size: 12px;
}

.consent-panel .consent-state {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
}

.consent-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #575260;
  font: inherit;
  font-size: 26px;
  cursor: pointer;
}

.consent-close:hover { background: #f3f0fb; }

.cookie-settings {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #575260;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.cookie-settings:hover {
  color: #5945c7;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.consent-panel :focus-visible,
.cookie-settings:focus-visible {
  outline: 3px solid #5945c7;
  outline-offset: 3px;
}

.consent-footer { margin-top: 24px; }

@media (max-width: 680px) {
  .consent-panel {
    left: max(12px, env(safe-area-inset-left));
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: calc(100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right));
    max-height: calc(100dvh - 24px - env(safe-area-inset-bottom));
    padding: 20px;
    border-radius: 16px;
  }
}
