/* 
 * Mobile Menu Fix v2
 * Fixes overflow issues with long section numbers
 */

/* Mobile menu container modifications */
@media (max-width: 768px) {
  .manual-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 100%;
  }
  
  /* Fix the scrollbar appearance */
  .navbar-collapse {
    overflow-x: hidden !important;
  }
  
  /* Better menu spacing */
  .listitms {
    padding-left: 10px !important;
  }

  /* Ensure text wraps properly */
  .inner-sub-category {
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: normal !important;
    hyphens: auto !important;
    display: inline-block !important;
    line-height: 1.3 !important;
    padding: 4px 0 !important;
    margin-bottom: 2px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Remove the bullet and pad the section numbers properly */
  .inner-sub-category::first-letter {
    opacity: 0;
    width: 0;
    display: inline;
    position: absolute;
  }
  
  /* Make menu items more compact */
  .x--sfe-TocEntry2-TOC-1-0 {
    padding: 0 !important;
    margin: 0 !important;
  }
  
  /* Adjust section heading spacing */
  .x--sfe-TocTitle-TOC-1-0.main-topic {
    padding: 8px 0 !important;
    font-size: 16px !important;
  }
  
  /* Make menu links more tappable */
  .listitms a {
    padding: 5px 0 !important;
    display: block !important;
  }

  /* Fix border and separations */
  .menu-section-accordian {
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  
  /* Make the section numbers slightly smaller */
  .inner-sub-category {
    font-size: 13px !important;
  }
}

/* Improve the arrow indicators and accordion behavior */
@media (max-width: 768px) {
  .listitmmain.accordion {
    position: relative;
  }
  
  .listitmmain.accordion:after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(255,255,255,0.5);
    border-bottom: 2px solid rgba(255,255,255,0.5);
    transform: translateY(-50%) rotate(45deg);
    transition: transform 0.2s ease;
  }
  
  .listitmmain.accordion.active:after {
    transform: translateY(-50%) rotate(-135deg);
  }
} 