/*!
 * Copyright (C) 2013-2021 Combodo SARL
 *
 * This file is part of iTop.
 *
 * iTop is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * iTop is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 */

/* SCSS variables */
$ibo-popover-menu--background-color: $ibo-color-white-100 !default;
$ibo-popover-menu--border-radius: $ibo-border-radius-300 !default;
$ibo-popover-menu--padding: 0 !default;

$ibo-popover-menu--section-border-radius: $ibo-popover-menu--border-radius !default;

.ibo-popover-menu{
  display: none;
  padding: $ibo-popover-menu--padding;
  background-color: $ibo-popover-menu--background-color;
  @extend %ibo-elevation-300;
  border-radius: $ibo-popover-menu--border-radius;
  flex-wrap: wrap;
  position: absolute;

  &.ibo-is-opened{
    display: flex;
    flex-direction: column;
  }
}


.ibo-popover-menu--section{
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  margin: 0px 0px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden; /* To avoid first/last entries of the menu to have no border-radius on hover */
  
  &:first-child{
    border-radius: $ibo-popover-menu--section-border-radius $ibo-popover-menu--section-border-radius 0 0;
  }
  &:last-child {
    border-radius: 0 0 $ibo-popover-menu--section-border-radius $ibo-popover-menu--section-border-radius;
  }
}