.crm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.crm-modal {
  background: #fff;
  position: relative;
  max-width: 980px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden !important; /* Disable scrolling on the modal itself */
  padding: 0 !important;
}

.crm-modal .form_grid {
  grid-template-columns: 1fr 1fr;
}

.crm-modal-header {
  padding: 30px 30px 10px 30px;
  position: relative;
  flex-shrink: 0;
}

.crm-modal-body {
  padding: 0 30px 20px 30px;
  overflow-y: auto !important; /* Force overflow */
  flex-grow: 1;
  -webkit-overflow-scrolling: touch; /* Better scrolling on iOS */
  touch-action: pan-y; /* Allow vertical panning, but let browser handle it */
}

/* Ensure parents don't collapse */
.crm-modal-backdrop, .crm-modal {
  pointer-events: auto;
}

.crm-modal-footer {
  padding: 20px 30px 30px 30px;
  border-top: 1px solid #eee;
  flex-shrink: 0;
}

.crm-modal-close {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  z-index: 10;
  width: 48px;
  height: 48px;
}

body.crm-modal-open {
  overflow: hidden !important;
}

.crm-step-indicator {
  display: flex;
  justify-content: space-between;
  margin: 36px 0 18px 0;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.crm-step-item {
  color: #ccc;
  font-weight: bold;
  font-size: 14px;
  position: relative;
  padding-bottom: 5px;
}

.crm-step-item.active {
  color: #000;
}

.crm-step-item.completed {
  color: green;
}

.crm-step-item.active::after {
  content: '';
  position: absolute;
  bottom: -11px;
  left: 0;
  right: 0;
  height: 2px;
  background: #000;
}

#crm-selected-exam-box {
  background: #f5f5f5;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.summary-section {
  background: #f5f5f5;
  padding: 15px;
  border-radius: 4px;
}

.crm-form-step .form_field-wrapper {
  margin-bottom: 15px;
}

.crm-form-step .form_field-label {
  font-weight: bold;
  margin-bottom: 5px;
}

.crm-error-box {
  background: #fee2e2;
  border: 1px solid #ef4444;
  color: #b91c1c;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 4px;
  display: none;
}

.crm-error-text {
  color: #ef4444;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.academy-date_item + .academy-date_item {
  margin-top: 6px;
}

.academy-date_link {
  justify-content: left;
  text-align: left;
  font-weight: bold;
}

.academy-date_link .academy-date_availability {
  margin-left: 0;
  margin-right: .25rem;
}

.form-item-star {
  color: #ef4444;
  font-weight: bold;
  margin-left: 0.25rem;
}

.academy-location {
  font-size: 13px;
  font-weight: normal;
}
