/* APPV1_APPOINTMENT_MOBILE_CONSOLIDATED_R7B_20260905
   Single final mobile layout authority for the appointment journey.
   R7A heatmap/data remains authoritative; R7 synthetic question navigation is retired.
*/
@media(max-width:760px){
  /* Questionnaire is a three-row app shell: heading / scrollable choices / action bar. */
  .gt-journey-stage[data-stage="0"].is-active,
  .gt-journey-stage[data-stage="0"].is-active.gt-r7a-question-fit{
    position:relative!important;
    inset:auto!important;
    display:grid!important;
    grid-template-rows:auto minmax(0,1fr) auto!important;
    height:var(--gt-r7a-question-height,calc(100dvh - 150px))!important;
    max-height:var(--gt-r7a-question-height,calc(100dvh - 150px))!important;
    min-height:420px!important;
    overflow:hidden!important;
    padding:44px 0 0!important;
  }
  .gt-journey-stage[data-stage="0"] .gt-journey-copy{
    padding:5px 12px 3px!important;
    margin:0!important;
    min-height:0!important;
  }
  .gt-journey-stage[data-stage="0"] .gt-journey-copy h1{
    font-size:23px!important;
    line-height:1!important;
    margin:2px 0 3px!important;
  }
  .gt-journey-stage[data-stage="0"] .gt-journey-copy p:not(.gt-journey-kicker){
    display:none!important;
  }

  .gt-r7b-question-shell,
  .gt-journey-question-frame.gt-r7b-question-scroll{
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch;
    padding:4px 9px 12px!important;
    scroll-padding-top:4px;
    scroll-padding-bottom:14px;
  }
  .gt-journey-question{
    padding:2px 0 8px!important;
    margin:0!important;
  }
  .gt-journey-question-count{
    font-size:14px!important;
    margin-bottom:2px!important;
  }
  .gt-journey-question h2{
    font-size:22px!important;
    line-height:1.04!important;
    margin:2px 0 6px!important;
  }
  .gt-journey-question p{
    font-size:15px!important;
    margin:0 0 6px!important;
  }

  /* Long option sets (Shapes etc.) stay fully reachable inside the middle row. */
  .gt-journey-options.gt-r7-many-options,
  .gt-journey-options.gt-r7b-many-options{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:5px!important;
    align-content:start!important;
    padding-bottom:4px!important;
  }
  .gt-journey-options.gt-r7-many-options .gt-journey-option,
  .gt-journey-options.gt-r7b-many-options .gt-journey-option{
    min-height:43px!important;
    height:auto!important;
    padding:6px 4px!important;
    font-size:14px!important;
    line-height:1.05!important;
    text-align:center!important;
    justify-content:center!important;
  }

  /* One real action bar; it occupies layout space and never overlays choices. */
  .gt-journey-stage[data-stage="0"]>.gt-journey-stage-footer.gt-r7b-actionbar{
    position:static!important;
    inset:auto!important;
    display:grid!important;
    grid-template-columns:1fr auto 1fr!important;
    gap:6px!important;
    width:100%!important;
    min-height:58px!important;
    height:58px!important;
    margin:0!important;
    padding:7px 9px!important;
    background:rgba(255,253,248,.99)!important;
    border-top:1px solid #e4d7c2!important;
    box-shadow:0 -5px 16px rgba(23,59,99,.045)!important;
    z-index:10!important;
  }
  .gt-r7b-actionbar button{
    min-height:44px!important;
    height:44px!important;
    margin:0!important;
    padding:7px 10px!important;
    font-size:15px!important;
    border-radius:10px!important;
  }
  .gt-r7b-actionbar [data-r7b-back]{justify-self:stretch}
  .gt-r7b-actionbar [data-r7b-next]{justify-self:stretch}
  .gt-r7b-actionbar [data-r7b-skip]{
    min-width:64px!important;
    background:#fff!important;
    color:#736a5d!important;
    border:1px solid #ddd2c1!important;
  }
  .gt-r7b-actionbar [hidden]{display:none!important}

  /* Hide obsolete per-question Continue buttons on mobile; footer is the authority. */
  .gt-journey-question>[data-question-next]{
    display:none!important;
  }

  /* Keep R7A heatmap/date-time screen compact and usable. */
  .gt-calendar-stage.is-active,
  .gt-calendar-stage.is-active.gt-r5-one-screen{
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    padding-bottom:56px!important;
  }
  .gt-r4-calendar-scheduler,
  .gt-r4-calendar-card,
  .gt-r4-times-card,
  .gt-calendar-times,
  .gt-calendar-time-grid{
    overflow:visible!important;
    max-height:none!important;
  }
  .gt-calendar-time-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
  .gt-r4-after-hours{
    overflow:visible!important;
    max-height:none!important;
  }

  /* Appointment list / detail / manage / reschedule / cancel / messages. */
  .gt-customer-portal,
  .gt-appt-manage-page,
  .gt-portal-shell{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
    box-sizing:border-box!important;
  }
  .gt-appt-manage-grid,
  .gt-appointment-list{
    grid-template-columns:1fr!important;
    width:100%!important;
    gap:9px!important;
  }
  .gt-customer-portal .gt-card,
  .gt-appt-manage-page .gt-card{
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  .gt-appt-field,
  .gt-appt-field input,
  .gt-appt-field select,
  .gt-appt-field textarea{
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  .gt-appt-field input,
  .gt-appt-field select{
    min-height:46px!important;
    font-size:16px!important;
  }
  .gt-appt-field textarea{
    min-height:96px!important;
    font-size:16px!important;
  }
  .gt-appt-actions,
  .gt-appt-calendar-links,
  .gt-r5b-confirm-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:6px!important;
  }
  .gt-appt-actions a,.gt-appt-actions button,
  .gt-appt-calendar-links a,.gt-appt-calendar-links button,
  .gt-r5b-confirm-actions a,.gt-r5b-confirm-actions button{
    min-height:44px!important;
    font-size:14px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
  }

  /* Auth handoff is bounded by the phone viewport. */
  .gt-r4-auth-dialog{
    width:calc(100vw - 14px)!important;
    max-width:calc(100vw - 14px)!important;
    max-height:calc(100dvh - 14px)!important;
    overflow-y:auto!important;
    padding:13px!important;
    box-sizing:border-box!important;
  }
  .gt-r4-auth-dialog iframe{
    width:100%!important;
    max-width:100%!important;
    min-height:410px!important;
    border:0!important;
  }
}

@media(max-width:350px){
  .gt-journey-options.gt-r7-many-options,
  .gt-journey-options.gt-r7b-many-options{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .gt-calendar-time-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}
