@use '../../../styles/typography';

:host {
  display: flex;
  flex-direction: column;
  height: 100%;

  .filter {
    border-bottom: 1px solid var(--color-separator);
    display: flex;
    gap: 1.25rem;
    padding: 0.5rem;

    .filter-input {
      width: 12rem;
    }

    .show-full-path {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
  }

  .visualization {
    position: relative;
    overflow: hidden;
    flex: 1;

    .side-pane {
      position: relative;
      padding: 1rem;

      .close-btn {
        position: absolute;
        top: 1rem;
        right: 1rem;

        mat-icon {
          font-size: 16px;
          width: 16px;
          height: 16px;
        }
      }

      h2 {
        @extend %heading-400;
        margin: 0;
        padding-top: 0;
      }

      table {
        margin-top: 1rem;
      }
    }

    .legend {
      position: absolute;
      bottom: 0.75rem;
      left: 0.75rem;
      padding: 0.5rem;
      border-radius: 0.5rem;
      background-color: color-mix(in srgb, var(--color-background) 80%, transparent 20%);
      backdrop-filter: blur(8px);

      ul {
        list-style-type: none;
        padding: 0;
        margin: 0;

        li {
          margin: 0;
          display: flex;
          align-items: center;
          gap: 0.375rem;
          color: var(--tertiary-contrast);

          &:not(:last-child) {
            margin-bottom: 0.75rem;
          }

          &::before {
            content: '';
            display: block;
            width: 12px;
            height: 12px;
            border: 1px solid;
          }

          &.eager::before {
            border-color: var(--red-05);
            background-color: var(--red-06);
          }

          &.lazy::before {
            border-color: var(--blue-02);
            background-color: var(--blue-03);
          }

          &.active::before {
            border-color: var(--green-02);
            background-color: var(--green-03);
          }

          &.dashed-line::before {
            border-color: var(--quaternary-contrast);
            background-color: transparent;
            border-style: dashed;
            border-width: 1px;
            width: 16px;
            height: 0;
          }
        }
      }
    }
  }
}

.unsupported-version {
  width: 50%;
  margin: auto;
}
