@use "_theme.scss";

.product-properties {
  *::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  *::-webkit-scrollbar-thumb {
    background: linear-gradient(13deg, var(--table-scrollbar-color) 14%, var(--table-scrollbar-color) 64%);
    border-radius: var(--form-input-border-radius);
  }
  *::-webkit-scrollbar-thumb:hover{
    background: linear-gradient(13deg, var(--color-line) 14%, var(--color-line) 64%);
  }
  *::-webkit-scrollbar-track{
    background: var(--white);
    border-radius: var(--form-input-border-radius);
    box-shadow: inset 7px 10px 12px var(--color-fill);
  }
  .quantity {
    margin-bottom: 30px;
    display: inline-block;

    .quantity-label {
      font-size: var(--text-size-label);
    }
    .product-quantity-component {
      margin-left: 10px;
      margin-right: 10px;
      max-width: 100%;
      display: inline;

      .quantity-error {
        font-size: var(--text-size-fineprint);
        white-space: nowrap;
        display: block;
      }

      .quantity-dropdown {
        width: unset;
        padding: 0 25px 0 10px;
        background-color: white;
      }

      .quantity-units,
      .pack-description {
        font-size: var(--text-size-fineprint);
        color: var(--text-color-medium);
        display: inline;
        margin-left: 5px;
        white-space: nowrap;
      }

      .quantity-units {
        .dynamic & {
          @media (max-width: theme.$md) {
            margin: 0px;
          }
        }
      }
    }
  }
  .properties-iframe-container .loading-dots {
    height: 12px;
    margin: 40px 0;

    .loading-dot {
      background: var(--color-highlight);
    }

  }
  .required-field {
    margin-left: 5px;
    color: var(--color-error)
  }
  .update-price-button .loading-dots {
    height: 10px;

    .loading-dot {
      background: var(--color-highlight);
    }

  }
  .properties-errors {
    margin-top: 25px;
    width: 100%;
    padding: 15px 20px;
    border: 1px solid var(--color-error);
    background-color: var(--white);
    border-radius: var(--form-input-border-radius);
    position: relative;
    min-height: 49px;
    margin-bottom: 20px;

    .error {
      display: flex;
      align-items: flex-start;
      font-size: 12px;
      color: var(--text-color-ultra-dark);
      margin-bottom: 5px;

      .error-icon {
        flex-shrink: 0;
        margin-top: 2px;
        margin-right: 5px;
      }

      .error-text {
        max-width: 90%;
      }
    }
  }
  .form-control.inline {
    display: inline-block !important;
    width: unset;
    margin-right: 15px;
  }

  .required {
    color: var(--color-error);
  }

  ul.error-detail {
    padding-left: 0;
    //margin-top: 5px;
    li {
      list-style: none;
    }
    .duc-error {
      display: flex;
      align-items: flex-start;
      font-size: 12px;
      margin-bottom: 5px;
      color: var(--color-error);
      padding-left: 0;

      #preflightLink {
        margin: 0 5px;
      }

      .error-icon {
        flex-shrink: 0;
        margin-top: 5px;
        margin-right: 8px;
      }

      .error-text {
        max-width: 90%;
        margin-top: 2px;
        font-size: var(--text-size-fineprint)
      }
    }
  }

  .info-icon {
    color: blue;
    &:hover .tooltip-text {
      display: inline-block;
      border: 1px solid var(--color-line);
      padding: 10px 20px;
      position: absolute;
      background: var(--color-fill);
      margin-left: 20px;
      margin-top: -5px;
      color: var(--text-color-dark);
      max-width: 300px;
    }
    .tooltip-text {
      display: none;
    }
  }

  .form-group.field {
    .control-label, .field-description {
      display: none;
    }
  }

  .duc-wrapper {
    max-width: 600px;
    margin-bottom: 30px;

    &.hidden {
      display: none;
    }

    .duc-head {
      & > * {
        display: inline-block;
        margin-right: 10px;
      }

      .duc-title {
        margin-bottom: 12px;
        font-size: var(--text-size-label);
        color: var(--text-color-ultra-dark);
        line-height: 1;
      }

      .duc-description {
        .duc-description-text {
          white-space: pre-wrap;
          margin-top: 5px;
          display: none;
          position: absolute;
          background: var(--color-fill);
          color: var(--text-color-disabled);
          padding: 10px;
          max-width: 350px;
          min-width: 170px;
          width: auto;
          text-align: center;
          border-radius: var(--form-input-border-radius);
          border: 1px solid var(--color-line);
          z-index: 91;
        }
        .icon {
          display: block;
          position: relative;
          top: -1px;
          &:hover {
             + .duc-description-text {
              display: block;
            }
          }
        }
        margin-right: 10px;
        cursor: help;
      }
    }

    div.form-control {
      border: 0;
      padding: 0;
      margin: 0;
      height: auto;
      border-radius: 0;
    }

    input, select, textarea {
      padding: 12px 15px;
      color: var(--text-color-dark);
      font-size: var(--text-size-regular);
      max-width: 600px;
      height: 38px;
      border-radius: var(--form-input-border-radius);
      border: 1px solid var(--color-line);
      width: 100%;
    }

    textarea {
      min-height: 45px;
      height: auto;
      line-height: 1.5;
      padding: 4px 15px;
    }

    select {
      padding: 8px 15px;
    }

    .drop-down-duc {
      position: relative;
      padding: 0;
      border: 0;
      height: auto;
      border-radius: 0;
      max-width: 600px;
      .select-component {
        .select-body.open {
          .select-item {
            &:first-child {
              padding-left: 23px;
            }
          }
        }
      }
      .form-control.disabled {
        color: var(--text-color-disabled);
        background: var(--color-fill);
        svg {
          path {
            fill: var(--text-color-disabled);
          }
        }
      }
    }

    .file-upload-duc {
      max-width: 600px;

      .upload-area-wrapper {
        width: 100%;
        border-radius: var(--form-input-border-radius);
        border: 1px dashed var(--color-line);
        display: flex;
        align-items: center;
        margin-bottom: 2px;
        text-decoration: none;
        color: var(--text-color-dark);
        font-size: var(--text-size-regular);
        padding: 22px;
        position: relative;
        justify-content: center;
        @media (min-width: theme.$md) and (max-width: theme.$lg) {
          display: block;
          .upload-button {
            width: 100%;
            margin: 0;
            justify-content: center;
          }
          .buttons-splitter {
            text-align: center;
            margin: 10px 0;
          }
          .drag-title {
            display: none;
          }
        }
        @media (max-width: theme.$md) {
          padding: 0;
          border: 0;
          display: block;
          margin-bottom: 15px;
          .buttons-splitter {
            display: none;
          }
          .drag-title {
            display: none;
          }
        }
        .upload-area {
          position: absolute;
          left: 0;
          top: 0;
          height: 100%;
          width: 100%;
          display: flex;
          justify-content: center;
          align-items: center;
        }
        .upload-input {
          position: absolute;
          width: 100%;
          height: 100%;
          left: 0;
          top: 0;
          opacity: 0;
          z-index: 9;
          padding: 0;
          display: block !important;
        }
        input.upload-input::-webkit-file-upload-button {
          cursor: pointer;
        }
        .icon {
          margin-right: 10px;
          line-height: 1.3;
        }
      }
      .bgGrey {
        background: var(--color-fill);
      }
      .centered {
        justify-content: center;
      }
      .marginB20 {
        margin-bottom: 20px;
      }
      .file-type-label {
        color: var(--text-color-medium);
        font-size: var(--text-size-fineprint);
        display: block;
      }
      .uploaded-files {
        margin-top: 6px;
        &.empty-files-list {
          margin-top: 10px;
        }
        .current-file {
          width: 100%;
          .current-file-name {
            display: flex;
            justify-content: flex-start;
            .file-name {
              color: var(--text-color-dark);
              font-size: var(--text-size-regular);
              text-decoration: none;
              line-height: 1;
              margin-bottom: 8px;
            }
            .uploading-progress {
              margin-left: 10px;
              margin-right: -5px;
              font-size: 14px;
              color: var(--color-highlight)
            }
            .delete-file {
              line-height: 1;
              margin-right: 10px;
              color: var(--text-color-dark);
              cursor: pointer;
              height: 14px;
              margin-bottom: 8px;
            }
          }
        }
      }
      .download-wrapper-link {
        display: flex;
        justify-content: flex-start;
        margin-bottom: 12px;
        a {
          color: var(--color-highlight);
          font-size: var(--text-size-regular);
          text-decoration: underline;
          line-height: 1;
        }
        svg {
            path {
              fill: var(--color-highlight) !important;
            }
          }
      }
      .download-icon {
        margin-right: 10px;
        color: var(--text-color-dark);
        height: 14px !important;
        line-height: 0;
      }
      .upload-button {
        position: relative;
        padding: 10px 15px;
        margin: 0 14px;
        display: flex;
        height: 40px;
        cursor: pointer;
        justify-content: space-between;
        font-size: var(--text-size-regular);
        color: var(--text-color-dark);
        border: 1px solid var(--color-line);
        border-radius: var(--form-input-border-radius);
        background: var(--button-secondary-background-color);
        &:hover {
          box-shadow: 2px 2px 5px -1px var(--image-box-border-color);
        }
        > * {
          cursor: pointer;
          line-height: 1.3;
        }
        @media (max-width: theme.$md) {
          width: 100%;
          margin: 0 0 15px;
          justify-content: center;
          padding: 8.5px 16px;
        }
      }

    }

    .checkbox-duc-wrapper {
      display: flex;
      justify-content: flex-start;

      input.wrg-toggle-input {
        max-width: 16px;
        max-height: 16px;
      }
    }

    .radio-selection-duc {

      // List
      &.galeryList_wrapper {
        border: 1px solid var(--color-line);
        border-radius: var(--form-input-border-radius);
      }
      .gallery-item.galeryList {
        display: flex;
        justify-content: flex-start;
        text-align: left;
        align-items: center;
        padding: 11px;
        border: 2px solid transparent;
        width: 100%;
        background: transparent;
        position: relative;
        .imageRadio {
          width: 50px;
          min-width: 50px;
          margin-right: 15px;
          height: 50px;
        }
        &:focus {
          border-radius: 0 !important;
        }
        &:hover {
          background: var(--color-fill);
        }
        &:not(:last-child) {
          border-bottom: 1px solid var(--color-line);
        }
        &:first-child {
          border-radius: var(--form-input-border-radius) var(--form-input-border-radius) 0 0;
        }

        &:last-child {
          border-radius: 0 0 var(--form-input-border-radius) var(--form-input-border-radius);
        }
      }

      // Grid
      &.galeryGrid_wrapper, &.radioButtonList_wrapper {
        display: flex;
        flex-flow: wrap;
      }
      .gallery-item.galeryGrid, .gallery-item.radioButtonList {
        width: 32%;
        margin: 0 2% 12px 0;
        padding: 15px 12px;
        border: 1px solid var(--color-line);
        border-radius: var(--form-input-border-radius);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        background: transparent;
        text-align: center;
        .imageRadio {
          width: 100%;
          min-height: 90px;
          margin-bottom: 8px;

          .image-inn {
            object-fit: contain;
            height: 100%;
            max-height: 100%;
            max-width: 100%;
            margin: 0 auto;
          }
        }
        &:hover {
          box-shadow: 2px 2px 6px 0 var(--color-line);
        }

        @media (max-width: theme.$xs) {
          width: 49%;
          margin: 0 2% 10px 0;
          &:nth-child(even) {
            margin-right: 0;
          }
        }
        @media (min-width: theme.$xs) and (max-width: theme.$sm) {
          width: 49%;
          margin: 0 2% 10px 0;
          &:nth-child(even) {
            margin-right: 0;
          }
        }
        @media (min-width: theme.$sm) and (max-width: theme.$md) {
          width: 32%;
          &:nth-child(3n) {
            margin-right: 0;
          }
        }
        @media (min-width: theme.$md) and (max-width: theme.$lg) {
          width: 49%;
          margin: 0 2% 10px 0;
          &:nth-child(even) {
            margin-right: 0;
          }
        }
        @media (min-width: theme.$lg) {
          width: 32%;
          &:nth-child(3n) {
            margin-right: 0;
          }
        }

      }

      // General
      .gallery-item {
        cursor: pointer;
        &:focus {
          outline: var(--text-color-ultra-dark) auto 2px !important;
        }
        .imageRadio {
          text-align: center;
          max-height: 90px;
          align-items: center;
          display: flex;
          justify-content: center;
          overflow: hidden;
        }
        .content {
          display: flex;
          flex-direction: column;
          .name {
            color: var(--text-color-dark);
            font-size: var(--text-size-regular);
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
          }
          .description {
            color: var(--text-color-medium);
            font-size: var(--text-size-fineprint);
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
          }
        }
        &.selected {
          background: var(--color-fill);
          border: 1px solid var(--color-highlight) !important;
        }
      }
      &.disabled {
        .gallery-item {
          border-color: var(--color-line);
          background: var(--color-fill);
          color: var(--text-color-disabled);
          cursor: default;
          &.selected {
            border-color: var(--text-color-disabled) !important;
          }
          .content {
            .name, .description {
              color: var(--text-color-disabled)
            }
          }
          &:hover {
            box-shadow: none;
          }
        }
      }
    }

    .icon:not(.folder-icon) {
      svg {
        path {
          fill: var(--text-color-dark)
        }
      }
    }

    &.has-error {
      .file-upload-duc {
        .upload-area-wrapper {
          border-color: var(--color-error) !important;
        }

      }
    }
    .file-upload-duc {
      &.duc-custom-error {
        .upload-area-wrapper {
          border-color: var(--color-error) !important;
        }
      }
    }
  }

  .product-ducs {
    .duc-wrapper {
      .form-control.disabled,
      .form-control[readonly],
      input:disabled,
      textarea:disabled,
      input[readonly] {
        background: var(--color-fill) !important;
      }


    }
  }
  a:focus-visible,
  ul:focus-visible,
  li:focus-visible,
  div:focus-visible,
  button:focus-visible,
  textarea:focus-visible,
  textarea:focus,
  input:focus-visible,
  input:focus,
  .gallery-item:focus,
  .select-component:focus,
  .wrg-toggle:focus,
  .upload-button:focus,
  .focused {
    outline: var(--text-color-ultra-dark) auto 2px !important;
    box-shadow: none;
    border-radius: var(--form-input-border-radius);
  }
  .errors {
    .text-input-duc,
    .drop-down-duc,
    input {
      border: 1px solid var(--color-error) !important;
      border-radius: var(--form-input-border-radius) !important;
      padding: 12px 15px;
    }
    .xmp-gs-duc-content {
      border: 1px solid var(--color-error) !important;
    }
  }
  .duc-error {
    display: flex;
    align-items: flex-start;
    font-size: var(--text-size-fineprint);
    margin-top: 6px;
    color: var(--color-error);
    padding-left: 0;

    #preflightLink {
      margin: 0 5px;
    }
    .error-icon {
      flex-shrink: 0;
      margin-top: 5px;
      margin-right: 8px;
    }

    .error-text {
      margin-top: 2px;
      font-size: var(--text-size-fineprint);
    }

    + .duc-error {
      margin-top: 7px;
    }
  }

  .mask-error {
    display: none;
  }
}
