@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Overpass:wght@300;400;600;700&display=swap");

@import "@ntbjs/react-components/styles/utils/colors";

:root {
  --yarl__portal_zindex: 99999;
}

#adminmenu .menu-top.toplevel_page_mediebank-gallery .wp-menu-image img {
  padding: 7px 0 0;
  opacity: 1;
  width: 20px;
  height: 20px;
}

.mediebank {
  &--standalone {
    margin-left: -20px;
  }

  h1 {
    margin-bottom: 20px;
  }

  &__search-field {
    position: relative;

    &__clear {
      color: #000;
      position: absolute;
      right: 8px;
      top: 9px;
      outline: 0;
      padding: 0;
      margin: 0;
      border: none;
      background: transparent;
      display: block;
      cursor: pointer;

      &__icon {
        //
      }
    }
  }

  &__container {
    border: 1px solid color("gray-200");
    border-radius: 3px;
    background: #FFF;
    padding: 12px 16px;
  }

  &__loader {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    width: 100%;
  }

  &__gallery {
    min-height: calc(100vh - 32px);
    background: #FFF;

    &__header {
      display: flex;
      align-items: center;
      padding: 12px 16px;
      border-bottom: 1px solid color("gray-200");

      &--sticky {
        z-index: 10;
        position: sticky;
        top: 0;
        background: #FFF;
      }

      &__logo {
        display: flex;
        align-items: center;
        flex-basis: 30%;
        background: transparent;
        margin: 0;
        padding: 0;
        border: 0;
        outline: none;
        cursor: pointer;

        &__image {
          max-height: 40px;
          padding-right: 13px;
        }

        &__text {
          font-family: Overpass, sans-serif;
          font-size: 19px;
        }
      }

      &__search {
        flex-basis: 40%;
        padding: 0 10px;

        input {
          width: 100%;
          padding: 13px 10px 13px 35px !important;
          border-radius: 3px !important;
          border: 1px solid #cacaca !important;
        }
      }

      &__user {
        flex-basis: 30%;
      }
    }

    &__action-bar {
      height: 60px;
      position: sticky;
      top: 32px;
      z-index: 10;
      border-bottom: 1px solid color("gray-200");
      background: #FFF;
      padding: 0 16px;

      display: flex;
      align-items: center;

      &__search {
        overflow: hidden;
        flex-basis: 0;
        transition: flex-basis 0.15s;

        &--visible {
          flex-basis: 25%;
        }

        input {
          padding: 13px 10px 13px 35px !important;
          border-radius: 3px !important;
          border: 1px solid #cacaca !important;
        }
      }

      &__actions {
        margin-left: auto;
        display: flex;
        align-items: center;

        &__selected {
          display: flex;
          align-items: center;

          &__checkbox {
            margin-left: 10px;
          }
        }

        &__download {
          margin-left: 16px;
        }
      }
    }

    &__assets {
      padding: 24px 16px;

      &__warning-message {
        background: #FFF;
        padding: 8px 12px;
        font-size: 0.9rem;
        display: flex;
        align-items: center;

        svg {
          color: color("orange-500");
          flex-grow: 1;
          flex-shrink: 0;
          padding-right: 8px;
        }
      }

      &__overlay {
        position: relative;
        width: 100%;
        height: 100%;

        $label: null !default;
        &__label {
          $label: &;
          position: absolute;
          display: inline-block;
          margin-left: 4px;
          margin-top: 4px;
          border-radius: 3px;
          background: #000;
          color: #FFF;
          padding: 2px 4px;

          &--error {
            background: color("red-500");
          }
        }

        &--loading {
          backdrop-filter: blur(2px);

          #{$label} {
            display: none;
          }
        }
      }
    }
  }

  &__settings {
    &__header {
      margin-top: 30px;
    }

    &__field {
      max-width: 400px;
      margin-bottom: 15px;

      &__label {
        display: block;
        padding-bottom: 10px;
        font-weight: bold;
      }

      &__content {
      }

      &__error {
        padding-top: 5px;
        color: color("red-500");
      }
    }

    &__saved {
      &--success {
        color: color("emerald-500");
      }

      &--error {
        color: color("red-500");
      }
    }

    &__submit {
      margin-top: 30px;
    }
  }
}
