/* ============================================================
   MODAL.CSS — In Full Effect
   Quick-action modal: aanmelden, optie nemen, info aanvragen.
   Triggered from date rows and calendar events.
   ============================================================ */

#quickModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

#quickModal.open {
  display: flex !important;
  animation: fadeIn 0.2s ease;
}

/* ── Overlay ─────────────────────────────────────────────── */
.modal-overlay {
  position: absolute; inset: 0;
  background: rgba(30, 30, 26, 0.75);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

/* ── Panel ───────────────────────────────────────────────── */
.modal-panel {
  position: relative;
  z-index: 1;
  background: var(--bg);
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  margin: 1rem;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.4);
}

/* ── Header ──────────────────────────────────────────────── */
.modal-header {
  background: var(--charcoal);
  padding: 1.75rem 2rem 1.5rem;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: white;
  width: 34px; height: 34px;
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 2px;
  font-family: var(--font-body);
  transition: var(--transition);
}
.modal-close:hover { background: rgba(255, 255, 255, 0.2); }

#mTrainingLabel {
  color: var(--sienna);
  display: block;
  margin-bottom: 0.4rem;
}

#mTrainingName {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 0.9rem;
  padding-right: 2.5rem;
}

#mMeta { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ── Tabs ────────────────────────────────────────────────── */
.modal-tabs {
  display: flex;
  border-bottom: 2px solid var(--stone-light);
  background: white;
}

.modal-tab-btn {
  flex: 1;
  padding: 0.85rem 0.5rem;
  font-size: 0.82rem; font-weight: 600;
  background: transparent; border: none;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--stone);
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  white-space: nowrap;
}
.modal-tab-btn:hover    { color: var(--charcoal); }
.modal-tab-btn.active   { color: var(--sienna); border-bottom-color: var(--sienna); }

/* ── Notice bar ──────────────────────────────────────────── */
#mNotice {
  background: var(--bg-dark);
  padding: 0.8rem 2rem;
  border-left: 3px solid var(--sienna);
  font-size: 0.82rem;
  color: var(--stone);
  line-height: 1.5;
}

/* ── Form body ───────────────────────────────────────────── */
#mFormBody { padding: 1.75rem 2rem; }

.modal-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.modal-form-row .form-group { margin-bottom: 0; }

/* ── Employer checkbox ───────────────────────────────────── */
.modal-employer-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  margin-bottom: 1.5rem;
  color: var(--stone);
}
.modal-employer-check input {
  margin-top: 3px;
  accent-color: var(--sienna);
  flex-shrink: 0;
}

/* ── Submit button ───────────────────────────────────────── */
#mSubmitBtn {
  width: 100%;
  padding: 1rem;
  background: var(--sienna);
  color: white;
  border: none;
  font-family: var(--font-body);
  font-size: 1rem; font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: var(--transition);
}
#mSubmitBtn:hover { background: var(--sienna-dark); }

.modal-fine-print {
  font-size: 0.78rem;
  color: var(--stone);
  text-align: center;
  margin-top: 0.75rem;
  max-width: none;
}

/* ── Success state ───────────────────────────────────────── */
#mSuccess {
  display: none;
  padding: 3rem 2rem;
  text-align: center;
}
.modal-success-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: var(--green);
  display: block;
}
#mSuccess h3    { margin-bottom: 0.75rem; }
#mSuccessText   { max-width: none; font-size: 0.95rem; margin: 0 auto; }

.modal-close-btn {
  margin-top: 1.75rem;
  padding: 0.75rem 2rem;
  background: var(--charcoal);
  color: white;
  border: none;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius);
}


/* ────────────────────────────────────────────────────────────
   RESPONSIVE
   ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .modal-form-row { grid-template-columns: 1fr; }
  .modal-tab-btn  { font-size: 0.72rem; padding: 0.75rem 0.25rem; }
}
