@import '../../styles/common.module.scss';

.Product {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 20px;
  padding-bottom: 0;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 300px;
}

.paper {
  @include paper;
}

.header {
  @include paper;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  z-index: 20;
}

.headerLeft {
  display: flex;
  align-items: center;
}

.headerActions {
  padding-right: 15px;
}

// .tabContent {
// }

.tab {
  @include styledScrollBarList;
  overflow: auto;
  height: 100%;
  min-height: 300px;
  margin-left: -10px;
  padding-left: 10px;
  padding-right: 10px;
  padding-top: 15px;
  padding-bottom: 15px;
}

.mainTab {
  @include paper;
  padding: 15px;
}

.textField {
  width: 100%;
}

.imageBlock {
  position: relative;
  border-radius: 5px;
  display: flex;
}

.imageItem {
  position: relative;
}

:global(.DraggableBlock__dragging) {
  .imageItem {
    background-color: transparent;
  }
}

.imageActions {
  opacity: 0;
  transition: 0.3s;
  position: absolute;
  top: 5px;
  right: 5px;
}

.saveBtn {
  position: relative;
}

.attributeBlock {
  @include paper;
  // border: 1px solid #bbb;
  max-width: 100%;
  margin: 0 auto 30px;
  border-radius: 10px;
  width: 100%;
}

.attributeHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  border-bottom: 1px solid #ddd;
}

.attributeName {
  font-size: 1rem;
  line-height: 1rem;
  border: 1px solid #333;
  padding: 3px 7px;
  border-radius: 30px;
  font-weight: 500;
}

.attributeInstanceValue {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 100px;
}

.editingProductVariant {
  border: 1px solid #bbb;
  margin: 10px;
  border-radius: 5px;
}

.editingProductVariantCard {
  padding: 10px;
}

.editingProductVariantTitle {
  font-size: 18px;
  font-weight: 500;

  .tag {
    margin-left: 15px;
  }
}

.notFoundPage {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.notFoundText {
  font-size: 25px;
  font-weight: 500;
}

.galleryActions {
  display: flex;
  flex-direction: column;
  border-left: 1px solid #ccc;
}

.galleryContainer {
  width: calc(100% - 50px);
}

button.galleryActionBtn {
  background-color: rgba($color: #fff, $alpha: 0.7);
}

button.galleryActionBtn:hover {
  background-color: rgba(0, 0, 0, 0.3);

  svg {
    color: #fff;
  }
}

button.galleryAddImageBtn {
  @extend .galleryActionBtn;
}

.openPageBtn {
  margin-right: 10px;
}

.newAttributesList {
  @include paperElevated;
  @include styledScrollBar;
  background-color: #fff;
  max-height: 90vh;
  overflow: auto;
  padding: 10px;
}

.newAttributeOption {
  min-width: 130px;
}

.descriptionEditor {
  @include styledScrollBar;
  border: 2px solid #e5e7eb;
  border-radius: 5px;
  max-height: 400px;
  overflow: auto;
  padding: 15px 40px;
  min-height: 150px;
}

.CategoriesTab {
  margin: 0 -10px;
}

.PageContent {
  // padding: 15px 15px 0 15px;
  position: relative;
  margin: auto;
}

.AttributesTab {
  display: flex;
  flex-direction: column;
}

.checklist {
  max-width: 250px;
  width: 250px;
  overflow: auto;
}

.popoverPaper {
  overflow: initial !important;
}

@media screen and (max-width: 869px) {
  // mobile
  .Product .header {
    justify-content: space-around;
  }

  .tab {
    overflow: visible;
    height: auto;
    padding-right: 0;
  }
}

:global(.modeDark) {
  .mainTab,
  .header,
  .paper,
  .attributeBlock {
    background-color: #333;

    * {
      color: #eee;
    }
  }

  .imageItem:hover {
    background-color: #555;
  }
}
