/* Desktop menu styling */
global-header [data-desktop-menu] {
  display: flex;
  flex-direction: row;
  align-items: center;
}

/* Menu item image and description styling */
global-header [data-desktop-menu] .menu-item-image,
global-header [data-mobile-menu] .menu-item-image {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

global-header [data-desktop-menu] .menu-item-content,
global-header [data-mobile-menu] .menu-item-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

global-header [data-desktop-menu] .menu-item-title {
  display: block;
  font-weight: 600;
  line-height: 1.2;
}

global-header [data-mobile-menu] .menu-item-title {
  display: block;
  font-weight: bold;
  line-height: 1.2;
  font-size: 16px;
}

global-header [data-desktop-menu] .menu-item-description,
global-header [data-mobile-menu] .menu-item-description {
  display: block;
  font-size: 12px;
  color: #242424;
  margin-top: 2px;
  line-height: 1.3;
  font-weight: normal;
}

global-header [data-desktop-menu] .menu-item-wrapper {
  display: inline-block;
  position: relative;
}

global-header [data-desktop-menu] .menu-item-wrapper .app-header-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 24px !important;
  text-decoration: none !important;
}

global-header [data-desktop-menu] .menu-item-wrapper .app-header-menu-link:hover,
global-header [data-desktop-menu] .menu-item-wrapper .app-header-menu-link:focus,
global-header [data-desktop-menu] .menu-item-wrapper .app-header-menu-link:active {
  text-decoration: underline !important;
  text-decoration-color: #016b88 !important;
  color: #016b88 !important;
}

/* Dropdown sub-menu */
global-header [data-desktop-menu] .menu-item-wrapper.has-dropdown .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 17px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  width: 244px;
  z-index: 1000;
  list-style: none;
  padding: 0;
  padding-bottom: 10px;
  margin: 0;
  border-radius: 0px 0px 8px 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12), 0 2px 4px rgba(0, 0, 0, .08);
}

/* Add line at top of dropdown when open */
global-header [data-desktop-menu] .menu-item-wrapper.has-dropdown.dropdown-open .sub-menu::before {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 8px 8px 0 0;
}

/* Main header dropdown - wider width */
global-header [data-desktop-menu] .menu-item-wrapper.has-dropdown .sub-menu.truckopedia-main-dropdown {
  width: 340px;
}

.bg-btn {
  background-color: #ec5928 !important;
}
global-header [data-desktop-menu] .menu-item-wrapper.has-dropdown.dropdown-open .sub-menu {
  display: block;
}

global-header [data-desktop-menu] .menu-item-wrapper.has-dropdown .sub-menu li {
  margin: 0;
  padding: 0 12px;
  margin-bottom: 10px;
}

/* Add padding to first item to account for the line */
global-header [data-desktop-menu] .menu-item-wrapper.has-dropdown.dropdown-open .sub-menu li:first-child {
  padding-top: 8px;
}

global-header [data-desktop-menu] .menu-item-wrapper.has-dropdown .sub-menu li:last-child {
  margin-bottom: 0px;
}

global-header [data-desktop-menu] .menu-item-wrapper.has-dropdown .sub-menu li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  padding: 12px 10px;
  text-decoration: none !important;
  border: none !important;
  border-bottom: none !important;
}

global-header [data-desktop-menu] .menu-item-wrapper.has-dropdown .sub-menu li a:hover,
global-header [data-desktop-menu] .menu-item-wrapper.has-dropdown .sub-menu li a:focus,
global-header [data-desktop-menu] .menu-item-wrapper.has-dropdown .sub-menu li a:active,
global-header [data-desktop-menu] .menu-item-wrapper.has-dropdown .sub-menu li a.menu-active {
  background-color: #e4eef3;
  color: inherit !important;
  text-decoration: none !important;
  border: none !important;
  border-bottom: none !important;
  border-radius: 4px;
}

global-header [data-desktop-menu] .menu-item-wrapper.has-dropdown > a {
  text-decoration: none !important;
}

/* Rotate dropdown chevron when dropdown is open */
global-header [data-desktop-menu] .menu-item-wrapper.has-dropdown.dropdown-open .dropdown-chevron {
  transform: rotate(180deg);
}

global-header [data-desktop-menu] .menu-item-wrapper.has-dropdown .dropdown-chevron {
  transition: transform 0.3s ease;
  display: inline-block;
  vertical-align: middle;
  margin-left: 0px !important;
  transform-origin: center center;
}

global-header [data-desktop-menu] .menu-item-wrapper.has-dropdown .sub-menu li a .dropdown-arrow,
global-header [data-desktop-menu] .menu-item-wrapper.has-dropdown .sub-menu li a > img[src*="right-arrow.webp"] {
  margin-left: auto;
  flex-shrink: 0;
}

