
.menu-arrow {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6rem;
  color: #aaa;
}

.has-submenu {
  position: relative;
}

    #wrapper {
      padding-left: 210px;
      transition: all .4s ease;
      height: 100%;
    }
  
    #wrapper.active {
      padding-left: 70px;
    }
  
    #sidebar-wrapper {
      width: 210px;
      background: #F1F1F1;
      position: fixed;
      height: 100%;
      top: 65px;
      left: 0;
      z-index: 1000;
    }
  
    #wrapper.active #sidebar-wrapper {
      width: 59px;
    }
  
    .sidebar-nav {
      list-style: none;
      padding: 0;
      margin: 0;
    }
    .no-transition * {
  transition: none !important;
}
  
    .sidebar-nav li a {
      display: flex;
      align-items: center;
      color: #1a73a3;
      text-decoration: none;
      padding: 10px 15px;
      transition: background .3s ease;
      position: relative;
    }
  
    .sidebar-nav li a:hover {
      background: rgb(164, 216, 247);
    }
  
    .sidebar-nav li a i {
      width: 30px;
      text-align: center;
      margin-right: 10px;
    }
  
    .sidebar-nav li a span {
      transition: transform 0.4s ease, opacity 0.4s ease;
      white-space: nowrap;
    }
  
    #wrapper.active .sidebar-nav li a span {
      transform: translateX(-200px);
      opacity: 0;
      pointer-events: none;
    }
    #wrapper.active .sidebar-nav li a .menu-arrow {
      transform: translate(5px, -50%);
      opacity: 1;
      position: absolute;
      right: 15px;
      top: 50%;
      pointer-events: auto;
    }
  
    .sidebar-nav .sidebar-brand a {
      font-size: 18px;
      color: white;
      background-color: #2f94cc;
    }
  
    .sidebar-nav .sidebar-brand a:hover {
      color: white;
      background-color: #2f94cc;
    }
  
/* Ensure submenu appears on the right of the parent item */
.submenu {
  list-style: none;
  padding-left: 0;
  display: none;
  position: absolute;
  left: 100%; /* Position to the right of the parent item */
  top: 0;
  width: 200px;
  background-color: #f9f9f9;
  z-index: 1001;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

/* Show submenu when the parent has the 'show' class */
.submenu.show {
  display: block;
  width: 190px!important;
}

.submenu li a {
  font-size: 14px;
  padding: 10px;
  color: #1a73a3;
}

.submenu li a:hover {
  background: #e0f0fb;
}

/* Adjust for smaller screens if necessary */
@media (max-width: 767px) {
  .submenu {
    left: 0; /* Reset the left position for smaller screens */
    width: 100%; /* Full width for the submenu */
  }
}
    .has-submenu {
      position: relative;
    }
  
    @media (max-width: 767px) {
      #wrapper {
        padding-left: 70px;
      }
  
      #wrapper.active {
        padding-left: 150px;
      }
  
      #wrapper.active #sidebar-wrapper {
        width: 150px;
      }
}

@media (max-width: 980px) {
  #sidebar-wrapper{
    top: 60px;
  }
}
   
/* Initial icon style */
#toggle-icon {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* When the menu is active (opened), change the icon to an arrow */
#menu-toggle.active #toggle-icon {
  transform: rotate(90deg);
}

/* Optionally, if you want a smooth change in opacity */
#toggle-icon {
  transition: opacity 0.3s ease;
}

#menu-toggle.active #toggle-icon {
  opacity: 0;
}

#menu-toggle.active #toggle-icon:before {
  content: '\f061'; /* FontAwesome arrow icon (right) */
  font-family: 'FontAwesome';
  font-size: 24px;
  opacity: 1;
  transition: opacity 0.10s ease;
}


