/* =============================================
   Navbar Modules — Profile, Sign-In, Search
   ============================================= */

/* ====== MODERN ANIMATED LOGO STYLES ====== */
/* Bigger logo with colorful animated effects */

.navbar .navbar-brand .logo-light,
.navbar .navbar-brand .logo-dark {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              filter 0.4s ease;
  animation: navLogoFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 2px 6px rgba(18, 28, 69, 0.12));
}

/* Continuous floating animation */
@keyframes navLogoFloat {
  0%, 100% {
    transform: translateY(0);
    filter: drop-shadow(0 2px 6px rgba(18, 28, 69, 0.12));
  }
  50% {
    transform: translateY(-4px);
    filter: drop-shadow(0 6px 14px rgba(255, 94, 20, 0.25));
  }
}

/* Hover: colorful glow + scale */
.navbar .navbar-brand:hover .logo-light,
.navbar .navbar-brand:hover .logo-dark {
  transform: scale(1.08) translateY(-2px);
  filter: drop-shadow(0 4px 18px rgba(255, 94, 20, 0.45))
         drop-shadow(0 0 8px rgba(18, 28, 69, 0.2));
  animation-play-state: paused;
}

/* Click/active effect */
.navbar .navbar-brand:active .logo-light,
.navbar .navbar-brand:active .logo-dark {
  transform: scale(0.97);
  filter: drop-shadow(0 2px 8px rgba(255, 94, 20, 0.3));
}

/* When navbar is fixed/scrolled - subtler animation */
.fixed-navbar .navbar-brand .logo-light,
.fixed-navbar .navbar-brand .logo-dark {
  animation: navLogoFloatSubtle 5s ease-in-out infinite;
}

@keyframes navLogoFloatSubtle {
  0%, 100% {
    transform: translateY(0);
    filter: drop-shadow(0 2px 4px rgba(18, 28, 69, 0.08));
  }
  50% {
    transform: translateY(-2px);
    filter: drop-shadow(0 4px 10px rgba(255, 94, 20, 0.18));
  }
}

.fixed-navbar .navbar-brand:hover .logo-light,
.fixed-navbar .navbar-brand:hover .logo-dark {
  filter: drop-shadow(0 4px 16px rgba(18, 28, 69, 0.22))
         drop-shadow(0 0 6px rgba(255, 94, 20, 0.2));
}

/* Mobile - simpler animation, slightly bigger */
@media (max-width: 768px) {
  .navbar .navbar-brand .logo-light,
  .navbar .navbar-brand .logo-dark {
    animation: navLogoFloatMobile 3.5s ease-in-out infinite;
  }

  @keyframes navLogoFloatMobile {
    0%, 100% {
      transform: translateY(0);
      filter: drop-shadow(0 2px 4px rgba(18, 28, 69, 0.1));
    }
    50% {
      transform: translateY(-3px);
      filter: drop-shadow(0 4px 8px rgba(255, 94, 20, 0.2));
    }
  }
}

/* Transparent header (top of page, dark background) - bright glow for readability */
.header-transparent .navbar:not(.fixed-navbar) .navbar-brand .logo-dark {
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.6))
         drop-shadow(0 2px 6px rgba(255, 255, 255, 0.3));
  animation: navLogoFloatTransparent 4s ease-in-out infinite;
}

@keyframes navLogoFloatTransparent {
  0%, 100% {
    transform: translateY(0);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.6))
           drop-shadow(0 2px 6px rgba(255, 255, 255, 0.3));
  }
  50% {
    transform: translateY(-4px);
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.7))
           drop-shadow(0 4px 12px rgba(255, 94, 20, 0.35));
  }
}

.header-transparent .navbar:not(.fixed-navbar) .navbar-brand:hover .logo-dark {
  transform: scale(1.08) translateY(-2px);
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.8))
         drop-shadow(0 4px 18px rgba(255, 94, 20, 0.5));
  animation-play-state: paused;
}

/* ── Profile Circle ── */
.nav-profile-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-profile-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.25);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  user-select: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-profile-circle:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  border-color: rgba(255,255,255,0.5);
}

