.fm-consent-panel[hidden],
.fm-consent-panel [hidden],
[data-fm-map-placeholder][hidden],
[data-fm-map-src][hidden] {
  display: none !important;
}

.fm-consent-panel {
  position: fixed;
  z-index: 2000;
  inset-inline-start: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(31rem, calc(100% - 32px));
  max-height: 70vh;
  max-height: 70dvh;
  overflow: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  padding: clamp(18px, 3.2vw, 28px);
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #1c262e;
  box-shadow: 0 8px 32px rgb(24 36 60 / 16%);
  font: 400 15px/1.5 'Poppins', Arial, sans-serif;
}

.fm-consent-panel h2 {
  margin: 0 36px 8px 0;
  font: 650 clamp(19px, 3.8vw, 23px)/1.25 'Montserrat', Arial, sans-serif;
  letter-spacing: -.025em;
  color: inherit;
}

.fm-consent-panel p { margin: 0; }
.fm-consent-panel button { font: inherit; cursor: pointer; }
.fm-consent-panel :focus-visible,
[data-fm-map-src]:focus-visible {
  outline: 3px solid #23599b;
  outline-offset: 2px;
}

.fm-consent-panel .fm-consent-close {
  position: absolute;
  inset-inline-end: 9px;
  top: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2f3f4d;
  font: 400 26px/1 Arial, sans-serif;
}

.fm-consent-links {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 16px;
  margin-top: 9px;
}
.fm-consent-links a {
  color: #2f3f4d;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#fm-consent-purposes { margin-top: 14px; }
#fm-consent-purposes p,
#fm-consent-purposes label {
  display: block;
  margin: 0;
  padding: 9px 0;
}
#fm-consent-purposes label {
  display: flex;
  align-items: start;
  gap: 10px;
  cursor: pointer;
}
#fm-consent-purposes strong,
#fm-consent-purposes span { display: block; }
#fm-consent-purposes input {
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  accent-color: #2f3f4d;
}
.fm-consent-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}
.fm-consent-actions button {
  min-height: 44px;
  padding: 7px 8px;
  border: 0;
  border-radius: 0;
  background: #2f3f4d;
  color: #fff;
  font-weight: 600;
  line-height: 1.25;
}
.fm-consent-actions button:hover { background: #1c262e; }
.fm-consent-actions [data-action="edit"],
.fm-consent-actions [data-action="save"] {
  grid-column: 1 / -1;
  background: #e8edf1;
  color: #2f3f4d;
}
.fm-consent-actions [data-action="edit"]:hover,
.fm-consent-actions [data-action="save"]:hover { background: #f1f4f6; }

@media (max-width: 440px) {
  .fm-consent-panel {
    inset-inline: 8px;
    width: auto;
    bottom: max(8px, env(safe-area-inset-bottom));
    font-size: 14px;
  }
}
