/**
 * Navbar Component Styles
 * Uses global CSS variables from global.css
 */

/* ============================================
   DESKTOP HEADER
   ============================================ */

.desktop-header {
  width: 100%;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 11;
  background-color: var(--bg-white);
  padding: 15px 0;
  height: 70px;
  display: block;
  transition: var(--transition-normal);
}

.desktop-header.shadow,
.desktop-header.fixed {
  box-shadow: var(--shadow-header);
}

/* ============================================
   NAVBAR WRAPPER & LAYOUT
   ============================================ */

.navbarWrapper {
  display: flex;
  align-items: center;
}

.navbarWrapper a img {
  max-width: 200px;
  height: auto;
}

.navPages {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: space-between;
}

.pagesCentered {
  margin: 0 auto;
}

.pagesCentered ul {
  display: flex;
  list-style: none;
  gap: 5px;
}

.pagesCentered ul li {
  display: block;
  position: relative;
}

/* ============================================
   NAVIGATION ITEMS
  ============================================ */

.navItems a {
  display: block;
  font-size: var(--text-normal);
  font-weight: var(--font-medium);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  padding: 5px 20px 5px 0;
  cursor: pointer;
  position: relative;
  min-width: max-content;
  transition: var(--transition-fast);
}

.navItems a:hover {
  color: var(--primary-blue);
}

.navItems:last-child a {
  padding-right: 0;
}

/* ============================================
   DROPDOWN MENUS
   ============================================ */

.has-dropdown {
  position: relative;
}

.has-dropdown::before {
  position: absolute;
  right: 8px;
  height: 6px;
  width: 6px;
  content: "";
  border-right: 1.5px solid var(--text-primary);
  border-bottom: 1.5px solid var(--text-primary);
  transform: rotate(45deg);
  transition: transform 0.2s ease-in-out, border-color 0.2s ease;
  top: 9px;
  pointer-events: none;
}
.navItems .has-dropdown:has(.dropdown-menu .services:hover) {
color: var(--primary-blue);
}

.has-dropdown:hover::before {
  transform: rotate(-135deg);
  border-color: var(--primary-blue-lighter);
  top: 12px;
}

.dropdown-menu {
  display: flex;
  flex-wrap: wrap;
  position: absolute;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-lightest);
  background: var(--bg-white);
  box-shadow: var(--shadow-lg);
  column-gap: 30px;
  align-items: flex-start;
  padding: 6px 15px;
  left: 50%;
  transform: translateX(-50%);
  visibility: hidden;
  min-width: 270px;
  width: 100%;
}

.dropdown-menu.services {
  min-width: 220px;
  width: auto;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  padding:0;
}

.dropdown-menu.services ul {
  display: block;
  list-style: none;
  padding: 0;
  margin: 0;
}


.dropdown-menu.services li:last-child {
  border-bottom: none;
}

.dropdown-menu.services li a {
  display: block;
  padding: 10px 20px;
  font-size: var(--text-sm);
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-fast);
  font-weight: var(--font-regular);
}

.dropdown-menu.services li a:hover {
  background-color: var(--bg-lighter-blue);
  color: var(--primary-blue);
}

.dropdown-menu.services li:last-child a {
  color: var(--primary-blue);
  font-weight: var(--font-semi);
}

.dropdown-menu.bestOffers {
  min-width: 185px;
  width: 100%;
}

.dropdown-menu.whyUs {
  min-width: 165px;
  width: 100%;
}

.dropdown-menu ul {
  display: flex;
  flex-direction: column;
}

.dropdown-menu li a {
  padding: 10px 0;
  padding-right: 0;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition-fast);
  font-size: var(--text-xs);
  font-weight: var(--font-semi);
  color: var(--text-gray);
  line-height: var(--leading-normal);
  display: block;
  white-space: nowrap;
}

.dropdown-menu li a:hover {
  color: var(--primary-blue-lighter);
}

.dropdown-menu li:last-child a {
  border-bottom: none;
}

