/*
 * @copyright   Copyright (C) 2010-2024 Combodo SAS
 * @license     http://opensource.org/licenses/AGPL-3.0
 */

/* 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: $ibo-spacing-0 !default;

$ibo-popover-menu--toggler-visual-hint--margin-left: 0.5rem !default;

$ibo-popover-menu--section--height: 100% !default;
$ibo-popover-menu--section--margin-x: $ibo-spacing-0 !default;
$ibo-popover-menu--section--margin-y: $ibo-spacing-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--toggler-visual-hint {
  margin-left: $ibo-popover-menu--toggler-visual-hint--margin-left;
}

.ibo-popover-menu--section {
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  margin: $ibo-popover-menu--section--margin-y $ibo-popover-menu--section--margin-x;
  width: $ibo-popover-menu--section--height;
  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;
  }
}