@mixin errorField() {
  font-size: 14px;
  font-weight: 400;
  color: var(--error-color);
  line-height: 16.94px;
}

.hideTemplateBuilder {
  display: none;
  @media (width <= 600px) {
    display: block;
    text-align: center;
  }
}

.createTemplateMaindiv {
  @media (width <= 600px) {
    display: none;
  }
  .createTemplateMainBox {
    position: relative;
    height: 100%;

    .tempTypeRadioWrapper {
      padding: 20px 0px 30px 0px;
      border-left: none;
      border-right: none;
      margin-left: 40px;

      .tempTypeRadioHeading {
        p {
          color: var(--text-color);
          font-size: 14px;
          font-style: normal;
          font-weight: 500;
          line-height: normal;
        }
      }

      .tempTypeRadioBox {
        margin-top: 20px;
        margin-bottom: 10px;
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 25px;

        .tempRadio {
          cursor: pointer;
          input {
            &:checked {
              accent-color: var(--primary-color);
            }

            &:focus {
              outline: none !important;
            }
          }

          label {
            cursor: pointer;
            color: var(--text-color);
            font-size: 14px;
            font-style: normal;
            font-weight: 500;
            line-height: normal;
          }
        }
      }

      & .error-field {
        @include errorField;
        margin-left: 5px;
      }
    }
  }
  .createTemplateHeader {
    padding-bottom: 15px;
    margin: 0px 40px;

    p {
      color: var(--primary-color);
      font-size: 24px;
      font-style: normal;
      font-weight: 700;
      line-height: normal;
      margin-bottom: 20px;
    }

    .templateInputWrapper {
      p {
        color: var(--text-color);
        font-size: 14px;
        font-style: normal;
        font-weight: 500;
        line-height: normal;
        margin-bottom: 16px;
      }

      & .error-field {
        @include errorField;
        margin-top: 10px !important;
      }
    }
  }

  .templateSelectWrapper {
    padding-bottom: 15px;
    margin: 20px 40px 80px 40px;
    p {
      color: var(--text-color);
      font-size: 14px;
      font-style: normal;
      font-weight: 500;
      line-height: normal;
      margin-bottom: 16px;
    }

    & .error-field {
      @include errorField;
      margin-top: 10px !important;
      font-weight: 400;
    }
  }

  .productTypeWrapper {
    padding: 20px 0px;
    margin: 0px 40px;

    .productHeading {
      p {
        &:first-child {
          color: var(--text-color);
          font-size: 14px;
          font-style: normal;
          font-weight: 500;
          line-height: normal;
        }

        &:last-child {
          color: var(--primary-color);
          font-size: 10px;
          font-style: normal;
          font-weight: 400;
          line-height: 18px;
          text-decoration-line: underline;
        }
      }
    }

    .productsWrapper {
      margin-top: 20px;
      display: flex;
      justify-content: flex-start;
      align-items: center;
      flex-wrap: wrap;
      gap: 25px;

      .productCard {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        border-radius: 6.299px;
        border: 0.45px solid var(--border-color);
        width: 100%;
        max-width: 185px;
        height: 100%;
        min-height: 135px;
        cursor: pointer;
        transition: 0.1s ease-in all;
        gap: 17px;
        position: relative;

        &.active,
        &:hover {
          background: var(--secondary-color);
          border-color: var(--primary-color);
        }

        p {
          color: var(--primary-color);
          font-size: 16px;
          font-style: normal;
          font-weight: 500;
          line-height: normal;
          margin: 0;
        }

        &:last-child {
          img {
            margin-bottom: 5px !important;
          }
        }

        &.error {
          border: 0.45px solid var(--error-color);
        }

        .productTooltip {
          position: absolute;
          top: 5px;
          right: 5px;
          z-index: 1 !important;

          svg{
            &:focus{
              outline: none !important;
            }
          }

          .customTooltipClass{
            padding: 8px !important;
            .react-tooltip-arrow{
              border-color: var(--border-color) !important;
            }
          }

          
          .productTooltipContent {
            display: flex;
            flex-direction: column;
            width: 170px;
            border-radius: 5px;
            font-size: 12px;
            font-weight: 500;
            line-height: normal;
            display: flex;
            justify-content: flex-start;
            align-items: flex-start;
            .heading{
              font-weight: 500 !important;
              font-size: 16px;
              line-height: normal;
              color: var(--text-color);
              margin-bottom: 10px;
            }

            .contentWrapper{
              display: flex;
              justify-content: flex-start;
              align-items: flex-start;
              flex-direction: column;
              gap: 5px;
              p {
                color: var(--text-color) !important;
                font-weight: 400;
                font-size: 14px;
                text-align: left;
                span{
                  font-weight: 600;
                }
              }
            }
          }
        }
      }
    }

    & .error-field {
      margin-top: 10px;
      @include errorField;
    }
  }

  .postCardSizeWrapper {
    padding: 20px 0px;
    margin: 0px 40px 80px 40px;

    .postCardHeading {
      p {
        color: var(--text-color);
        font-size: 14px;
        font-style: normal;
        font-weight: 500;
        line-height: normal;
      }
    }

    .postCardWrapper {
      margin-top: 20px;
      display: flex;
      justify-content: flex-start;
      align-items: flex-start;
      flex-wrap: wrap;
      gap: 25px;

      .postCard {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 20px;
        flex-direction: column;
        border-radius: 6.299px;
        border: 0.45px solid var(--border-color);
        cursor: pointer;
        padding: 13px 20px;
        transition: 0.1s ease-in all;

        svg {
          &:nth-child(2) {
            margin-bottom: 20px;
          }

          &:last-child {
            margin-bottom: 20px;
          }
        }

        svg {
          path:has(.rplSubCards) {
            fill: var(--svg-color-not-active);
          }
        }

        &.active,
        &:hover {
          background: var(--secondary-color);
          border-color: var(--primary-color);

          svg {
            &:nth-child(2) {
              margin-bottom: 20px;
            }

            &:last-child {
              margin-bottom: 20px;
            }

            path:has(.rplSubCards) {
              fill: var(--svg-color);

              &:hover:has(.rplSubCards) {
                fill: var(--svg-color);
              }
            }
          }
        }

        p {
          color: var(--primary-color);
          font-size: 16px;
          font-style: normal;
          font-weight: 500;
          line-height: normal;
          margin: 0;
        }
      }

      .postCard-small {
        width: 100%;
        max-width: 150px;
        height: 100%;
        min-height: 148px;
      }

      .postCard-mid {
        width: 100%;
        max-width: 196px;
        height: 100%;
        min-height: 182px;
      }

      .postCard-large {
        width: 100%;
        max-width: 248px;
        height: 100%;
        min-height: 226px;
      }
    }

    & .error-field {
      margin-top: 10px;
      @include errorField;
    }
  }

  .footerBtns {
    position: fixed;
    width: 100%;
    bottom: 0;
    border-top: 0.5px solid var(--border-color);
    background-color: #fff;

    .createTemplateBtns {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      gap: 20px;
      padding: 14px 95px 14px 35px;
    }
  }
  .error {
    border: 1.5px solid var(--error-color);
  }
}

.rplSubCards {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 150px;
  min-height: 100px;
}