.has-dropdown a:hover + .dropdown-menu,
.dropdown-menu:hover {
  visibility: unset;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */

.btnsWrap {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Live Chat Button */
.liveChatBtn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border-lightest);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--font-semi);
  line-height: 20px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.liveChatBtn:hover {
  background-color: var(--bg-lighter-blue);
  border-color: var(--primary-blue-light);
}

.liveChatIndicator {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: var(--radius-circle);
  animation: pulse-indicator 2s ease-in-out infinite;
}

/* Order Now Button */
.orderNowBtn {
  position: relative;
  background: var(--primary-blue-light);
  border: 1px solid var(--primary-blue-light);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--bg-white);
  font-weight: var(--font-semi);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.orderNowBtn:hover {
  background-color: var(--primary-blue-hover);
  border-color: var(--primary-blue-hover);
  color: var(--bg-white);
}

.btnsWrap .orderNowBtn::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  animation-name: pulse-blue;
  animation-duration: 1s;
  animation-delay: 0.5s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-direction: normal;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Pulse Animations */
@keyframes pulse-indicator {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes pulse-blue {
  0% {
    box-shadow: 0 0 0 0 var(--primary-blue-light);
      opacity: 0;
  }
  100% {
    box-shadow: 0 0 0 20px transparent;
  }
}

/* ============================================
   USER SESSION / LOGIN
   ============================================ */

.newLoginBtn {
  position: relative;
  margin-left: 10px;
}

.newLoginBtn.loggedIn .userIcon {
  cursor: pointer;
  background-color: #e5efff;
  border-radius: 8px;
  padding: 8px;
  transition: all 0.15s ease;
}

.newLoginBtn.loggedIn .userIcon:hover {
  background-color: #cde0ff;
}

.userIcon {
  width: auto;
  height: auto;
  border: none;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.userIcon:hover {
  opacity: 0.8;
}

.userIcon img {
  width: 15px;
  height: 15px;
}

.new-session-wraper {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-lightest);
  box-shadow: var(--shadow-lg);
  padding: 0;
  opacity: 0;
  min-width: 180px;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.1s ease;
  z-index: 10;
}

.new-session-wraper.loggedUser {
  min-width: 260px;
}

.newLoginBtn:hover .new-session-wraper {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.new-session-wraper ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.new-session-wraper li {
  border-bottom: none;
}

.new-session-wraper li:last-child {
  border-bottom: none;
}

.new-session-wraper li a {
  display: flex;
  align-items: center;
  column-gap: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: #1e293b;
  transition: all 0.15s ease;
  border-radius: 8px;
  min-width: max-content;
}

.new-session-wraper li a:before {
  content: "";
  width: 18px;
  height: 18px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: 50%;
  flex-shrink: 0;
}

/* Dashboard icon */
.session_links li:nth-child(1) a:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231176ca' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 12l2-3m0 0l7-4 7 4M5 9v10a1 1 0 001 1h12a1 1 0 001-1V9m-9 4l4 2m-2-2l-4 2'/%3E%3C/svg%3E");
}

/* Order Progress icon */
.session_links li:nth-child(2) a:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231176ca' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z'/%3E%3C/svg%3E");
}

/* Download Work icon */
.session_links li:nth-child(3) a:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231176ca' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4'/%3E%3C/svg%3E");
}

/* Request Revision icon */
.session_links li:nth-child(4) a:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231176ca' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M11 4a2 2 0 114 0 4 4 0 11-8 0 4 4 0 018 0M9 12h6m-2 0v6m0-6v6'/%3E%3C/svg%3E");
}

/* Manage Profile icon */
.session_links li:nth-child(5) a:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231176ca' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z'/%3E%3C/svg%3E");
}

/* Logout icon */
.session_links li:nth-child(6) a:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231176ca' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1'/%3E%3C/svg%3E");
}

.new-session-wraper li a:hover {
  background-color: #f1f5f9;
  color: #1176ca;
}

.new-session-wraper.loggedUser .info_wraper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.new-session-inner {
  width: 100%;
}

