/* Mobile breadcrumb: horizontally scrollable bar, professional look */
.wvu-breadcrumbs-compact {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 15px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity; /* slight snap for nicer feel */
  padding: 8px 12px; /* comfortable touch padding */
  border-radius: 8px;
  background: rgba(0,0,0,0.04); /* subtle neutral background, keeps brand colors of links */
}
.wvu-breadcrumbs-compact::-webkit-scrollbar { height: 8px; }
.wvu-breadcrumbs-compact::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 8px; }
.wvu-breadcrumbs-compact::-webkit-scrollbar-track { background: transparent; }

.wvu-breadcrumbs-compact > * { scroll-snap-align: start; }
.wvu-breadcrumbs-compact a,
.wvu-breadcrumbs-compact span {
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 10px; /* item-level padding for tap targets */
  border-radius: 6px;
}
.wvu-breadcrumbs-compact a:hover,
.wvu-breadcrumbs-compact a:focus {
  background: rgba(0,0,0,0.06);
  outline: none;
}

/* Divider between crumbs (keeps consistent, subtle look) */
.wvu-breadcrumbs-compact .wvu-breadcrumb-divider {
  color: rgba(0,0,0,0.4);
  padding: 0 2px;
}

/* Hide legacy toggle and menu entirely */
.wvu-breadcrumbs-toggle { display: none !important; }
.wvu-breadcrumbs-menu,
.wvu-breadcrumbs-menu.open { display: none !important; opacity: 0 !important; pointer-events: none !important; }

/* Visually hide the original breadcrumb list but keep it available for screen readers */
.wvu-breadcrumbs-original-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
/* Wrapper and stacking context helpers */
.wvu-breadcrumbs-wrapper { position: relative; display: block; z-index: 2147483647; }
.wvu-breadcrumbs-compact { position: relative; z-index: 2147483647; }

/* Small-screen behavior: full-width menu and stronger truncation */
@media (max-width: 360px) {
  .wvu-breadcrumbs-menu {
    left: 0 !important;
    transform: none !important;
    width: 100% !important;
    border-radius: 0 !important;
    top: 0 !important;
  }
  .wvu-breadcrumbs-menu li,
  .wvu-breadcrumbs-menu li a {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

/* Mobile layout rules for the compact control */
@media (max-width: 768px) {
  .wvu-breadcrumbs-wrapper { padding-left: 0.09rem; padding-right: 0; display: block; }

  .wvu-breadcrumbs-compact {
    margin-left: 0.06rem;
    max-width: calc(100% - 0.06rem);
    box-sizing: border-box;
    display: flex;
    width: 100%;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    min-width: 0;
    gap: 0.2rem;
  }

  /* Icon constraints: keep icons small and prevent them from pushing text */
  .wvu-breadcrumbs-compact img,
  .wvu-breadcrumbs-compact svg,
  .wvu-breadcrumbs-compact i,
  .wvu-breadcrumbs-compact .icon,
  .wvu-breadcrumbs-compact .et-pb-icon,
  .wvu-breadcrumbs-compact .dsm_home_icon {
    width: 1rem !important; height: 1rem !important; max-width: 1rem !important; max-height: 1rem !important;
    display: inline-block !important; vertical-align: middle !important; object-fit: contain !important;
    flex: 0 0 auto !important; margin-right: 0.25rem !important;
  }

  /* Ensure module wrappers do not overflow when compact UI is enabled */
  .wvu-breadcrumbs-wrapper .et_pb_module.dsm_breadcrumbs.dsm_breadcrumbs_0,
  .wvu-breadcrumbs-wrapper .dsm_breadcrumbs,
  .wvu-breadcrumbs-wrapper .dsm_breadcrumbs_wrap,
  .wvu-breadcrumbs-wrapper .et_pb_module.dsm_breadcrumbs {
    width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; overflow: hidden !important;
  }
  .wvu-breadcrumbs-wrapper .dsm_breadcrumbs a,
  .wvu-breadcrumbs-wrapper .dsm_breadcrumbs span,
  .wvu-breadcrumbs-wrapper .et_pb_module.dsm_breadcrumbs a,
  .wvu-breadcrumbs-wrapper .et_pb_module.dsm_breadcrumbs span { display: inline-block !important; max-width: 100% !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
}

/* Desktop: reveal original breadcrumbs; compact hidden */
@media (min-width: 769px) {
  .wvu-breadcrumbs-compact { display: none !important; }
  .wvu-breadcrumbs-wrapper { padding-left: 0 !important; padding-right: 0 !important; display: inline-block !important; }
  .wvu-breadcrumbs-original-hidden { position: static !important; width: auto !important; height: auto !important; padding: 0 !important; margin: 0 !important; overflow: visible !important; clip: auto !important; white-space: normal !important; border: none !important; }
}

/* Ensure Divi/Diamond breadcrumbs render horizontally and scroll on mobile even without compact markup */
@media (max-width: 768px) {
  .et_pb_module.dsm_breadcrumbs,
  .dsm_breadcrumbs_wrap,
  .dsm_breadcrumbs {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* The UL should be a single row, scrollable on X */
  .dsm_breadcrumbs {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.25rem !important; /* tighter default spacing */
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin; /* Firefox: make scrollbar small */
    scrollbar-color: rgba(0,0,0,0.12) transparent; /* Firefox colors */
    white-space: nowrap !important;
    padding: 0 !important; /* match desktop look without bulky background */
    margin: 0 !important;
    background: transparent !important; /* keep desktop colors */
    border-radius: 0 !important;
  }
  .dsm_breadcrumbs::-webkit-scrollbar { height: 4px; }
  .dsm_breadcrumbs::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 8px; }
  .dsm_breadcrumbs::-webkit-scrollbar-track { background: transparent; }

  /* Each list item stays inline without growing vertically */
  .dsm_breadcrumbs li,
  .dsm_breadcrumbs > li {
    list-style: none !important;
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* Links and spans truncate nicely */
  .dsm_breadcrumbs li a,
  .dsm_breadcrumbs li span {
    display: inline-flex !important;
    align-items: center !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    padding: 0 !important; /* remove extra padding to mirror desktop */
    border-radius: 0 !important;
    text-decoration: none !important;
  }
  .dsm_breadcrumbs li a:hover,
  .dsm_breadcrumbs li a:focus { background: rgba(0,0,0,0.06); outline: none; }

  /* Separator stays inline and compact */
  .dsm_breadcrumbs_separator,
  .dsm_separator_icon {
    display: inline-flex !important;
    align-items: center !important;
    color: inherit !important; /* use desktop color */
    margin: 0 0.4rem !important; /* match desktop-ish spacing */
    flex: 0 0 auto !important;
  }

  .dsm_breadcrumbs_separator
  {
    margin-bottom: 10px!important;
  }

   .dsm_breadcrumbs_wrap
   {
    padding-left: 24px!important;
    padding-right:24px!important;
   }

  /* Icon sizing so they don't push height */
  .dsm_breadcrumbs .et-pb-icon,
  .dsm_breadcrumbs .dsm_home_icon {
    font-family: 'ETmodules' !important; /* ensure correct Divi icon font */
    font-style: normal !important;
    font-weight: normal !important;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
    display: inline-block !important;
    margin-right: 0.2rem !important; /* tighter gap to text */
    vertical-align: middle !important;
    flex: 0 0 auto !important;
  }

  /* Also enforce icon font on the separator icon to avoid glyph "5" appearing */
  .dsm_breadcrumbs .dsm_separator_icon {
    font-family: 'ETmodules' !important;
    font-style: normal !important;
    font-weight: normal !important;
  }
}
