.wtps-form {
  --field-br: 0px;
}

.wtps-form form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.wtps-form .wtps-form-container {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(var(--formcolumns, 2), 1fr);
  gap: 8px;
}

@media (max-width: 1024px) {
  .wtps-form .wtps-form-container {
    grid-template-columns: 1fr;
  }
}

.wtps-form .wtps-form-field {
  width: 100%;
  display: flex;
  position: relative;
  flex-direction: column;
  font-size: inherit;
  font-family: inherit;
  user-select: none;
  color: var(--formcolor, rgb(0, 0, 0));
}

.wtps-form .wtps-form-field-input {
  width: 100%;
  position: relative;
  display: inline-block;
  --field-padding: 12px;
}

.wtps-form .wtps-form-field input,
.wtps-form .wtps-form-field textarea,
.wtps-form .wtps-form-field .select-selected {
  font-family: inherit;
  font-size: inherit;
  border: none;
  -webkit-appearance: none;
  -ms-appearance: none;
  -moz-appearance: none;
  appearance: none;
  color: var(--formcolor, rgb(0, 0, 0));
  padding: var(--field-padding);
  background-color: var(--formfieldbgcolor, rgb(245, 245, 245));
  border-top-width: var(--formbordertop, 0px);
  border-right-width: var(--formborderright, 0px);
  border-bottom-width: var(--formborderbottom, 0px);
  border-left-width: var(--formborderleft, 0px);
  border-style: solid;
  border-color: var(--formcolor, rgb(0, 0, 0));
  width: 100%;
  outline: none;
  border-radius: var(--field-br);
  transition: all 200ms ease;
}

.wtps-form .wtps-form-field textarea {
  height: 120px;
}

.wtps-form .wtps-form-field .wtps-form-field-info {
  width: 100%;
  font-size: smaller;
  padding: 4px;
  opacity: 0.8;
  color: var(--formtitlecolor, var(--bodycolortext));
}

.wtps-form .wtps-form-field .error-message,
.wtps-form .wtps-form-recaptcha .error-message {
  display: none;
}

.wtps-form .wtps-form-field.field-error .error-message,
.wtps-form .wtps-form-recaptcha.field-error .error-message {
  position: absolute;
  top: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #c90505;
  padding: 0;
}

.wtps-form .wtps-form-field .wtps-form-field-title {
  width: 100%;
  pointer-events: none;
  font-size: inherit;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--formtitlecolor, var(--bodycolortext));
}

.wtps-form .wtps-form-field:has(:required) .wtps-form-field-title::after {
  content: "(obligatorio)";
  padding-left: 4px;
  opacity: 1;
}

.wtps-form .wtps-form-field input:not(:placeholder-shown),
.wtps-form .wtps-form-field input:focus,
.wtps-form .wtps-form-field textarea:not(:placeholder-shown),
.wtps-form .wtps-form-field textarea:focus {
  background-size: 100%;
}

.wtps-form .wtps-form-field input:focus+.wtps-form-field-title,
.wtps-form .wtps-form-field input:not(:placeholder-shown)+.wtps-form-field-title,
.wtps-form .wtps-form-field textarea:focus+.wtps-form-field-title,
.wtps-form .wtps-form-field textarea:not(:placeholder-shown)+.wtps-form-field-title,
.wtps-form .wtps-form-field:has(.select-arrow-active) .wtps-form-field-title,
.wtps-form .wtps-form-field:has(.has-value) .wtps-form-field-title {
  color: var(--formtitlecolor, var(--bodycolortext)) !important;
}

.wtps-form .wtps-form-field input:-webkit-autofill,
.wtps-form .wtps-form-field input:-webkit-autofill:focus,
.wtps-form .wtps-form-field textarea:-webkit-autofill,
.wtps-form .wtps-form-field textarea:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 2000px transparent inset;
}

/* Password */
.wtps-form-field .wtps-field-password-icon {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  padding: var(--field-padding) calc(var(--field-padding) * 0.5);
  display: flex;
  cursor: pointer;
  transform: all 200ms ease;
}

.wtps-form-field .wtps-field-password-icon svg {
  fill: currentColor;
}

