
/* TT 4.2: panel lateral real (PC) y hoja inferior desplazable (móvil).
   Se conservan los mismos nodos del planificador para no duplicar eventos. */
:root{--tt-sheet-height:78px}
.app-shell{position:fixed!important;z-index:7;inset:0!important;display:grid!important;
 grid-template-columns:clamp(290px,24vw,355px) minmax(0,1fr)!important;
 grid-template-rows:minmax(0,1fr)!important;gap:0!important;pointer-events:auto!important;}
.app-shell>.sidebar{display:flex!important;position:relative!important;inset:auto!important;
 width:calc(100% - 10px)!important;height:calc(100dvh - 20px)!important;max-height:calc(100dvh - 20px)!important;
 margin:10px 0 10px 10px!important;transform:none!important;overflow:hidden!important;
 border-radius:18px!important;z-index:5;box-shadow:none!important;
 background:rgba(55,62,67,.96)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
.app-shell>.map-frame{position:relative!important;inset:auto!important;width:auto!important;
 height:calc(100dvh - 20px)!important;min-height:0!important;min-width:0!important;
 margin:10px 10px 10px 0!important;grid-column:2;grid-row:1;border-radius:18px!important;}
.app-shell>.ads-sidebar{display:none!important} /* Vacío; nunca sacrificar mapa por un espacio sin anuncio */
.app-shell>.sidebar .sidebar-main{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;}
.app-shell>.sidebar .tt-sidebar-privacy{flex-shrink:0}
.app-shell>.sidebar .brand2{padding:8px 11px!important;background:rgba(106,114,119,.47);}
.app-shell>.sidebar .brandrow{display:flex;min-height:46px;justify-content:space-between;gap:10px}
.app-shell>.sidebar .brandmark,.app-shell>.sidebar .brandname,.app-shell>.sidebar .branddesc{display:none!important}
#ttSidebarHome,#ttSidebarCollapse{display:inline-flex;align-items:center;justify-content:center;
 width:40px;height:40px;border:0;border-radius:11px;color:#edf3f5;
 background:transparent;cursor:pointer;padding:7px;}
