/* DIGI HAM LINK v62 — phone-size visual reconciliation for Personal AllStarLink.
   CSS only. No radio/PTT/API/Asterisk changes. All selectors are mobile-only,
   and connected-only rules require the preexisting v61 verified state. */
@media screen and (max-width:767px) {
  html body #view-radio:not([hidden]) {
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }
  /* The legacy mobile VFO rules, several desktop patches and v61's card
     protection differ. Give the verified Personal ASL card one flow owner. */
  html body #view-radio.dhl-asl-v61-verified:not([hidden]) > #vfoPanel {
    display:block!important;
    position:relative!important;
    inset:auto!important;
    float:none!important;
    transform:none!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    padding:9px 10px 10px!important;
    margin:0 0 7px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
    isolation:isolate;
  }
  html body #view-radio.dhl-asl-v61-verified > #vfoPanel > * {
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  /* Double-guard the legacy idle VFO on mobile; it is not an active link
     indicator and may be repopulated by the older renderer. */
  html body #view-radio.dhl-asl-v61-verified #vfoPanel #talkingCurrent,
  html body #view-radio.dhl-asl-v61-verified #vfoPanel #talkingStatus,
  html body #view-radio.dhl-asl-v61-verified #vfoPanel .vfoStandby {
    display:none!important;visibility:hidden!important;
    animation:none!important;transition:none!important;
  }
  html body #view-radio.dhl-asl-v61-verified #vfoPanel .vfoTop {
    min-height:30px!important;
    gap:6px!important;
    margin:0 0 5px!important;
    box-sizing:border-box!important;
  }
  html body #view-radio.dhl-asl-v61-verified #vfoPanel #dhl-asl-v48-radio-state {
    width:100%!important;
    max-width:100%!important;
    min-height:0!important;
    height:auto!important;
    padding:7px 8px!important;
    margin:4px 0 7px!important;
    font-size:11px!important;
    line-height:1.4!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  html body #view-radio.dhl-asl-v61-verified #vfoPanel #dhl-asl-v51-connected {
    font-size:clamp(15px,4.5vw,20px)!important;
    line-height:1.2!important;
    text-align:center!important;
    margin:6px auto!important;
    max-width:100%!important;
    overflow-wrap:anywhere!important;
  }
  html body #view-radio.dhl-asl-v61-verified #vfoPanel #dhl-asl-v52-details {
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-height:36px!important;
    height:auto!important;
    max-height:none!important;
    padding:0 8px!important;
    margin:0 0 8px!important;
    overflow:hidden!important;
    position:relative!important;
    inset:auto!important;
    transform:none!important;
  }
  html body #view-radio.dhl-asl-v61-verified #vfoPanel #dhl-asl-v52-details[open] {
    max-height:170px!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
  }
  html body #view-radio.dhl-asl-v61-verified #vfoPanel #dhl-asl-v52-details > summary {
    display:list-item!important;
    min-height:35px!important;
    padding:9px 0!important;
    margin:0!important;
    line-height:1.35!important;
    white-space:normal!important;
    overflow:visible!important;
    font-size:11px!important;
  }
  html body #view-radio.dhl-asl-v61-verified #vfoPanel #dhl-asl-v52-details pre {
    white-space:pre-wrap!important;
    overflow-wrap:anywhere!important;
    max-width:100%!important;
    max-height:110px!important;
    overflow:auto!important;
    font-size:10px!important;
  }
  html body #view-radio.dhl-asl-v61-verified #vfoPanel #dhl-asl-v53-hero {
    position:relative!important;
    inset:auto!important;
    margin:6px 0!important;
    padding:7px 2px!important;
    width:100%!important;
    min-width:0!important;
    min-height:0!important;
    height:auto!important;
    overflow:hidden!important;
    text-align:center!important;
  }
  html body #view-radio.dhl-asl-v61-verified #vfoPanel #dhl-asl-v53-hero > strong {
    display:block;
    font-size:clamp(25px,8.1vw,41px)!important;
    line-height:1.12!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    max-width:100%!important;
  }
  html body #view-radio.dhl-asl-v61-verified #vfoPanel .dhl-v61-call {
    font-size:clamp(25px,8vw,37px)!important;
    line-height:1.12!important;
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  html body #view-radio.dhl-asl-v61-verified #vfoPanel .dhl-v61-node {
    font-size:11px!important;
    line-height:1.35!important;
  }
  html body #view-radio.dhl-asl-v61-verified #vfoPanel #dhl-asl-v57-speaker,
  html body #view-radio.dhl-asl-v61-verified #vfoPanel #dhl-asl-v58-station {
    width:100%!important;
    min-height:45px!important;
    height:48px!important;
    max-height:48px!important;
    margin:2px 0 6px!important;
    overflow:hidden!important;
  }
  html body #view-radio.dhl-asl-v61-verified #vfoPanel .vfoMeter,
  html body #view-radio.dhl-asl-v61-verified #vfoPanel .vfoMeterLabel,
  html body #view-radio.dhl-asl-v61-verified #vfoPanel .vfoMeterTrack {
    position:relative!important;
    inset:auto!important;
    transform:none!important;
    box-sizing:border-box!important;
    max-width:100%!important;
    min-width:0!important;
  }
  html body #view-radio.dhl-asl-v61-verified #vfoPanel .vfoMeter {
    min-height:38px!important;
    height:auto!important;
    margin:6px 0!important;
    padding:3px 0!important;
    overflow:hidden!important;
  }
  /* Mobile v9-v11 intentionally MOVE Last Heard outside VFO. Keep it in
     document flow, not inside the desktop VFO scroll clipping region. */
  html body #view-radio.dhl-asl-v61-verified:not([hidden]) > details.dhl-mobile-lastheard-separate {
    display:block!important;
    position:relative!important;
    inset:auto!important;
    float:none!important;
    transform:none!important;
    flex:0 0 auto!important;
    order:initial!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    max-height:none!important;
    min-height:0!important;
    margin:5px 0 8px!important;
    padding:6px 9px!important;
    overflow:hidden!important;
  }
  html body #view-radio.dhl-asl-v61-verified:not([hidden]) > details.dhl-mobile-lastheard-separate #talkingLast {
    box-sizing:border-box!important;
    width:100%!important;
    max-width:100%!important;
    height:clamp(65px,11dvh,108px)!important;
    min-height:65px!important;
    max-height:108px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
  html body #view-radio.dhl-asl-v61-verified #vfoPanel .dhl-asl-v61-mic-wrap {
    position:relative!important;
    inset:auto!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:34px!important;
    transform:none!important;
    margin:7px 0 0!important;
    box-sizing:border-box!important;
  }
  /* Personal AllStarLink popup fields must not push a narrow viewport wider.
     These are PRESENTATION selectors, never the main Radio PTT handlers. */
  html body #dhl-personal-asl-bridge,
  html body #dhl-personal-asl-bridge input,
  html body #dhl-personal-asl-bridge select {
    box-sizing:border-box!important;
    min-width:0!important;
    max-width:100%!important;
  }
  html body #dhl-personal-asl-bridge input,
  html body #dhl-personal-asl-bridge select {width:100%!important;}
  html body #dhl-personal-asl-bridge button {max-width:100%!important;}
}
