/* Prevents page scroll while popup is visible. */
body.no-scroll {
  overflow: hidden;
}

/* Full-viewport overlay — dark semi-transparent backdrop. */
.fim-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: rgb(0 0 0 / 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2.5rem 1rem;
}

@media (min-width: 48rem) {
  .fim-popup-overlay {
    padding: 2.5rem;
  }
}

/* Popup card — flex column, capped at viewport height. */
.fim-popup {
  width: 100%;
  max-width: 60rem;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 5rem);
  overflow: hidden;
}

/* Title — fixed at top, never shrinks. */
.fim-popup__title {
  flex-shrink: 0;
}

/* Body — the only element that scrolls. */
.fim-popup__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

/* Actions wrapper — fixed at bottom, never shrinks. */
.fim-popup__actions {
  flex-shrink: 0;
}

/* Disabled button state. */
.fim-popup__agree:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
