/* =========================================================
   TeďTo RC12.12.2 · Quick launcher alignment hotfix
   Final override layer loaded after Pilot Ready.
   ========================================================= */

/* The central + must feel like an action, not an unexplained icon. */
body.ui-refresh-v2 .bottom-nav button.nav-create[data-quick-launcher]{
  position:relative;
  overflow:visible;
}
body.ui-refresh-v2 .bottom-nav button.nav-create[data-quick-launcher]::after{
  content:"Přidat";
  position:absolute;
  left:50%;
  top:calc(100% + 5px);
  transform:translateX(-50%);
  color:var(--tedto-purple,#6b43f4);
  font-size:10px;
  line-height:1;
  font-weight:800;
  white-space:nowrap;
  pointer-events:none;
}

/* Clearer three-way global launcher. */
body.ui-refresh-v2 .one-tedto-launcher>section{
  background:var(--tedto-surface,#fff);
  color:var(--tedto-text,#111729);
  border:1px solid var(--tedto-line,#e2e6ef);
}
body.ui-refresh-v2 .one-tedto-launcher>section>header{
  background:color-mix(in srgb,var(--tedto-surface,#fff) 96%,transparent);
}
body.ui-refresh-v2 .one-tedto-launcher-grid>article{
  position:relative;
  box-shadow:0 10px 28px rgba(27,34,63,.055);
}
/* app.css styles every launcher header as space-between; card headers must stay left aligned. */
body.ui-refresh-v2 .one-tedto-launcher-grid article>header{
  justify-content:flex-start!important;
  text-align:left!important;
}
body.ui-refresh-v2 .one-tedto-launcher-grid article>header>div{
  flex:1 1 auto;
  min-width:0;
  text-align:left!important;
}
body.ui-refresh-v2 .one-tedto-launcher-grid article>header h3{
  margin:0!important;
  text-align:left!important;
}
body.ui-refresh-v2 .one-tedto-launcher-grid article>p{
  margin:9px 0 13px;
}
body.ui-refresh-v2 .one-tedto-launcher-grid article>div{
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
}
body.ui-refresh-v2 .one-tedto-launcher-grid article>div>a.primary{
  min-height:42px;
  font-size:10px;
}
body.ui-refresh-v2 .one-tedto-launcher-grid article>div>a:not(.primary){
  border-color:transparent;
  background:transparent;
  color:var(--tedto-purple,#6b43f4);
  padding-inline:7px;
  white-space:nowrap;
}
body.ui-refresh-v2 .one-tedto-launcher>section>footer{
  justify-content:space-between;
}
body.ui-refresh-v2 .one-tedto-launcher>section>footer>div{
  display:flex;
  min-width:0;
  align-items:center;
  gap:9px;
}
body.ui-refresh-v2 .one-tedto-launcher>section>footer>a{
  flex:0 0 auto;
  color:var(--tedto-purple,#6b43f4);
  font-size:10px;
  font-weight:900;
  text-decoration:none;
  white-space:nowrap;
}

/* Mobile: lift the sheet almost to the top and keep its header visible. */
@media(max-width:760px){
  body.ui-refresh-v2 .quick-launcher-sheet{
    align-items:flex-start!important;
    justify-content:center!important;
    padding:max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom))!important;
  }
  body.ui-refresh-v2 .one-tedto-launcher>section{
    width:100%!important;
    max-height:calc(100dvh - max(16px,env(safe-area-inset-top)) - max(16px,env(safe-area-inset-bottom)))!important;
    margin:0!important;
    border-radius:23px!important;
    overflow:auto!important;
    overscroll-behavior:contain;
    box-shadow:0 24px 70px rgba(8,12,28,.38)!important;
  }
  body.ui-refresh-v2 .one-tedto-launcher>section>header{
    position:sticky;
    top:0;
    z-index:4;
    padding:15px 14px 12px!important;
    border-bottom:1px solid var(--tedto-line,#e2e6ef)!important;
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
  }
  body.ui-refresh-v2 .one-tedto-launcher>section>header small{
    font-size:8px;
  }
  body.ui-refresh-v2 .one-tedto-launcher>section>header h2{
    font-size:21px!important;
    letter-spacing:-.45px;
  }
  body.ui-refresh-v2 .one-tedto-launcher>section>header p{
    max-width:30ch;
    margin-top:3px;
    font-size:10px!important;
    line-height:1.35;
  }
  body.ui-refresh-v2 .one-tedto-launcher>section>header>button{
    flex:0 0 38px;
    width:38px;
    height:38px;
  }
  body.ui-refresh-v2 .one-tedto-launcher-grid{
    padding:10px!important;
    gap:8px!important;
  }
  body.ui-refresh-v2 .one-tedto-launcher-grid>article{
    padding:11px!important;
    border-radius:16px!important;
  }
  body.ui-refresh-v2 .one-tedto-launcher-grid article>header{
    gap:9px;
  }
  body.ui-refresh-v2 .one-tedto-launcher-grid article>header>span{
    width:40px;
    height:40px;
    border-radius:12px;
  }
  body.ui-refresh-v2 .one-tedto-launcher-grid article>header small{
    display:none;
  }
  body.ui-refresh-v2 .one-tedto-launcher-grid article h3{
    font-size:15px;
  }
  body.ui-refresh-v2 .one-tedto-launcher-grid article>p{
    margin:7px 0 9px!important;
    color:var(--tedto-muted,#6f7890);
    font-size:9px;
    line-height:1.35;
  }
  body.ui-refresh-v2 .one-tedto-launcher-grid article>div,
  body.ui-refresh-v2 .one-tedto-launcher-grid article>div.help-actions{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
    width:100%;
  }
  body.ui-refresh-v2 .one-tedto-launcher-grid article>div>a,
  body.ui-refresh-v2 .one-tedto-launcher-grid article>div.help-actions>a:first-child{
    grid-column:auto!important;
    width:100%;
    min-width:0;
    min-height:42px;
    padding:8px 9px;
    border-radius:12px;
    font-size:9.5px;
    line-height:1.2;
    white-space:normal;
  }
  body.ui-refresh-v2 .one-tedto-launcher-grid article>div>a.primary{
    min-height:42px;
    font-size:10px;
  }
  body.ui-refresh-v2 .one-tedto-launcher-grid article>div>a:not(.primary){
    border:1px solid color-mix(in srgb,var(--tedto-purple,#6b43f4) 26%,var(--tedto-line,#e2e6ef))!important;
    background:var(--tedto-surface,#fff)!important;
    color:var(--tedto-purple,#6b43f4)!important;
  }
  body.ui-refresh-v2 .one-tedto-launcher>section>footer{
    position:sticky;
    bottom:0;
    z-index:4;
    padding:10px 12px calc(10px + env(safe-area-inset-bottom))!important;
    background:color-mix(in srgb,var(--tedto-surface-2,#f7f8fc) 96%,transparent)!important;
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
  }
  body.ui-refresh-v2 .one-tedto-launcher>section>footer p{
    font-size:8px;
    line-height:1.3;
  }
  body.ui-refresh-v2 .one-tedto-launcher>section>footer>a{
    font-size:9px;
  }
}

@media(max-width:340px){
  body.ui-refresh-v2 .one-tedto-launcher-grid article>p{display:none}
  body.ui-refresh-v2 .one-tedto-launcher-grid article>div,
  body.ui-refresh-v2 .one-tedto-launcher-grid article>div.help-actions{grid-template-columns:1fr!important}
}

/* Dark mode completion: older modules still used literal white backgrounds. */
html[data-theme="dark"] body.ui-refresh-v2{
  --surface:#0c111c;
  --surface-soft:#111827;
  --card:#0f1724;
  --card-soft:#151e2d;
  --line:#273247;
  --text:#f3f6fc;
  --muted:#93a0b5;
}
html[data-theme="dark"] body.ui-refresh-v2 .screen{
  background-color:var(--tedto-app-bg,#070b13)!important;
  color:var(--tedto-text,#f4f6fb)!important;
}
html[data-theme="dark"] body.ui-refresh-v2 .screen :where(section,article,aside,form,div)[class*="card"],
html[data-theme="dark"] body.ui-refresh-v2 .screen :where(section,article,aside,form,div)[class*="panel"],
html[data-theme="dark"] body.ui-refresh-v2 .screen :where(section,article,aside,form,div)[class*="box"],
html[data-theme="dark"] body.ui-refresh-v2 .screen :where(section,article,aside,form,div)[class*="surface"]{
  background-color:#0f1724!important;
  border-color:#273247!important;
  color:#f3f6fc!important;
}
html[data-theme="dark"] body.ui-refresh-v2 .screen :where(section,article,aside,form,div)[class*="soft"],
html[data-theme="dark"] body.ui-refresh-v2 .screen :where(section,article,aside,form,div)[class*="summary"],
html[data-theme="dark"] body.ui-refresh-v2 .screen :where(section,article,aside,form,div)[class*="toolbar"]{
  background-color:#111a29!important;
  border-color:#29364a!important;
}
html[data-theme="dark"] body.ui-refresh-v2 .screen :where(button,a,span,div)[class*="chip"]:not(.active):not(.is-active):not([aria-selected="true"]),
html[data-theme="dark"] body.ui-refresh-v2 .screen :where(button,a,span,div)[class*="pill"]:not(.active):not(.is-active),
html[data-theme="dark"] body.ui-refresh-v2 .screen :where(button,a,span,div)[class*="tag"]:not(.active):not(.is-active){
  background-color:#151e2d!important;
  border-color:#2b384c!important;
  color:#dce3ef!important;
}
html[data-theme="dark"] body.ui-refresh-v2 .screen :where(.tabs,.segmented,.filter-row,.filter-bar,.category-row,.action-row,.facts-row,.stats-row){
  background-color:#0f1724!important;
  border-color:#273247!important;
}
html[data-theme="dark"] body.ui-refresh-v2 .screen :where(.tabs,.segmented,.filter-row,.filter-bar,.category-row) :is(button,a):not(.active):not(.is-active):not([aria-selected="true"]){
  background-color:#151e2d!important;
  border-color:#2b384c!important;
  color:#cbd4e2!important;
}
html[data-theme="dark"] body.ui-refresh-v2 .screen :where(.empty,.empty-state,[class*="empty"]){
  border-color:#2a374b!important;
  color:#f3f6fc!important;
}
html[data-theme="dark"] body.ui-refresh-v2 .screen :where(.empty,.empty-state,[class*="empty"]) p,
html[data-theme="dark"] body.ui-refresh-v2 .screen :where(.empty,.empty-state,[class*="empty"]) small{
  color:#93a0b5!important;
}
html[data-theme="dark"] body.ui-refresh-v2 .screen :where(input,select,textarea,button):disabled{
  background-color:#121a28!important;
  border-color:#263246!important;
  color:#6f7c91!important;
}
html[data-theme="dark"] body.ui-refresh-v2 .screen [style*="background:#fff"],
html[data-theme="dark"] body.ui-refresh-v2 .screen [style*="background: #fff"],
html[data-theme="dark"] body.ui-refresh-v2 .screen [style*="background:white"],
html[data-theme="dark"] body.ui-refresh-v2 .screen [style*="background: white"]{
  background-color:#0f1724!important;
  color:#f3f6fc!important;
  border-color:#273247!important;
}

/* Preserve visual content that must not be recoloured. */
html[data-theme="dark"] body.ui-refresh-v2 :is(.leaflet-container,.leaflet-tile-pane,.request-gallery,.service-market-card-media-v2,.profile-cover,.profile-hero-cover,img,video){
  background-color:transparent!important;
}
html[data-theme="dark"] body.ui-refresh-v2 .one-tedto-launcher>section,
html[data-theme="dark"] body.ui-refresh-v2 .one-tedto-launcher>section>header{
  background-color:#0f1724!important;
  border-color:#2b374b!important;
}
html[data-theme="dark"] body.ui-refresh-v2 .one-tedto-launcher-grid>article{
  background-color:#111a29!important;
  border-color:#2b374b!important;
  box-shadow:none!important;
}
html[data-theme="dark"] body.ui-refresh-v2 .one-tedto-launcher-grid article>header>span,
html[data-theme="dark"] body.ui-refresh-v2 .one-tedto-launcher-grid article>div>a:not(.primary){
  background-color:#151e2d!important;
  border-color:#303d52!important;
  color:#dce3ef!important;
}
html[data-theme="dark"] body.ui-refresh-v2 .one-tedto-launcher>section>footer{
  background-color:#111a29!important;
  border-color:#2b374b!important;
}
html[data-theme="dark"] body.ui-refresh-v2 .bottom-nav button.nav-create[data-quick-launcher]::after{color:#a992ff}
