/* =========================
   Advanced select
========================= */

@use "../kit-deps" as *;

.advanced-select-container {
  position: relative;
  display: inline-flex;
  width: 100%;
  max-width: 320px;
}

.advanced-select {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  background-color: $surface-panel-muted;
  border: $border-width-base $border-style-base $mint-600;
  border-left-width: $border-width-accent;
  border-radius: $radius-md;
  box-shadow: 0 8px 24px rgba($neutral-900, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition:
    opacity $motion-fast $motion-ease,
    visibility $motion-fast $motion-ease,
    transform $motion-fast $motion-ease;

  &.a-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .popup-options-container {
    .not-found {
      width: 100%;
      padding: $space-4;
      text-align: center;
      display: none;
      color: $neutral-500;
      font-size: 14px;

      &.show {
        display: block;
      }
    }

    .options {
      width: 100%;
      display: none;
      padding: $space-1 0;

      &.show {
        display: block;
      }

      .option {
        padding: $space-2 $space-4;
        cursor: pointer;
        font-size: 14px;
        color: $neutral-900;
        transition:
          color $motion-fast $motion-ease,
          background-color $motion-fast $motion-ease;

        &.hide {
          display: none;
        }

        &:hover,
        &.focus {
          color: $neutral-900;
          background-color: $yellow-300;
        }
      }
    }
  }
}