global-header [data-desktop-menu] .menu-item-wrapper.has-dropdown .dropdown-chevron {
  margin-left: auto;
  flex-shrink: 0;
}

/* Mobile menu dropdown styling */
global-header [data-mobile-menu] .menu-item-wrapper.has-dropdown .sub-menu {
  display: none;
  margin: 0;
  padding: 0;
}

global-header [data-mobile-menu] .menu-item-wrapper.has-dropdown.dropdown-open .sub-menu {
  display: block;
}

/* Add line at top of mobile dropdown when open */
global-header [data-mobile-menu] .menu-item-wrapper.has-dropdown.dropdown-open .sub-menu::before {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background-color: #242424;
  margin-bottom: 0;
}

/* Ensure first item has proper spacing after the line */
global-header [data-mobile-menu] .menu-item-wrapper.has-dropdown.dropdown-open .sub-menu li:first-child a {
  padding-top: 12px;
}

global-header [data-mobile-menu] .menu-item-wrapper.has-dropdown .sub-menu li {
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
  padding-left: 0;
}

global-header [data-mobile-menu] .menu-item-wrapper.has-dropdown .sub-menu li::before {
  position: absolute;
  left: 0;
  color: #000;
  font-weight: bold;
  top: 50%;
  transform: translateY(-50%);
}

global-header [data-mobile-menu] .menu-item-wrapper.has-dropdown .sub-menu li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  padding: 12px 20px 12px 15px;
  text-decoration: none !important;
  border: none !important;
  position: relative;
  gap: 12px;
  margin-left: 0px;
}

/* Style dropdown items differently from title - 14px and normal weight */
global-header [data-mobile-menu] .menu-item-wrapper.has-dropdown .sub-menu li a .menu-item-title {
  font-size: 14px !important;
  font-weight: normal !important;
  padding-top: 0px !important;
}

global-header [data-mobile-menu] .menu-item-wrapper.has-dropdown .sub-menu li a .dropdown-arrow {
  color: #016784;
  font-size: 30px;
  font-weight: normal;
  line-height: 1;
  text-align: center;
}

global-header [data-mobile-menu] .menu-item-wrapper.has-dropdown .sub-menu li a > img[src*="right-arrow.webp"] {
  height: auto;
  object-fit: contain;
  margin-left: auto;
  flex-shrink: 0;
}

global-header [data-mobile-menu] .menu-item-wrapper.has-dropdown .sub-menu li a:hover,
global-header [data-mobile-menu] .menu-item-wrapper.has-dropdown .sub-menu li a:focus,
global-header [data-mobile-menu] .menu-item-wrapper.has-dropdown .sub-menu li a:active,
global-header [data-mobile-menu] .menu-item-wrapper.has-dropdown .sub-menu li a.menu-active {
  background-color: #e4eef3;
  color: inherit !important;
  text-decoration: none !important;
  border-radius: 4px;
}

/* Remove underline from dropdown parent */
global-header [data-mobile-menu] .menu-item-wrapper.has-dropdown > a {
  text-decoration: none !important;
}

/* Mobile dropdown chevron - aligned with other arrows */
global-header [data-mobile-menu] .menu-item-wrapper.has-dropdown .mobile-dropdown-chevron {
  margin-left: auto;
  flex-shrink: 0;
  color: #016784;
  font-size: 14px;
  transition: transform 0.3s ease;
  margin-right: -3px;
}

global-header [data-mobile-menu] .menu-item-wrapper.has-dropdown.dropdown-open .mobile-dropdown-chevron {
  transform: rotate(180deg);
}

.global-header-main {
  height: 120px !important;
}
@media (max-width: 991px) {
    global-header [data-mobile-menu] {
      display: flex !important;
      flex-direction: column !important;
    }
    
    global-header [data-mobile-menu] .app-header-menu-link {
      display: flex !important;
      align-items: center !important;
      width: 100% !important;
      margin-bottom: 8px !important;
      padding: 12px 20px 12px 15px !important;
      gap: 12px !important;
    }
    .global-header-main {
      height: 80px !important;
    }
  }


/* Mobile Search Input Styles */
.mobile-search-wrapper {
  margin-bottom: 20px;
}

.mobile-search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.mobile-search-icon {
  position: absolute;
  right: 12px;
  color: #242424;
  font-size: 21px;
  pointer-events: none;
  z-index: 1;
}

.mobile-search-input {
  width: 100%;
  padding: 12px 15px 12px 40px;
  border: none !important;
  border-radius: 6px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}

.mobile-search-input:focus {
  border-color: #016784;
}

.mobile-search-results {
  margin-top: 10px;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}

.mobile-search-results.has-results {
  display: block;
}

