.evmap-consent[hidden],
.evmap-consent [hidden] {
  display: none !important;
}

.evmap-consent,
.evmap-consent * {
  box-sizing: border-box;
}

.evmap-consent-banner {
  position: fixed;
  z-index: 10020;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: max(1rem, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  width: min(76rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: 0 auto;
  padding: 1.15rem;
  overflow: auto;
  border: 1px solid #cbd7e6;
  border-radius: 1rem;
  background: #fff;
  color: #172033;
  box-shadow: 0 1.25rem 3.5rem rgba(15, 23, 42, 0.24);
}

.evmap-consent-banner-copy {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}

.evmap-consent-banner-copy strong {
  font-size: 1.05rem;
}

.evmap-consent-banner-copy p {
  margin: 0;
  max-width: 70ch;
  color: #475569;
  line-height: 1.5;
}

.evmap-consent-banner-copy a,
.evmap-consent-policy-link {
  color: #0b5cad;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.evmap-consent-actions,
.evmap-consent-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.evmap-consent-actions {
  display: grid;
  grid-template-columns: repeat(3, max-content);
}

.evmap-consent-actions button,
.evmap-consent-dialog-actions button,
.evmap-consent-close {
  min-height: 2.75rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid #1769aa;
  border-radius: 0.55rem;
  background: #fff;
  color: #0b4f86;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.evmap-consent-dialog-actions button {
  white-space: normal;
  overflow-wrap: anywhere;
}

.evmap-consent-dialog-actions button:first-child {
  background: #1769aa;
  color: #fff;
}

.evmap-consent-actions .evmap-consent-choice-action {
  border-color: #1769aa;
  background: #1769aa;
  color: #fff;
}

.evmap-consent-actions button:hover,
.evmap-consent-dialog-actions button:hover {
  background: #edf6fd;
}

.evmap-consent-actions .evmap-consent-choice-action:hover,
.evmap-consent-dialog-actions button:first-child:hover {
  border-color: #0d578f;
  background: #0d578f;
}

.evmap-consent-actions button:disabled,
.evmap-consent-dialog-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.evmap-consent-actions button:focus-visible,
.evmap-consent-dialog-actions button:focus-visible,
.evmap-consent-close:focus-visible,
.evmap-consent-category input:focus-visible {
  outline: 3px solid rgba(23, 105, 170, 0.32);
  outline-offset: 2px;
}

.evmap-consent-dialog-layer {
  position: fixed;
  z-index: 10030;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.evmap-consent-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.68);
}

.evmap-consent-dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  width: min(46rem, 100%);
  max-height: min(48rem, calc(100dvh - 2rem));
  padding: clamp(1rem, 3vw, 1.5rem);
  overflow: auto;
  border: 1px solid #d7e0eb;
  border-radius: 1rem;
  background: #fff;
  color: #172033;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.3);
}

.evmap-consent-dialog > header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.evmap-consent-dialog > header > div {
  min-width: 0;
}

.evmap-consent-dialog h2,
.evmap-consent-dialog h3,
.evmap-consent-dialog p {
  margin: 0;
}

.evmap-consent-dialog > header span {
  color: #0b5cad;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.evmap-consent-dialog > header h2 {
  margin-top: 0.25rem;
  overflow-wrap: anywhere;
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  line-height: 1.2;
}

.evmap-consent-dialog > p {
  color: #475569;
  line-height: 1.55;
}

.evmap-consent-close {
  min-width: 2.75rem;
  padding: 0;
  font-size: 1.5rem;
}

.evmap-consent-category {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid #d8dee9;
  border-radius: 0.8rem;
  background: #fbfdff;
}

.evmap-consent-category-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.evmap-consent-category-heading[for] {
  cursor: pointer;
}

.evmap-consent-category-heading > span,
.evmap-consent-category-heading > div {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.evmap-consent-category-heading small,
.evmap-consent-category-heading div > span {
  color: #64748b;
  line-height: 1.4;
}

.evmap-consent-category-heading input {
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 auto;
  accent-color: #1769aa;
}

.evmap-consent-necessary-control {
  display: flex !important;
  grid-auto-flow: column;
  gap: 0.65rem !important;
  align-items: center;
}

.evmap-consent-always-on {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: #eaf7ee;
  color: #176b36;
  font-size: 0.8rem;
  font-weight: 700;
}

.evmap-consent-integration-details {
  display: grid;
  gap: 0.65rem;
}

.evmap-consent-integration-details article {
  display: grid;
  gap: 0.45rem;
  padding-top: 0.65rem;
  border-top: 1px solid #e5e9f0;
}

.evmap-consent-integration-details h3 {
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.evmap-consent-integration-details article > p {
  color: #475569;
  line-height: 1.5;
}

.evmap-consent-integration-details dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
}

.evmap-consent-integration-details dl div {
  display: grid;
  gap: 0.1rem;
}

.evmap-consent-integration-details dt {
  color: #64748b;
  font-size: 0.75rem;
}

.evmap-consent-integration-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.evmap-consent-error {
  padding: 0.75rem;
  border-left: 0.25rem solid #d92d20;
  background: #fff1f0;
  color: #7a271a;
}

.evmap-consent-policy-link {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.evmap-consent-dialog-actions {
  position: sticky;
  bottom: -1px;
  margin: 0 -0.2rem -0.2rem;
  padding: 0.75rem 0.2rem 0.2rem;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    #fff 0.75rem
  );
}

.evmap-consent-dialog-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .evmap-consent-banner {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .evmap-consent-actions,
  .evmap-consent-dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .evmap-consent-actions button,
  .evmap-consent-dialog-actions button {
    width: 100%;
  }

  .evmap-consent-integration-details dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .evmap-consent-banner {
    right: 0.75rem;
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    left: 0.75rem;
    width: calc(100% - 1.5rem);
    padding: 0.9rem;
  }

  .evmap-consent-dialog-layer {
    padding: 8px;
  }

  .evmap-consent-dialog {
    gap: 16px;
    max-height: calc(100dvh - 16px);
    padding: 16px;
    border-radius: 0.8rem;
    overflow-x: hidden;
  }

  .evmap-consent-dialog > header {
    flex-direction: column;
    gap: 12px;
  }

  .evmap-consent-close {
    order: -1;
    align-self: flex-end;
    min-width: 44px;
    min-height: 44px;
    font-size: 24px;
  }

  .evmap-consent-category {
    gap: 12px;
    padding: 16px;
  }

  .evmap-consent-category-heading {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .evmap-consent-necessary-control {
    grid-auto-flow: row;
    justify-items: start;
    align-self: flex-start;
  }

  .evmap-consent-dialog-actions {
    position: static;
    gap: 8px;
    margin: 0;
    padding: 0;
    background: none;
  }

  .evmap-consent-dialog-actions button {
    min-height: 44px;
    padding: 10px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .evmap-consent * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
