.azg-consent[hidden] { display: none; }

.azg-consent {
  box-sizing: border-box;
  position: fixed;
  z-index: 100;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  width: min(480px, calc(100% - 40px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  margin: 0;
  padding: 0;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  background: #fff;
  color: #303030;
  box-shadow: 0 4px 18px rgb(0 0 0 / 8%);
  font: 400 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.azg-consent-inner {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.azg-consent-inner h2 {
  margin: 0;
  color: #292929;
  font: 650 18px/1.3 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: normal;
  text-align: center;
}

.azg-consent-inner p { margin: 0; color: #555; }
.azg-consent a.azg-consent-policy {
  justify-self: center;
  color: #d71920;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.azg-consent .azg-consent-error { color: #a32126; }

.azg-consent-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.azg-consent-actions button {
  min-height: 48px;
  padding: 8px;
  border: 0;
  border-radius: 7px;
  background: #f4f4f4;
  color: #303030;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.azg-consent-actions button:hover { background: #eaeaea; }
.azg-consent-actions button:focus-visible,
.azg-consent-policy:focus-visible { outline: 2px solid #d71920; outline-offset: 2px; }

.azg-consent-settings {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  text-decoration: underline;
  cursor: pointer;
}

.azg-consent-settings:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

@media (max-width: 520px) {
  .azg-consent {
    right: max(12px, env(safe-area-inset-right));
    left: max(12px, env(safe-area-inset-left));
    bottom: max(12px, env(safe-area-inset-bottom));
    width: auto;
    max-height: calc(100dvh - 24px);
  }
  .azg-consent-inner { padding: 14px; }
}
