@import "variables";

.mintmrm {

  %scrollbar-style {
    &::-webkit-scrollbar {
      width: 5px;
    }
    &::-webkit-scrollbar-track {
      background: #f2f5f8;
    }
    &::-webkit-scrollbar-thumb {
      background-color: #c1c1c1;
      border-radius: 20px;
    }
  }

  .mrm-form-wrapper {
    box-sizing: border-box;

    * {
      box-sizing: border-box;
    }
    .required-mark {
      font-weight: 600;
      color: #dd1212;
    }

    .mrm-form-group {
      margin: 0;

      &.alignment-center {
        margin-left: auto;
        margin-right: auto;
      }
      &.alignment-right {
        margin-left: auto;
        margin-right: 0;
      }
    }

    label,
    .label {
      font-style: normal;
      font-weight: 500;
      font-size: 15px;
      line-height: 18px;
      color: #344054;
      box-sizing: border-box;
      display: block;
    }

    input[type=date],
    input[type=email],
    input[type=text],
    textarea,
    select {
      font-size: 14px;
      line-height: 1.3;
      color: #7a8b9a;
      padding: 9px 15px;
      width: 100%;
      border-radius: 6px;
      display: block;
      border: 1px solid #e4e6eb;
      min-height: 30px;
      box-sizing: border-box;
      outline: none;
      box-shadow: none;
      max-width: 100%;

      &:active,
      &:focus {
        border-color: #573BFF!important;
        color: #7a8b9a;
        box-shadow: none;
      }
    }

    .mintmrm-btn {
      display: inline-block;
      border: 1px solid transparent;
      color: #fff;
      font-style: normal;
      font-weight: 600;
      font-size: 14px;
      line-height: 17px;
      letter-spacing: -0.01em;
      padding: 11px 15px;
      cursor: pointer;
      text-align: center;
      border-radius: 6px;
      text-transform: capitalize;
      background-color: #573BFF;
      min-height: 44px;

      &:hover {
        background-color: #4C25A5;
        color: #fff;
      }

    }

    //----checkbox style----
    .mintmrm-checkbox {
      position: relative;

      input[type="checkbox"] {
        position: absolute;
        top: 7px;
        z-index: -1;
        width: 0;
        padding: 0!important;
        opacity: 0;
      }

      input[type="checkbox"]:active + label::before,
      input[type="checkbox"]:focus + label::before {
        border-color: #573bff;
      }
    }
    .mintmrm-checkbox.no-title label {
      min-height: 20px;
    }
    .mintmrm-checkbox label {
      font-weight: 500;
      font-size: 15px;
      line-height: 1;
      letter-spacing: -0.01em;
      color: #344054;
      position: relative;
      padding-left: 29px;
      display: inline-block;
      text-transform: capitalize;
      cursor: pointer;
    }
    .mintmrm-checkbox label:before {
      content: "";
      position: absolute;
      left: 0;
      top: -2px;
      width: 20px;
      height: 20px;
      border-radius: 4px;
      border: 1px solid #bdc7eb;
      background-color: #f6f6f8;
      transition: all 0.3s ease;
      box-sizing: border-box;
    }
    .mintmrm-checkbox label:after {
      content: "";
      position: absolute;
      left: 6px;
      top: 4px;
      width: 9px;
      height: 5px;
      transform: rotate(-45deg);
      border-bottom: 2px solid #fff;
      border-left: 2px solid #fff;
      transition: all 0.3s ease;
      opacity: 0;
      visibility: hidden;
      box-sizing: border-box;
    }
    .mintmrm-checkbox input[type="checkbox"]:checked + label::before {
      background-color: #573bff;
      border-color: #573bff;
    }
    .mintmrm-checkbox input[type="checkbox"]:checked + label::after {
      opacity: 1;
      visibility: visible;
    }

    //----radio btn style----
    .mintmrm-radiobtn {
      position: relative;

      input[type="radio"] {
        position: absolute;
        top: 7px;
        z-index: -1;
        width: 0;
        height: auto;
        opacity: 0;
      }

      input[type="radio"]:active + label::before,
      input[type="radio"]:focus + label::before {
        border-color: #573bff;
      }
    }
    .mintmrm-radiobtn.no-title label {
      height: 16px;
    }
    .mintmrm-radiobtn label {
      font-size: 15px;
      line-height: 14px;
      font-weight: 500;
      color: #7a8b9a;
      position: relative;
      padding-left: 29px;
      display: inline-block;
      text-transform: capitalize;
      cursor: pointer;
    }
    .mintmrm-radiobtn label::before {
      content: "";
      position: absolute;
      left: 0;
      top: -3px;
      width: 20px;
      height: 20px;
      border-radius: 100%;
      background: #f7f7fa;
      border: 1px solid #bdc7eb;
      transition: all 0.3s ease;
      box-sizing: border-box;
    }
    .mintmrm-radiobtn label::after {
      content: "";
      position: absolute;
      left: 5px;
      top: 2px;
      width: 10px;
      height: 10px;
      border-radius: 100%;
      background: #573bff;
      transform: scale(0);
      transition: all 0.3s ease;
    }
    .mintmrm-radiobtn input[type="radio"]:checked + label::before {
      border-color: #573bff;
    }
    .mintmrm-radiobtn input[type="radio"]:checked + label::after {
      transform: scale(1);
    }


    .response {
      font-size: 15px;
      font-style: italic;
      color: #000;

      &.mintmrm-error {
        color: #e71616;
      }
      &.mintmrm-success {
        color: #08c708;
      }
    }


    //----mrm submit button loader----
    .mrm-submit-button {
      position: relative;
    }
    .mrm-submit-button::after {
      content: "";
      border: 2px solid #8265c5;
      border-radius: 50%;
      border-top: 2px solid #fff;
      width: 13px;
      height: 13px;
      animation: spin 0.7s linear infinite;
      margin-left: 7px;
      position: relative;
      top: 2px;
      display: none;
      box-sizing: border-box;
    }
    .mrm-submit-button.show-loader::after {
      display: inline-block;
    }

    @-webkit-keyframes spin {
      0% {
        -webkit-transform: rotate(0deg);
      }
      100% {
        -webkit-transform: rotate(360deg);
      }
    }

    @keyframes spin {
      0% {
        transform: rotate(0deg);
      }
      100% {
        transform: rotate(360deg);
      }
    }


    //-------form inner--------
    .mrm-form-wrapper-inner {
      position: relative;

      .mrm-form-close {
        position: absolute;
        right: -12px;
        top: -16px;
        width: 30px;
        height: 30px;
        background: #573bff;
        z-index: 99;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 100%;
        cursor: pointer;
      }

      .mrm-form-overflow {
        @extend %scrollbar-style; //---extend form default.scss---
      }

      &.custom-background {
        background: transparent;
        border-radius: 0;
        padding: 0;

        .mrm-form-overflow {
          padding: 0;

          .wp-block-columns {
            margin: 0;
          }
        }
      }
    }

    .wp-block-column {
      padding: 0.2em;
    }
    .mintmrm-form-preview .wp-block-image.aligncenter {
      text-align: center;
    }
  }

}