@media (max-width: 760px) {
    #wrapper {
        padding-left: 59px;  /* Adjust the padding when the menu is collapsed */
    }

    #wrapper.active {
        padding-left: 150px;  /* Adjust the padding when the menu is active (open) */
    }

    #wrapper.active #sidebar-wrapper {
        width: 150px;  /* Set sidebar width when active */
    }

    #sidebar-wrapper {
        width: 210px;  /* Sidebar width on larger screens */
    }

    #wrapper.active #sidebar-wrapper {
        width: 59px;  /* Sidebar width when collapsed */
    }

    .sidebar-nav li a span {
        transition: transform 0.4s ease, opacity 0.4s ease;
        white-space: nowrap;
    }

    #wrapper.active .sidebar-nav li a span {
        transform: translateX(-200px);  /* Hide text when collapsed */
        opacity: 0;
        pointer-events: none;
    }

    .sidebar-nav .sidebar-brand a {
        font-size: 18px;
        color: white;
        background-color: #2f94cc;
    }

    .sidebar-nav .sidebar-brand a:hover {
        color: white;
        background-color: #2f94cc;
    }

    /* Toggle button icon changes */
    #toggle-icon {
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    #menu-toggle.active #toggle-icon {
        transform: rotate(90deg);
    }

    #toggle-icon {
        transition: opacity 0.3s ease;
    }

    #menu-toggle.active #toggle-icon {
        opacity: 0;
    }

    #menu-toggle.active #toggle-icon:before {
        content: '\f061';  /* FontAwesome arrow icon (right) */
        font-family: 'FontAwesome';
        font-size: 24px;
        opacity: 1;
        transition: opacity 0.10s ease;
    }
}

.submenu li a.active {
  background-color: #d1e9f9;
  font-weight: bold;
}

@media (max-width: 767px) {
  .submenu.active {
    left: 61px;
    width: 170px;
  }
  .submenu {
    left: 61px;
    width: 170px;
}
}

.sidebar-nav li.active > a {
  background-color: #d1e9f9;
  font-weight: bold;
}

.btn_sidebar {
    color: #ffffff!important;
    background: #2f94cc!important;
    border-radius: 5px!important;
    text-decoration: none!important;
    /*border: 2px solid #ffffff;*/
    min-width: 10rem;
}

.btn_sidebar:hover {
    color: #2f94cc !important;
    background-color: #ffffff!important;
    text-decoration: none!important;
    border: 2px solid #2f94cc!important;
}

.sidebar_link span {
    color: rgb(156, 156, 222);
}
.btn_link {
    font-size: 0.8em;
}
.btn_return {
    color: #ffffff;
    background: #b9b9b9;
}

.dropdown-container {
    display: none;
}

.dropdown-btn{
    border: 0;
    background-color: #000000;
    color: #b5b5be;
    font-size: medium;
    padding: 0.5rem 0.9rem;
    margin-left: .8rem;
}

.dropdown-btn:hover{
    font-weight: 400;
    border-left: 3px solid white;
    color: white;
}

.dropdown-btn.active{
    border: 0;
    background-color: #a08e8e;
    color: white;
    width: 250px;
    font-weight: 400;
    border-left: 6px solid rgb(84, 0, 0);
    text-align: left;
}



  /* Media query for smaller screens (e.g., when the screen width is less than 768px) */
@media (max-width: 760px) {
  #wrapper.active #page-content-wrapper {
    margin-left: -98px!important /* collapsed sidebar width */
  }

  .wrapper {
    padding-left: 60px; /* Reduce the padding */
  }

  .wrapper .sidebar {
    width: 60px!important; /* Collapse the sidebar */
  }

  .wrapper .sb-item-list > .sb-item > .sb-text {
    position: absolute;
    transform: translateX(-200%);
    opacity: 0;
  }

  .wrapper .btn-toggle-sidebar .sb-icon.fa-angle-double-left {
    display: none!important;
  }

  .wrapper .btn-toggle-sidebar .sb-icon.fa-angle-double-right {
    display: none!important;
  }
  .wrapper .btn-toggle-sidebar{
    border-bottom: 0!important;
  }
  .wrapper .texy{
    position: absolute;
    transform: translateX(-200%);
    opacity: 0;
  }
  .vertical-menu {
    height: 400px;
    overflow-y: auto;
    z-index: 1;
    width: 190px;
    top: -93px!important;
  }
  .wrapper{
    font-size: 12px;
  }
}

/*PAGE Content*/
@media (min-width: 768px) {
  .container, .container-md, .container-sm {
      max-width: 100%;
  }
}

#page-content-wrapper {
  transition: margin-left 0.4s ease;
}

#wrapper.active #page-content-wrapper {
  margin-left: -11px; /* collapsed sidebar width */
}


/*tooltipサイドメニュー*/
.sidebar-nav li a[data-tooltip] {
  position: relative;
}

.sidebar-nav li a[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: #333;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  margin-left: 8px;
  z-index: 1000;
}

#wrapper.active .sidebar-nav li a[data-tooltip]:hover::after {
  opacity: 1;
}