@use "../base/mixins";
@use "../vars/variables";

.modal-secondary--media-browse {
  z-index: var(--uc-vselect-z-index);

  &__loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
  }

  .modal-secondary {
    &__container {
      min-height: 36.125rem;

      @media only screen and (max-height: 650px) {
        margin-bottom: auto;
      }

      hr {
        border-color: rgba(255, 255, 255, 0.2);
      }
    }

    &__header {
      &__content {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.625rem;

        h2 {
          font-size: 1rem;
          font-weight: 400;
        }
      }
    }

    &__body {
      position: relative;

      @media only screen and (max-height: 650px) {
        max-height: 100vh;
        max-height: 100dvh;
      }

      @media screen and (max-width: variables.$bp-phone) {
        max-height: 100vh;
        max-height: 100dvh;
      }

      .browse-element {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;

        &__item {
          position: relative;
          padding-right: 3rem;

          &__add {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            right: 0.625rem;
          }
        }
      }

      .list-with-filter {
        &__form {
          gap: 1.25rem;
          margin-bottom: 0.625rem;

          .filter-item-container {
            display: flex;
            flex-wrap: wrap;
            gap: 0.625rem;
          }
        }
      }
    }
  }

  &--disabled {
    .modal-secondary {
      &__body {
        opacity: 0.3;
        pointer-events: none;
        cursor: default;
        transition: opacity 0.5s;
      }
    }
  }
}
