/* BMSDock Start UI
   Owns Welcome, file loading and onboarding/start-guide layout.
   Feature Card geometry is owned by feature-cards-ui.css.
   Typography is owned by start-typography.css. */

.welcome-overlay{
  position:absolute;
  inset:0;
  z-index:650;
  display:none;
  align-items:flex-start;
  justify-content:center;
  padding:52px 18px 22px;
  color:#fff;
  text-align:center;
  background:rgba(18,26,32,.50);
  backdrop-filter:blur(13px) saturate(.9);
  -webkit-backdrop-filter:blur(13px) saturate(.9);
  overflow-y:auto;
  overflow-x:hidden;
}
.welcome-overlay.show{display:flex}
.map-card.welcome-active .right-tools{display:none!important}
.map-card.welcome-active #infoBtn,.map-card.welcome-active #donateBtn{display:none!important}
.welcome-overlay::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(8,14,20,.28),rgba(8,14,20,.08) 46%,rgba(8,14,20,.30));
  pointer-events:none;
}
.welcome-content{
  position:relative;
  z-index:1;
  width:min(520px,calc(100% - 34px));
  margin-top:4px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
}
.welcome-logo{
  width:min(330px,100%);
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto 2px;
}
.welcome-logo-img{
  width:100%;
  max-width:330px;
  height:auto;
  display:block;
  object-fit:contain;
}
.welcome-mission{
  margin:0;
  max-width:330px;
  color:rgba(255,255,255,.86);
  font-size:14px;
  line-height:1.28;
  font-weight:900;
  text-shadow:0 2px 10px rgba(0,0,0,.35);
}
.welcome-actions{
  width:min(330px,100%);
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:8px;
}
.welcome-demo-btn{
  min-height:48px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:16px;
  background:rgba(19,27,35,.72);
  color:#fff;
  font-size:14px;
  font-weight:900;
  box-shadow:0 5px 18px rgba(0,0,0,.25);
  backdrop-filter:blur(3px);
  -webkit-backdrop-filter:blur(3px);
}
.welcome-demo-btn:active{transform:scale(.97)}
.welcome-demo-btn.loading{opacity:.68;pointer-events:none}
.welcome-upload-btn{background:rgba(10,186,181,.86)}
.welcome-close{
  position:absolute;
  right:14px;
  top:14px;
  z-index:2;
  width:38px;
  height:38px;
  border:0;
  border-radius:50%;
  background:rgba(19,27,35,.72);
  color:#fff;
  font-size:28px;
  line-height:38px;
  font-weight:900;
  box-shadow:0 4px 16px rgba(0,0,0,.28);
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
}
.welcome-status{
  min-height:18px;
  color:rgba(255,255,255,.82);
  font-size:12px;
  font-weight:800;
}
@media (max-width:520px){.welcome-overlay{padding-top:48px}
.welcome-logo{font-size:38px}
.welcome-content{width:min(430px,calc(100% - 20px))}
.welcome-actions{gap:9px;width:min(320px,100%)}
.welcome-mission{font-size:13px}
.welcome-demo-btn{min-height:46px;font-size:13px;border-radius:15px}}


.start-guide-panel{
  display:none;
  box-sizing:border-box;
  min-height:230px;
  padding:16px 18px 10px;
}
.start-guide-panel.active{
  display:block;
}
.start-guide-tab{
  display:none;
  height:230px;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  text-align:left;
}
.start-guide-tab.active{
  display:block;
}
.start-guide-tab h2{
  margin:2px 0 14px;
  text-align:center;
  font-size:20px;
  line-height:1.15;
  font-weight:850;
  letter-spacing:-.03em;
  color:#0f172a;
}
.start-guide-tab ol{
  margin:0;
  padding:0 0 0 22px;
  color:#475569;
  font-size:14px;
  line-height:1.55;
  font-weight:650;
}
.start-guide-tab li{
  margin:8px 0;
}
@media (max-width:420px){.start-guide-panel{min-height:220px;padding:14px 16px 8px;}
.start-guide-tab{height:220px;}
.start-guide-tab h2{font-size:18px;margin-bottom:12px;}
.start-guide-tab ol{font-size:13px;line-height:1.5;}
.start-guide-tab li{margin:7px 0;}}


