/* SwiftCharge Update 66 — responsive stability and accessible scrolling. */

:root{--sc66-nav-space:calc(96px + env(safe-area-inset-bottom));}
html{scroll-behavior:smooth;overflow-x:hidden;overflow-y:auto;}
body{overflow-x:hidden;overflow-y:auto;}
.page,.portal-shell,.portal-content,.driver-page,.driver-shell,.driver-workspace,#driverSectionContent{min-width:0;}
.swift63-history-card,.data-row,.station-card,.profile-panel{content-visibility:auto;contain-intrinsic-size:auto 90px;}
.sc66-role-list{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0;}
.sc66-role-list>strong{width:100%;font-size:.78rem;text-transform:uppercase;letter-spacing:.05em;color:#756a61;}
.sc66-role-list>span{display:inline-flex;align-items:center;gap:7px;padding:7px 9px 7px 12px;border:1px solid #ded2c1;border-radius:999px;background:#fff8ef;font-weight:750;}
.sc66-remove-role{display:grid;place-items:center;width:24px;height:24px;padding:0;border:0;border-radius:50%;background:#a20d18;color:#fff;font-size:1rem;line-height:1;cursor:pointer;}

@media (max-width:760px){
  html,body,body[data-page="driver"]{height:auto!important;min-height:100%!important;min-height:100dvh!important;overflow-x:hidden!important;overflow-y:auto!important;touch-action:pan-y pinch-zoom!important;}
  body[data-page="driver"] .driver-page,
  body[data-page="driver"] #driverDashboard,
  body[data-page="driver"] .driver-shell{height:auto!important;min-height:100dvh!important;overflow:visible!important;}
  body[data-page="driver"] .driver-workspace{height:auto!important;min-height:calc(100dvh - var(--sc66-nav-space))!important;overflow:visible!important;padding:0 14px var(--sc66-nav-space)!important;}
  body[data-page="driver"] #driverSectionContent{height:auto!important;min-height:0!important;overflow:visible!important;padding-top:10px!important;padding-bottom:8px!important;display:block!important;}
  body[data-page="driver"] .swift64-scroll-page,
  body[data-page="driver"] .swift63-scroll-page,
  body[data-page="driver"] .swift61-history-list,
  body[data-page="driver"] .swift-mobile-list,
  body[data-page="driver"] .swift-account-compact,
  body[data-page="driver"] .swift62-support,
  body[data-page="driver"] .swift62-support-card,
  body[data-page="driver"] .swift-focused-charge-card,
  body[data-page="driver"] .swift-focused-charge-form,
  body[data-page="driver"] .swift-live-session-card{height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;}
  body[data-page="driver"] .swift-mobile-bottom-nav{grid-template-columns:repeat(4,minmax(0,1fr))!important;left:10px!important;right:10px!important;bottom:calc(8px + env(safe-area-inset-bottom))!important;min-height:72px!important;padding:7px!important;border:1px solid rgba(255,255,255,.9)!important;border-radius:36px!important;background:rgba(255,255,255,.97)!important;box-shadow:0 14px 38px rgba(39,34,48,.18)!important;backdrop-filter:blur(18px)!important;-webkit-backdrop-filter:blur(18px)!important;}
  body[data-page="driver"] .swift-mobile-bottom-nav button{min-height:56px!important;border-radius:28px!important;padding:4px 2px!important;}
  body[data-page="driver"] .swift-mobile-bottom-nav button small{font-size:.67rem!important;white-space:nowrap!important;}
  body[data-page="driver"] .swift-mobile-bottom-nav button.active{background:linear-gradient(135deg,#a20d18,#c61625)!important;color:#fff!important;box-shadow:0 7px 20px rgba(162,13,24,.25)!important;}

  body[data-driver-view="map"] .driver-workspace{min-height:100dvh!important;}
  body[data-driver-view="map"] #driverSectionContent{display:flex!important;flex-direction:column!important;min-height:calc(100dvh - var(--sc66-nav-space) - 72px)!important;overflow:visible!important;}
  body[data-driver-view="map"] .swift-map-card{flex:1 1 auto!important;min-height:320px!important;overflow:hidden!important;}
  body[data-driver-view="map"] .swift-map-canvas,
  body[data-driver-view="map"] #chargerMap{height:clamp(320px,55dvh,620px)!important;min-height:320px!important;}
  .swift-map-search{flex:0 0 auto!important;}
  .swift-map-meta-row,.swift-map-filter-row,.swift-map-count{flex:0 0 auto!important;}

  .swift-station-detail{position:fixed!important;inset:0!important;z-index:6000!important;display:flex!important;align-items:flex-end!important;justify-content:center!important;padding:10px 10px calc(92px + env(safe-area-inset-bottom))!important;overflow-y:auto!important;overscroll-behavior:contain!important;}
  .swift-station-sheet{width:min(100%,560px)!important;max-height:calc(100dvh - 112px - env(safe-area-inset-bottom))!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;border-radius:24px!important;}
  .swift-station-photo{flex:0 0 auto!important;min-height:132px!important;height:clamp(132px,21dvh,210px)!important;max-height:210px!important;}
  .swift-station-photo img{width:100%!important;height:100%!important;object-fit:cover!important;}
  .swift-station-body{min-height:0!important;overflow-x:hidden!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;padding:12px 14px 16px!important;}
  .swift-station-sockets{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;overflow:visible!important;}
  .swift-station-socket{min-width:0!important;min-height:58px!important;padding:8px!important;}
  .swift-socket-icon img{width:38px!important;height:38px!important;object-fit:contain!important;}
  .swift-station-info{overflow:visible!important;}
  .swift-station-actions{position:sticky!important;bottom:-16px!important;z-index:2!important;margin:10px -14px -16px!important;padding:10px 14px calc(12px + env(safe-area-inset-bottom))!important;background:linear-gradient(180deg,rgba(255,255,255,.82),#fff 24%)!important;}
  body.swift-station-detail-open{overflow-y:auto!important;}

  .driver-modal{overflow-y:auto!important;padding:12px!important;align-items:flex-start!important;}
  .driver-modal-card{max-height:none!important;margin:auto!important;overflow:visible!important;}
  .auth-card,.signup-success{max-height:none!important;overflow:visible!important;}
  .responsive-table,.table-wrap,.invoice-table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;}
  .portal-content,.portal-content>.card{overflow:visible!important;}
}

@media (max-width:390px){
  body[data-page="driver"] .driver-workspace{padding-left:10px!important;padding-right:10px!important;}
  .swift-station-detail{padding-left:6px!important;padding-right:6px!important;}
  .swift-station-sheet{border-radius:20px!important;}
  .swift-station-socket{font-size:.78rem!important;}
}

@media (min-width:761px){
  .driver-workspace,#driverSectionContent,.portal-content{overflow:visible;}
  .swift-station-sheet{max-height:min(88vh,920px);}
  .swift-station-body{overflow-y:auto;}
}
