/* ==========================================================================
   VSP Mobile Menu Styles - Cleaned & Adjusted for Admin Bar + Banner
   ========================================================================== */

/* 🔹 Root Layout Variables */
/* 👇 This sets custom values we use for spacing and layout (like banner height) */
:root {
  --admin-bar-height: 46px;
  --cov-banner-height: 0px;
}

/* 🔹 Base Toggle Visibility */

/* 👇 This controls the button that opens the mobile menu */
#vsp-menu-toggle {
  display: none;
}


/* 🔹 Toggle Button */
.burger-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #0f225e;
  position: absolute;
 top: calc(var(--admin-bar-height) + var(--cov-banner-height) + 0.5rem);
  right: 1rem;
  z-index: 1001;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.burger-toggle .menu-label {
  font-size: 1rem;
  font-weight: bold;
}

/* 🔹 Mobile Slideout Container */
/* 👇 This is the mobile menu container. It's hidden by default and slides in when opened. */
.mobile-slideout {
  position: fixed;
  top: calc(var(--admin-bar-height) + var(--cov-banner-height));
  height: calc(100% - (var(--admin-bar-height) + var(--cov-banner-height)));
  right: -100%;
  width: 80%;
  background: #f5f6fa;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.3);
  transition: right 0.3s ease-in-out;
  z-index: 9999;
  padding: 1rem;
  overflow-y: auto;
}

/* 👇 This is the mobile menu container. It's hidden by default and slides in when opened. */
.mobile-slideout.open {
  right: 0;
}

/* 🔹 Close Button */
/* 👇 This is the X button used to close the menu */
.close-menu {
  background: none;
  border: none;
  font-size: 2rem;
  color: #0f225e;
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1002;
  cursor: pointer;
}

/* 👇 This is the X button used to close the menu */
.close-menu,
.burger-toggle {
  background: none;
  outline: none;
  box-shadow: none;
}

/* 👇 This is the X button used to close the menu */
.close-menu:focus,
/* 👇 This is the X button used to close the menu */
.close-menu:active,
/* 👇 This is the X button used to close the menu */
.close-menu:hover,
.burger-toggle:focus,
.burger-toggle:active,
.burger-toggle:hover {
  background: none;
  color: inherit;
  outline:auto;
  box-shadow: none;
  
}

/* 🔹 Title */
.mobile-menu-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: #0f225e;
  padding: 1rem 0;
  border-bottom: 1px solid #ccc;
  margin-bottom: 10px;
}

/* 🔹 Search Input */
.mobile-search-form {
   position: relative;
  margin: 1rem auto;
  padding-bottom: 1.5rem;
  max-width: 280px;
  border-bottom: 1px solid #ccc;
}

.search-wrapper {
  position: relative;
  width: 100%;
}


/* 👇 This is the search input box inside the mobile menu */
#mobile-search {
 width: 85%;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem; /* space for icons on right */
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
}

#search-icon,
.clear-search {
  position: absolute;
  top: 15px;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: #0f225e;
   
}




.search-wrapper button {
  background: none;
  border: none;
  font-size: 1.25rem;
  margin-left: 0rem;
  color: #0f225e;
  cursor: pointer;
  padding:5px;
}

/* 🔹 Clear Search */
.clear-search {
  right:3rem;
}

.clear-search:hover {
  color: #f00;
}

/* 🔹 Navigation Panels */
/* 👇 These are panels for submenu levels that slide in and out */
.nav-panels {
  position: relative;
  height: auto;
}

/* 👇 These are panels for submenu levels that slide in and out */
.nav-panel {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  width: 100%;
  height: auto;
  background: transparent;
  transition: transform 0.3s ease-in-out;
  pointer-events: none;
  opacity: 0;
}

/* 👇 These are panels for submenu levels that slide in and out */
.nav-panel.is-active {
   display: block;
  transform: translateX(-100%);
  pointer-events: auto;
  opacity: 1;
}

/* 👇 These are panels for submenu levels that slide in and out */
.nav-panel.slide-back {
  transform: translateX(-200%);
}

/* 🔹 Navigation Buttons */
/* 👇 Buttons for going forward and backward between menu levels */
.nav-next,
/* 👇 Buttons for going forward and backward between menu levels */
.nav-back {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  font-weight: 600;
  color: #0f225e;
  cursor: pointer;
  font-size: 1rem;
}

/* 👇 Buttons for going forward and backward between menu levels */
.nav-next:hover,
/* 👇 Buttons for going forward and backward between menu levels */
.nav-back:hover {
  background: #e6e6e6;
}

.chevron {
  font-size: 1.75rem;
  transition: transform 0.2s ease;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 3px solid #0f225e;
  outline-offset: 2px;
  border-radius: 4px;
}


/* 🔹 Responsive Rules */
/* 👇 This part makes the menu show only on small screens (phones/tablets) */
@media (max-width: 768px) {
  #vsp-mobile-menu,
/* 👇 This controls the button that opens the mobile menu */
  #vsp-menu-toggle {
    display: block;
  }
}

/* === Lowe's-Inspired Navigation Item Styling === */
/* 👇 These are panels for submenu levels that slide in and out */
.nav-panel ul > li {
  border-bottom: 1px solid #e0e0e0;
  padding: 0;
}

/* 👇 These are panels for submenu levels that slide in and out */
.nav-panel ul > li a,
/* 👇 These are panels for submenu levels that slide in and out */
.nav-panel ul > li button.nav-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f225e;
  background: white;
  width: 100%;
  padding: 1.2rem 1rem;
  text-align: left;
  border: none;
  text-decoration: none;
  border-radius: 0;
}

/* 👇 These are panels for submenu levels that slide in and out */
.nav-panel .chevron {
  font-size: 1.75rem;
  margin-left: 1rem;
}

/* 👇 These are panels for submenu levels that slide in and out */
.nav-panel ul > li a:hover,
/* 👇 These are panels for submenu levels that slide in and out */
.nav-panel ul > li button.nav-next:hover {
  background: #f7f7f7;
}

/* 👇 These are panels for submenu levels that slide in and out */
.nav-panel ul {
  background: #fff;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 👇 This supports dark mode styles for users who have it enabled */
@media (prefers-color-scheme: dark) {
/* 👇 This is the mobile menu container. It's hidden by default and slides in when opened. */
  .mobile-slideout {
    background: #1f1f1f;
    color: #f0f0f0;
  }

/* 👇 These are panels for submenu levels that slide in and out */
  .nav-panel ul {
    background: #2a2a2a;
    box-shadow: none;
  }

/* 👇 These are panels for submenu levels that slide in and out */
  .nav-panel ul > li {
    border-bottom: 1px solid #444;
  }

/* 👇 These are panels for submenu levels that slide in and out */
  .nav-panel ul > li a,
/* 👇 These are panels for submenu levels that slide in and out */
  .nav-panel ul > li button.nav-next {
    background: #2a2a2a;
    color: #ffffff;
  }

/* 👇 These are panels for submenu levels that slide in and out */
  .nav-panel ul > li a:hover,
/* 👇 These are panels for submenu levels that slide in and out */
  .nav-panel ul > li button.nav-next:hover {
    background: #333;
  }

/* 👇 This is the X button used to close the menu */
  .close-menu,
  .burger-toggle {
    color: #f0f0f0;
  }

/* 👇 This is the search input box inside the mobile menu */
  #mobile-search {
    background-color: #1f1f1f;
    color: #ffffff;
    border: 1px solid #444;
  }

  .clear-search,
  #search-icon {
    color: #ccc;
  }
}
