/* 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-breadcrumbs {
    @include bk.component-base(bk-breadcrumbs);
    
    @include bk.font(bk.$font-family-display, bk.$font-weight-regular, bk.$font-size-s);
    
    > ol {
      @include bk.flex-row;
      flex-wrap: wrap;
      column-gap: bk.$spacing-1;
      
      .bk-breadcrumb__item {
        color: bk.$theme-breadcrumb-text-default;
        
        &:not(:nth-last-child(1 of .bk-breadcrumb__item)) {
          .bk-breadcrumb__item__link::after {
            content: '/' / '';
            margin-inline-start: bk.$spacing-1;
          }
        }
        
        .bk-breadcrumb__item__link {
          text-decoration: none;
          color: bk.$theme-breadcrumb-text-link;
          
          &:hover {
            color: bk.$theme-text-link-hover; // FIXME: separate token for breadcrumb?
          }
          
          &.bk-breadcrumb__item__link--disabled {
            cursor: not-allowed;
            color: bk.$theme-text-label-disabled;
          }
        }
      }
    }
  }
}