.mobile-search-results .search-result-item {
  padding: 12px 15px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.mobile-search-results .search-result-item:hover {
  background-color: #f8f9fa;
}

.mobile-search-results .search-result-item strong {
  display: block;
  color: #242424;
  margin-bottom: 4px;
}

.mobile-search-results .search-result-item span {
  color: #888;
  font-size: 14px;
}

.mobile-search-results .search-no-results {
  padding: 15px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

.mobile-search-results .search-loading {
  padding: 15px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

/* Mobile menu arrow styling */
[data-mobile-menu] .app-header-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 12px 20px 12px 15px;
  gap: 12px;
  text-decoration: none !important;
}

/* Mobile CTA Button Styling */
[data-mobile-menu] .mobile-menu-cta {
  width: 100%;
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

[data-mobile-menu] .mobile-menu-cta svg {
  flex-shrink: 0;
}

/* Mobile menu arrow styling - for both span and img */
[data-mobile-menu] .mobile-menu-arrow,
[data-mobile-menu] .app-header-menu-link > img[src*="right-arrow.webp"],
global-header [data-mobile-menu] .app-header-menu-link > img[src*="right-arrow.webp"] {
  margin-left: auto;
  flex-shrink: 0;
  position: static;
  transform: none;
}

[data-mobile-menu] .mobile-menu-arrow {
  color: #016784;
  font-size: 30px;
  font-weight: normal;
  line-height: 1;
  text-align: center;
}

[data-mobile-menu] .app-header-menu-link > img[src*="right-arrow.webp"] {
  height: auto;
  object-fit: contain;
}

/* Forms & Documents Dropdown Styles */
.forms-docs-dropdown {
  width: 1280px !important;
  min-width: 1000px;
  max-width: 1280px;
  padding: 0px 10px 32px 10px !important;
  background: #fff;
  left: 0 !important;
  transform: none !important;
}

.forms-docs-dropdown-content {
  display: flex;
  flex-direction: row;
  gap: 30px;
  flex-wrap: nowrap;
  margin-bottom: 20px;
  justify-content: flex-start;
  align-items: flex-start;
}

.forms-docs-category-column {
  flex: 1 1 auto;
  min-width: 180px;
  max-width: 220px;
  display: flex;
  flex-direction: column;
}

.forms-docs-category-title {
  font-size: 14px;
  font-weight: bold;
  color: #808080;
  text-transform: uppercase;
  margin-top: 32px;
  padding-left: 20px;
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0);
}

.forms-docs-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  font-weight: 600;
  color: #242424;
}

.forms-docs-category-list li {
  margin: 0;
  padding: 0;
}

.forms-docs-form-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px;
  color: #242424;
  text-decoration: none;
  font-size: 16px;
  transition: background-color 0.2s;
  border-radius: 4px;
  min-height: 32px;
  box-sizing: border-box;
}

.forms-docs-form-link:hover,
.forms-docs-form-link:active,
.forms-docs-form-link:focus {
  background-color: #e4eef3;
  color: #242424 !important;
  text-decoration: none !important;
}

.forms-docs-form-link .dropdown-arrow {
  margin-left: 8px;
  width: 7.4px;
  height: 12px;
  flex-shrink: 0;
}

.forms-docs-view-all {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #016784;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  margin-top: 12px;
  margin-left: 20px;
  padding-top: 8px;
  line-height: 1.4;
}

.forms-docs-view-all .dropdown-arrow {
  width: 7.4px;
  height: 12px;
  flex-shrink: 0;
  margin-left: 12px;
}

.forms-docs-view-all:hover,
.forms-docs-view-all:active,
.forms-docs-view-all:focus {
  text-decoration: none !important;
  color: #016784 !important;
}

.forms-docs-dropdown-footer {
  text-align: center;
  padding-top: 20px;
  margin-top: 20px;
}

.forms-docs-view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 55px;
  border: 1px solid #016784;
  color: #016784;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
}

.forms-docs-view-all-btn .dropdown-arrow {
  width: 7.4px;
  height: 12px;
  flex-shrink: 0;
}

.forms-docs-view-all-btn:hover,
.forms-docs-view-all-btn:active,
.forms-docs-view-all-btn:focus {
  text-decoration: none !important;
  color: #016784 !important;
  background-color: #f0fff4;
}

/* Amazon Connect chat button - adjust position */
@media (max-width: 991px) {
  #amazon-connect-open-widget-button {
    position: fixed !important;
    bottom: 5px !important;
    transition: bottom 0.3s ease;
    right: min(2vh, 2vw);
  }

  body.scrolling-up #amazon-connect-open-widget-button {
    bottom: 110px !important;
  }

  /* Cookie consent revisit button - adjust position based on scroll */
  .cky-revisit-bottom-left {
    position: fixed !important;
    bottom: 110px !important;
    left: 15px !important;
    transition: bottom 0.3s ease;
  }

  body.scrolling-down .cky-revisit-bottom-left {
    bottom: 15px !important;
  }

  body.scrolling-up .cky-revisit-bottom-left {
    bottom: 110px !important;
  }
}