// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only

@use '../mixins';
@use '../variables';

.MediaQualitySelector {
  &__popper {
    @include mixins.module-composition-popper;
    & {
      color: var(--color-label-primary);
      padding-block: 12px;
      padding-inline: 16px;
      width: auto;
    }
  }

  &__title {
    @include mixins.font-body-1-bold;
    margin-bottom: 12px;
  }

  &__option {
    @include mixins.button-reset();

    & {
      align-items: center;
      border-radius: 6px;
      display: flex;
      height: 42px;
      margin-block: 2px;
      margin-inline: 0;
      min-width: 200px;
    }

    &--checkmark {
      height: 12px;
      margin-block: 0;
      margin-inline: 6px;
      width: 16px;
    }

    &--selected {
      @include mixins.color-svg(
        '../images/icons/v3/check/check-compact.svg',
        currentColor
      );
    }

    &--title {
      @include mixins.font-body-2;
    }

    &--description {
      @include mixins.font-subtitle;
    }

    &:hover {
      @include mixins.light-theme() {
        background-color: variables.$color-gray-05;
      }

      @include mixins.dark-theme() {
        background-color: variables.$color-gray-65;
      }
    }

    &:focus {
      outline: none;
    }

    &:focus-visible {
      box-shadow: 0 0 1px 1px variables.$color-ultramarine;
    }
  }
}
