@use "../../../scss/globals.scss";

.upload-background-image-button {
  &__wrapper {
    position: absolute;
    top: 16px;
    right: 16px;
  }

  border-color: globals.$body-color;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.8);
  background-color: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(20px);

  &__menu {
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    padding: 4px;
    display: flex;
    flex-direction: column;
    animation: menu-fade-in 0.2s ease-out;

    &--closing {
      animation: menu-fade-out 0.15s ease-in;
    }
  }

  &__menu-item {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    border-radius: 4px;
    padding: 5px 12px;
    cursor: pointer;
    transition: background-color 0.1s ease-in-out;
    font-size: 14px;
    background: none;
    border: none;
    color: globals.$body-color;
    text-align: left;

    &:hover:not(:disabled) {
      background-color: rgba(255, 255, 255, 0.1);
    }

    &:disabled {
      cursor: default;
      opacity: 0.6;
    }

    &:focus {
      background-color: rgba(255, 255, 255, 0.1);
      outline: none;
    }
  }
}

@keyframes menu-fade-in {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes menu-fade-out {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-8px);
  }
}
