/*
 * Copyright (c) 2023 Thomas Hansen - For license inquiries you can contact thomas@ainiro.io.
 */

@import "src/assets/styles/_variables/colors.scss";
@import "src/assets/styles/_variables/mixin.scss";
@import "src/assets/styles/_variables/sizing.scss";

::ng-deep .endpoints-list {
  .mat-expansion-panel-body {
    padding-left: 0;
    padding-right: 0;
    margin-left: 3px;
    margin-right: 3px;
  }

  .mat-content {
    overflow: visible;
  }

  #inner-panel {
    border-radius: $ainiro_radius;

    .mat-content {
      font-size: 14px;
    }

    .mat-expansion-panel-header {
      height: unset;
      min-height: 40px;
    }
  }
}

.methods {
  min-width: 50px;
  min-height: 20px;
  width: 50px;
  height: 20px;
  font-size: 10px;
  border-radius: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  color: $ainiro_default;

  &.get {
    background-color: $ainiro_info;
  }

  &.post,
  &.socket {
    background-color: $ainiro_success;
  }

  &.put,
  &.patch {
    background-color: $ainiro_warning;
  }

  &.delete {
    background-color: $ainiro_error;
  }
}

.box-sizing {
  box-sizing: border-box;
}

.copy-btn {
  .mat-icon {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
  }
}

::ng-deep {
  .cdk-drag-preview {
    box-sizing: border-box;
    border-radius: 4px;
    background-color: white;
    display: flex;
    align-items: center;
    box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14),
      0 3px 14px 2px rgba(0, 0, 0, 0.12);
  }

  .cdk-drag-placeholder {
    opacity: 0;
  }

  .cdk-drag-animating {
    transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
  }

  .hoverable-table.cdk-drop-list-dragging .mat-header-cell:not(.cdk-drag-placeholder) {
    transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
  }
}

.virtual-viewport {
  height: 53vh;

  ::ng-deep .cdk-virtual-scroll-spacer {
    max-height: 100%;
  }

  @include scrollbar(transparent, transparent, 7px);

  &:hover {
    @include scrollbar($ainiro_default_alt, $ainiro_default_grey4, 7px);
  }
}