.nav-profile-admin .nav-profile-circle,
.nav-profile-circle.nav-profile-admin {
  background: linear-gradient(135deg, #121c45 0%, #1e2f6e 100%);
}

.nav-profile-customer .nav-profile-circle,
.nav-profile-circle.nav-profile-customer {
  background: linear-gradient(135deg, #ff5e14 0%, #ff8a50 100%);
}

.fixed-navbar .nav-profile-circle {
  border-color: #e0e0e0;
}

.fixed-navbar .nav-profile-circle:hover {
  border-color: #bbb;
}

/* ── Tooltip ── */
.nav-profile-tooltip {
  display: none;
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 11px;
  text-align: center;
  z-index: 10001;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  animation: navTooltipIn 0.15s ease;
}

.nav-profile-tooltip::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #1a1a2e;
}

.nav-profile-tooltip strong {
  font-size: 12px;
  display: block;
  margin-bottom: 2px;
}

.nav-profile-tooltip .nav-profile-tooltip-sub {
  color: rgba(255,255,255,0.55);
  font-size: 10px;
}

@keyframes navTooltipIn {
  from { opacity: 0; transform: translateX(-50%) translateY(4px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Profile Dropdown ── */
.nav-profile-dropdown {
  display: none;
  position: absolute;
  top: 54px;
  right: -8px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  min-width: 230px;
  z-index: 10002;
  overflow: hidden;
  animation: navDropIn 0.18s ease;
}

@keyframes navDropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-profile-dropdown-header {
  padding: 16px 18px 14px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafbfc;
}

.nav-profile-dropdown-name {
  font-weight: 700;
  font-size: 14px;
  color: #121c45;
  line-height: 1.3;
}

.nav-profile-dropdown-sub {
  font-size: 11px;
  color: #999;
  margin-top: 3px;
}

.nav-profile-dropdown-menu {
  padding: 6px 0;
}

.nav-profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-size: 13px;
  color: #444;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-profile-dropdown-item:hover {
  background: #f5f7fa;
  color: #121c45;
  text-decoration: none;
}

.nav-profile-dropdown-item i {
  width: 18px;
  font-size: 14px;
  text-align: center;
  flex-shrink: 0;
}

.nav-profile-dropdown-item.admin-accent i { color: #121c45; }
.nav-profile-dropdown-item.customer-accent i { color: #ff5e14; }

.nav-profile-dropdown-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 4px 0;
}

.nav-profile-dropdown-item--logout {
  color: #d32f2f;
}

.nav-profile-dropdown-item--logout:hover {
  background: #fef2f2;
  color: #c62828;
}

/* ── Sign In Button ── */
.nav-signin-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 18px;
  height: 40px;
  line-height: 40px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.35);
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.nav-signin-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.6);
  color: #fff;
  text-decoration: none;
}

.nav-signin-btn i {
  font-size: 13px;
  transition: transform 0.2s ease;
}

.nav-signin-btn:hover i {
  transform: translateX(2px);
}

/* Fixed navbar: dark text */
.fixed-navbar .nav-signin-btn {
  border-color: #ddd;
  color: #333;
}

.fixed-navbar .nav-signin-btn:hover {
  background: #f5f7fa;
  border-color: #bbb;
  color: #121c45;
}

/* ── Sign In Dropdown ── */
.nav-signin-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  min-width: 250px;
  z-index: 10002;
  overflow: hidden;
  animation: navDropIn 0.18s ease;
}

.nav-signin-dropdown-header {
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafbfc;
}

.nav-signin-dropdown-header h6 {
  margin: 0;
  font-weight: 700;
  font-size: 13px;
  color: #121c45;
}

.nav-signin-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  transition: background 0.15s ease;
}

.nav-signin-option:hover {
  background: #f5f7fa;
  text-decoration: none;
  color: #333;
}