.start-guide-support{
  height:260px;
  padding:0 2px 6px;
}
.start-guide-support h2{
  color:#0f172a;
}
.start-support-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  
  
  
  border:0;
  border-radius:999px;
  background:linear-gradient(135deg,#22c55e,#16a34a);
  color:#fff;
  
  
  letter-spacing:-.01em;
  box-shadow:0 12px 24px rgba(22,163,74,.24);
  cursor:pointer;
}
.start-support-btn:active{transform:translateY(1px);}
@media (max-width:520px){.start-guide-support{height:260px;}}
.start-guide-support{
  text-align:center;
}
.start-guide-tab{
  scrollbar-gutter:stable;
}
.start-guide-support{
  box-sizing:border-box;
  padding-right:22px !important;
  padding-left:2px !important;
  scrollbar-gutter:stable;
}
.start-guide-support::-webkit-scrollbar{
  width:8px;
}
.start-guide-support::-webkit-scrollbar-track{
  background:transparent;
}
.start-guide-support::-webkit-scrollbar-thumb{
  background:rgba(100,116,139,.28);
  border-radius:999px;
}
.start-guide-support .support-lead,
.start-guide-support .support-note{
  max-width:min(700px, calc(100% - 10px));
}
.start-guide-support .support-grid{
  width:min(100%, 540px);
  margin-left:auto !important;
  margin-right:auto !important;
}
.start-guide-support .support-grid > div{
  box-sizing:border-box;
  max-width:520px;
}
@media (max-width:520px){.start-guide-support{
    padding-right:18px !important;
  }
.start-guide-support .support-grid{
    width:calc(100% - 2px);
  }}
.trip-chart-card.onboarding-mode .start-guide-tab{
  overflow-y:auto;
}
@media (max-width:520px){.trip-chart-card.onboarding-mode .start-guide-panel{
    min-height:calc(var(--onboarding-tab-height) + 14px) !important;
  }
.trip-chart-card.onboarding-mode .start-guide-tab{
    height:var(--onboarding-tab-height) !important;
    min-height:var(--onboarding-tab-height) !important;
    max-height:var(--onboarding-tab-height) !important;
  }}
.trip-chart-card.onboarding-mode .start-guide-tab{
  min-height: calc(var(--onboarding-info-min-height) - 42px) !important;
  height: auto !important;
  max-height: none !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  text-align: left !important;
}
.trip-chart-card.onboarding-mode .start-guide-tab h2{
  text-align: left !important;
  margin: 0 0 22px !important;
  font-size: 28px !important;
  line-height: 1.12 !important;
}
.trip-chart-card.onboarding-mode .start-guide-tab ol{
  text-align: left !important;
}
.trip-chart-card.onboarding-mode .start-guide-support{
  display: none;
  min-height: calc(var(--onboarding-info-min-height) - 42px) !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 0 !important;
  text-align: left !important;
}
.trip-chart-card.onboarding-mode .start-guide-support.active{
  display: block !important;
}
.start-guide-support .support-grid,
.start-guide-support .support-lead,
.start-guide-support .support-note{
  display: none !important;
}


@media (max-width: 760px){
.trip-chart-card.onboarding-mode .start-guide-tab h2{
    font-size: 24px !important;
  }

}
@media (max-width: 520px){
.trip-chart-card.onboarding-mode .start-guide-tab h2{
    font-size: 22px !important;
    margin-bottom: 16px !important;
  }


}
.trip-chart-card.onboarding-mode .start-guide-tab,
.trip-chart-card.onboarding-mode .start-guide-support{
  text-align: left !important;
  padding: 0 !important;
}
.trip-chart-card.onboarding-mode .start-guide-tab h2,
.trip-chart-card.onboarding-mode .start-guide-support h2{
  text-align: left !important;
  margin: 0 0 14px !important;
  color: #0f172a !important;
}
.trip-chart-card.onboarding-mode .start-guide-tab ol{
  margin: 0 !important;
  padding-left: 22px !important;
  color: #475569 !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  font-weight: 600 !important;
}
.trip-chart-card.onboarding-mode .start-guide-tab li{
  margin: 8px 0 !important;
}
.start-guide-support .support-text-flow{
  max-width: 820px !important;
  margin:0 0 14px !important;
  color: #475569 !important;
  font-size: 14.5px !important;
  line-height: 1.48 !important;
  font-weight: 560 !important;
  text-align: left !important;
}
.start-guide-support .support-text-flow p{
  margin: 0 0 12px !important;
}
.start-guide-support .support-text-flow p:last-child{
  margin-bottom: 0 !important;
}
.start-guide-support .support-text-flow strong{
  color: #0f172a !important;
  font-weight: 720 !important;
}
.start-guide-support .start-support-btn{
  margin: 14px auto 14px !important;
  min-height: 44px !important;
  padding: 0 24px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
}
@media (max-width: 760px){.trip-chart-card.onboarding-mode .start-guide-panel{
    padding: 18px 26px 18px !important;
  }
.trip-chart-card.onboarding-mode .start-guide-tab h2,
  .trip-chart-card.onboarding-mode .start-guide-support h2{
    margin-bottom: 13px !important;
  }
.start-guide-support .support-text-flow{
    font-size: 14px !important;
    line-height: 1.46 !important;
  }}
