/**
 * Main menu styling
 */
.tw-nav-item {
  position: relative;
}

/* Dropdown menu container */
.has-children .tw-absolute {
  min-width: 200px;
  background: white;
  border-radius: 0.375rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 0.5rem 0;
  z-index: 1001;
}

/* Base styles for dropdown */
.tw-nav-item .tw-absolute {
  display: block !important;
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 200ms ease-out;
  margin-top: 0;
  min-width: 12rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Show dropdown on hover/focus */
.tw-nav-item:hover .tw-absolute,
.tw-nav-item:focus-within .tw-absolute,
.tw-nav-item:focus .tw-absolute,
.tw-nav-item:focus-visible .tw-absolute {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Dropdown menu items */
.tw-nav-item .tw-absolute a {
  display: block;
  padding: 0.5rem 1rem;
  color: #1f2937;
  text-decoration: none;
  transition: background-color 150ms ease-in-out;
}

.tw-nav-item .tw-absolute a:hover {
  background-color: #f3f4f6;
}

/* Dark mode support */
.dark .tw-nav-item .tw-absolute {
  background: #1f2937;
  border-color: #374151;
}

.dark .tw-nav-item .tw-absolute a {
  color: #f9fafb;
}

.dark .tw-nav-item .tw-absolute a:hover {
  background-color: #374151;
}
/* Ensure menuOverlay is above all other elements */
#menuOverlay {
  z-index: 1001 !important;
}

 .top-bar .menu,.top-bar .menu ul {
 padding-top: 0px;
 padding-bottom: 0px;
 height: 36px;
 align-items: anchor-center;
}

.top-bar .menu li.menu-item--active-trail {
padding-top: 0px;
padding-bottom: 0px;
height: 36px;
background: black;
align-content: center;
}

/* Active menu item styling */
.top-bar .menu a.is-active {
  background-color: #000000; /* Black background */
  color: white !important; /* Blue text color */
  border-radius: 0.25rem; /* rounded */
  padding: 0 0.5rem; /* Remove top/bottom padding, keep left/right */
  font-weight: 600;
  box-shadow: none; /* Remove shadow */
  position: relative;
}

/* Remove the bottom indicator since we're using full background color */
.top-bar .menu a.is-active::after {
  display: none;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background-color: white;
  border-radius: 1px;
}

/* Improve menu item spacing and hover effects */
.top-bar .menu a {
  position: relative;
  transition: all 0.2s ease;
}

.top-bar .menu a:hover {
  transform: translateY(-1px);
}

/* --- Dropdown and submenu styles moved from menu--menu-top-categories.html.twig --- */
.tw-nav-item:hover .dropdown {
  display: block !important;
}

.dropdown {
  display: none;
  position: absolute !important;
  left: 0;
  top: 100%;
  min-width: 12rem;
  background-color: white !important;
  border-radius: 0.375rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
  border: 1px solid rgba(229, 231, 235, 1) !important;
  z-index: 50 !important;
  padding: 0.5rem 0;
}

@media (prefers-color-scheme: dark) {
  .dropdown {
    background-color: #1e293b !important;
    border: 1px solid rgba(51, 65, 85, 0.5) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
  }
}

.dark .dropdown {
  background-color: #1e293b !important;
  border: 1px solid rgba(51, 65, 85, 0.5) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.tw-nav-item {
  position: relative;
}

.hover-bridge {
  position: absolute;
  height: 15px;
  width: 100%;
  bottom: -15px;
  left: 0;
  z-index: 49;
}

.dropdown a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #374151 !important;
  transition: background-color 0.2s, color 0.2s;
}

.dropdown a:hover {
  background-color: #EBF5FF !important;
  color: #2563eb !important;
}

@media (prefers-color-scheme: dark) {
  .dropdown a {
    color: #cbd5e1 !important;
  }
  .dropdown a:hover {
    background-color: rgba(30, 58, 138, 0.3) !important;
    color: #3b82f6 !important;
  }
}

.dark .dropdown a {
  color: #cbd5e1 !important;
}

.dark .dropdown a:hover {
  background-color: rgba(30, 58, 138, 0.3) !important;
  color: #3b82f6 !important;
}

/*.myaccount-menu-dropdown span {
    padding-top: 9px;
}*/

@media (max-width: 640px) {
    .myaccount-menu-dropdown span {padding-top: 4px;}
}

.priority-menu__active-link, .is-active {
  background-color: #f1f2f3!important;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration:none!important;
}

.region-topbar-center .is-active, .region-mobile-header-footer-pre .is-active {
  background-color: #444!important;
}

.menu--main-menu ul > li:last-child a {
  background-color: #1c58a0;
  padding: 0.375rem 0.75rem;
  border-radius: 0.125rem;
}