.infoToggle {
  width: 100%;
}

.info-head {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  column-gap: 15px;
  border-bottom: 1px solid #ccc;
}

.user_avatar {
  max-width: 40px;
  width: 100%;
  border-radius: 100px;
  background-color: #f2f6ff;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.user_avatar img {
  width: auto;
  height: auto;
  max-width: 24px;
  max-height: 24px;
  object-fit: contain;
}

.userName {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.userName .greetings {
  font-size: 17px;
  color: #000;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  font-weight: 500;
  line-height: 1.2;
}

.userName .greetings span {
  font-size: 13px;
  color: #918f94;
  font-weight: normal;
}

.session_links {
  padding-top: 10px;
}

.session_links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.session_links li {
  border-bottom: none;
  width: 100%;
}

.session_links li:last-child {
  border-bottom: none;
}

.session_links li a {
  display: flex;
  align-items: center;
  column-gap: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: #1e293b;
  transition: all 0.15s ease;
  border-radius: 8px;
  min-width: max-content;
}

.session_links li a:hover {
  background-color: #f1f5f9;
  color: #1176ca;
}

/* ============================================
   AI DETECTOR PAGE STYLES
   ============================================ */

.detectorPage {
  background-color: var(--primary-blue-dark);
}

.detectorPage .navbarWrapper a img {
  filter: brightness(0) invert(1);
}

.detectorPage .navItems a {
  color: var(--bg-white);
}

.detectorPage .navItems a:hover {
  color: var(--bg-lighter-blue);
}

.detectorPage .has-dropdown::before {
  filter: brightness(0) invert(1);
}

.detectorPage .orderNowBtn {
  background: var(--bg-white);
  color: var(--primary-blue-dark);
  border-color: var(--bg-white);
}

.detectorPage .orderNowBtn:hover {
  background: var(--bg-lighter-blue);
  border-color: var(--bg-lighter-blue);
}

.detectorPage .userIcon {
  border-color: var(--bg-white);
}

.detectorPage .userIcon img {
  filter: brightness(0) invert(1);
}

.detectorPage .dropdown-menu li a {
  color: var(--text-primary);
}

/* ============================================
   MOBILE HEADER (Hidden on desktop)
   ============================================ */

.mobile-header {
  display: none;
  width: 100%;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 11;
  background-color: var(--bg-white);
  padding: 15px 0;
  height: 58px;
  transition: var(--transition-normal);
}

.mobile-header.hidden {
  transform: translateY(-100%);
}

.mobile-header.visible {
  transform: translateY(0);
}

.mobile-header .navToggler {
  display: none;
}

/* Mobile-only elements - Hidden on desktop */
#mobileNavPages {
  display: none;
}

.headerOverlay {
  display: none;
}

/* ============================================
   PROMO BANNER ANIMATION
   ============================================ */

