/**
 * @file
 * Base layout styles for NextDC theme.
 */

/* Grid system */
.nextdc-grid {
  display: grid;
  gap: 1rem;
}

.nextdc-grid--2-col {
  grid-template-columns: repeat(2, 1fr);
}

.nextdc-grid--3-col {
  grid-template-columns: repeat(3, 1fr);
}

.nextdc-grid--4-col {
  grid-template-columns: repeat(4, 1fr);
}

/* Responsive grid */
@media (max-width: 768px) {

  .nextdc-grid--2-col,
  .nextdc-grid--3-col,
  .nextdc-grid--4-col {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {

  .nextdc-grid--3-col,
  .nextdc-grid--4-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

.nextdc-body {
  .custom-container {
    max-width: 100% !important;

    .layout__region--content {
      width: 100%;
      margin-right: auto;
      margin-left: auto;
      padding: 0 15px;

      @media (min-width: 576px) {
        max-width: 540px;
      }

      @media (min-width: 768px) {
        max-width: 720px !important;
        padding: 0 !important;
      }

      @media (min-width: 992px) {
        max-width: 960px !important;
      }

      @media (min-width: 1200px) {
        max-width: 1140px !important;
      }

      @media (min-width: 1400px) {
        max-width: 1320px !important;
      }

      @media (min-width: 1600px) {
        max-width: 1400px !important;
      }
    }
  }
}


#media-library-wrapper {
  .media-library-add-form__input-wrapper {
    .js-form-managed-file.form-managed-file {
      display: flex !important;

      input[value="Upload"].js-hide {
        display: block !important;
        height: fit-content !important;
      }
    }
  }

  .form-item__select {
    height: 44px !important;
  }
}

.swiper-button-prev {
  &:hover {
    border: 3px solid #201850;
    background-color: #ffffff;
    opacity: 1 !important;

    &::after {
      transform: translateX(-1px);
    }
  }
}

.swiper-button-next {
  &:hover {
    border: 3px solid #201850;
    background-color: #ffffff;
    opacity: 1 !important;
    &::after {
      transform: translateX(1px);
    }
  }
}