/*
 * CloudBeaver - Cloud Database Manager
 * Copyright (C) 2020-2024 DBeaver Corp and others
 *
 * Licensed under the Apache License, Version 2.0.
 * you may not use this file except in compliance with the License.
 */
.buttonLabel {
  composes: theme-button__label from global;
}
.buttonIcon {
  composes: theme-button__icon from global;
}
.ripple {
  composes: theme-button_ripple from global;
}

.button {
  composes: theme-button from global;
  display: flex;

  & .buttonLabel {
    line-height: 1;
    opacity: 1;
  }

  & .buttonIcon {
    & > * {
      width: 100%;
    }

    &.disabled {
      opacity: 0.5;
    }
  }

  & .loader,
  & .buttonLabel {
    transition: opacity cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
  }

  & .loader {
    position: absolute;
    opacity: 0 !important;
  }

  &.loading {
    & .loader {
      opacity: 1 !important;
    }

    & .buttonLabel {
      opacity: 0;
    }
  }
}

.raised {
  composes: theme-button_raised from global;
}
.unelevated {
  composes: theme-button_unelevated from global;
}
.outlined {
  composes: theme-button_outlined from global;
}
.secondary {
  composes: theme-button_secondary from global;
}
