.privacy-consent {
  position: fixed;
  z-index: 1000;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: block;
  width: min(920px, calc(100% - 36px));
  margin-inline: auto;
  padding: 17px 18px 17px 20px;
  border: 1px solid rgba(15, 76, 92, 0.12);
  border-radius: 12px;
  color: var(--ink, #17383f);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 46px rgba(7, 45, 55, 0.18);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 220ms ease;
  backdrop-filter: blur(12px);
}

.privacy-consent-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.privacy-consent-summary[hidden],
.privacy-consent-details[hidden] {
  display: none;
}

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

.privacy-consent.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.privacy-consent-copy {
  min-width: 0;
}

.privacy-consent-copy strong {
  display: block;
  margin-bottom: 3px;
  color: var(--petrol, #0f4c5c);
  font-size: 13px;
  font-weight: 600;
}

.privacy-consent-copy p {
  max-width: 620px;
  margin: 0;
  color: var(--muted, #62757a);
  font-size: 11px;
  line-height: 1.55;
}

.privacy-consent-copy a {
  color: var(--petrol, #0f4c5c);
  font-weight: 600;
}

.privacy-consent-actions {
  display: grid;
  width: min(470px, 100%);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  flex: none;
  gap: 8px;
}

.privacy-consent-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(15, 76, 92, 0.2);
  border-radius: 9px;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.privacy-consent-essential {
  color: var(--petrol, #0f4c5c);
  background: var(--cream-light, #f7f8f4);
}

.privacy-consent-allow {
  border-color: var(--petrol, #0f4c5c);
  color: #fff;
  background: var(--petrol, #0f4c5c);
}

.privacy-consent-settings,
.privacy-consent-save {
  color: var(--petrol, #0f4c5c);
  background: #fff;
}

.privacy-consent-button:hover {
  filter: brightness(0.97);
}

.privacy-consent-button:focus-visible,
.privacy-consent-back:focus-visible,
.privacy-consent-option input:focus-visible + i,
.privacy-settings-link:focus-visible,
.map-consent-placeholder button:focus-visible {
  outline: 3px solid rgba(127, 196, 207, 0.58);
  outline-offset: 2px;
}

.privacy-consent-details {
  display: grid;
  gap: 14px;
}

.privacy-consent-details-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.privacy-consent-details-heading strong {
  display: block;
  color: var(--petrol, #0f4c5c);
  font-size: 14px;
  font-weight: 600;
}

.privacy-consent-details-heading p {
  margin: 3px 0 0;
  color: var(--muted, #62757a);
  font-size: 11px;
  line-height: 1.5;
}

.privacy-consent-back {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  color: var(--petrol, #0f4c5c);
  background: var(--cream-light, #f7f8f4);
  cursor: pointer;
  font: inherit;
  font-size: 19px;
  line-height: 1;
}

.privacy-consent-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.privacy-consent-option {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 13px;
  border: 1px solid rgba(15, 76, 92, 0.12);
  border-radius: 10px;
  background: var(--cream-light, #f7f8f4);
  cursor: pointer;
}

.privacy-consent-option span {
  min-width: 0;
}

.privacy-consent-option strong,
.privacy-consent-option small {
  display: block;
}

.privacy-consent-option strong {
  color: var(--ink, #17383f);
  font-size: 12px;
  font-weight: 600;
}

.privacy-consent-option small {
  margin-top: 2px;
  color: var(--muted, #62757a);
  font-size: 9px;
  line-height: 1.45;
}

.privacy-consent-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.privacy-consent-option i {
  position: relative;
  width: 38px;
  height: 22px;
  flex: none;
  border-radius: 999px;
  background: #cbd5d7;
  transition: background-color 160ms ease;
}

.privacy-consent-option i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(7, 45, 55, 0.2);
  content: "";
  transition: transform 180ms ease;
}

.privacy-consent-option input:checked + i {
  background: var(--petrol, #0f4c5c);
}

.privacy-consent-option input:checked + i::after {
  transform: translateX(16px);
}

.privacy-consent-detail-actions {
  display: grid;
  width: min(360px, 100%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-self: end;
  gap: 8px;
}

.privacy-consent-save {
  border-color: var(--petrol, #0f4c5c);
  color: #fff;
  background: var(--petrol, #0f4c5c);
}

.privacy-settings-link {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.provider-map-visual.is-consent-required .provider-map-fallback-copy {
  display: none;
}

.map-consent-placeholder {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  color: var(--petrol, #0f4c5c);
  background: var(--aqua-pale, #e4f1f2);
  text-align: center;
}

.map-consent-placeholder strong {
  font-size: 10px;
  line-height: 1.25;
}

.map-consent-placeholder button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--petrol, #0f4c5c);
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 600;
}

.provider-detail-map-shell:has(.is-consent-required) .provider-detail-map-controls {
  display: none;
}

@media (max-width: 720px) {
  .privacy-consent {
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: calc(100% - 20px);
    padding: 15px;
  }

  .privacy-consent-summary {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .privacy-consent-actions {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .privacy-consent-allow {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .privacy-consent-options {
    grid-template-columns: 1fr;
  }

  .privacy-consent-detail-actions {
    width: 100%;
  }

  .privacy-consent-button {
    padding-inline: 10px;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .privacy-consent {
    transition: none;
  }
}
