// This file is part of Indico.
// Copyright (C) 2002 - 2026 CERN
//
// Indico is free software; you can redistribute it and/or
// modify it under the terms of the MIT License; see the
// LICENSE file for more details.

@use 'base' as *;
@use './boxes' as *;

.i-dropdown {
  @include border-all();
  @include default-border-radius();
  @include single-box-shadow();
  background: $light-gray;
  margin-top: 0;
  padding: 0;
  position: absolute;
  z-index: 1;
  display: none;
  box-sizing: initial;

  > li {
    cursor: pointer;
    display: block;
    list-style-type: none;
    min-width: 1em;
    padding: 0.1em 1em;

    a {
      display: block;
      line-height: 1.7rem;
      width: 100%;

      &[class*='icon-']::before {
        font-size: 1.2rem;
        margin-right: 0.3em;
        vertical-align: -10%;
      }

      &.disabled {
        color: $gray;
        cursor: default;
      }
    }

    &:hover a:not(.disabled),
    &:hover a:not(.disabled)[class*='icon-']::before {
      color: $light-black;
    }
  }
}

.dropup-menu {
  @include icon-after('icon-arrow-down');

  &::after {
    transform: rotate(-180deg);
  }
}
