/* Lake Insights theme-independent header overrides. Edit this file for header layout and appearance. */

/* ========== Header: allow dropdown overlay below; do not expand height ========== */
header.elementor-location-header {
  width: 100% !important;
  max-width: 100% !important;
  position: relative;
  overflow: visible;
  box-sizing: border-box;
  z-index: 100;
}

/* ========== Header container: single row, logo and user in line; wider on desktop ========== */
header.elementor-location-header .elementor-element-2483a92 {
  max-width: 1680px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 40px !important;
  padding-right: 40px !important;
  box-sizing: border-box;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  overflow: visible;
}

/* Force inner flex row to stay single line (Elementor flex container); overflow visible so dropdown can extend down */
header.elementor-location-header .elementor-element-2483a92.e-con,
header.elementor-location-header .elementor-element-2483a92 .e-con-box,
header.elementor-location-header .elementor-element-2483a92 > .elementor-widget-wrap {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 0;
  overflow: visible;
}

/* Logo column: don't grow; user column stays right */
header.elementor-location-header .elementor-element-2483a92 > .e-con-box > .elementor-widget-wrap:first-child {
  flex-shrink: 0;
}
header.elementor-location-header .elementor-element-2483a92 .li-header-slot,
header.elementor-location-header .elementor-element-2483a92 .li-user-menu,
header.elementor-location-header .elementor-element-2483a92 .li-user-dropdown,
header.elementor-location-header .elementor-element-2483a92 .li-header-login-wrap {
  flex-shrink: 0;
  min-width: 0;
  margin-left: 48px;
}

/* User dropdown and slot always visible (do not hide with nav column) */
.li-header-slot,
.li-user-dropdown {
  display: flex !important;
}

/* ========== Avatar in user menu ========== */
.li-user-menu .li-header-avatar-wrap {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  margin-right: 8px;
  flex-shrink: 0;
}
.li-user-menu .li-header-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  vertical-align: middle;
  object-fit: cover;
  display: block;
}