@keyframes blinkPromo {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

@media (max-width: 1199px) {

  /* Hide desktop header on mobile */
  .desktop-header {
    display: none !important;
  }

  /* Show mobile header */
  .mobile-header {
    display: block;
  }

  .headerOverlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 55;
    display: none;
  }

  .headerOverlay.show {
    display: block;
  }

  header {
    position: sticky;
    background-color: var(--bg-white);
    box-shadow: 0 4px 10px rgba(119, 119, 119, 0.15);
    height: 58px;
  }

  header.stickOrder {
    top: 0;
  }

  .navbarWrapper {
    justify-content: space-between;
  }

  .mobile-header .navToggler,
  button.navToggler {
    display: block;
    border: none;
    outline: none;
    background-color: transparent;
    cursor: pointer;
  }

  /* Mobile Navigation Sidebar */
  #mobileNavPages {
    display: none;
    align-items: unset;
    flex: 1;
    justify-content: unset;
    position: fixed;
    top: 0;
    height: 100vh;
    right: -270px;
    flex-direction: column;
    width: 270px;
    background-color: var(--bg-light-blue);
    transition: 0.1s ease all;
    overflow-y: auto;
    z-index: 60;
  }

  #mobileNavPages.show {
    right: 0;
    display: flex;
  }

  .pagesCentered {
    margin: 0;
    padding: 15px 0;
  }

  .pagesCentered ul {
    flex-direction: column;
  }

  li.service-nav-dd.has-dropdown,
  .navItems {
    position: relative;
    border-bottom: 1px solid var(--border-light);
  }

  .navItems a,
  .dropdown-menu .a {
    color: var(--text-primary);
    width: 100%;
    padding: 15px;
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    column-gap: 8px;
    font-weight: var(--font-medium);
  }

  .btnsWrap {
    flex-direction: column;
  }

  .btnsWrap .orderNowBtn {
    max-width: 160px;
    width: 100%;
    text-align: center;
    display: flex;
  }
 .btnsWrap .orderNowBtn:hover {
   background-color: var(--primary-blue-hover);
   border-color: var(--primary-blue-hover);
   color: var(--bg-white);
 }
  .navToggler {
    display: block;
    border: none;
    outline: none;
    background-color: transparent;
    cursor: pointer;
  }

  #mobileNavPages .dropdown-menu {
    display: none;
    visibility: visible;
    max-height: 250px;
    overflow-y: scroll;
    opacity: 1;
    left: 0;
    position: relative;
    transform: translateX(0);
    border: none;
    box-shadow: none;
    padding: 0;
  }

  #mobileNavPages .dropdown-menu.active {
    display: block;
  }

  #mobileNavPages .dropdown-menu li {
    border-bottom: 1px solid var(--border-light);
  }

  #mobileNavPages .dropdown-menu li:last-child {
    border-bottom: none;
  }

  #mobileNavPages .dropdown-menu li a {
    font-size: var(--text-sm);
    padding: 12px 15px;
  }

  #mobileNavPages .dropdown-menu.whyUs li:last-child a {
    color: var(--primary-blue);
    font-weight: var(--font-semi);
  }

  .dropdown-menu.bestOffers {
    min-width: 270px;
  }

  .navItems a:hover {
    color: var(--text-primary);
  }

  .has-dropdown:hover::before {
    transform: rotate(45deg);
    border-color: var(--text-primary);
  }

  .has-dropdown::before {
    top: 21px;
  }

  .has-dropdown.active::before {
    transform: rotate(-135deg);
    border-color: var(--primary-blue-lighter);
  }

  .sideNavLogo {
    padding: 28px 20px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .sideNavLogo button {
    background: none;
    outline: none;
    border: none;
    display: flex;
    transform: translateY(-3px);
    width: 30px;
    height: 30px;
  }

  .sideNavLogo button img {
    width: 30px;
    height: 30px;
    object-fit: scale-down;
  }

  #mobileNavPages .dropdown-menu.whyUs {
    min-width: 270px;
  }

  .navItems.has-dropdown.active > a {
    color: var(--primary-blue-lighter);
  }

  .has-dropdown.active::before {
    transform: rotate(180deg);
    background-image: url(../../assets/images/down-arrow-colored.webp);
  }

  .dropdown-menu .navItems:last-child {
    border-bottom: none;
  }

  .navbarWrapper a img {
    max-width: 180px;
    height: 100%;
  }

  .contactBtns {
    padding: 15px;
    margin-top: 30px;
    border-top: 1px solid var(--border-lightest);
  }

  .contactBtns a {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 17px;
    font-size: var(--text-sm);
    font-weight: var(--font-regular);
    line-height: 16px;
    color: var(--text-secondary);
  }

  .contactBtns a img {
    display: block;
    width: 14px;
    height: 14px;
  }

  .navItems.has-dropdown {
    padding-right: 0;
  }

  .dropdown-menu li a {
    font-size: var(--text-xs);
    color: var(--text-primary);
  }

  .detectorPage .navToggler img {
    filter: invert(1) !important;
  }

  .dropdown-menu {
    border-radius: 0;
  }

  /* Hide live chat button on mobile */
  .liveChatBtn {
    display: none;
  }
}
