/* =========================================================
   Modals — smoother entrance, refined padding, better footer
   ========================================================= */

#modal-root {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(13, 27, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: overlayIn 250ms ease both;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-container {
  background-color: var(--color-white);
  border-radius: var(--radius-card);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(212, 175, 55, 0.15);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  animation: modalSlideUp 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(13, 27, 42, 0.06);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.25;
}

.modal-close-btn {
  background: none;
  border: none;
  color: rgba(13, 27, 42, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  transition: background 200ms ease, color 200ms ease;
}

.modal-close-btn:hover {
  background: rgba(13, 27, 42, 0.06);
  color: var(--color-navy);
}

.modal-close-btn svg { width: 18px; height: 18px; }

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(13, 27, 42, 0.85);
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(13, 27, 42, 0.06);
  background-color: rgba(242, 244, 247, 0.6);
  border-bottom-left-radius: var(--radius-card);
  border-bottom-right-radius: var(--radius-card);
}

/* Icon wrappers */
.modal-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.modal-icon-wrapper svg { width: 28px; height: 28px; }

.success-icon {
  background-color: rgba(34, 197, 94, 0.1);
  color: var(--color-success);
}

.error-icon {
  background-color: rgba(220, 38, 38, 0.1);
  color: var(--color-danger);
}

.modal-alert-message {
  line-height: 1.6;
  color: rgba(13, 27, 42, 0.75);
  font-size: 0.875rem;
}

/* Confirm action buttons */
.modal-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* Payment / plan info cards inside modal */
.plan-summary-card {
  background-color: var(--color-navy);
  color: var(--color-white);
  border-radius: var(--radius-input);
  padding: 1.25rem;
  border: 1px solid rgba(212, 175, 55, 0.3);
  margin-bottom: 1rem;
}

.bank-details-card {
  background-color: var(--color-light);
  border-radius: var(--radius-input);
  padding: 1.25rem;
  border: 1px solid rgba(13, 27, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bank-detail-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bank-detail-row span {
  font-size: 0.72rem;
  color: rgba(13, 27, 42, 0.5);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.bank-detail-row strong {
  font-family: monospace;
  font-size: 1rem;
  color: var(--color-navy);
  word-break: break-all;
  user-select: all;
}

.step-ol {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.step-ol li {
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(13, 27, 42, 0.8);
}
