/* Patient page: the questionnaire on the left, the pedigree on the right. */
/* the whole width of the screen, with a margin on each side */
.patient-page { padding: 0 24px; max-width: 2400px; margin: 0 auto; }
@media (max-width: 600px) { .patient-page { padding: 0 12px; } }

/* the patient's own fields: name, date of birth, sex */
.patient-identity { grid-template-columns: 2fr 1.2fr 1.4fr; align-items: start; }
.patient-identity .pt-label { display: block; margin: 0 0 3px; font-size: 12px; font-weight: 600; color: #3d5368; }
.patient-identity .pt-radios { min-height: 34px; }
@media (max-width: 600px) { .patient-identity { grid-template-columns: 1fr 1fr; } .patient-identity .pt-field:first-child { grid-column: 1 / -1; } }

/* "Avez-vous des enfants ?" and "Combien ?" side by side, above the cards */
.patient-question { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 40px; margin-bottom: 6px; }
.patient-question > br { display: none; }
.patient-question .input-group { max-width: 200px; }
.pq-yesno .question { margin-bottom: 4px; }
.pq-yesno .radio-inline:first-of-type { padding-left: 20px; }

.patient-intro { padding: 0 6px; color: #3d5368; font-size: 13px; }

#live_pedigree { padding-top: 20px; }
#live_pedigree .live-pedigree-help { padding: 0 6px; color: #3d5368; font-size: 13px; }
#live_pedigree #pedigree svg { max-width: 100%; }
.live-pedigree-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 20px; }
.live-pedigree-buttons .btn { white-space: normal; }
/* a preview: only "centre" and "full screen" are kept */
#pedigree_history .fa-undo, #pedigree_history .fa-repeat, #pedigree_history .fa-refresh { display: none; }

/* wide screens: the pedigree stays in view while the patient scrolls the questionnaire */
@media (min-width: 1200px) {
  /* columns as tall as the questionnaire, so the pedigree column has room to stay in view */
  #patient_layout { display: flex; }
  #patient_layout::before, #patient_layout::after { display: none; }
  /* the drawing's height is computed so that the whole column fits the screen (drawPatientPedigree) */
  #live_pedigree { position: sticky; top: 0; }
  #show_pedigree { display: none; }
}

/* small screens: the pedigree is below; a button brings it into view */
@media (max-width: 1199px) {
  #show_pedigree {
    position: fixed; right: 16px; bottom: 16px; z-index: 50;
    border-radius: 22px; padding: 10px 16px; box-shadow: 0 2px 8px rgba(0, 46, 93, .35);
  }
  #show_pedigree.pedigree-in-view { display: none; }
}