.comment-form-mint-mail input[type="checkbox"] {
  margin-right: 6px;
}

//-------plugin page template's style------
.mintmrm-page-template-main {
  padding: 50px 0;

  .mrm-preferance-form-wrapper {
    width: 100%;
  }

  .mintmrm-container {
    max-width: 1230px;
    padding: 0 15px;
    margin: 0 auto;
    min-height: 62vh;
    display: flex;
    flex-flow: column;
    align-items: center;
    justify-content: center;

    .response {
      font-size: 15px;
      font-weight: 500;

      &.mintmrm-success {
        color: #24c329;
      }

      &.mintmrm-error {
        color: #cd2653;
      }
    }
  }

  a,
  svg path,
  button[type="submit"],
  input[type="button"],
  input[type="submit"],
  .mintmrm-btn,
  .transition-3ms {
    transition: all 0.3s ease;
  }

  .mrm-form-group {
    margin-bottom: 15px;

    label,
    .label {
      font-style: normal;
      font-weight: 500;
      font-size: 14px;
      line-height: 1.3;
      color: #344054;
      display: block;
    }

    //---input field style---
    input[type="date"],
    input[type="search"],
    input[type="url"],
    input[type="tel"],
    input[type="number"],
    input[type="password"],
    input[type="email"],
    input[type="text"],
    textarea,
    select {
      font-size: 14px;
      line-height: 1.3;
      color: #7a8b9a;
      padding: 12px 15px;
      width: 100%;
      border-radius: 6px;
      display: block;
      border: 1px solid #ebedf0;

      &::placeholder {
        color: #a4a8b5;
      }

      &::-webkit-input-placeholder,
      &::-moz-placeholder,
      &:-ms-input-placeholder {
        color: #a4a8b5;
      }

      &:focus {
        outline: none;
        box-shadow: none;
        border-color: $primary-color;
      }

      &:hover {
        color: #7a8b9a;
      }

      &[readonly] {
        cursor: not-allowed;
        background-color: #eee;
      }
    }

    textarea {
      resize: none;
      padding: 11px 15px;
    }

    select {
      max-width: inherit;
    }


    //---button style---
    input[type="submit"],
    button[type="submit"],
    .mintmrm-btn {
      display: inline-block;
      border: 1px solid transparent;
      color: #fff;
      font-style: normal;
      font-weight: 600;
      font-size: 14px;
      line-height: 17px;
      letter-spacing: -0.01em;
      padding: 11px 15px;
      cursor: pointer;
      text-align: center;
      border-radius: 6px;
      text-transform: capitalize;
      background-color: $primary-color;
      text-decoration: none;

      &:hover {
        background-color: $secondary-color;
        color: #fff;
      }

      &.outline {
        background-color: transparent;
        color: #3c3f47;
        border-color: #e4e6eb;

        &:hover {
          background-color: $primary-color;
          border-color: $primary-color;
          color: #fff;
        }
      }

      &:disabled {
        opacity: 0.7;
        background: #c1bbbb;
        cursor: not-allowed;
        color: #474747;
      }

      &.show-loader {
        .mintmrm-loader {
          display: inline-block;
        }
      }

      .mintmrm-loader {
        position: relative;
        top: 2px;
      }

      &.show-loader {
        .mintmrm-loader {
          display: inline-block;
        }
      }
    }

  }

  .mrm-checkbox-group {
    margin-bottom: 6px;

    &:last-child {
      margin-bottom: 0;
    }
  }
}
