@import '_theme.scss';

.product-instance-properties {
  .section {
    border: 1px solid var(--color-line);
    border-left: 2px solid var(--text-color-medium);
    padding: 20px 30px;
    display: flex;
    flex-direction: column;

    &.section-open {
      border-left: 2px solid var(--color-highlight);

      .section-content {
        padding-top: 15px;
        max-height: var(--openSection);
      }

    }

    &:nth-child(2) {
      border-top-left-radius: 4px;
      border-top-right-radius: 4px;
    }

    &:not(:nth-child(2)) {
      margin-top: 30px;
    }

    &:last-child {
      border-bottom-left-radius: 4px;
      border-bottom-right-radius: 4px;
    }
    & .hidden {
      display: none;
    }
  }
  .section:not(.section-open) {

    .section-header {
      color: var(--text-color-ultra-dark);

      .section-title {
        margin-right: 20px;
      }
    }
  }
  .section-header {
    cursor: pointer;
    color: var(--color-text);
    display: flex;
    justify-content: space-between;
    min-width: 100%;
  }
  .section-header > svg {
    margin-left: 20px;
    flex-shrink: 0;
  }
  .section-open .section-header {
    color: var(--color-highlight);
  }

  .section-title {
    align-items: center;
    display: flex;
    font-size: var(--text-size-label);

    .section-title-text {
      margin-left: 14px;
      @media (max-width: $md) {
        margin-left: 14px;
      }
    }
  }

  .section-tick-icon {
    background: var(--color-success);
    border-radius: 50%;
    padding: 5px;

    path {
      fill: white
    }
  }

  .section-content {
    display: flex;
    flex-direction: column;
    padding-top: 0;
    transition: max-height .3s, padding-top 0.3s;
    overflow: hidden;
    max-height: 0;
 }

  .section-error-msg {
    color: var(--color-error);
    padding-top: 4px;
  }
  .section-description {
    margin: 25px 0 15px;
    font-size: var(--text-size-regular);
    color: var(--text-color-dark);
  }
}
