@import 'base';

.my-popover { // Fuck you bootstrap
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: color(black, normal, 0.3);
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;

  &.popover_mode_keep-constrained {
    overflow: scroll;

    .popover__container {
      max-width: 98%;
    }
  }

  &.popover_mode_fill-screen {
    .popover__container {
      width: 98%;
      height: 98%;
    }

    .popover__content {
      flex: 1;
    }
  }

  .popover__container {
    box-shadow: 0 2px 5px 2px color(black, light);
    background-color: white;
    position: relative;
    padding: 10px;
    margin: 10px;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    border-radius: 5px;
    max-height: 90%;
    max-width: 90%;
  }

  .popover__header {
    flex-shrink: 0;
    display: flex;
    color: color(black);
    font-size: 24px;
    align-items: center;
    justify-content: center;

    .popover__header__title {
      display: flex;
      flex: 1;
      align-items: center;
      justify-content: center;
      text-align: center;
    }

    .popover__header__close-button {
      @extend %link;
      color: color(black, light);
      font-size: 30px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }

  .popover__content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: scroll;
  }
}