.nav-signin-option-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.nav-signin-option-icon.admin-icon {
  background: linear-gradient(135deg, #121c45 0%, #1e2f6e 100%);
}

.nav-signin-option-icon.customer-icon {
  background: linear-gradient(135deg, #ff5e14 0%, #ff8a50 100%);
}

.nav-signin-option-text {
  line-height: 1.35;
}

.nav-signin-option-title {
  font-weight: 600;
  color: #121c45;
  display: block;
  font-size: 13px;
}

.nav-signin-option-desc {
  font-size: 11px;
  color: #999;
  margin-top: 1px;
  display: block;
}

.nav-signin-divider {
  height: 1px;
  background: #f0f0f0;
}

/* ── Inline Search Box ── */
.nav-search-li {
  position: relative;
}

.nav-inline-search {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 15px;
  z-index: 10001;
  transform-origin: top right;
  animation: navSearchPopDown 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes navSearchPopDown {
  from { 
    opacity: 0; 
    transform: translateY(-20px) scale(0.9); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
}

.nav-inline-search::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 18px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
  border-left: 1px solid #e0e0e0;
  border-top: 1px solid #e0e0e0;
  z-index: 1;
}

.nav-inline-search-form {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  overflow: hidden;
  height: 48px;
  z-index: 2;
}

.nav-inline-search-input {
  border: none;
  outline: none;
  padding: 0 18px;
  font-size: 14px;
  width: 250px;
  height: 100%;
  background: transparent;
  color: #333;
}

.nav-inline-search-input::placeholder {
  color: #aaa;
}

.nav-inline-search-btn {
  border: none;
  background: #ff5e14;
  color: #fff;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s ease;
}

.nav-inline-search-btn:hover {
  background: #e5540f;
}

.nav-inline-search-close {
  border: none;
  background: transparent;
  color: #999;
  width: 36px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: color 0.15s ease;
}

.nav-inline-search-close:hover {
  color: #333;
}

/* ── Request A Quote Button ── */
.navbar-modules .btn__request {
  height: 42px;
  line-height: 42px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff5e14 0%, #ff7a3d 100%);
  color: #fff;
  letter-spacing: 0.3px;
  padding: 0 20px;
  white-space: nowrap;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(255,94,20,0.25);
}

.navbar-modules .btn__request:hover {
  background: linear-gradient(135deg, #121c45 0%, #1e2f6e 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(18,28,69,0.30);
  transform: translateY(-1px);
}

.navbar-modules .btn__request i {
  font-size: 11px;
  margin-left: 6px;
  transition: transform 0.2s ease;
}

.navbar-modules .btn__request:hover i {
  transform: translateX(3px);
}

/* ── Module Search Icon ── */
.module__btn-search {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}

.module__btn-search:hover {
  background: rgba(255,255,255,0.12);
}

.fixed-navbar .module__btn-search:hover {
  background: #f5f7fa;
}

/* ── Language Dropdown ── */
.navbar-modules .dropdown .dropdown-toggle {
  height: 40px;
  line-height: 40px;
  padding: 0 16px 0 10px;
  font-weight: 600;
  font-size: 13px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.navbar-modules .dropdown .dropdown-toggle:hover {
  background: rgba(255,255,255,0.08);
}

.fixed-navbar .navbar-modules .dropdown .dropdown-toggle:hover {
  background: #f5f7fa;
}

.navbar-modules .dropdown .dropdown-menu {
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.10);
  border: 1px solid #e8e8e8;
  min-width: 110px;
  padding: 6px;
  margin-top: 8px;
}

.navbar-modules .dropdown .dropdown-menu .dropdown-item {
  border-radius: 6px;
  padding: 6px 10px;
  border-bottom: none;
  transition: background 0.15s ease;
}

.navbar-modules .dropdown .dropdown-menu .dropdown-item:hover {
  background: #f5f7fa;
}

.navbar-modules .dropdown .dropdown-menu .dropdown-item:after {
  display: none;
}

/* ── Mobile Auth Button ── */
.nav-mobile-auth {
  display: none;
}

@media (max-width: 991.98px) {
  .nav-mobile-auth {
    display: flex;
    align-items: center;
    gap: 8px;
    position: absolute;
    top: 50%;
    right: 70px;
    transform: translateY(-50%);
    z-index: 1001;
  }

  .nav-mobile-auth-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .nav-mobile-auth-btn:hover {
    transform: scale(1.08);
  }

  .nav-mobile-auth-btn.signin-mobile {
    background: #ff5e14;
    color: #fff;
    box-shadow: 0 2px 8px rgba(255,94,20,0.3);
  }

  .nav-mobile-auth-btn.profile-mobile {
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  }

  .nav-mobile-auth-btn.profile-mobile.admin-mobile {
    background: linear-gradient(135deg, #121c45 0%, #1e2f6e 100%);
  }

  .nav-mobile-auth-btn.profile-mobile.customer-mobile {
    background: linear-gradient(135deg, #ff5e14 0%, #ff8a50 100%);
  }
}

/* ── Utility: hide before JS loads ── */
.nav-auth-loading {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.nav-auth-ready {
  visibility: visible;
  opacity: 1;
}
