//////////////////////////////////////////////////////////////////////////////////////////
//   _  _ ____ _  _ ___  ____                                                           //
//   |_/  |__| |\ | |  \ |  |    This file belongs to Kando, the cross-platform         //
//   | \_ |  | | \| |__/ |__|    pie menu. Read more on github.com/kando-menu/kando     //
//                                                                                      //
//////////////////////////////////////////////////////////////////////////////////////////

// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
// SPDX-License-Identifier: MIT

@use '../variables.scss' as *;

.container {
  position: absolute;
  top: 0px;
  left: 0px;
  bottom: 0px;
  right: 0px;

  display: flex;
  color: $text-normal;

  background-size: cover;
  background-position: center;
  background-blend-mode: overlay;

  &.sakuraSystemFlavor .centerArea,
  &.transparentSystemFlavor .centerArea {
    color-scheme: light dark;
  }

  &.sakuraDarkFlavor .centerArea,
  &.transparentDarkFlavor .centerArea {
    color-scheme: only dark;
  }

  &.sakuraLightFlavor .centerArea,
  &.transparentLightFlavor .centerArea {
    color-scheme: only light;
  }

  @media (prefers-color-scheme: dark) {
    &.sakuraSystemFlavor {
      background-image: url('../../../assets/images/settings-sakura-dark.webp');
    }

    &.sakuraSystemFlavor .centerArea,
    &.transparentSystemFlavor .centerArea {
      background-color: rgba($base-dark, 0.5);
    }
  }

  @media (prefers-color-scheme: light) {
    &.sakuraSystemFlavor {
      background-image: url('../../../assets/images/settings-sakura-light.webp');
    }

    &.sakuraSystemFlavor .centerArea,
    &.transparentSystemFlavor .centerArea {
      background-color: rgba($base-light, 0.5);
    }
  }

  &.sakuraLightFlavor {
    background-image: url('../../../assets/images/settings-sakura-light.webp');
  }

  &.sakuraLightFlavor .centerArea,
  &.transparentLightFlavor .centerArea {
    background-color: rgba($base-light, 0.5);
  }

  &.sakuraDarkFlavor {
    background-image: url('../../../assets/images/settings-sakura-dark.webp');
  }

  &.sakuraDarkFlavor .centerArea,
  &.transparentDarkFlavor .centerArea {
    background-color: rgba($base-dark, 0.5);
  }
}

.centerArea {
  flex-grow: 1;
  width: 0;
  min-width: 400px;
  z-index: 1;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

:global(.react-tooltip) {
  z-index: 1000;
}
