@use "../abstracts/variables" as *;
@use "../abstracts/mixins" as *;

.no-technical-explorer {
  display: flex;
  flex-direction: column;
  gap: $spacing-md;
}

.no-technical-explorer__tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: $spacing-sm;
}

.no-technical-explorer__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
  color: $color-text-soft;
  border: 1px solid $color-border;
  border-radius: $radius-pill;
  background: $color-panel-bg;
  font-size: $font-size-sm;
  font-weight: 600;
  line-height: 1;
}

.no-technical-explorer__tab[aria-pressed="true"] {
  color: $color-blue-strong;
  border-color: $color-blue-strong-tint-28;
  background: $color-blue-tint-10;
}

.no-technical-explorer__description {
  margin: 0;
  color: $color-text-muted;
  font-size: $font-size-md;
  line-height: 1.5;
}

.no-technical-explorer__toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: $spacing-sm;
  align-items: center;
}

.no-technical-explorer__search,
.no-technical-explorer__page-size {
  @include control;

  width: 100%;
}

.no-technical-explorer__actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: $spacing-sm;
}

.no-technical-explorer__action {
  @include button-secondary;

  white-space: nowrap;
}

.no-technical-explorer__flush-help {
  color: $color-text-muted;
  font-size: $font-size-xs;
  line-height: 1.45;
}

.no-technical-explorer__table-wrap {
  overflow-x: auto;
  border: 1px solid $color-border-soft;
  border-radius: $radius-card;
  background: $color-card-bg;
}

.no-technical-explorer__table {
  width: 100%;
  border-collapse: collapse;

  th,
  td {
    padding: 0.85rem 0.9rem;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid $color-border-soft;
    font-size: $font-size-sm;
  }

  th {
    white-space: nowrap;
    color: $color-text-soft;
    background: $color-panel-bg;
    font-weight: 700;
  }

  td {
    color: $color-text;
  }

  tbody tr:hover {
    background: $color-blue-tint-04;
  }
}

.no-technical-explorer__sort-button {
  display: inline-flex;
  align-items: center;
  padding: 0;
  cursor: pointer;
  color: inherit;
  border: 0;
  background: transparent;
  font: inherit;
  gap: 0.35rem;

  &--asc::after {
    content: "↑";
    font-size: 11px;
  }

  &--desc::after {
    content: "↓";
    font-size: 11px;
  }
}

.no-technical-explorer__empty {
  padding: $spacing-md;
  color: $color-text-muted;
  font-size: $font-size-sm;
  line-height: 1.5;
}

.no-technical-explorer__pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: $spacing-sm;
}

.no-technical-explorer__pagination-summary {
  color: $color-text-muted;
  font-size: $font-size-sm;
}

.no-technical-explorer__pagination-actions {
  display: inline-flex;
  align-items: center;
  gap: $spacing-sm;
}

.no-technical-explorer__pagination-button {
  @include button-secondary;
}

.no-technical-explorer__row {
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.no-technical-explorer__row--success {
  background: $color-green-tint-08;

  &:hover {
    background: $color-green-tint-12;
  }
}

.no-technical-explorer__row--warning {
  background: $color-orange-tint-10;

  &:hover {
    background: $color-orange-tint-14;
  }
}

.no-technical-explorer__row--danger {
  background: $color-red-tint-10;

  &:hover {
    background: $color-red-tint-14;
  }
}

.no-technical-explorer__row-link {
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: $color-blue-strong;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
}

@media (max-width: 960px) {
  .no-technical-explorer__toolbar {
    grid-template-columns: 1fr;
  }

  .no-technical-explorer__actions {
    width: 100%;
  }
}
