
@import "../../mixins/_vendor-prefixes.less";


/**
 * c8y smart rest tab - Component styles
 *
 * Note: Uses @size-* tokens for spacing where applicable.
 *
 * Intentionally hardcoded values:
 * - Component-specific dimensions: Fixed sizes for component layout
 * - Off-grid spacing: Component-specific positioning
 * - Border widths (1px, 2px, 3px): Standard borders
 * - Font-sizes: Typography
 * - Percentages: Layout
 */
.c8y-smart-rest-tab {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 100%;
  flex: 1 1 100%;
  padding: @size-20;
  background-color: @component-background-default;
  box-shadow: 0 1px 1px rgba(@black, 0.1);
  .transition(all 0.25s ease-in-out);
  .row {
    display: block;
    margin-right: calc(-1 * @size-5);
    margin-left: calc(-1 * @size-5);
    > [class^='col-xs-'],
    > [class*=' col-xs'],
    > [class^='col-sm-'],
    > [class*=' col-sm'],
    > [class^='col-md-'],
    > [class*=' col-md'],
    > [class^='col-lg-'],
    > [class*=' col-lg'] {
      padding-right: @size-5;
      padding-left: 5px;
    }
  }
}

.smart-rest-editor {
  @media (max-width: @screen-sm-max) {
    position: relative;
    .col-xs-12 {
      position: static;
    }
    .c8y-smart-rest-tab {
      position: absolute;
      top: 0;
      left: 0;
      z-index: 100;
      width: 100%;
    }
  }
  @media (max-width: @screen-xs-max) {
    .c8y-smart-rest-tab {
      right: -15px;
      left: -15px;
      padding-right: 30px;
      padding-left: 30px;
      width: auto;
    }
  }
}

.smart-rest-csv-viewer,
.smart-rest-request-editor {
  code {
    background-color: transparent;
    color: @gray-50;
  }
}
