[data-element="editor-packages"] {
  .umb-pane {
    height: 100%;
    margin: 0;

    .umb-pane-content,
    .umb-editor-sub-views {
      height: 100%;

      .umb-editor-sub-view {
        padding: 20px;
      }

      .sub-view-Marketplace {
        height: 100%;
        margin: 0;
        padding: 0;

        .umb-editor-sub-view__content {
          height: 100%;
        }
      }
    }
  }
}

.umb-marketplace-view-wrapper {
  height: 100%;
  display: flex;
  align-items: stretch;
}

.umb-marketplace-view {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.umb-packages-view-title {
    font-size: 20px;
    font-weight: bold;
    color: @black;
    margin-bottom: 30px;
}

.umb-packages-view-wrapper {
    padding: 20px 60px;
}

@media (max-width: 768px) {

    .umb-packages-view-wrapper {
        padding: 0;
    }

}

.umb-packages-section {
    margin-bottom: 40px;
}

.umb-packages-search {
    width: 100%;
    border-radius: 3px;
    box-sizing: border-box;
}

.umb-packages-search input {
    border-width: 2px;
    border-radius: 3px;
    min-height: 44px;
    padding: 4px 10px;
    font-size: 16px;
    margin-bottom: 0;
    border-color: @gray-8;

    &:hover, &:focus {
        border-color: @gray-8;
    }
}

.umb-packages__pagination {
    display: flex;
    justify-content: center;
}

.umb-packages {
    display: grid;
    grid-gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

// Cards
.umb-package {
    box-sizing: border-box;
}

.umb-package-link {
    display: block;
    position: relative;
    box-sizing: border-box;
    height: 100%;
    width: 100%;
    border-radius: 3px;
    border: 1px solid transparent;
    text-decoration: none !important;
    transition: border-color 100ms ease;
    background-color: @white;
    box-shadow: 0 1px 1px 0 rgba(0,0,0,0.16);

    &:hover {
        border-color: @blueMid;
    }
}

// Icon
.umb-package-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 10px;
    padding-right: 10px;
    padding-left: 10px;
    padding-bottom: 10px;
    text-align: center;
    background-color: @white;
    border-top-right-radius: 3px;
    border-top-left-radius: 3px;
    min-height: 60px;

    img {
        max-width: 70px;
        width: 70px;
        height: auto;
    }
}

// Info
.umb-package-info {
    padding: 15px;
    text-align: center;
}

// Name
.umb-package-name {
    font-size: 14px;
    max-width: 250px;
    margin-bottom: 5px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: normal;
    margin-left: auto;
    margin-right: auto;
}

.umb-package-description {
    font-size: 12px;
    color: @gray-4;
    word-wrap: break-word;
    line-height: 1.1rem;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

// Numbers
.umb-package-numbers {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    opacity: .6;
    margin-top: 10px;

    small {
        padding: 0 5px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .umb-icon {
        font-size: 0.9rem;
    }
}

.umb-package-link {
    &:hover {
        .umb-package-numbers {
            opacity: 1;

            .icon-hearts {
                color: @red !important;
            }
        }
    }

    .umb-package-cloud {
        margin-top: 0.5rem;
        font-size: 0.75rem;
        min-height: 1rem; // ensures vertical space is taken up even if "works on cloud" isn't visible

        .umb-icon {
            color: @turquoise !important;
            font-size: 0.9rem;
        }
    }
}

// Version
.umb-package-version {
    display: inline-flex;
    font-size: 12px;
    font-weight: bold;
    padding: 1px 5px;
    background: @gray-8;
    border-radius: 3px;
    color: @black;
}

/* CATEGORIES */

.umb-packages-categories {
    display: flex;
    user-select: none;
    flex-wrap: wrap;
}

.umb-packages-category {
    display: flex;
    align-items: center;
    flex: 1 0 auto;
    justify-content: center;
    max-width: 25%;
    font-size: 14px;
    font-weight: bold;
    color: @black;
    box-sizing: border-box;
    justify-content: center;
    border: 1px solid @gray-8;
    border-left: 0;
    padding: 10px 0;
    background: @white;
}


@media (max-width: 768px) {
    .umb-packages-category {
        width: 100%;
        margin-top: 0;
        margin-bottom: 15px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 992px) {
    .umb-packages-category {
        border: 1px solid @gray-8;
        margin: 5px;
        flex: 0 0 auto;
        text-align: center;
        padding: 10px;
        max-width: 100%;
        border-radius: 3px;
    }
}

@media (min-width: 1100px) and (max-width: 1300px) {
    .umb-packages-category {
        border: 1px solid @gray-8;
        margin: 5px;
        flex: 0 0 auto;
        text-align: center;
        padding: 10px;
        max-width: 100%;
        border-radius: 3px;
    }
}


.umb-packages-category:hover {
    color: @ui-active-type-hover;
    text-decoration: none;
}
.umb-packages-category.-active {
    color: @ui-active-type;
    background-color: @ui-active;
}

.umb-packages-category.-first {
    border-left: 1px solid @gray-8;
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
}

.umb-packages-category.-last {
    border-right: 1px solid @gray-8;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
}

/* PACKAGE DETAILS */

.umb-package-details {
    display: flex;
    flex-flow: row wrap;
}

.umb-package-details__back-action {
    font-weight: bold;
    color: @black;
    padding: 0;
    border: 0;
    background-color: transparent;
}

.umb-package-details__back-action:focus,
.umb-package-details__back-action:hover {
    color: @gray-4;
    text-decoration: none;
}


@sidebarwidth: 350px; // Width of sidebar. Ugly hack because of old version of Less

.umb-package-details__main-content {
    flex: 1 1 auto;
    margin-right: 20px;
    width: calc(~'100%' - ~'@{sidebarwidth}' - ~'20px'); // Make sure that the main content area doesn't gets affected by inline styling
    min-width: 480px;
}

.umb-package-details__sidebar {
    flex: 0 0 @sidebarwidth;
}

@media (max-width: 768px) {

    .umb-package-details {
        flex-direction: column;
    }

    .umb-package-details__main-content {
        flex: 1 1 auto;
        width: 100%;
        margin-bottom: 30px;
        margin-right: 0;
        min-width: 300px;
    }

    .umb-package-details__sidebar {
        flex: 1 1 auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .umb-package-details__main-content {
        min-width: 0px;
    }
}

.umb-package-details__section {
    background: @gray-10;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 3px;
    border: 1px solid @gray-8;
}

.umb-package-details__section-title {
    font-size: 17px;
    font-weight: bold;
    color: @black;
    margin-top: 0;
    margin-bottom: 15px;
}

.umb-package-details__section-description {
    font-size: 12px;
    line-height: 1.6em;
    margin-bottom: 15px;
}

.umb-package-details__information-item {
    margin-bottom: 10px;
    font-size: 13px;
}

.umb-package-details__information-item-label {
    color: @black;
    font-weight: bold;
}

.umb-package-details__information-item-content {
    word-break: break-word;
}

.umb-package-details__information-item-label-2 {
    font-size: 12px;
    color: @gray-4;
}

.umb-package-details__compatability {
    margin-bottom: 15px;
}

.umb-package-details__compatability-label {
    margin-bottom: 3px;
}

.umb-package-details__description {
    margin-bottom: 20px;
    line-height: 1.6em;
    word-wrap: break-word;
}

.umb-package-details__description p {
    margin-bottom: 20px;
}

.umb-package-details__description a {
    text-decoration: underline;
}

.umb-package-details__description a:hover,
.umb-package-details__description a:focus {
    text-decoration: none;
}

/* Links */

.umb-package-details__link {
  font-weight: bold;
  color: @black;
}

.umb-package-details__link:hover {
    text-decoration: underline;
}
/* Install instructions */
.umb-package-details__install-instructions {
  background: #444;
  color: #fff;
  font-family: Monaco,Menlo,Consolas,'Courier New',monospace;
  padding: 20px 20px;
  border-radius: 5px;
  margin: 20px 0 10px 0;
  word-wrap: break-word;
}

/* Install instructions */
.umb-package-details__install-instructions span {
  color: @blueMidLight;
}

/* Owner profile */

.umb-package-details__owner-profile {
    display: flex;
    align-items: center;
}
.umb-package-details__owner-profile-avatar {
    margin-right: 15px;
    flex: 0 0 auto;
}

.umb-package-details__owner-profile-name {
    font-size: 15px;
    color: @black;
    font-weight: bold;
}

.umb-package-details__owner-profile-karma {
    font-size: 12px;
    color: @gray-4;
}

/* gallery */

.umb-gallery__thumbnails {
    display: flex;
    flex-wrap: wrap;
}

.umb-gallery__thumbnail {
    background: transparent;
    flex: 0 1 100px;
    border: 1px solid @ui-action-discreet-border;
    border-radius: 3px;
    margin: 5px;
    padding: 10px;
    box-sizing: border-box;
    max-width: 100px;
}

.umb-gallery__thumbnail:hover {
    cursor: pointer;
    border-color: @ui-action-discreet-border-hover;
}

.umb-gallery__thumbnail:focus-visible,
.umb-gallery__thumbnail:focus {
  cursor: pointer;
  border: 2px solid @ui-outline;
}

/* PACKAGE LIST */

.umb-package-list {
    display: flex;
    flex-direction: column;
}

.umb-package-list__item {
    display: flex;
    flex-direction: row;
    background: @gray-10;
    margin-bottom: 5px;
    border-radius: 3px;
    padding: 15px 20px;
    align-items: center;
}

.umb-package-list__item-icon {
    flex: 0 0 35px;
    margin-right: 20px;
    font-size: 30px;
    text-align: center;
    justify-content: center;
    align-items: center;
}

.umb-package-list__item-content {
    flex: 1 1 auto;
    margin-right: 20px;
}

.umb-package-list__item-name {
    font-size: 16px;
    color: @black;
    font-weight: bold;
}

.umb-package-list__item-description {
    font-size: 14px;
    color: @gray-4;
}

.umb-package-list__item-actions {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
}

.umb-package-list__item-action {
    font-weight: bold;
    color: @gray-3;
}

.umb-package-list__item-action:hover {
    text-decoration: none;
    color: @red;
}