#ttSidebarHome svg,#ttSidebarCollapse svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#ttSidebarHome:hover,#ttSidebarCollapse:hover{background:rgba(255,255,255,.12)}
#ttSidebarHome:focus-visible,#ttSidebarCollapse:focus-visible{outline:2px solid #a7d9ed;outline-offset:2px}
#ttSidebarCollapse{margin-left:auto}
/* Los pasos ya no ocupan el panel; las alternativas siguen disponibles. */
.tt-journey-safety-compact{margin:9px 0 7px;color:#b9c6ca;font-size:10px;line-height:1.5}
.tt-journey-result{margin-top:9px;padding-top:10px}
#ttSidebarExpand,#ttSidebarBackdrop{display:none!important}
/* El catalogo sigue accesible desde "Ver rutas" en el inicio, sin duplicarlo aqui. */
.app-shell>.sidebar #ttRoutesOpen{display:none!important}
body.map-mode-active .map-frame>.tt-map-home{display:none!important}
/* 3D en la esquina superior y debajo el selector del tema. */
body.map-mode-active .map-frame #ttMapStylePicker{top:14px!important;right:14px!important;z-index:220!important;}
body.map-mode-active .map-frame #globalThemeToggle{top:67px!important;right:14px!important;z-index:220!important;}
body.map-mode-active .map-frame #themeToggle{display:none!important}
/* El botón de la barra lateral sólo compacta el menú; el mapa nunca queda detrás del panel. */
body.tt-side-compact .app-shell{grid-template-columns:66px minmax(0,1fr)!important}
body.tt-side-compact .sidebar-main,body.tt-side-compact .tt-sidebar-privacy{display:none!important}
body.tt-side-compact .app-shell>.sidebar .brandrow{flex-direction:column;align-items:center;justify-content:flex-start}
body.tt-side-compact #ttSidebarCollapse{margin-left:0}
body.tt-side-compact .app-shell>.sidebar .brand2{padding:10px 5px!important}
/* El componente móvil usa el mismo formulario y resultado que el panel de escritorio. */
#ttSheetGrip{display:none}
@media(max-width:760px){
 :root{--tt-sheet-height:78px}
 .app-shell{display:block!important;position:fixed!important;inset:0!important;overflow:hidden!important}
 /* El mapa conserva un lienzo estable mientras el panel inferior se arrastra.
    El panel cubre la zona inferior, sin provocar WebGL resize por cada pixel. */
 .app-shell>.map-frame{position:absolute!important;inset:0 0 78px 0!important;
   width:100%!important;height:calc(100dvh - 78px)!important;min-height:0!important;
   margin:0!important;border:0!important;border-radius:0!important;}
 .app-shell>.sidebar{position:absolute!important;z-index:350!important;inset:auto 0 0 0!important;
   width:100%!important;height:var(--tt-sheet-height)!important;max-height:95dvh!important;
   margin:0!important;
   border-radius:19px 19px 0 0!important;border:1px solid rgba(235,242,247,.24)!important;
   border-bottom:0!important;box-shadow:0 -12px 36px rgba(11,17,22,.24)!important;
   background:#4b5257!important;transition:height .26s cubic-bezier(.2,.76,.2,1)!important;}
 body.tt-sheet-dragging .app-shell>.sidebar{transition:none!important}
 .app-shell>.sidebar .brand2{display:none!important}
 .app-shell>.sidebar .sidebar-main{padding:10px 14px 22px!important;flex:1;min-height:0;
  overflow-y:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
 .app-shell>.sidebar .tt-sidebar-privacy{display:none!important}
 body.tt-sheet-peek .app-shell>.sidebar .sidebar-main{visibility:hidden;pointer-events:none}
 #ttSheetGrip{display:flex;position:relative;flex:none;flex-direction:column;align-items:center;
   justify-content:flex-start;gap:7px;height:45px;padding:9px 12px 5px;
   box-sizing:border-box;color:#e6ecef;cursor:grab;touch-action:none;user-select:none;
   -webkit-user-select:none}
 body.tt-sheet-dragging #ttSheetGrip{cursor:grabbing}
 #ttSheetGrip .tt-sheet-handle{display:block;width:64px;height:6px;border-radius:10px;
   background:rgba(231,236,240,.70);box-shadow:0 1px 3px #10191f4a;}
 #ttSheetGrip .tt-sheet-hint{font-size:11px;font-weight:750;line-height:1.2;letter-spacing:.015em;opacity:.88}
 body:not(.tt-sheet-peek) #ttSheetGrip .tt-sheet-hint{display:none}
 #ttSidebarHome,#ttSidebarCollapse{display:none!important}
 body.map-mode-active .map-frame>.tt-map-home{display:flex!important;top:13px!important;left:12px!important}
 body.map-mode-active .map-frame #ttMapStylePicker{top:12px!important;right:12px!important}
 body.map-mode-active .map-frame #globalThemeToggle{top:64px!important;right:12px!important}
 #ttLiveControls{bottom:12px!important;z-index:215}
 .app-shell>.sidebar .tt-journey-panel{margin-bottom:13px}
 .app-shell>.sidebar .tt-journey-choices{margin-bottom:12px}
 .app-shell>.sidebar .tt-journey-options{grid-template-columns:1fr!important}
 body.tt-side-compact .app-shell{display:block!important}
}
@media(prefers-reduced-motion:reduce){.app-shell>.sidebar{transition:none!important}}

/* TT 8.3.9 · Panel inferior realmente opaco en los dos temas.
   Las reglas de base.css para body:not(.dark-mode) .sidebar usan rgba();
   impedir que vuelvan a transparentar el panel sobre el mapa. */
@media (max-width:760px){
 body:not(.dark-mode) .app-shell > .sidebar,
 body.dark-mode .app-shell > .sidebar,
 body.dark .app-shell > .sidebar{
   background:#454d53!important;
   background-color:#454d53!important;
   opacity:1!important;
   filter:none!important;
   backdrop-filter:none!important;
   -webkit-backdrop-filter:none!important;
   background-image:none!important;
   isolation:isolate;
 }
 body.tt-nearby-sheet .app-shell > .sidebar #ttNearbyPanel{
   background:#485158!important;
   background-image:none!important;
   backdrop-filter:none!important;
   -webkit-backdrop-filter:none!important;
 }
}