.wtps-form-field .wtps-field-password-icon:hover {
  opacity: 0.6;
}

.wtps-form-field:has(input[type="text"]) .wtps-field-password-icon {
  opacity: 0.4;
}

.wtps-form-field:has(.wtps-field-password-icon) input {
  padding-right: 32px;
}

/* Checkbox */
.wtps-form-field:has(input[type="checkbox"]),
.wtps-form-field:has(textarea) {
  border-top: 0;
  grid-column: 1 / -1;
}

.wtps-form-field .wtps-form-field-input:has(input[type="checkbox"]) {
  cursor: pointer;
  display: flex;
  align-items: start;
  gap: 8px;
}

.wtps-form .wtps-form-field:has(input[type="checkbox"]) .wtps-form-field-info {
  padding-left: 24px;
}

.wtps-form-field input[type="checkbox"] {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  max-width: 20px;
  max-height: 20px;
  padding: 0px;
  background-color: transparent;
  border: 1px solid var(--formtitlecolor, var(--bodycolortext));
  transition: all 200ms ease;
}

.wtps-form-field:has(input[type="checkbox"]) .wtps-form-field-title {
  position: static;
  display: inline-block;
  white-space: wrap;
  flex-wrap: wrap;
  padding-top: 2px;
}

.wtps-form-field:has(input[type="checkbox"]) .wtps-form-field-title a {
  font-size: inherit;
  font-weight: inherit;
  text-decoration: underline;
  pointer-events: auto;
  color: inherit;
}

.wtps-form-field:has(input[type="checkbox"]) {
  display: flex;
}

.wtps-form-field input[type="checkbox"] {
  border-radius: 4px;
}

.wtps-form-field input[type="checkbox"]:checked:before {
  content: "";
  width: inherit;
  height: inherit;
  position: absolute;
  background-color: var(--formtitlecolor, var(--bodycolortext));
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 20 20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2.22222 0C1.63285 0 1.06762 0.234126 0.650874 0.650874C0.234126 1.06762 0 1.63285 0 2.22222V17.7778C0 18.3671 0.234126 18.9324 0.650874 19.3491C1.06762 19.7659 1.63285 20 2.22222 20H17.7778C18.3671 20 18.9324 19.7659 19.3491 19.3491C19.7659 18.9324 20 18.3671 20 17.7778V2.22222C20 1.63285 19.7659 1.06762 19.3491 0.650874C18.9324 0.234126 18.3671 0 17.7778 0H2.22222ZM15.5 7.55111C15.7085 7.34277 15.8257 7.06014 15.8258 6.76539C15.8259 6.47065 15.7089 6.18793 15.5006 5.97944C15.2922 5.77096 15.0096 5.65377 14.7148 5.65366C14.4201 5.65356 14.1374 5.77055 13.9289 5.97889L8.42889 11.4789L6.07222 9.12222C5.96906 9.01899 5.84658 8.93708 5.71176 8.88119C5.57695 8.82529 5.43245 8.79649 5.2865 8.79644C4.99176 8.79634 4.70905 8.91332 4.50056 9.12167C4.29207 9.33001 4.17488 9.61264 4.17478 9.90738C4.17467 10.2021 4.29166 10.4848 4.5 10.6933L7.56444 13.7578C7.67795 13.8713 7.81271 13.9614 7.96103 14.0229C8.10936 14.0843 8.26834 14.116 8.42889 14.116C8.58944 14.116 8.74842 14.0843 8.89675 14.0229C9.04507 13.9614 9.17983 13.8713 9.29333 13.7578L15.5 7.55111Z' fill='currentColor'/%3E%3C/svg%3E");
  mask-size: auto;
  mask-repeat: no-repeat;
  mask-position: center center;
  top: 0;
  left: 0;
}

.wtps-form-field:has(select) select {
  display: none;
}

.wtps-form .select-selected:after {
  position: absolute;
  content: "";
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  right: 10px;
  width: 0;
  height: 0;
  transition: 320ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--formcolor, rgb(0, 0, 0));
  width: 10px;
  height: 10px;
  clip-path: polygon(50% 20%, 0 80%, 100% 80%);
  z-index: 1;
}

