/**
 * Copyright (c) 2026-present, Goldman Sachs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@use 'mixins' as *;

.data-quality-custom-selector {
  @include flexVCenter;

  width: 100%;
  height: 2.8rem;
  border: 0.1rem solid var(--color-border-default);
  border-radius: 0.2rem;
  cursor: pointer;
  background: var(--color-bg-panel);

  &[disabled] {
    cursor: not-allowed;
    background: var(--color-bg-app);
    border-color: var(--color-border-default);

    .data-quality-custom-selector__label {
      color: var(--color-text-muted);
    }

    .data-quality-custom-selector__dropdown__trigger svg {
      color: var(--color-text-muted);
    }
  }

  &__label {
    @include flexVCenter;

    padding: 0 0.5rem;
    height: 100%;
    width: calc(100% - 2rem);
    color: var(--color-text-muted);
    font-size: 1.2rem;
    user-select: none;
  }

  &__clear {
    @include flexCenter;

    flex-shrink: 0;
    width: 2rem;
    min-width: 2rem;
    height: 100%;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--color-text-muted);

    &:hover {
      color: var(--color-text-primary);
    }

    svg {
      font-size: 1.1rem;
    }
  }

  &__dropdown__trigger {
    @include flexCenter;

    width: 2rem;
    min-width: 2rem;
    height: 100%;

    svg {
      color: var(--color-text-secondary);
      font-size: 1.2rem;
    }
  }

  &__dropdown__option {
    @include flexVCenter;

    height: 2.8rem;
    padding: 0 1rem;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--color-text-muted);

    &:hover {
      background: var(--color-dark-blue-shade-100);
    }
  }
}
