/**
* Copyright IBM Corp. 2016, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

@use '@carbon/styles/scss/config' as *;
@use '@carbon/styles/scss/spacing' as *;
@use '@carbon/styles/scss/theme' as *;
@use '@carbon/styles/scss/layout' as *;
@use '@carbon/styles/scss/components/button' as *;
@use '../../globals/vars' as *;
@use '../../globals/imports' as *;

@mixin button {
  :host(#{$c4d-prefix}-button) {
    @include emit-layout-tokens();

    display: inline-flex;

    svg {
      @extend .#{$prefix}--btn__icon;
    }

    .#{$prefix}--btn {
      flex-grow: 1;
      max-inline-size: 100%;
    }

    .#{$prefix}--btn--hidden {
      display: none;
      visibility: hidden;

      @media print {
        display: inline-block;
        color: $text-primary;
        font-weight: 200;
        visibility: visible;

        span {
          font-weight: 600;
          margin-inline: calc(-1 * #{$spacing-02}) $spacing-02;
        }
      }
    }
  }
}
