// Кнопки — docplat_new

@mixin docplat-new-btn-base {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--BTN-RADIUS);
  font-family: var(--font-bold);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;

  &:focus,
  &:active {
    outline: none;
  }

  &:disabled {
    cursor: not-allowed;
    opacity: 0.5;
  }
}

@mixin docplat-new-btn-primary {
  @include docplat-new-btn-base;
  border: none;
  background: var(--PRIMARY);
  color: var(--WHITE);

  &:hover:not(:disabled) {
    background: #2a5ae0;
  }
}

@mixin docplat-new-btn-secondary {
  @include docplat-new-btn-base;
  background: var(--WHITE);
  border: 2px solid var(--PRIMARY);
  color: var(--PRIMARY);

  // &:hover:not(:disabled) {
  //   background: #eef3fc;
  // }
}

@mixin docplat-new-btn-light($border-color, $text-color: $border-color) {
  @include docplat-new-btn-base;
  background: transparent;
  border: var(--BTN-LIGHT-BORDER-WIDTH, 2px) solid #{$border-color};
  color: #{$text-color};

  &:hover:not(:disabled) {
    background: var(--WHITE);
  }
}

// Основная кнопка (платформа на теме docplat_new)
.btn-primary {
  @include docplat-new-btn-primary;
}

// Общий стиль без background (outline)
.light-btn-primary {
  @include docplat-new-btn-light(var(--PRIMARY));
}
.light-btn-success {
  @include docplat-new-btn-light(var(--SUCCESS));
}
.light-btn-info {
  @include docplat-new-btn-light(var(--INFO));
}
.light-btn-warning {
  @include docplat-new-btn-light(var(--WARNING), var(--DARK-GREY));
}
.light-btn-danger {
  @include docplat-new-btn-light(var(--DANGER));
}
.light-btn-default {
  @include docplat-new-btn-light(var(--MIDLE-GRAY), var(--DARK-GREY));
}

// Кнопки в модальных окнах
.sln-core-dialog-modal,
.sln-core-info-dialog {
  .btn-primary {
    @include docplat-new-btn-primary;
  }

  .sln-cancel-close,
  .light-btn-primary {
    @include docplat-new-btn-secondary;
  }
}

// Auth remote
.sln-btn__signIn {
  @include docplat-new-btn-base;
  width: 100%;
  background: #e8effe;
  border: none;
  color: var(--PRIMARY);

  &:hover:not(:disabled) {
    background: #dce8fd;
  }

  p {
    margin: 0;
    color: inherit;
    font: inherit;
    background: transparent;
  }
}

// кнопки в гриде (размер S)
.sln-btn-full-s {
  min-width: 33px;
  min-height: 33px;
  font-size: 11px;
  padding: 0 10px;
}
