/* ── MEDICAL FORM MODAL ── */
.mf-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7,15,26,0.88);
  z-index: 1000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2rem 1rem;
  backdrop-filter: blur(4px);
}
.mf-overlay.open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.mf-modal {
  background: #0e1e30;
  border: 1px solid rgba(30,115,190,0.3);
  border-radius: 8px;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  animation: mfSlideIn .22s ease;
}
@keyframes mfSlideIn {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Header */
.mf-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.8rem 2rem 1.4rem;
  border-bottom: 1px solid rgba(30,115,190,0.18);
}
.mf-header-inner { flex: 1; }
.mf-badge {
  display: inline-block;
  font-family: 'Roboto Mono', monospace;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #00d68f;
  border: 1px solid rgba(0,214,143,0.35);
  border-radius: 3px;
  padding: .2rem .6rem;
  margin-bottom: .7rem;
}
.mf-title {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #e8f0f8;
  margin: 0 0 .4rem;
  line-height: 1.3;
}
.mf-subtitle {
  font-size: .78rem;
  color: #8aaccc;
  margin: 0;
  line-height: 1.55;
}
.mf-close {
  background: none;
  border: 1px solid rgba(30,115,190,0.2);
  color: #8aaccc;
  border-radius: 3px;
  width: 32px;
  height: 32px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.mf-close:hover { border-color: #1e73be; color: #fff; }

/* Body */
.mf-body { padding: 1.6rem 2rem 2rem; }

/* Questions */
.mf-questions {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mf-question {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: .95rem 0;
  border-bottom: 1px solid rgba(30,115,190,0.1);
}
.mf-question:last-child { border-bottom: none; }
.mf-q-text {
  font-size: .84rem;
  color: #b0c8e0;
  line-height: 1.55;
  margin: 0;
  flex: 1;
}
.mf-q-num {
  font-family: 'Roboto Mono', monospace;
  font-size: .75rem;
  color: #8aaccc;
  margin-right: .4rem;
}
.mf-radio-group {
  display: flex;
  gap: .6rem;
  flex-shrink: 0;
  padding-top: .1rem;
}
.mf-radio-label {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  font-weight: 700;
  color: #8aaccc;
  cursor: pointer;
  padding: .3rem .65rem;
  border: 1px solid rgba(30,115,190,0.2);
  border-radius: 3px;
  transition: all .15s;
  white-space: nowrap;
}
.mf-radio-label input[type="radio"] {
  accent-color: #00d68f;
  cursor: pointer;
  width: 14px;
  height: 14px;
}
.mf-radio-label:has(input:checked) {
  border-color: rgba(30,115,190,0.5);
  color: #b0c8e0;
  background: rgba(30,115,190,0.08);
}
.mf-radio-label.mf-yes:has(input:checked) {
  border-color: rgba(245,149,0,0.5);
  color: #f59500;
  background: rgba(245,149,0,0.08);
}
.mf-radio-label:hover { border-color: rgba(30,115,190,0.4); color: #b0c8e0; }

/* Physician block */
.mf-physician-block {
  display: none;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(245,149,0,0.07);
  border: 1px solid rgba(245,149,0,0.3);
  border-radius: 6px;
  padding: 1.4rem 1.5rem;
  margin-top: 1.4rem;
}
.mf-physician-block.visible { display: flex; }
.mf-physician-icon {
  font-size: 1.4rem;
  color: #f59500;
  flex-shrink: 0;
  line-height: 1;
  padding-top: .1rem;
}
.mf-physician-content { flex: 1; }
.mf-physician-title {
  font-family: 'Open Sans', sans-serif;
  font-size: .95rem;
  font-weight: 800;
  color: #f59500;
  margin: 0 0 .5rem;
}
.mf-physician-text {
  font-size: .82rem;
  color: #b0c8e0;
  line-height: 1.65;
  margin: 0 0 1rem;
}
.mf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(245,149,0,0.12);
  border: 1px solid rgba(245,149,0,0.4);
  color: #f59500;
  border-radius: 3px;
  padding: .5rem 1.1rem;
  font-family: 'Open Sans', sans-serif;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all .2s;
}
.mf-download-btn:hover {
  background: rgba(245,149,0,0.2);
  border-color: #f59500;
  color: #ffb733;
}

/* Declaration */
.mf-declare-block {
  margin-top: 1.6rem;
  padding: 1rem 1.2rem;
  background: rgba(0,214,143,0.05);
  border: 1px solid rgba(0,214,143,0.2);
  border-radius: 5px;
}
.mf-declare-label {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  cursor: pointer;
  font-size: .84rem;
  color: #b0c8e0;
  line-height: 1.5;
  font-weight: 600;
}
.mf-declare-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #00d68f;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: .1rem;
}

/* Footer */
.mf-footer {
  margin-top: 1.4rem;
  display: flex;
  justify-content: flex-end;
}
.mf-proceed-btn {
  background: #00d68f;
  color: #070f1a;
  border: none;
  border-radius: 4px;
  padding: .75rem 2rem;
  font-family: 'Open Sans', sans-serif;
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .04em;
  cursor: pointer;
  transition: all .2s;
}
.mf-proceed-btn:disabled {
  background: rgba(0,214,143,0.2);
  color: rgba(7,15,26,0.4);
  cursor: not-allowed;
}
.mf-proceed-btn:not(:disabled):hover {
  background: #00f0a0;
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .mf-overlay { padding: 0; align-items: flex-end; }
  .mf-modal { border-radius: 8px 8px 0 0; max-width: 100%; }
  .mf-header { padding: 1.4rem 1.2rem 1.1rem; }
  .mf-body { padding: 1.2rem 1.2rem 1.6rem; }
  .mf-question { flex-direction: column; gap: .7rem; }
  .mf-radio-group { align-self: flex-start; }
}

/* ── Participant info block ── */
.mf-participant-block {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding: 1.2rem 1.4rem;
  background: rgba(37,160,232,0.05);
  border: 1px solid rgba(37,160,232,0.18);
  border-radius: 6px;
  margin-bottom: 1.4rem;
}
.mf-participant-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem;
}
.mf-field { display: flex; flex-direction: column; gap: .4rem; }
.mf-field-label {
  font-family: 'Roboto Mono', monospace;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #8aaccc;
}
.mf-input {
  background: rgba(14,30,48,0.8);
  border: 1px solid rgba(30,115,190,0.3);
  border-radius: 4px;
  color: #e8f0f8;
  font-family: 'Open Sans', sans-serif;
  font-size: .84rem;
  padding: .55rem .8rem;
  transition: border-color .15s;
  width: 100%;
  box-sizing: border-box;
}
.mf-input::placeholder { color: rgba(138,172,204,0.4); }
.mf-input:focus { outline: none; border-color: rgba(37,160,232,0.6); }
.mf-input:valid:not(:placeholder-shown) { border-color: rgba(0,214,143,0.4); }

/* ── Note ── */
.mf-note {
  font-size: .8rem;
  color: #8aaccc;
  margin: 0 0 1.2rem;
  padding: .7rem 1rem;
  background: rgba(37,160,232,0.06);
  border-left: 2px solid rgba(37,160,232,0.3);
  border-radius: 0 3px 3px 0;
}

/* ── Inline box sections ── */
.mf-box {
  display: none;
  margin: 0 0 .5rem 1rem;
  border: 1px solid rgba(37,160,232,0.25);
  border-top: none;
  border-radius: 0 0 6px 6px;
  animation: mfBoxIn .2s ease;
}
@keyframes mfBoxIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mf-box.mf-box-visible { display: block; }
.mf-box-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1.2rem;
  background: rgba(37,160,232,0.08);
  border-bottom: 1px solid rgba(37,160,232,0.18);
}
.mf-box-key {
  font-family: 'Roboto Mono', monospace;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #25a0e8;
}
.mf-box-sub { font-size: .75rem; color: #8aaccc; font-weight: 600; }
.mf-box-question { padding-left: 1.2rem; padding-right: 1.2rem; }
.mf-box-question:last-child { border-bottom: none; }

/* ── Signature block ── */
.mf-signature-block {
  margin-top: 1.4rem;
  padding: 1.2rem 1.4rem;
  background: rgba(0,214,143,0.04);
  border: 1px solid rgba(0,214,143,0.2);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.mf-signature-input {
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  font-style: italic;
  border-color: rgba(0,214,143,0.25);
}
.mf-signature-input:focus { border-color: rgba(0,214,143,0.5); }
.mf-sig-note {
  font-size: .73rem;
  color: #8aaccc;
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .mf-participant-row { grid-template-columns: 1fr; }
  .mf-box { margin-left: 0; }
}

/* Medical declaration inline links */
a.open-medical {
  color: var(--active, #25a0e8);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color .15s;
}
a.open-medical:hover {
  color: var(--electric, #00bfff);
  text-decoration-style: solid;
}
