[data-bs-theme="dark"] {
  .btn-toggle::after {
    content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%28255,255,255,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 10l5-5 5 5'/%3e%3c/svg%3e");
  }
}

@media (min-width: 768px) {

  #navigation,
  .sidebar {
    flex: 0 0 clamp(15rem, 20vw, 19rem);
    width: clamp(15rem, 20vw, 19rem);
    min-width: 15rem;
    max-width: 19rem;
  }
}

#navigation,
.sidebar {

  background-color: var(--cin-bg-elevated) !important;
  border-right: 1px solid var(--cin-border) !important;
  box-shadow: var(--cin-shadow-sm);
  z-index: 1030;

  .offcanvas-md {

    &.bg-body-tertiary {
      background-color: var(--cin-bg-elevated) !important;
    }

    .navigation-groups {

      padding: var(--cin-spacing);
      
      .sidebar-group {
    
        margin-bottom: var(--cin-spacing-xs);
    
        &.is-dragging {
          opacity: .6;
        }
    
        &.is-drop-target {
          outline: 2px dashed rgba(var(--bs-primary-rgb), .5);
          outline-offset: 2px;
        }
    
    
        .sidebar-group-nav {
    
          .sidebar-item-wrapper {
    
            &:not(.btn-primary):hover {
              --bs-btn-color: #fff;
              --bs-btn-bg: #0067b4;
              --bs-btn-border-color: #0067b4;
              --bs-btn-hover-color: #fff;
              --bs-btn-hover-bg: rgb(0, 87.55, 153);
              --bs-btn-hover-border-color: rgb(0, 82.4, 144);
              --bs-btn-focus-shadow-rgb: 38, 126, 191;
              --bs-btn-active-color: #fff;
              --bs-btn-active-bg: rgb(0, 82.4, 144);
              --bs-btn-active-border-color: rgb(0, 77.25, 135);
              --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
              --bs-btn-disabled-color: #fff;
              --bs-btn-disabled-bg: #0067b4;
              --bs-btn-disabled-border-color: #0067b4;
            }
    
            a {
              color: inherit;
            }
          }
        }
    
        .sidebar-group-toggle-wrapper {
    
          .btn-toggle {
            padding: .25rem .5rem;
            font-weight: 600;
            color: var(--bs-emphasis-color);
            background-color: transparent;
            display: inline-flex;
            align-items: center;
            gap: .25rem;
            width: 100%;
    
            &:hover,
            &:focus {
              color: rgba(var(--bs-emphasis-color-rgb), .85);
              background-color: var(--bs-primary-bg);
            }
    
            &::after {
              margin-left: auto;
              line-height: 0;
              content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 10l5-5 5 5'/%3e%3c/svg%3e");
              transition: transform .35s ease;
              transform-origin: 50% 50%;
            }
    
            &[aria-expanded="true"] {
              color: rgba(var(--bs-emphasis-color-rgb), .85);
            }
    
            &.collapsed::after,
            &[aria-expanded="false"]::after {
              transform: rotate(180deg);
            }
          }
    
          a:not(.btn-primary):hover {
            --bs-btn-color: #fff;
            --bs-btn-bg: #0067b4;
            --bs-btn-border-color: #0067b4;
            --bs-btn-hover-color: #fff;
            --bs-btn-hover-bg: rgb(0, 87.55, 153);
            --bs-btn-hover-border-color: rgb(0, 82.4, 144);
            --bs-btn-focus-shadow-rgb: 38, 126, 191;
            --bs-btn-active-color: #fff;
            --bs-btn-active-bg: rgb(0, 82.4, 144);
            --bs-btn-active-border-color: rgb(0, 77.25, 135);
            --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
            --bs-btn-disabled-color: #fff;
            --bs-btn-disabled-bg: #0067b4;
            --bs-btn-disabled-border-color: #0067b4;
          }
        }
      }
    }
  }
}
