@use '../../../styles/mixins';

.participant-menu {
  --color-text: white;
  --color-background-compact-menu: #212121DD;
  --color-background-compact-menu-hover: #00000066;
  --color-background: #212121DD;
  --color-item-active: #00000066;

  position: absolute;
  z-index: var(--z-modal-menu);

  .bubble {
    overflow: visible;

    padding: 0;
    border: none !important;
    border-radius: 0;

    color: var(--color-text);

    background: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;

    .group {
      overflow: hidden;

      margin-bottom: 0.5rem;
      border-radius: var(--border-radius-default);

      background: var(--color-background);
      backdrop-filter: blur(10px);
      box-shadow: 0 0.25rem 0.5rem 0.125rem rgba(16, 16, 16, 0.3);
    }
  }

  &.compact {
    .group {
      background: var(--color-background-compact-menu);
    }
  }

  .volume-control {

    @mixin thumb-styles() {
      width: 1.5rem;
      height: 3rem;
      border: none;
      border-radius: var(--border-radius-default);

      background: var(--range-color);
      box-shadow: -13.5rem 0 0 12.75rem var(--range-color);

      transition: 0.25s ease-in-out background-color, 0.25s ease-in-out box-shadow;
    }

    cursor: var(--custom-cursor, pointer);
    position: relative;
    overflow: hidden;
    height: 3rem;

    .info {
      pointer-events: none;

      position: relative;
      z-index: 1;

      display: flex;
      flex-direction: row;
      align-items: center;

      height: 100%;
      padding: 0.75rem 1rem;

      .AnimatedSticker {
        margin-right: 1rem;
      }
    }

    &.high {
      --range-color: #4DA6E0;
    }

    &.normal {
      --range-color: #57BC6C;
    }

    &.medium {
      --range-color: #CAA53B;
    }

    &.low {
      --range-color: #CB5757;
    }

    // Apply custom styles
    input[type="range"] {
      position: absolute;
      z-index: 0;
      top: 0;
      left: -1.5rem;

      width: calc(100% + 1.5rem);
      height: 3rem;
      margin: 0;

      // Note that while we're repeating code here,
      // that's necessary as you can't comma-separate these type of selectors.
      // Browsers will drop the entire selector if it doesn't understand a part of it.
      &::-webkit-slider-thumb {
        @include thumb-styles();
      }

      &::-moz-range-thumb {
        @include thumb-styles();
      }

      &::-ms-thumb {
        @include thumb-styles();
      }
    }

    @include mixins.reset-range();
  }
}
