/* VarnaTime App 0.2.6 — shared mobile web and PWA navigation. */
.vt-pwa-lite-nav,
.vt-pwa-lite-section-slot,
.vt-pwa-lite-section-backdrop { display: none; }

@media (max-width: 767px) {
  body.vt-pwa-lite-enhanced {
    --vt-app-nav-height: 56px;
    --vt-app-section-height: 48px;
    padding-bottom: calc(var(--vt-app-nav-height) + env(safe-area-inset-bottom, 0px));
  }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-nav {
    display: grid;
    position: fixed;
    inset: auto 0 0;
    z-index: 10000;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    min-height: var(--vt-app-nav-height);
    padding: 2px 12px calc(2px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    border-top: 1px solid #e3e8ef;
    background: #fff;
    box-shadow: 0 -4px 16px rgba(15, 35, 55, .08);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    transform: none !important;
  }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-nav-slot {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    min-width: 0;
  }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-nav-link {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    min-height: 50px;
    box-sizing: border-box;
    padding: 2px 2px;
    border: 0;
    border-radius: 10px;
    color: #617080;
    background: transparent;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none !important;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
  }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-nav-link:hover,
  body.vt-pwa-lite-enhanced .vt-pwa-lite-nav-link:focus-visible,
  body.vt-pwa-lite-enhanced .vt-pwa-lite-nav-link.is-active { color: #3f78ab; }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-nav-link.is-active { font-weight: 700; }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-nav-link svg { display: block; flex: 0 0 auto; }

  /* Takes up space under the original theme header, then fixes to viewport top. */
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-slot:not([hidden]) {
    display: block !important;
    position: relative;
    width: 100%;
    height: var(--vt-app-section-height);
    min-height: var(--vt-app-section-height);
    box-sizing: border-box;
    z-index: 10045;
  }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-bar {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: var(--vt-app-section-height);
    min-height: var(--vt-app-section-height);
    width: 100%;
    box-sizing: border-box;
    padding: 5px 14px;
    background: #f6f8fb;
    border-bottom: 1px solid #e3e9f1;
    box-shadow: 0 2px 8px rgba(25, 53, 74, .07);
    color: #213b50;
    font: 500 13px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
  }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-bar.is-stuck {
    position: fixed !important;
    top: var(--vt-app-header-offset, 0px);
    right: 0;
    left: 0;
    width: 100%;
    z-index: 10055;
  }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-district {
    flex: 1 1 auto;
    display: block;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #355269;
    font-weight: 500;
  }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-district strong {
    font-weight: 700;
    color: #1c3b53;
  }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: auto;
    min-height: 37px;
    margin: 0;
    padding: 6px 11px;
    border: 0;
    border-radius: 9px;
    background: #3f78ab;
    color: #fff;
    box-shadow: 0 2px 5px rgba(36, 87, 132, .13);
    font: 700 12.5px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-toggle:hover,
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-toggle[aria-expanded="true"] { background: #316b9e; }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-toggle svg { flex: 0 0 auto; display: block; }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-toggle[aria-expanded="true"] .vt-pwa-lite-toggle-chevron { transform: rotate(180deg); }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-toggle:focus-visible,
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-link:focus-visible,
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-menu-head button:focus-visible,
  body.vt-pwa-lite-enhanced .vt-pwa-lite-nav-link:focus-visible { outline: 2px solid #173a56; outline-offset: 2px; }

  /* Dropdown appears directly below bar only while opened, no persistent overlay. */
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-menu:not([hidden]) {
    display: flex !important;
    position: absolute;
    top: calc(100% + 5px);
    right: 12px;
    z-index: 10065;
    width: min(316px, calc(100vw - 24px));
    max-height: min(68dvh, 525px);
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5eaf0;
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(17, 42, 64, .19);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-menu-head {
    display: flex;
    flex: 0 0 auto;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    box-sizing: border-box;
    padding: 5px 9px 5px 15px;
    border-bottom: 1px solid #edf1f6;
    color: #2b628f;
    font-size: 13px;
  }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-menu-head button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #587084;
    cursor: pointer;
  }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-links {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    min-height: 0;
    padding: 9px;
    overscroll-behavior: contain;
  }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-link:not([hidden]) {
    display: flex !important;
    flex: 0 0 auto;
    align-items: center;
    gap: 11px;
    min-height: 43px;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 0;
    border-radius: 9px;
    color: #263e54;
    background: #f7f9fc;
    font: 500 13px/1.25 system-ui, -apple-system, "Segoe UI", sans-serif;
    text-decoration: none !important;
    overflow-wrap: anywhere;
  }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-link svg { display: block; flex: 0 0 auto; color: #3f78ab; }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-link.is-active { background: #e8f3fc; color: #215f96; font-weight: 700; }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-link:active { background: #dcecfb; }
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-link[hidden],
  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-menu[hidden] { display: none !important; }

  body.vt-pwa-lite-enhanced .vt-pwa-lite-section-backdrop:not([hidden]) {
    display: block !important;
    position: fixed;
    inset: 0 0 calc(var(--vt-app-nav-height) + env(safe-area-inset-bottom, 0px));
    z-index: 10040;
    background: rgba(13, 32, 49, .19);
  }
  /* WPCode navigation remains in DOM; hide only its visual floating controls in PWA. */
  body.vt-pwa-lite-enhanced.vt-pwa-lite-sections-ready #vt-floating-nav,
  body.vt-pwa-lite-enhanced.vt-pwa-lite-sections-ready #vt-floating-toggle,
  body.vt-pwa-lite-enhanced.vt-pwa-lite-sections-ready #vt-floating-menu {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  body.vt-pwa-lite-enhanced #kt-scroll-up,
  body.vt-pwa-lite-enhanced a#kt-scroll-up { display: none !important; }
  body.vt-pwa-lite-enhanced.vt-pwa-lite-map-fullscreen .vt-pwa-lite-nav,
  body.vt-pwa-lite-enhanced.vt-pwa-lite-map-fullscreen .vt-pwa-lite-section-slot,
  body.vt-pwa-lite-enhanced.vt-pwa-lite-map-fullscreen .vt-pwa-lite-section-backdrop { display: none !important; }
  body.vt-pwa-lite-enhanced.vt-pwa-lite-map-fullscreen { padding-bottom: 0 !important; }
  body.vt-pwa-lite-enhanced.vt-pwa-lite-sections-ready #info,
  body.vt-pwa-lite-enhanced.vt-pwa-lite-sections-ready #lokatsiya,
  body.vt-pwa-lite-enhanced.vt-pwa-lite-sections-ready #transport,
  body.vt-pwa-lite-enhanced.vt-pwa-lite-sections-ready #obrazovanie,
  body.vt-pwa-lite-enhanced.vt-pwa-lite-sections-ready #sgradi,
  body.vt-pwa-lite-enhanced.vt-pwa-lite-sections-ready #podhodyasht,
  body.vt-pwa-lite-enhanced.vt-pwa-lite-sections-ready #plusove,
  body.vt-pwa-lite-enhanced.vt-pwa-lite-sections-ready #karta,
  body.vt-pwa-lite-enhanced.vt-pwa-lite-sections-ready #vt-karta { scroll-margin-top: 65px; }
}
@media (prefers-reduced-motion: reduce) {
  .vt-pwa-lite-section-menu, .vt-pwa-lite-section-backdrop { transition: none !important; }
}