.wtps-form .select-selected.select-arrow-active:after {
  transform: translateY(-50%) rotate(0deg);
}

.wtps-form .select-items div,
.wtps-form .select-selected {
  color: var(--formcolor, rgb(0, 0, 0));
  padding: var(--field-padding);
  background-color: var(--formfieldbgcolor, rgb(245, 245, 245));
  border-radius: var(--field-br);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 200ms ease;
}

.wtps-form .select-selected.no-value {
  /* opacity: 0.6; */
}

.wtps-form .select-items div {
  border-radius: 0;
}

.wtps-form .select-items {
  color: var(--formcolor, rgb(0, 0, 0));
  position: absolute;
  top: 100%;
  border-top: 2px solid transparent;
  left: 0;
  right: 0;
  z-index: 99;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
  border-radius: var(--field-br);
}

.wtps-form .select-items::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--formfieldbgcolor, rgb(245, 245, 245));
}

.wtps-form .select-hide {
  display: none;
}

.wtps-form .select-items div:hover,
.wtps-form .same-as-selected {
  position: relative;
}

.wtps-form .select-items div:hover::before,
.wtps-form .same-as-selected::before {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.05) !important;
}



/* ReCaptcha */
.wtps-form .wtps-form-recaptcha {
  position: relative;
  width: 100%;
  display: flex;
  align-items: start;
  justify-content: start;
  flex-direction: column;
  gap: 4px;
}

.wtps-form .wtps-form-recaptcha.field-error .error-message {
  padding-top: 2px;
}

/* Form 1 */
.wtps-form.wtps-form-1 {
  --field-br: 4px;
}

.wtps-form.wtps-form-1 .wtps-form-field {
  position: relative;
  border-top: 16px solid transparent;
  margin-bottom: 16px;
}

.wtps-form.wtps-form-1 .wtps-form-field .wtps-form-field-title {
  color: var(--formcolor, rgb(0, 0, 0));
  position: absolute;
  left: var(--field-padding);
  width: calc(100% - (var(--field-padding) * 2));
  overflow: hidden;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.8;
  transition: top 0.3s ease, color 0.3s ease, font-size 0.3s ease;
}

.wtps-form.wtps-form-1 .wtps-form-field input:focus+.wtps-form-field-title,
.wtps-form.wtps-form-1 .wtps-form-field textarea:focus+.wtps-form-field-title,
.wtps-form.wtps-form-1 .wtps-form-field input:not(:placeholder-shown)+.wtps-form-field-title,
.wtps-form.wtps-form-1 .wtps-form-field textarea:not(:placeholder-shown)+.wtps-form-field-title,
.wtps-form.wtps-form-1 .wtps-form-field:has(.select-arrow-active) .wtps-form-field-title,
.wtps-form.wtps-form-1 .wtps-form-field:has(.has-value) .wtps-form-field-title {
  width: 100%;
  top: -12px;
  opacity: 1;
  left: 4px;
  font-size: 10px;
  font-weight: 500;
}

.wtps-form.wtps-form-1 .wtps-form-field:has(input[type="checkbox"]) .wtps-form-field-title {
  font-size: unset;
  font-weight: 400;
  position: static;
  margin-top: 10px;
  color: var(--formcolor, rgb(0, 0, 0));
}

.wtps-form.wtps-form-1 .select-selected.no-value {
  color: transparent;
}

.wtps-form.wtps-form-1 .wtps-form-field:has(textarea) .wtps-form-field-title {
  top: 20px;
}

.wtps-form.wtps-form-1 .wtps-form-field.field-error .error-message {
  padding: 0 4px;
}

/* (end) Form 1 */

/* Form 2 */
.wtps-form.wtps-form-2 {
  --field-br: 0px;
}

.wtps-form.wtps-form-2 .wtps-form-container {
  gap: 16px;
}

.wtps-form.wtps-form-2 .wtps-form-field-input {
  --field-padding: 20px 0px 8px;
}

.wtps-form.wtps-form-2 .select-items div {
  padding: 16px;
}

