/**
 * @file
 * Custom footer menu styles for Design Day site
 */

/* Footer menu container styling */
.region-footer-col-1 {
  padding: 0;
}

/* Footer menu block */
.footer-col-menu {
  margin-bottom: 2rem;
}

/* Footer column title */
.footercol-title {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #63b3a2;
}

/* Footer navigation */
.footer-col-menu .navbar-nav {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Footer nav items */
.footer-col-menu .nav-item {
  margin-bottom: 0.75rem;
  position: relative;
}

.footer-col-menu .nav-item:last-child {
  margin-bottom: 0;
}

/* Footer nav links */
.footer-col-menu .nav-link {
  color: #fff;
  font-size: 0.875rem;
  padding: 0.5rem 0;
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
  line-height: 1.5;
}

.footer-col-menu .nav-link:hover,
.footer-col-menu .nav-link:focus {
  color: #63b3a2;
  padding-left: 0.5rem;
  border-bottom: 2px solid #63b3a2;
}

/* Active link styling */
.footer-col-menu .nav-link.active {
  color: #63b3a2;
  font-weight: 500;
}

/* Dropdown styling for footer */
.footer-col-menu .dropdown {
  position: relative;
}

/* Hide dropdown arrow in footer */
.footer-col-menu .dropdown-toggle::after {
  display: none;
}

/* Footer dropdown menu */
.footer-col-menu .dropdown-menu {
  position: static !important;
  display: block !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  padding-left: 30px !important;
  margin: 0 !important;
  box-shadow: none !important;
  min-width: 100% !important;
}

/* Alternative approach using margin on the ul */
.footer-col-menu ul.dropdown-menu.nav-level-1 {
  margin-left: 30px !important;
  padding-left: 0 !important;
}

/* Target the dropdown menu within footer regions specifically */
.region-footer-col-1 .dropdown-menu,
.region-footer-col-1 ul.dropdown-menu,
#block-egrbs5-mainnavigation-2 .dropdown-menu {
  margin-left: 30px !important;
  padding-left: 0 !important;
}

/* Ensure the dropdown list items respect the indentation */
.footer-col-menu .dropdown .dropdown-menu {
  display: block !important;
  position: static !important;
  float: none !important;
  width: auto !important;
  margin-left: 30px !important;
  margin-top: 0 !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* More specific targeting for footer dropdown submenu */
.footer-col-menu .nav-item.dropdown .dropdown-menu,
.footer-col-menu li.dropdown ul.dropdown-menu,
#block-egrbs5-mainnavigation-2 .dropdown .dropdown-menu,
#block-egrbs5-mainnavigation-2 ul.nav-level-1 {
  margin-left: 20px !important;
  padding-left: 0 !important;
  width: calc(100% - 20px) !important;
}

/* Alternative: indent the entire dropdown container */
.footer-col-menu .nav-item.dropdown ul.nav-level-1 {
  margin-left: 20px !important;
  display: block !important;
  position: static !important;
}

/* Footer dropdown items */
.footer-col-menu .dropdown-item {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8125rem;
  padding: 0.4rem 0 0.4rem 1.5rem;
  background: transparent;
  border: none;
  transition: all 0.3s ease;
  display: block;
  width: 100%;
  text-align: left;
  text-decoration: none;
  position: relative;
}

/* Add arrow icon before submenu items */
.footer-col-menu .dropdown-item::before {
  content: "↳";
  position: absolute;
  left: 0;
  top: 0.4rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  line-height: 1;
}

/* Ensure dropdown items in nav-level-1 are properly styled */
.footer-col-menu ul.nav-level-1 .nav-item,
.footer-col-menu .dropdown-menu .nav-item {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.footer-col-menu .dropdown-item:hover,
.footer-col-menu .dropdown-item:focus {
  color: #63b3a2;
  background: transparent;
  padding-left: 2rem;
  text-decoration: none;
}

/* Change arrow color on hover */
.footer-col-menu .dropdown-item:hover::before,
.footer-col-menu .dropdown-item:focus::before {
  color: #63b3a2;
}

/* Active dropdown item */
.footer-col-menu .dropdown-item.active,
.footer-col-menu .dropdown-item.is-active {
  color: #63b3a2;
  font-weight: 500;
  background: transparent;
}

/* Active arrow color */
.footer-col-menu .dropdown-item.active::before,
.footer-col-menu .dropdown-item.is-active::before {
  color: #63b3a2;
}

/* Remove focus outlines */
.footer-col-menu .nav-link:focus,
.footer-col-menu .dropdown-item:focus {
  outline: none;
  box-shadow: none;
}

/* Ensure dropdown menus are always visible in footer */
.footer-col-menu .dropdown-menu {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: static !important;
  transform: none !important;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .footercol-title {
    font-size: 1.125rem;
  }
  
  .footer-col-menu .nav-link {
    font-size: 0.8125rem;
  }
  
  .footer-col-menu .dropdown-item {
    font-size: 0.75rem;
    padding-left: 1rem;
  }
  
  .footer-col-menu .dropdown-item:hover {
    padding-left: 1.5rem;
  }
}

/* Contextual links styling for footer */
.footer-col-menu .contextual {
  position: absolute;
  right: 0;
  top: 0;
}

/* Hide contextual links on frontend for cleaner look */
body:not(.user-logged-in) .footer-col-menu .contextual {
  display: none;
}