/* PayAfterCure responsive patch v2.
   REPLACE the entire previous PAC responsive patch with this file.
   Illness selection only: questionnaire table layout is untouched. */
#frm_illness { max-width: 100%; }
#frm_illness * { box-sizing: border-box; }
@media screen and (max-width: 767px) {
  #frm_illness table,
  #frm_illness tbody,
  #frm_illness tr {
    display: block;
    width: 100% !important;
    max-width: 100%;
  }
  #frm_illness table td {
    display: block;
    width: 100% !important;
    max-width: 100%;
    float: none !important;
    padding: 0 !important;
  }
  #frm_illness table td > label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 48px;
    margin: 0 0 8px;
    padding: 12px;
    border: 1px solid #d3d9df;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.45;
    cursor: pointer;
  }
  #frm_illness .hv-name {
    display: block;
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
  }
  #frm_illness input[type="radio"] {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    float: none !important;
    margin: 2px 0 0 !important;
  }
  #frm_illness input:focus-visible {
    outline: 3px solid #2367a6;
    outline-offset: 3px;
  }
}

.pac-srf-page #frm_illness fieldset { border:0; padding:0; margin:0; min-width:0; }
.pac-srf-page #frm_illness legend { font-weight:700; font-size:1.1rem; }
.pac-srf-page :focus-visible,.pac-portal-page :focus-visible {outline:3px solid #2367a6;outline-offset:3px;}
.pac-srf-page input[type=text],.pac-srf-page textarea,.pac-srf-page select,
.pac-portal-page input,.pac-portal-page textarea,.pac-portal-page select {max-width:100%;box-sizing:border-box;}
.pac-srf-page .pac-table-scroll,.pac-portal-page .pac-table-scroll {max-width:100%;overflow-x:auto;}
.pac-portal-page #case-update-grid img {max-width:100%;height:auto;}
@media(max-width:767px){
 .pac-srf-page #progressbar {display:flex;flex-wrap:wrap;gap:8px;overflow:visible;}
 .pac-srf-page #progressbar li {float:none;width:auto;flex:1 1 90px;font-size:12px;}
 .pac-srf-page #progressbar li:after {display:none;}
 .pac-srf-page #frm_questions,.pac-portal-page #frm-portal {font-size:16px;}
 .pac-srf-page #frm_questions table,.pac-portal-page #frm-portal table {width:100%!important;table-layout:fixed;}
 .pac-srf-page #frm_questions td,.pac-portal-page #frm-portal td {white-space:normal;overflow-wrap:anywhere;padding:8px;}
 .pac-srf-page button,.pac-srf-page input[type=button],.pac-portal-page button {min-height:44px;max-width:100%;}
}

@media print {
 body.pac-printing * {visibility:hidden;}
 body.pac-printing #prescription_div,body.pac-printing #prescription_div * {visibility:visible;}
 body.pac-printing #prescription_div {display:block!important;position:absolute;top:0;left:0;width:100%;}
 body.pac-printing #removePrint {display:none!important;}
}

/* Package 3: narrowly scoped reflow; hidden questions remain hidden. */
.pac-srf-page #frm_questions,.pac-portal-page #frm-portal {font:16px/1.5 Arial,Helvetica,sans-serif;max-width:100%;}
.pac-srf-page #frm_questions *,.pac-portal-page #frm-portal *{box-sizing:border-box;}
.pac-srf-page #frm_questions textarea,.pac-srf-page #frm_questions select,.pac-srf-page #frm_questions input[type=text],.pac-srf-page #frm_questions input[type=number]{max-width:100%;min-height:44px;font-size:16px;}
.pac-srf-page #frm_questions .checkbox_row_single{display:flex!important;align-items:flex-start;gap:8px;min-height:44px;margin:0 0 6px;}
.pac-srf-page #frm_questions .checkbox_row_single input{float:none!important;flex:0 0 20px;width:20px;height:20px;margin:11px 0 0!important;}
.pac-srf-page #frm_questions .checkbox_row_single label{float:none!important;margin:0!important;min-height:44px;padding:9px 4px;line-height:1.5;font-size:16px;cursor:pointer;}
.pac-step-summary{font:600 16px/1.4 Arial,Helvetica,sans-serif;margin:12px 0;}
.pac-history-sort{display:none;}
.pac-portal-page #case-update-grid td{overflow-wrap:anywhere;vertical-align:top;}
@media(max-width:600px){
 .pac-srf-page #frm_questions .pac-question-row:not(.hide){display:grid;grid-template-columns:minmax(0,1fr);margin:0 0 18px;border:1px solid #d6dde3;border-radius:8px;}
 .pac-srf-page #frm_questions .pac-question-row>td{display:block;width:100%!important;max-width:100%;border:0!important;padding:10px!important;}
 .pac-srf-page #frm_questions .pac-question-row>.hv-FixWidth{font-weight:600;background:#f5f7f9;}
 .pac-srf-page #frm_questions .pac-question-row>.hv-FixWidth span{float:none!important;font-size:16px;}
 .pac-srf-page #frm_questions .Hv-HalfWidth{width:100%!important;float:none!important;}
 .pac-srf-page #frm_questions textarea{width:100%!important;min-height:110px;}
 .pac-portal-page .pac-history-sort{display:flex;align-items:center;gap:10px;margin:12px 0;flex-wrap:wrap;}
 .pac-portal-page .pac-history-sort select{min-height:44px;font-size:16px;max-width:100%;}
 .pac-portal-page #case-update-grid{display:block!important;width:100%!important;border:0;}
 .pac-portal-page #case-update-grid thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);}
 .pac-portal-page #case-update-grid tbody{display:block;width:100%;}
 .pac-portal-page #case-update-grid tbody tr{display:block;border:1px solid #d6dde3;border-radius:8px;margin:0 0 16px;background:#fff!important;}
 .pac-portal-page #case-update-grid tbody td{display:block!important;width:100%!important;max-width:100%;border:0!important;border-bottom:1px solid #edf0f3!important;padding:10px!important;font-size:16px!important;}
 .pac-portal-page #case-update-grid tbody td::before{content:attr(data-pac-label);display:block;font-weight:700;color:#333;margin-bottom:4px;}
 .pac-portal-page #case-update-grid-div .pac-table-scroll{overflow:visible;}
 .pac-portal-page .dataTables_wrapper .dataTables_paginate{display:flex;justify-content:center;gap:4px;flex-wrap:wrap;}
 .pac-portal-page .dataTables_wrapper .paginate_button{min-height:44px;min-width:44px;}
}
@media(prefers-reduced-motion:reduce){.pac-srf-page #progressbar li,.pac-portal-page .pac-feedback-choice{transition:none!important;animation:none!important;}}

.pac-srf-page .pac-answer-confirmation{border:0;padding:12px 0;margin:0;}
.pac-srf-page .pac-answer-confirmation legend{font-size:16px;font-weight:600;}
.pac-srf-page .pac-answer-confirmation label{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:8px 12px;margin-right:8px;cursor:pointer;}

/* SRF mobile repair: all stages remain visible; completed numbers turn green. */
.pac-srf-page #progressbar{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;width:100%;padding:0!important;margin:20px 0 28px!important;overflow:visible!important;list-style:none;position:relative;isolation:isolate;}
.pac-srf-page #progressbar::before{content:"";display:block;position:absolute;left:10%;right:10%;top:17px;height:2px;background:#ef8f00;z-index:0;pointer-events:none;}
.pac-srf-page #progressbar > li{z-index:1;}
.pac-srf-page #progressbar li,.pac-srf-page #progressbar li[aria-current=step]{display:block!important;float:none!important;position:relative;width:auto!important;min-width:0;margin:0;padding:0!important;font:12px/1.3 Arial,Helvetica,sans-serif;text-align:center;text-transform:none;overflow-wrap:anywhere;}
.pac-srf-page #progressbar li::before,.pac-srf-page #progressbar li::after{content:none!important;display:none!important;}
.pac-srf-page .pac-step-number{display:flex;align-items:center;justify-content:center;width:36px;height:36px;margin:0 auto 8px;border-radius:5px;background:#ef8f00;color:#17202b;font-size:18px;font-weight:700;}
.pac-srf-page .pac-step-complete .pac-step-number{background:#24783c;color:#fff;}
.pac-srf-page .pac-step-label{display:block;}
.pac-srf-page #progressbar li[aria-current=step] .pac-step-label{font-weight:700;}
.pac-srf-page #frm_questions{width:100%;padding-top:20px;}
.pac-srf-page .pac-patient-picker{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:12px;align-items:start;margin:16px 0;}
.pac-srf-page .pac-patient-picker>div{min-width:0;}
.pac-srf-page .pac-question-table{width:100%;border-collapse:collapse;table-layout:fixed;}
.pac-srf-page .pac-question-table .hv-FixWidth{width:35%;vertical-align:top;}
.pac-srf-page .pac-question-table .hv-FixWidth-content{width:65%;vertical-align:top;}
.pac-srf-page .pac-question-table td{padding:12px;border-bottom:1px solid #d6dde3;}
.pac-srf-page .pac-category-heading{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:10px;background:#e8f0f5;}
.pac-srf-page .pac-category-heading a,.pac-srf-page .pac-clear-answers{cursor:pointer;}
.pac-srf-page .pac-field-help{display:block;font-size:14px;font-weight:400;margin-top:6px;}
.pac-srf-page #frm_questions [data-pac-bmi]{font-weight:700;font-style:normal;background:#f5f7f9;}
.pac-srf-page .pac-questionnaire-score,.pac-srf-page .pac-questionnaire-score *{font-style:normal!important;}
@media(max-width:767px){
 .pac-srf-page #progressbar{gap:3px;}
 .pac-srf-page #progressbar li,.pac-srf-page #progressbar li[aria-current=step]{font-size:11px;}
 .pac-srf-page .pac-step-number{width:32px;height:32px;font-size:17px;}
 .pac-srf-page #progressbar::before{top:15px;}
 .pac-srf-page .pac-patient-picker{grid-template-columns:minmax(0,1fr);}
 .pac-srf-page #frm_questions .pac-question-table,.pac-srf-page #frm_questions .pac-question-table>tbody{display:block!important;width:100%!important;max-width:100%;}
 .pac-srf-page #frm_questions .pac-question-table tr{width:100%!important;max-width:100%;}
 .pac-srf-page #frm_questions .pac-category-row{display:block;}
 .pac-srf-page #frm_questions .pac-category-row>td{display:block;width:100%!important;padding:0!important;}
 .pac-srf-page #frm_questions .pac-question-row:not(.hide){display:grid;grid-template-columns:minmax(0,1fr);box-sizing:border-box;width:100%!important;max-width:100%;margin:0 0 16px;border:1px solid #d6dde3;border-radius:8px;overflow:hidden;}
 .pac-srf-page #frm_questions .pac-question-row>td{display:block;box-sizing:border-box;width:100%!important;max-width:100%;border:0!important;padding:12px!important;}
 .pac-srf-page #frm_questions .pac-question-row>.hv-FixWidth{background:#f5f7f9;font-weight:600;}
 .pac-srf-page #frm_questions select,.pac-srf-page #frm_questions textarea,.pac-srf-page #frm_questions input[type=text]{width:100%!important;max-width:100%;}
 .pac-srf-page #frm_questions [name=time_spent]{width:auto!important;}
 .pac-srf-page #frm_questions .checkbox_row_single label{flex:1;min-width:0;}
}

/* PAC: make account links identifiable; compact the closed mobile menu. */
.pac-srf-page a[href*="wp-login.php"],
.pac-portal-page .nologin-text a[href*="wp-login.php"] {
  color:#005ea8 !important;
  text-decoration:underline !important;
  text-underline-offset:3px;
  background:transparent !important;
}
.pac-srf-page a[href*="wp-login.php"]:hover,
.pac-portal-page .nologin-text a[href*="wp-login.php"]:hover {
  color:#003e73 !important;
}
@media screen and (max-width:767px) {
  .pac-srf-page .header-row-3,
  .pac-portal-page .header-row-3 {margin-bottom:12px;}
  .pac-srf-page .header-row-3 .navbar,
  .pac-portal-page .header-row-3 .navbar {
    min-height:44px; margin:0; padding:0;
    border:0 !important; background:transparent !important;
    box-shadow:none !important;
  }
  .pac-srf-page .header-row-3 .navbar-header,
  .pac-portal-page .header-row-3 .navbar-header {
    float:right; width:auto; margin:0; padding:0;
  }
  .pac-srf-page .header-row-3 .navbar-toggle,
  .pac-portal-page .header-row-3 .navbar-toggle {
    float:none; min-width:44px; min-height:44px; margin:0; padding:10px;
  }
  .pac-srf-page .header-row-3 .navbar-collapse,
  .pac-portal-page .header-row-3 .navbar-collapse {
    clear:both; width:100%; margin:0; box-sizing:border-box;
  }
}
