/* HVSZ_H119_PASSWORD_RESET_MOBILE_SIDEBAR
 * A H118 ticket-kártya és értesítési panel javításai érintetlenek maradnak.
 * Ez az asset kizárólag a mobil agent oldalsáv rácsát, magasságát és a
 * történeti TESZT pszeudo-badge-et korrigálja.
 */

/* A v2-clean-slate.css történeti ::after badge-ének végleges semlegesítése. */
body.ui-v2-shell .topbar::after {
  content: none !important;
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 1100px) {
  /* A topbar a karbantartási sáv ALATTI tényleges dinamikus viewportot kapja. */
  body.ui-v2-shell .topbar {
    height: calc(100dvh - var(--h114-maintenance-height, 0px)) !important;
    min-height: 0 !important;
    max-height: calc(100dvh - var(--h114-maintenance-height, 0px)) !important;
    overflow: hidden !important;
  }

  body.ui-v2-shell .topbar-inner {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    align-content: stretch !important;
    justify-content: stretch !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    gap: 8px !important;
    padding: 10px 9px max(9px, env(safe-area-inset-bottom, 0px)) !important;
    overflow: hidden !important;
  }

  body.ui-v2-shell .topbar .brand {
    grid-column: 1 !important;
    grid-row: 1 !important;
    flex: 0 0 auto !important;
    min-height: 0 !important;
    max-height: 102px !important;
    margin: 0 !important;
    padding: 8px 9px !important;
    overflow: hidden !important;
  }

  body.ui-v2-shell .topbar .brand-logo {
    max-height: 58px !important;
    width: auto !important;
    object-fit: contain !important;
  }

  body.ui-v2-shell .topbar .topbar-center,
  body.ui-v2-shell .topbar nav.topbar-center {
    grid-column: 1 !important;
    grid-row: 2 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: static !important;
    inset: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  body.ui-v2-shell .topbar .topbar-center > .topbar-pill,
  body.ui-v2-shell .topbar .topbar-center > a.topbar-pill,
  body.ui-v2-shell .topbar .topbar-center > button.topbar-pill {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 36px !important;
    padding: 6px 9px !important;
    line-height: 1.12 !important;
  }

  /* A rendelkezésre álló üres hely az Ügyfélportál gomb FÖLÖTT marad. */
  body.ui-v2-shell .topbar .topbar-center > [data-h62-portal-switch],
  body.ui-v2-shell .topbar .topbar-center > a[href*="customer_portal"],
  body.ui-v2-shell .topbar .topbar-center > a[href*="admin_portal"] {
    order: 999 !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
  }

  body.ui-v2-shell:not(.customer-v2-portal) .topbar .topbar-right {
    grid-column: 1 !important;
    grid-row: 3 !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(36px, 1fr)) !important;
    align-items: center !important;
    align-self: end !important;
    width: 100% !important;
    min-height: 44px !important;
    height: auto !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 7px 0 0 !important;
    overflow: visible !important;
    position: static !important;
    inset: auto !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    border-top: 1px solid var(--v2-border, rgba(255,255,255,.10)) !important;
    z-index: 4 !important;
  }

  body.ui-v2-shell:not(.customer-v2-portal)
  .topbar .topbar-right > *,
  body.ui-v2-shell:not(.customer-v2-portal)
  .topbar .topbar-right .notification-bell-wrap {
    min-width: 0 !important;
    width: 100% !important;
    display: block !important;
  }

  body.ui-v2-shell:not(.customer-v2-portal)
  .topbar .topbar-right .topbar-icon {
    width: 100% !important;
    min-width: 0 !important;
    height: 38px !important;
    min-height: 38px !important;
  }
}

/* Alacsony telefonokon is görgetés nélküli, tömör kiosztás. */
@media (max-width: 1100px) and (max-height: 720px) {
  body.ui-v2-shell .topbar-inner {
    gap: 5px !important;
    padding-top: 7px !important;
  }

  body.ui-v2-shell .topbar .brand {
    max-height: 78px !important;
    padding: 5px 7px !important;
  }

  body.ui-v2-shell .topbar .brand-logo {
    max-height: 42px !important;
  }

  body.ui-v2-shell .topbar .version-badge {
    margin-top: 2px !important;
    font-size: 8.5px !important;
  }

  body.ui-v2-shell .topbar .topbar-center,
  body.ui-v2-shell .topbar nav.topbar-center {
    gap: 4px !important;
  }

  body.ui-v2-shell .topbar .topbar-center > .topbar-pill,
  body.ui-v2-shell .topbar .topbar-center > a.topbar-pill,
  body.ui-v2-shell .topbar .topbar-center > button.topbar-pill {
    min-height: 32px !important;
    padding: 4px 7px !important;
    font-size: 11px !important;
  }

  body.ui-v2-shell:not(.customer-v2-portal) .topbar .topbar-right {
    min-height: 38px !important;
    padding-top: 5px !important;
  }

  body.ui-v2-shell:not(.customer-v2-portal)
  .topbar .topbar-right .topbar-icon {
    height: 33px !important;
    min-height: 33px !important;
  }
}