@media (max-width: 520px){.trip-chart-card.onboarding-mode .start-guide-panel{
    padding: 16px 18px 16px !important;
  }
.trip-chart-card.onboarding-mode .start-guide-tab,
  .trip-chart-card.onboarding-mode .start-guide-support{
    height: calc(var(--onboarding-info-height) - 32px) !important;
    min-height: calc(var(--onboarding-info-height) - 32px) !important;
    max-height: calc(var(--onboarding-info-height) - 32px) !important;
  }
.trip-chart-card.onboarding-mode .start-guide-tab h2,
  .trip-chart-card.onboarding-mode .start-guide-support h2{
    margin-bottom: 12px !important;
  }
.trip-chart-card.onboarding-mode .start-guide-tab ol{
    font-size: 13px !important;
    line-height: 1.46 !important;
  }
.start-guide-support .support-text-flow{
    font-size: 13px !important;
    line-height: 1.42 !important;
    
  }
.start-guide-support .support-text-flow p{
    margin-bottom: 10px !important;
  }
.start-guide-support .start-support-btn{
    width: min(100%, 300px) !important;
    min-height: 42px !important;
    font-size: 14px !important;
    padding: 0 16px !important;
  }}


.welcome-logo-img{margin-top:-18px !important;}


.trip-chart-card.onboarding-mode .start-guide-panel{
  padding:20px 36px 0 !important;
}
.trip-chart-card.onboarding-mode .start-guide-tab,
.trip-chart-card.onboarding-mode .start-guide-support{
  overflow:visible !important;
}
@media (max-width:760px){.trip-chart-card.onboarding-mode .start-guide-panel{
    padding:18px 26px 0 !important;
  }}
@media (max-width:520px){.trip-chart-card.onboarding-mode .start-guide-panel{
    padding:16px 18px 0 !important;
  }}
