.happy-form-section {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.happy-problem-form-wrap-container,
.happy-problem-form-container {
  margin: auto;
  width: 100%;
}

.happy-problem-form-wrapper {
  box-sizing: border-box;
  padding-top: 0;
}

.happy-problem-form-wrapper-form {
  box-sizing: border-box;
  width: 100%;
  padding: 20px 35px 0;
  background-color: #fff;
  margin: 0 auto;
}

.happy-choice-label {
  margin-right: 10px;
}

.happy-radio-field-wrapper,
.happy-checkbox-field-wrapper {
  .happy-choice-label {
    display: block;
  }

  &.is-horizontal .happy-choice-label {
    display: inline-block;
  }
}

.happy-problem-file-input {
  display: none;
}

.happy-form-gap {
  padding: var(--happy-gap, 0) 0 0;
}

.happy-form-divider {
  border-top-width: var(--happy-divider-thickness, 1px);
  border-top-style: var(--happy-divider-style, solid);
  border-top-color: var(--happy-divider-color, #212121);
}

.happy-recaptcha-align {
  text-align: var(--happy-recaptcha-align, left);
}

.happy-recaptcha-inner {
  display: inline-block;
}


.happy-editor-element {
  border: 1px solid;

}

.happy-editor-toolbar {
  span {
    padding: 5px;
  }
}

.happy-field-require-message {
  color: red;
}

.happy-back-to-tickets-wrap {
  max-width: 840px;
  margin: 0 auto 12px;
  padding: 0;
  text-align: left;
}

.happy-back-to-tickets {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4384F5;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;

  svg {
    flex-shrink: 0;
  }

  &:hover {
    color: #2f6de0;
    text-decoration: none;
  }
}

.happy-problem-form-wrap-container {
  border-radius: 8px;
  box-shadow: 0 0 10px rgb(0 0 0 / 25%);
  overflow: hidden;
  margin: 0 auto;
  max-width: 840px;

  .happy-auth-container {
    padding: 35px;
    width: 100%;

    .happy-form-field input:not([type=checkbox]) {
      border-radius: 0;
      border-color: #767676;
    }

    .happy-auth-actions {
      .happy-auth-button {
        border-radius: 4px !important;
      }
    }
  }
  .happy_choose_problem {
    .happy-form-element {
      width: 100%;
      margin-bottom: 17px;
      display: flex;
      flex-direction: column;
      gap: 8px
    }
  }
  &:has(.happy-auth-single) {
    width: 100%;
  }

  input, select, textarea {
    background-color: white;
    border: 1px solid #A6A6A6;
    box-shadow: unset;
    border-radius: 4px;
    box-sizing: border-box;
    line-height: 1.15;
    min-height: 40px;
    padding: 0 8px;
    outline: none !important;
    font-size: 14px;

    &:focus {
      background-color: white;
    }

    &:focus-visible {
      background-color: white;
      outline: 1px solid;
    }
  }

  .happy_choose_problem_wrapper {
    margin-top: 0;
    margin-bottom: 0;
    width: 100%;
    border: none !important;
    padding: 20px 35px 0 !important;

    &.happy-first-step-choose-wrapper {
      background-color: #fff;
      padding: 20px 35px 0 !important;

      .happy_choose_problem_header {
        display: flex;
        margin-bottom: 30px;

        .happy-form-element {
          display: flex;
          justify-content: space-between;
          width: 100%;
          align-items: center;
          position: relative;

          &:before {
            content: "";
            position: absolute;
            width: 100%;
            height: 1px;
            background-color: #bfbaba;

          }

          .happy_wrap_title {
            display: flex;
            align-items: center;
            background-color: white;
            z-index: 9;
            padding-right: 5px;

            .happy_step_number {
              background-color: #d9d5d5;
              width: 20px;
              height: 20px;
              font-size: 14px;
              line-height: 20px;
              text-align: center;
              color: #333;
              border-radius: 50%;
              margin-right: 10px;
            }

            .happy_step_title {
              font-size: 15px;
              font-weight: bold;
              color: #1d67c0;

              .happy-required {
                color: #ff3d00 !important;
                font-weight: 700 !important;
                margin-left: 4px;
              }
            }
          }

          .happy-choose-step-btn {
            font-size: 15px;
            color: #1d67c0;
            text-decoration: none;
            background-color: white;
            z-index: 9;
            padding: 0 0 0 10px !important;
            outline: none !important;

            .happy-icon {
              color: #726e6e;
              font-size: 13px;
              padding: 3px;
              background-color: #d9d5d5;
              border-radius: 50%;
              margin-right: 6px;
            }
          }
        }
      }
    }

  }

  .happy_woo_choose_order {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;

    > .happy-form-element {
      box-sizing: border-box;
      flex: 0 0 100%;
      width: 100%;
      max-width: 100%;
      min-width: 0;

      label {
        display: block;
        font-size: 16px;
        font-weight: normal;
        margin-bottom: 4px;
        line-height: 1.48;
        color: #333;
      }

      select {
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
      }

      .happy-required {
        color: #ff3d00 !important;
        font-weight: 700 !important;
        margin-left: 4px;
        display: inline !important;
        visibility: visible !important;
      }
    }
  }

  .form-check {
    padding: 0;
    display: flex;
    align-items: center;
    background: #ffffff;

    .form-check-input {
      outline: none;
      position: static;
      margin: 0 3px 0 0;
    }
  }

  .happy-helpdesk-problem-form {
    margin-top: 0;
    margin-bottom: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

    .happy-form-section {
      width: 100%;
      max-width: 100%;

      > .happy-form-element {
        box-sizing: border-box;
        flex-grow: 0;
        flex-shrink: 0;
        max-width: 100%;
        min-width: 0;
      }
    }

    .happy-form-element {
      box-sizing: border-box;

      input, textarea, select, h1, h2, h3, h4, h5, h6 {
        margin: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 10px;
      }

      input[type=checkbox], input[type=radio] {
        width: initial;
      }

      button {
        line-height: 1;
      }

      input[type=file] {
        cursor: pointer;
        border: dashed 1.75px black;
        background-color: #FFF3E4;
        min-height: 115px;
        position: relative;

        &::before {
          background-color: #fff;
          border-radius: 50px;
          position: absolute;
          top: 50%;
          left: 20px;
          transform: translateY(-50%);
          font-size: 16px;
          text-align: center;

        }
      }

      label {
        display: inline-block;
        font-size: 16px;
        font-weight: normal;
        margin-bottom: 4px;
        line-height: 1.48;
      }

      .happy-required,
      abbr {
        color: #ff3d00;
        font-weight: 700;
        text-decoration: none;
      }

      p {
        margin: 1em 0;
        line-height: 1.2;
      }
    }

    .happy-error {
      color: red;
      line-height: 1.5;
    }

    .happy-form-element {
      .happy-wrap-editor-field {
        border-radius: 4px;
        overflow: hidden;
        border: solid 1px #A6A6A6;

        .mce-toolbar-grp .mce-container-body {
          background-color: #FFF3E4;
        }
      }
    }
  }

  .happy-wrap-problem-submit-button {
    background-color: #ffffff;
    padding: 0 0 20px;
    text-align: var(--happy-submit-align, left);
  }

}

@media screen and (max-width: 768px) {
  .happy-problem-form-wrap-container .happy-form-section > .happy-form-element,
  .happy-problem-form-container .happy-form-section > .happy-form-element,
  .happy-problem-form-wrap-container .happy_woo_choose_order > .happy-form-element {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}
