@use '../../styles';
@use '../../themes/defaults';

table.jse-transform-wizard {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;

  input {
    font-family: inherit;
    font-size: inherit;
  }

  tr {
    th {
      font-weight: normal;
      text-align: left;
      width: 60px;
    }

    td {
      .jse-horizontal {
        width: 100%;
        display: flex;
        flex-direction: row;
        margin-bottom: styles.$padding-half;

        // svelte-select
        // TODO: this styling should be configured globally
        :global(.svelte-select .multi-item) {
          align-items: center;
        }
        :global(.svelte-select .value-container) {
          gap: 0 !important;
        }

        :global(.svelte-select.jse-filter-path) {
          flex: 4;
          margin-right: styles.$padding-half;
        }

        :global(.svelte-select.jse-filter-relation) {
          flex: 1.5;
          margin-right: styles.$padding-half;
        }

        :global(.svelte-select.jse-sort-path) {
          flex: 3;
          margin-right: styles.$padding-half;
        }

        :global(.svelte-select.jse-sort-direction) {
          flex: 1;
        }

        :global(.svelte-select.jse-projection-paths) {
          flex: 1;
        }

        :global(.svelte-select input) {
          box-sizing: border-box;
        }

        .jse-filter-value {
          flex: 4;
          padding: 4px 8px;
          border: defaults.$input-border;
          border-radius: defaults.$input-radius;
          outline: none;
          background: defaults.$input-background;
          color: inherit;

          &:focus {
            border: defaults.$input-border-focus;
          }
        }
      }
    }
  }
}