.trip-chart-card.onboarding-mode .start-guide-panel{
  box-sizing:border-box !important;
  height:var(--bms-support-panel-height) !important;
  min-height:var(--bms-support-panel-height) !important;
  max-height:var(--bms-support-panel-height) !important;
  overflow:hidden !important;
}
.trip-chart-card.onboarding-mode .start-guide-tab,
.trip-chart-card.onboarding-mode .start-guide-support{
  box-sizing:border-box !important;
  height:100% !important;
  min-height:100% !important;
  max-height:100% !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
}
.trip-chart-card.onboarding-mode.bms-measuring-support .start-guide-panel{
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  overflow:visible !important;
}
.trip-chart-card.onboarding-mode.bms-measuring-support .start-guide-support{
  display:block !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  overflow:visible !important;
}
.file-loading-panel{
  box-sizing:border-box;
  width:calc(100% - 12px);
  height:24px;
  min-height:24px;
  max-height:24px;
  margin:0 auto 10px;
  padding:4px 0;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:visible;
}
.file-loading-track{
  position:relative;
  width:100%;
  height:16px;
  overflow:hidden;
  border:1px solid transparent;
  border-radius:8px;
  background:transparent;
  box-shadow:none;
  opacity:0;
  transition:opacity .12s ease, background-color .12s ease, border-color .12s ease;
}
.file-loading-panel.is-active .file-loading-track{
  opacity:1;
  border-color:rgba(233,201,58,.62);
  background:#f7edbd;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.22),0 3px 10px rgba(0,0,0,.14);
}
.file-loading-bar{
  position:absolute;
  inset:0 auto 0 0;
  z-index:1;
  display:block;
  width:0%;
  height:100%;
  border-radius:inherit;
  background:#E9C93A;
  transition:width .16s ease;
}
.file-loading-text{
  position:absolute;
  inset:0;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  padding:0 12px;
  overflow:hidden;
  color:#201600;
  font-size:12px;
  line-height:16px;
  font-weight:400;
  white-space:nowrap;
  text-overflow:ellipsis;
  text-align:center;
  text-shadow:0 1px 0 rgba(255,255,255,.38);
  pointer-events:none;
}
.file-loading-panel.is-indeterminate .file-loading-bar{
  width:42%!important;
  animation:bmsFileLoadingIndeterminate 1.1s ease-in-out infinite;
}
.file-loading-panel.is-error .file-loading-bar{background:#ef4444}
.file-loading-panel.is-complete .file-loading-bar{background:#E9C93A}
@media (prefers-reduced-motion:reduce){.file-loading-panel.is-indeterminate .file-loading-bar{animation:none}}
@media (max-width:520px){.file-loading-panel{margin-bottom:9px;}}


@media (max-width:520px){.welcome-content{
    gap:10px !important;
  }
.welcome-actions{
    margin-top:5px !important;
  }}
.map-card.welcome-active .welcome-content,
.map-card.welcome-active .start-language-switch,
.map-card.welcome-active .welcome-close,
.map-card.welcome-active .welcome-actions,
.map-card.welcome-active .file-loading-panel{
  pointer-events:auto !important;
}
.trip-chart-card.onboarding-mode{
  position:relative !important;
  z-index:120010 !important;
}
.map-card.welcome-active{
  position:relative !important;
  height:auto !important;
  min-height:0 !important;
  overflow:visible !important;
  z-index:auto !important;
}
.map-card.welcome-active #map{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  min-height:100% !important;
}
.map-card.welcome-active .welcome-overlay{
  position:relative !important;
  inset:auto !important;
  width:100% !important;
  height:auto !important;
  min-height:0 !important;
  box-sizing:border-box !important;
  display:flex !important;
  overflow:visible !important;
  pointer-events:auto !important;
  z-index:120000 !important;
  overscroll-behavior:contain !important;
  scroll-padding-bottom:max(28px,calc(env(safe-area-inset-bottom) + 20px));
  padding:
    max(52px, calc(env(safe-area-inset-top) + 28px))
    18px
    max(30px, calc(env(safe-area-inset-bottom) + 18px)) !important;
}
.map-card.welcome-active .welcome-content{
  pointer-events:auto !important;
  flex:0 1 auto !important;
  padding-bottom:4px;
}
.map-card.welcome-active .welcome-actions{
  flex:0 0 auto;
}
.map-card.welcome-active .welcome-overlay::before{
  position:absolute !important;
  inset:0 !important;
}
body:has(.map-card.welcome-active) .sheet{
  margin-top:0 !important;
  border-radius:0 !important;
}
body:has(.map-card.welcome-active) .trip-chart-card.onboarding-mode{
  position:relative !important;
  z-index:auto !important;
  isolation:auto !important;
}
@media (max-width:520px){.map-card.welcome-active{
    height:auto !important;
    min-height:0 !important;
  }
.map-card.welcome-active .welcome-overlay{
    padding-top:max(48px, calc(env(safe-area-inset-top) + 24px)) !important;
  }}
.map-card.welcome-active .welcome-overlay{
  padding-bottom:0 !important;
}
.map-card.welcome-active .file-loading-panel{
  flex:0 0 24px !important;
  height:24px !important;
  min-height:24px !important;
  max-height:24px !important;
  margin:0 auto !important;
  padding:4px 0 !important;
}
.map-card.welcome-active .welcome-status:empty{
  display:none !important;
}
@media (max-width:520px){.map-card.welcome-active .welcome-overlay{
    padding-bottom:0 !important;
  }
.map-card.welcome-active .file-loading-panel{
    margin:0 auto !important;
  }}


/* Welcome/FileLoading mobile regression safeguards. */

@media (max-width: 700px){
  
  

  

  

  
  

  

  /* The fourth Welcome action and FileLoading block must remain fully visible. */
  #welcomeOverlay .welcome-actions,
  #welcomeOverlay .welcome-content,
  #welcomeOverlay .welcome-panel {
    overflow: visible !important;
  }

  #welcomeOverlay .file-loading-progress,
  #welcomeOverlay .file-loading-progress-track,
  #welcomeOverlay .file-loading-bar {
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* Welcome/FileLoading mobile geometry safeguards. */

@media (max-width: 700px){
  /* Restore normal Welcome button box behavior and centered label. */
  #welcomeOverlay #welcomeUploadBtn {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 0 !important;
    text-align: center !important;
  }

  
  

  
  

  
  

  

  /* Restore the original FileLoading flex geometry. */
  #welcomeOverlay .file-loading-panel {
    display: flex !important;
    position: relative !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    overflow: visible !important;
  }

  #welcomeOverlay .file-loading-panel[hidden] {
    display: none !important;
  }

  #welcomeOverlay .file-loading-track {
    visibility: visible !important;
  }

  #welcomeOverlay .file-loading-panel.is-active .file-loading-track {
    opacity: 1 !important;
  }

  #welcomeOverlay .file-loading-bar {
    visibility: visible !important;
  }
}

/* UI 1.9.27 — Support Spacing Polish: 14px above and below the Support CTA. */

/* UI 1.9.28 — Support Spacing Consistency: canonical Support rules; redundant legacy reassignments removed. */
