/**
 * Admin overrides — loaded after style.css / style.min.css (see assets_helper.php).
 * Header: logo bounds + flex toolbar alignment (works with minified core CSS).
 */

/* Top bar: flex row, vertically centered, no clipping scrollbars */
#header {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap;
  height: 57px;
  box-sizing: border-box;
  padding: 0;
  overflow: visible;
}

#header .hide-menu {
  float: none !important;
  flex-shrink: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 0 10px;
  cursor: pointer;
  line-height: 1;
  color: #6b7280;
}

#header #logo,
#header .header-company-logo {
  float: none !important;
  flex-shrink: 0;
  width: 230px;
  max-width: 230px;
  height: 57px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  box-sizing: border-box;
  overflow: hidden;
}

#header #logo .logo,
#header .header-company-logo .logo {
  display: block;
  line-height: 0;
  text-align: center;
}

#header #logo img,
#header .header-company-logo img {
  max-height: 40px !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain;
  vertical-align: middle;
}

#header nav {
  float: none !important;
  flex: 1 1 auto;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end;
  min-width: 0;
  height: 57px;
  overflow: visible !important;
}

#header .navbar-nav.navbar-right {
  float: none !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap;
  margin: 0 !important;
  gap: 0;
  height: 57px;
}

#header .navbar-nav.navbar-right > li {
  float: none !important;
  display: flex !important;
  align-items: center !important;
  margin: 0;
}

#header .navbar-nav.navbar-right > li > a {
  display: flex !important;
  align-items: center !important;
  justify-content: center;
  height: 57px !important;
  min-height: 57px;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 10px;
  padding-right: 10px;
  box-sizing: border-box;
}

/* Top search row */
#header #top_search {
  display: flex !important;
  align-items: center !important;
  padding-right: 4px;
}

#header #top_search #search_input {
  height: 36px;
  padding: 6px 12px;
  line-height: 1.25;
  width: 220px;
  max-width: min(280px, 28vw);
  box-sizing: border-box;
}

#header #top_search_button {
  display: flex !important;
  align-items: center !important;
  padding-right: 6px;
}

#header #top_search_button .btn {
  height: 36px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Profile avatar: don’t float inside flex row */
#header .header-user-profile .profile img.pull-left,
#header .header-user-profile .profile img {
  float: none !important;
  margin: 0 !important;
  display: block;
}

/* Notification bell: strip Tailwind vertical nudge from notifications.php */
#header .header-notifications .notifications-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center;
}

#header .header-notifications .notifications-icon > span {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#header .navbar-nav > li > a > i {
  line-height: 1;
}

#header .navbar-nav > li > a > .icon-total-indicator {
  top: 9px;
}

#header li.icon {
  display: flex !important;
}

/* Public invoice (mobile): full-width Pay / submit, no horizontal overflow */
@media (max-width: 767px) {
  #online_payment_form #pay_now {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-break: break-word;
  }
}