.wtps-form.wtps-form-2 .wtps-form-field .wtps-field-password-icon {
  padding: var(--field-padding);
  padding-right: 8px;
}

.wtps-form.wtps-form-2 .wtps-form-field input:not([type="checkbox"]):focus,
.wtps-form.wtps-form-2 .wtps-form-field:has(.select-arrow-active) .select-selected {
  padding-left: 8px;
}

.wtps-form.wtps-form-2 .wtps-form-field .wtps-form-field-info {
  padding: 8px 0;
  opacity: 1;
}

.wtps-form.wtps-form-2 .wtps-form-field .wtps-form-field-title {
  padding-bottom: 4px;
  font-size: inherit;
  font-weight: 600;
  /* opacity: 0.6; */
}

.wtps-form.wtps-form-2 .wtps-form-field textarea:focus,
.wtps-form.wtps-form-2 .wtps-form-field textarea:focus-visible {
  padding-left: 8px;
}

/* (end) Form 2 */

/* Form 3 */
.wtps-form.wtps-form-3 {
  --field-br: 100px;
}

.wtps-form.wtps-form-3 .wtps-form-container {
  gap: 16px;
}

.wtps-form.wtps-form-3 .wtps-form-field-input {
  --field-padding: 14px 20px;
  margin-top: 12px;
}

.wtps-form.wtps-form-3 .select-items div {
  padding: 16px;
}

.wtps-form.wtps-form-3 .wtps-form-field .wtps-field-password-icon {
  padding: 10px;
}

.wtps-form.wtps-form-3 .wtps-form-field:has(.select-selected) .wtps-form-field-input::after {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  content: "";
  z-index: -1;
}

.wtps-form.wtps-form-3 .select-items {
  border-radius: 16px;
}

.wtps-form.wtps-form-3 .wtps-form-field .wtps-form-field-info {
  padding: 0;
  padding-top: 4px;
  opacity: 0.8;
}

.wtps-form.wtps-form-3 .wtps-form-field .wtps-form-field-title {
  font-size: inherit;
  font-weight: 600;
}

.wtps-form.wtps-form-3 .wtps-form-field textarea {
  border-radius: 16px;
}

/* (end) Form 3 */

/* Form 4 */
.wtps-form.wtps-form-4 {
  --field-br: 5px;
}

.wtps-form.wtps-form-4 .wtps-form-container {
  gap: 24px;
}

.wtps-form.wtps-form-4 .wtps-form-field-input {
  --field-padding: 8px 15px;
  margin-top: 5px;
}

.wtps-form.wtps-form-4 .select-items div {
  padding: 16px;
}

.wtps-form.wtps-form-4 .wtps-form-field .wtps-field-password-icon {
  padding: 10px;
}

.wtps-form.wtps-form-4 .select-items {
  border-radius: var(--field-br);
}

.wtps-form.wtps-form-4 .wtps-form-field .select-selected,
.wtps-form.wtps-form-4 .wtps-form-field input:-webkit-autofill,
.wtps-form.wtps-form-4 .wtps-form-field textarea {
  /* border-bottom: 1px solid var(--formcolor); */
  -webkit-text-fill-color: var(--formcolor, var(--bodycolortex));
  background-color: var(--formfieldbgcolor, var(--bodycolorbackground));
}

.wtps-form.wtps-form-4 .wtps-form-field input[type="checkbox"] {
  position: relative;
}

.wtps-form.wtps-form-4 .wtps-form-field input[type="checkbox"]:checked:before {
  mask-image: none;
  width: 10px;
  height: 10px;
  background-color: var(--formtitlecolor, var(--bodycolortext));
  transform: translate(-50%, -50%);
  left: 50%;
  top: 50%;
  border-radius: 2px;
}

.wtps-form.wtps-form-4 .wtps-form-field .wtps-form-field-info {
  padding: 0;
  padding-top: 4px;
  opacity: 0.8;
  font-size: inherit;
}

.wtps-form.wtps-form-4 .wtps-form-field .wtps-form-field-title {
  font-size: inherit;
}

/* (end) Form 4 */