/* ========== Avatar badge: header toggle (image or initials fallback) ========== */
.li-header-avatar-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}
.li-header-avatar-wrap .li-header-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.li-header-avatar-wrap .li-header-slot-initials {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 50%;
  background: #1e6fb8;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
/* Header toggle badge size (avatar or initials) */
.li-user-dropdown .li-user-toggle .li-header-avatar-wrap {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
}
.li-user-dropdown .li-user-toggle .li-header-avatar-wrap .li-header-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== User slot: truncate name if needed, stay in one line ========== */
.elementor-element-2483a92 .li-header-slot,
.elementor-element-2483a92 .li-user-menu {
  min-width: 0;
  max-width: 100%;
  display: inline-flex !important;
  align-items: center;
  flex-wrap: nowrap;
}
.li-user-menu .li-user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Login / Logout text: less bold */
.li-user-menu .li-login-btn,
.li-user-menu .li-logout-btn {
  font-weight: 500;
}

/* Desktop: show username and account controls; mobile hides via .li-user-account-desktop */
.li-user-account-desktop {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.li-user-toggle .li-user-account-desktop {
  margin-left: 8px;
}
.li-user-toggle .li-user-account-desktop .li-caret {
  margin-left: 4px;
}
/* Dropdown arrow only on desktop; hidden on mobile */
.desktop-only {
  display: inline-block;
}
@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
}
/* Logged-out: login link with avatar-style "Lo" on mobile, full "Login" on desktop */
a.li-login-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
a.li-login-btn .li-header-avatar-wrap {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
}

/* ========== Logo: responsive height ========== */
.elementor-element-2483a92 .elementor-widget-image img,
.elementor-element-2483a92 .li-header-logo-img,
.elementor-element-2483a92 img[class*="logo"] {
  max-height: 98px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ========== Nav: hover and active underline (visual polish only) ========== */
header.elementor-location-header .elementor-element-2483a92 .elementor-nav-menu .elementor-item {
  transition: color 0.2s ease;
}
header.elementor-location-header .elementor-element-2483a92 .elementor-nav-menu .elementor-item:hover {
  color: #1B5E6B;
}
header.elementor-location-header .elementor-element-2483a92 .elementor-nav-menu .current-menu-item > a,
header.elementor-location-header .elementor-element-2483a92 .elementor-nav-menu .elementor-item-active {
  position: relative;
}
header.elementor-location-header .elementor-element-2483a92 .elementor-nav-menu .current-menu-item > a::after,
header.elementor-location-header .elementor-element-2483a92 .elementor-nav-menu .elementor-item-active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: currentColor;
}

/* Elementor Nav Menu: restore native responsive behavior; keep header + user styling in mobile */
@media (max-width: 900px) {
  /* Header row: flex so logo and right group stay on one line */
  header.elementor-location-header
  .elementor-element-2483a92 {
    display: flex !important;
    align-items: center !important;
    min-height: 60px;
  }
  /* Inner row: nav + user columns stay inline (avatar and hamburger side by side) */
  header.elementor-location-header
  .elementor-element-2483a92
  .e-con-box {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
  }
  header.elementor-location-header
  .elementor-element-2483a92
  .e-con-box > .elementor-widget-wrap {
    flex-shrink: 0;
  }
  header.elementor-location-header
  .elementor-element-2483a92
  .li-header-slot,
  header.elementor-location-header
  .elementor-element-2483a92
  .li-user-dropdown {
    flex-shrink: 0;
    display: flex !important;
    align-items: center !important;
  }
  header.elementor-location-header
  .elementor-element-2483a92
  .li-user-dropdown {
    margin-left: 12px;
  }
}

/* ========== Tablet: constrain content width ========== */
@media (max-width: 1200px) {
  header.elementor-location-header .elementor-element-2483a92 {
    max-width: 1200px !important;
  }
}

/* ========== Mobile: full width, reduced padding ========== */
@media (max-width: 768px) {
  /* Mobile: show only avatar (or initials); hide username, caret, and login text */
  .li-user-account-desktop {
    display: none !important;
  }
  header.elementor-location-header .elementor-element-2483a92 {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    min-height: 60px;
  }
  .elementor-element-2483a92 .li-header-slot,
  .elementor-element-2483a92 .li-user-menu {
    flex-shrink: 1;
  }
  .li-user-name {
    max-width: 140px;
  }
  .elementor-element-2483a92 .elementor-widget-image img,
  .elementor-element-2483a92 .li-header-logo-img,
  .elementor-element-2483a92 img[class*="logo"] {
    max-height: 56px;
  }
  .elementor-element-2483a92 > .e-con-box > .elementor-widget-wrap:first-child {
    min-width: 0;
    flex-shrink: 1;
  }
}

/* ========== Small phones ========== */
@media (max-width: 480px) {
  header.elementor-location-header .elementor-element-2483a92 {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .li-user-name {
    max-width: 90px;
  }
  .li-user-menu .li-header-avatar-wrap {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    margin-right: 6px;
  }
  .li-user-menu .li-header-avatar {
    width: 24px;
    height: 24px;
  }
  .li-user-menu .li-divider,
  .li-user-menu .li-logout-btn {
    font-size: 13px;
  }
  .elementor-element-2483a92 .elementor-widget-image img,
  .elementor-element-2483a92 .li-header-logo-img,
  .elementor-element-2483a92 img[class*="logo"] {
    max-height: 44px;
  }
}

/* ========== Very small: avatar + Logout only ========== */
@media (max-width: 360px) {
  header.elementor-location-header .elementor-element-2483a92 {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  .li-user-name {
    display: none;
  }
  .li-user-menu .li-divider {
    display: none;
  }
  .li-user-menu .li-header-avatar-wrap {
    margin-right: 4px;
  }
  .elementor-element-2483a92 .elementor-widget-image img,
  .elementor-element-2483a92 .li-header-logo-img,
  .elementor-element-2483a92 img[class*="logo"] {
    max-height: 40px;
  }
}

/* ========== User dropdown (visibility only; no layout/size changes) ========== */
.li-user-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}
.li-user-dropdown .li-user-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.li-user-dropdown .li-user-toggle .li-header-avatar-wrap {
  flex-shrink: 0;
}
.li-user-dropdown .li-user-toggle .li-header-avatar {
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.li-user-dropdown .li-user-toggle .li-user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.li-user-dropdown .li-caret {
  font-size: 32px;
  margin-left: 6px;
  opacity: 0.85;
  vertical-align: middle;
}
.li-user-dropdown .li-user-menu {
  display: none !important;
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  min-width: 160px;
  margin-top: 4px;
  z-index: 1000;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
  flex-direction: column;
  text-align: center;
}
.li-user-dropdown .li-user-menu.open {
  display: block !important;
}
/* User name at top of dropdown (moved from header) */
.li-user-dropdown .li-user-menu .li-account-name {
  padding: 10px 16px 8px;
  font-weight: 600;
  font-size: 14px;
  color: #1a1a1a;
  text-align: center;
  border-radius: 8px 8px 0 0;
}
.li-user-dropdown .li-user-menu .li-account-menu-divider {
  margin: 0;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.li-user-dropdown .li-user-menu a {
  display: block;
  padding: 10px 16px;
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.15s ease;
  text-align: center;
}
.li-user-dropdown .li-user-menu > a:first-of-type {
  border-radius: 0;
}
.li-user-dropdown .li-user-menu a:last-child {
  border-bottom: none;
  border-radius: 0 0 8px 8px;
}
.li-user-dropdown .li-user-menu a:hover {
  background: rgba(0, 0, 0, 0.04);
}
.li-user-dropdown .li-user-menu a:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.04);
}

/* Portaled menu (when appended to body so it isn't clipped by header) — right-aligned, professional */
body > .li-user-menu.li-user-menu-portal {
  display: block !important;
  position: fixed;
  z-index: 99999;
  min-width: 160px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
  text-align: center;
}
body > .li-user-menu.li-user-menu-portal .li-account-name {
  padding: 10px 16px 8px;
  font-weight: 600;
  font-size: 14px;
  color: #1a1a1a;
  text-align: center;
  border-radius: 8px 8px 0 0;
}
body > .li-user-menu.li-user-menu-portal .li-account-menu-divider {
  margin: 0;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
body > .li-user-menu.li-user-menu-portal a {
  display: block;
  padding: 10px 16px;
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.15s ease;
  text-align: center;
}
body > .li-user-menu.li-user-menu-portal a:first-of-type {
  border-radius: 0;
}
body > .li-user-menu.li-user-menu-portal a:last-child {
  border-bottom: none;
  border-radius: 0 0 8px 8px;
}
body > .li-user-menu.li-user-menu-portal a:hover {
  background: rgba(0, 0, 0, 0.04);
}
body > .li-user-menu.li-user-menu-portal a:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.04);
}

@media (max-width: 480px) {
  .li-user-dropdown .li-user-toggle .li-header-avatar-wrap {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
  }
  .li-user-dropdown .li-user-toggle .li-header-avatar {
    width: 24px;
    height: 24px;
  }
}
@media (max-width: 360px) {
  .li-user-dropdown .li-user-toggle .li-user-name {
    display: none;
  }
}
