/**
 * Shared Apex customer-facing modal (js/apex-modal.js). Pale pink surface,
 * burgundy heading/primary action, rounded corners, subtle shadow — the
 * same palette (--pink/--maroon/--maroon-dark from css/styles.css) already
 * used for every other Apex pink-surface treatment on the site, not a new
 * one invented for this component.
 */
.apex-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(26, 18, 20, 0.45);
  animation: apex-modal-fade-in 0.15s ease-out;
}

@keyframes apex-modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.apex-modal {
  width: 100%;
  max-width: 26rem;
  padding: 1.5rem;
  background: linear-gradient(160deg, #fffbfc 0%, var(--pink, #f8e8ec) 100%);
  border: 1px solid rgba(122, 21, 40, 0.14);
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(26, 18, 20, 0.24), 0 2px 8px rgba(122, 21, 40, 0.12);
  font-family: "DM Sans", system-ui, sans-serif;
  animation: apex-modal-pop-in 0.18s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes apex-modal-pop-in {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.apex-modal__title {
  margin: 0 0 0.4rem;
  font-family: "Poppins", var(--font-ui, "DM Sans", system-ui, sans-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--maroon-dark, #5c0f1e);
}

.apex-modal__body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--maroon-dark, #5c0f1e);
}

.apex-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.35rem;
}

.apex-modal__btn {
  height: 2.4rem;
  padding: 0 1.2rem;
  border: none;
  border-radius: 999px;
  font-family: "Poppins", var(--font-ui, "DM Sans", system-ui, sans-serif);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

.apex-modal__btn:active {
  transform: scale(0.97);
}

.apex-modal__btn--primary {
  background: linear-gradient(160deg, #fdf6f8 0%, var(--pink, #f8e8ec) 55%, var(--pink-deep, #e8b4c4) 100%);
  color: var(--maroon, #7a1528);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 2px 8px rgba(122, 21, 40, 0.14);
}

.apex-modal__btn--primary:hover {
  filter: brightness(1.06);
}

.apex-modal__btn--danger {
  background: var(--maroon, #7a1528);
  color: #fff;
}

.apex-modal__btn--danger:hover {
  background: var(--maroon-dark, #5c0f1e);
}

.apex-modal__btn--ghost {
  background: transparent;
  color: var(--maroon-dark, #5c0f1e);
  border: 1px solid rgba(122, 21, 40, 0.25);
}

.apex-modal__btn--ghost:hover {
  background: rgba(122, 21, 40, 0.06);
}

.apex-modal__btn:focus-visible {
  outline: 2px solid var(--maroon, #7a1528);
  outline-offset: 2px;
}

@media (max-width: 420px) {
  .apex-modal {
    padding: 1.25rem;
  }
  .apex-modal__actions {
    flex-direction: column-reverse;
  }
  .apex-modal__btn {
    width: 100%;
  }
}
