.modelSelector {
  width: 60vw !important;
  max-width: 1200px;
  --cardBackground: #262732;
  :global {
    .main {
      height: 60vh;
      max-height: 900px;
      > .ant-tabs {
        height: 100%;
        .ant-tabs-content,
        .ant-tabs-tabpane {
          height: 100%;
        }
      }
    }

    .model-select-tabs {
      display: flex;
      .tab {
        margin-right: 20px;
        padding: 6px;
        opacity: 0.8;
        transition: var(--transition);
        cursor: pointer;
        &.active {
          border-bottom: solid 2px var(--primaryColor);
          color: var(--primaryColor);
        }
      }
      margin-bottom: 1rem;
    }

    .modelCard {
      display: flex;
    }

    .model-filter {
      .ant-tag.inactive {
        cursor: no-drop;
        opacity: 0.6;
        background-color: transparent !important;
        &:hover {
          background-color: transparent;
          color: rgba(255, 255, 255, 0.85);
        }
      }
    }
  }
}

.curated_models {
  height: 100%;
  overflow-y: auto;
}

.modelCardList {
  margin-bottom: 20px;
  display: grid;
  grid-gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  padding: 10px 10px 10px 0;
  :global {
      .model-card {
    user-select: none;
    border-radius: 12px;
    border: 1px solid rgba(71, 71, 71, 0.1);
    box-shadow: inset 0 0.5px 1px rgb(141 147 157 / 15%);
    background: var(--cardBackground);
    padding: 10px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 260px;
    .model-card__gallery {
      height: 258px;
      background-color: var(--backgroundColor);
      border-radius: 10px;
      flex-shrink: 0;
      overflow: hidden;
      display: flex;
      justify-content: center;
      align-items: center;
      .ant-image,
        img {
          border-radius: 6px;
          min-height: 200px;
          width: 100%;
          display: block;
        }
    }
    .model-card__title {
      color: #c5c5d3;
      margin: 10px 0;
      font-size: 14px;
      flex-shrink: 0;
      .action {
        justify-content: flex-start;
        display: inline-flex;
        word-break: break-all;
      }
    }
    .model-card__content {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }
    .model-card__footer {
      height: 30px;
      flex-shrink: 0;
      display: flex;
      justify-content: flex-end;
    }
  }
  }
}

.civitai_models_list_page {
  height: 100%;
  overflow: hidden;

  :global {
    .search {
      display: flex;
      .search-box {
        flex: 1;
        margin-right: 10px;
      }
    }

    .infinite-scroll-component {
      margin-bottom: 20px;
      display: grid;
      grid-gap: 12px;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      padding: 10px 10px 10px 0;
    }

    .model-card-item {
      user-select: none;
      border-radius: 12px;
      border: 1px solid rgba(71, 71, 71, 0.1);
      box-shadow: inset 0 0.5px 1px rgb(141 147 157 / 15%);
      background: var(--cardBackground);
      padding: 10px;
      transition: var(--transition);
      display: flex;
      flex-direction: column;
      .model-card-item-header {
        margin: 4px 0;
        .model-card-item-header-title {
          color: #c5c5d3;
          font-size: 14px;
          font-weight: 500;
        }
      }
      .model-card-item-body {
        flex: 1;
        .model-card-item-body-tags {
          margin-bottom: 10px;
        }
      }
      .ant-image,
      img {
        border-radius: 6px;
        min-height: 200px;
        width: 100%;
        display: block;
      }
      .gallery-card {
        height: 158px;
        background-color: var(--cardHover);
        border-radius: 10px;
      }
      .model-card-item-footer {
        height: 30px;
        flex-shrink: 0;
        display: flex;
        justify-content: flex-end;
      }
    }
  }
}

.civitai_models_detail_modal {
  :global {
    .ant-modal-body {
      height: 70vh;
    }
    .text.action {
      display: inline-flex;
    }
  }
}

.civitai_models_detail_page {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow-x: hidden;
  :global {
    .gallery {
      height: 400px;
      overflow-x: hidden;
      .slide {
        display: inline-flex !important;
        justify-content: center;
        align-items: center;
        img {
          max-height: 360px;
        }
        .ant-img {
          max-height: 400px;
        }
      }
    }
    .body {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
    }
    .header {
      padding-bottom: 10px;
      .text.action {
        display: inline-flex;
      }
    }
    .footer {
      padding-top: 10px;
      display: flex;
      .select-model {
        width: 220px;
      }
      .actions {
        padding-right: 20px;
      }
    }
  }
}
