/* v38 – painel de entrega em três níveis, sem alterar o mapa nem a navegação. */
.map-v7-page .v38-sheet {
  /* O CSS legado para <=520px usa transform:none e o swipe usa
     position:relative, empurrando o painel metade da tela para direita. */
  position:absolute!important;
  transform:translateX(-50%)!important;
  width:min(calc(100% - 20px),740px)!important;
  max-width:calc(100vw - 20px)!important;
  margin:0!important;
  left:50%!important;right:auto!important;
  bottom:calc(75px + env(safe-area-inset-bottom));
  padding:0 14px 12px!important;border-radius:23px 23px 17px 17px;
  background:#fff;border:1px solid #e4eaf0;
  box-shadow:0 -8px 32px rgba(6,31,65,.17);
  overflow:hidden;transition:max-height .25s ease,box-shadow .2s ease;
  touch-action:pan-y;
}
.map-v7-page .v38-sheet.v38-level-0 {max-height:128px!important;padding-bottom:10px!important}
.map-v7-page .v38-sheet.v38-level-1 {max-height:min(52dvh,510px)!important}
.map-v7-page .v38-sheet.v38-level-2 {max-height:69dvh!important}
.v38-sheet .v7-sheet-toggle {
  display:grid;grid-template-columns:minmax(0,1fr) 26px;
  width:100%;padding:18px 5px 8px;
  gap:6px;min-height:72px;text-align:left;border:0;
  background:#fff;color:#112d4b;cursor:pointer;
}
.v38-sheet .v7-handle {top:7px;left:50%;width:46px;height:5px;background:#d6dfeb;border-radius:6px}
.v38-sheet .v38-summary {display:flex;flex-direction:column;gap:3px;min-width:0}
.v38-sheet .v38-heading {font-size:10px;line-height:1.15;font-weight:900;letter-spacing:.065em;color:#6687a8}
.v38-sheet .v38-next-address {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:clamp(15px,4.6vw,20px);line-height:1.23;color:#102941}
.v38-sheet .v38-mini-meta {display:flex;align-items:center;gap:7px;min-width:0;white-space:nowrap}
.v38-sheet .v38-pill {display:inline-block;max-width:65%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:3px 8px;border-radius:9px;background:#ecf3ff;color:#1d5aa8;font-size:10px;font-weight:700}
.v38-sheet .v38-pill b{font-weight:900}
.v38-sheet .v38-comp {display:block;min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;color:#54697f;font-size:11px;font-weight:650}
.v38-sheet .v38-chevron{align-self:center;text-align:center;font-size:22px;font-weight:500;color:#8a9bad}
/* Nos níveis expandidos o endereço já aparece no cartão; não repetir
   cabeçalho gigante e preservar área do mapa. */
.v38-sheet.v38-level-1 .v7-sheet-toggle,
.v38-sheet.v38-level-2 .v7-sheet-toggle {min-height:45px;padding:17px 5px 6px}
.v38-sheet.v38-level-1 .v38-next-address,
.v38-sheet.v38-level-2 .v38-next-address {display:none}
.v38-sheet.v38-level-1 .v38-summary,
.v38-sheet.v38-level-2 .v38-summary {justify-content:center}
.v38-sheet.v38-level-1 .v38-heading,
.v38-sheet.v38-level-2 .v38-heading {font-size:11px}

.v38-sheet .v7-sheet-body {overflow-y:auto;overscroll-behavior:contain;padding:3px 3px 5px;scrollbar-width:thin}
.v38-sheet.v38-level-0 .v7-sheet-body {display:none!important}
.v38-sheet.v38-level-1 .v7-sheet-body {display:block!important;max-height:calc(min(52dvh,510px) - 55px)}
.v38-sheet.v38-level-2 .v7-sheet-body {display:block!important;max-height:calc(69dvh - 55px)}
.v38-sheet.v38-level-1 .v38-mini-meta,.v38-sheet.v38-level-2 .v38-mini-meta{display:none}
.v38-sheet .v38-detail{padding:3px 3px 12px;color:#122d49}
.v38-detail .v38-row-top{display:flex;justify-content:space-between;gap:8px;color:#6682a0;font-weight:850;font-size:10px;letter-spacing:.045em}
.v38-detail h2{margin:7px 0 12px;color:#102941;font-size:clamp(21px,6vw,27px);line-height:1.12;letter-spacing:-.035em;overflow-wrap:anywhere}
.v38-package-block {border:1px solid #c9dff7;background:#f0f6ff;border-radius:14px;padding:11px 13px;margin-bottom:9px;display:flex;flex-direction:column;gap:6px}
.v38-package-block small{font-size:10px;font-weight:850;color:#517bb0;letter-spacing:.03em}
.v38-package-block strong{font-size:clamp(18px,5vw,24px);letter-spacing:.02em;color:#1557a5;overflow-wrap:anywhere}
.v38-address-extra{display:flex;align-items:baseline;gap:7px;padding:5px 2px;font-size:12px;min-width:0}
.v38-address-extra strong{font-size:11px;color:#596d82;min-width:82px}
.v38-address-extra span{color:#102941;overflow-wrap:anywhere}
.v38-notes{border-left:3px solid #e2b869;background:#fff9ec;padding:8px 10px;margin:8px 0;border-radius:0 8px 8px 0;font-size:12px;color:#5a492f}
.v38-notes>strong{display:block;margin-bottom:4px}
.v38-notes p{margin:4px 0}
.v38-actions{display:grid;grid-template-columns:1fr 1fr 1fr;gap:7px;margin-top:11px}
.v38-actions button{min-width:0;min-height:57px;border:1px solid #dbe4ed;border-radius:13px;padding:7px 5px;font-size:clamp(10px,2.8vw,13px);font-weight:850;line-height:1.15;white-space:normal}
.v38-actions .v38-navigate{background:#1775ee;border-color:#1775ee;color:#fff}
.v38-actions .v38-fail{background:#fff4f1;color:#9b3c32;border-color:#efd9d4}
.v38-actions .v38-deliver{background:#eaf8eb;color:#1c743c;border-color:#cce8d1}
.v38-tools{display:flex;align-items:center;justify-content:space-between;gap:7px;margin-top:9px;color:#8a9aaa;font-size:10px}
.v38-tools button{font-size:11px;font-weight:750;border:0;border-radius:9px;padding:8px;background:#f0f4f8;color:#47627c}
.v38-list{border-top:1px solid #e2e9ef;padding-top:10px}
.v38-list header{display:flex;justify-content:space-between;gap:8px;align-items:center;padding:4px 3px 8px;font-size:12px;color:#17304e}
.v38-list header span{font-size:10px;color:#7489a0}
.v38-list .v38-list-item{display:grid;grid-template-columns:32px minmax(0,1fr) 14px;align-items:start;gap:9px;padding:10px 6px;border:0;border-top:1px solid #edf1f5;background:#fff;width:100%;text-align:left;color:#14304f}
.v38-list .v38-list-item.is-current{background:#f2f7fe}
.v38-list-item>b{display:grid;place-items:center;width:29px;height:29px;border-radius:10px;background:#e7f0ff;color:#2168bf;font-weight:900;font-size:13px}
.v38-list-item>span{display:block;min-width:0}
.v38-list-item strong{display:block;font-size:12px;line-height:1.24;overflow-wrap:anywhere}
.v38-list-item small{display:block;margin-top:4px;font-size:10px;line-height:1.5;color:#76899c}
.v38-list-item small .v38-pill{font-size:9px;max-width:100%}
.v38-list-item i{font-style:normal;font-size:22px;color:#7f93a6}
.v38-sheet .v38-finished{padding:14px;font-weight:750}
.map-stop-marker.v38-done-number,.map-stop-marker.done.v38-done-number{
  width:23px;height:23px;background:#edf0f4!important;border:2px solid #bcc6d1!important;
  color:#7d8a9a!important;opacity:.48!important;box-shadow:none!important;
  filter:grayscale(1);font-size:10px!important;font-weight:800;pointer-events:auto
}
.map-stop-marker.v38-done-number.active{width:23px;height:23px}
@media(max-width:400px){
 .map-v7-page .v38-sheet{bottom:calc(72px + env(safe-area-inset-bottom))}
 .v38-sheet .v38-next-address{font-size:16px}
 .v38-address-extra{font-size:11px}
 .v38-detail h2{font-size:21px}
}
@media(prefers-reduced-motion:reduce){.map-v7-page .v38-sheet{transition:none!important}}
