/* Copyright (c) Fortanix, Inc.
|* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
|* the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */

@use '../../../styling/defs.scss' as bk;

@layer baklava.components {
  .bk-app-layout-sidebar {
    @include bk.component-base(bk-app-layout-sidebar);
    container-type: inline-size;
    
    --bk-app-layout-sidebar-inset: #{bk.$spacing-4}; // Allow sidebar child components to know the inset
    
    align-self: start; // https://ishadeed.com/article/position-sticky-css-grid
    overflow: hidden;
    
    padding-block-start: bk.$spacing-6;
    padding-inline: var(--bk-app-layout-sidebar-inset);
    
    display: flex;
    flex-direction: column;
    
    /*
    &.bk-app-layout-sidebar--collapsible {
      transition: all 300ms ease-in-out;
      transition-property: width, grid-template-columns;
      
      .bk-app-layout-sidebar__action-collapse {
        margin: bk.$spacing-2;
        padding: bk.$spacing-1 bk.$spacing-2;
        background: var(--bk-panel-color-background);
        cursor: pointer;
      }
    }
    */
    
    // Separators
    hr {
      margin-block: bk.$spacing-3;
      border: none;
      border-block-start: bk.rem-from-px(1) solid bk.$theme-side-nav-menu-divider-default;
    }
  }
}
