.wp-block-themeisle-blocks-form {

	--border-radius: 4px;
	--border-color: inherit;
	--border-width: 1px;
	--label-color: inherit;
	--help-label-color: inherit;
	--input-width: 100%;
	--required-color: red;
	// --submit-color: initial; // var(--wp--preset--color--contrast);
	// --submit-color-hover: initial; // var(--wp--preset--color--base);
	// --submit-bg-color: initial; // var(--wp--preset--color--primary);
	// --submit-bg-color-hover: initial;// var(--wp--preset--color--contrast);
	--submit-msg-color: green;
	--submit-error-color: red;
	--inputs-gap: 16px;
	--input-gap: 10px;
	--label-font-size: var(--bodyfontsize, inherit);
	--message-font-size: var(--bodyfontsize, inherit);
	--submit-font-size: var(--btnfs, var(--bodyfontsize, inherit));
	--input-color: initial;
	--input-font-size: 1em;
	--help-font-size: 13px;
	--input-bg-color: initial;

	--stripe-border-radius: 6px;
	--stripe-border-color: #e0e0e0;
	--stripe-border-width: 1px;

	// Responsive
	--btn-pad: 10px 20px;
	--btn-pad-tablet: var(--btn-pad);
	--btn-pad-mobile: var(--btn-pad-tablet);

	--padding: 8px; // input
	--padding-tablet: var(--padding);
	--padding-mobile: var(--padding-tablet);

	border: none;

	.otter-form__container {
		display: flex;
		flex-wrap: wrap;
		gap: var(--inputs-gap);

		&> div {
			margin: 0px;
		}

		p {
			margin-bottom: 10px;
		}

		&> div {
			width: 100%;
			margin: 0px;
		}

		.wp-block-button {
			display: flex;
			align-items: baseline;
			flex-direction: column;

			.wp-block-button__link {
				font-size: var(--submit-font-size);
				text-align: center;
				height: auto;
				padding: var(--btn-pad);
				border: 0px;
				transition: background-color 0.15s linear;
				max-width: max-content;
				white-space: normal !important;

				@media ( min-width:640px ) and ( max-width: 1024px ) {
					padding: var(--btn-pad-tablet);
				}

				@media ( max-width: 640px ) {
					padding: var(--btn-pad-mobile);
				}
			}

			&.right {
				align-items: flex-end;
			}

			&.o-right-tablet {
				@media ( max-width: 1024px ) {
					align-items: flex-end;
				}
			}

			&.o-right-mobile {
				@media ( max-width: 640px ) {
					align-items: flex-end;
				}
			}

			&.left {
				@media( min-width: 1024px ) {
					align-items: flex-start;
				}
			}

			&.o-left-tablet {
				@media ( max-width: 1024px ) {
					align-items: flex-start;
				}
			}

			&.o-left-mobile {
				@media ( max-width: 640px ) {
					align-items: flex-start;
				}
			}

			&.o-center {
				@media( min-width: 1024px ) {
					align-items: center;
				}
			}

			&.o-center-tablet {
				@media ( max-width: 1024px ) {
					align-items: center;
				}
			}

			&.o-center-mobile {
				@media ( max-width: 640px ) {
					align-items: center;
				}
			}

			&.full {
				flex-direction: column;
				align-items: center;

				.wp-block-button__link {
					width: 100%;
					max-width: unset;
				}
			}

			&.o-full-tablet {
				@media ( max-width: 1024px ) {
					flex-direction: column;
					align-items: center;

					.wp-block-button__link {
						width: 100%;
						max-width: unset;
					}
				}
			}

			&.o-full-mobile {
				@media ( max-width:640px ) {
					flex-direction: column;
					align-items: center;

					.wp-block-button__link {
						width: 100%;
						max-width: unset;
					}
				}
			}

			@media (max-width: 640px) {
				flex-direction: column;
			}
		}

		> .protection {
			display: none;
		}

		.has-submit-msg  {

			> div {
				display: flex;
				flex-direction: column;
				align-items: flex-start;
			}

			&:not(.full) .o-form-server-response {
				padding-left: 0px;
			}

			&.right > div {
				align-items: flex-end;

				.o-form-server-response {
					padding-right: 0px;
				}
			}

			&.o-right-tablet > div {
				@media ( max-width: 1024px ) {
					align-items: flex-end;

					.o-form-server-response {
						padding-right: 0px;
					}
				}
			}

			&.o-right-mobile > div {
				@media ( max-width:640px ) {
					align-items: flex-end;

					.o-form-server-response {
						padding-right: 0px;
					}
				}
			}

			&.left > div {
				align-items: flex-start;

				.o-form-server-response {
					padding-left: 0px;
				}
			}

			&.o-left-tablet > div {
				@media ( max-width: 1024px ) {
					align-items: flex-start;

					.o-form-server-response {
						padding-left: 0px;
					}
				}
			}

			&.o-left-mobile > div {
				@media ( max-width:640px ) {
					align-items: flex-start;

					.o-form-server-response {
						padding-left: 0px;
					}
				}
			}

			&.full > div, &.o-center > div {
				align-items: center;
			}

			&.o-full-tablet > div, &.o-center-tablet > div  {
				@media ( max-width: 1024px ) {
					align-items: center;
				}
			}

			&.o-full-mobile > div, &.o-center-mobile > div  {
				@media ( max-width:640px ) {
					align-items: center;
				}
			}
		}
	}


	.wp-block-themeisle-blocks-form-input, .wp-block-themeisle-blocks-form-textarea, .wp-block-themeisle-blocks-form-multiple-choice, .wp-block-themeisle-blocks-form-file {
		display: flex;
		flex-direction: column;
		width: 100%;
		gap: var(--input-gap);
		margin: 0px;

		.otter-form-input-label, .otter-form-textarea-label {
			width: 100%;
			color: var(--label-color);
			font-size: var(--label-font-size);

			.required {
				color: var(--required-color);
			}
		}

		.otter-form-input, .otter-form-textarea-input, select {
			color: var(--input-color);
			width: var(--input-width);
			font-size: var(--input-font-size);

			&:not(input[type="file"]) {
				padding: var(--padding);
				border-radius: var(--border-radius);
				border-width: var(--border-width);
				border-color: var(--border-color);
				border-style: solid;
				background-color: var(--input-bg-color);
			}

			@media (max-width: 1024px) {
				padding: var(--padding-tablet);
			}

			@media (max-width: 640px) {
				padding: var(--padding-mobile);
			}
		}

		.o-form-choice-label {
			font-size: var(--input-font-size);
			background: var(--input-bg-color);
			box-sizing: border-box;
		}

		.o-form-help {
			opacity: 0.8;
			color: var(--help-label-color);
			margin-bottom: 0px;
			font-size: var(--help-font-size);
			width: 100%;
		}

		&.is-style-hidden-label {
			.otter-form-input-label, .otter-form-textarea-label {
				display: none;
			}
		}
	}

	.wp-block-themeisle-blocks-form-input,
	.wp-block-themeisle-blocks-form-textarea,
	.wp-block-themeisle-blocks-form-multiple-choice,
	.wp-block-themeisle-blocks-form-file,
	.wp-block-themeisle-blocks-form-stripe-field {
		@media (min-width: 640px) {
			flex-grow: 1;

			&:is(.is-style-o-c-three-quarters, .is-style-o-c-two-thirds, .is-style-o-c-half, .is-style-o-c-one-third, .is-style-o-c-one-quarter) {
				box-sizing: border-box;
				margin-left: 0px;
				margin-right: 0px;
			}

			&.is-style-o-c-three-quarters {
				flex-basis: calc( 75% - var( --inputs-gap ) );
				max-width: 75%;
			}

			&.is-style-o-c-two-thirds {
				flex-basis: calc( 66.66666666666666% - var( --inputs-gap ) );
				max-width: 66.66666666666666%;
			}

			&.is-style-o-c-half {
				flex-basis: calc( 50% - var( --inputs-gap ) );
				max-width: 50%;
			}

			&.is-style-o-c-one-third {
				flex-basis: calc( 33.33333333333333% - var( --inputs-gap ) );
				max-width: 33.33333333333333%;
			}

			&.is-style-o-c-one-quarter {
				flex-basis: calc( 25% - var( --inputs-gap ) );
				max-width: 25%;
			}
		}

		@media (min-width: 640px) {
			flex-grow: 1;

			&:is(.is-style-o-c-three-quarters, .is-style-o-c-two-thirds, .is-style-o-c-half, .is-style-o-c-one-third, .is-style-o-c-one-quarter) {
				box-sizing: border-box;
				margin-left: 0px;
				margin-right: 0px;
			}

			&.is-style-o-c-three-quarters {
				flex-basis: calc( 75% - var( --inputs-gap ) );
				max-width: 75%;
			}

			&.is-style-o-c-two-thirds {
				flex-basis: calc( 66.66666666666666% - var( --inputs-gap ) );
				max-width: 66.66666666666666%;
			}

			&.is-style-o-c-half {
				flex-basis: calc( 50% - var( --inputs-gap ) );
				max-width: 50%;
			}

			&.is-style-o-c-one-third {
				flex-basis: calc( 33.33333333333333% - var( --inputs-gap ) );
				max-width: 33.33333333333333%;
			}

			&.is-style-o-c-one-quarter {
				flex-basis: calc( 25% - var( --inputs-gap ) );
				max-width: 25%;
			}
		}
	}

	.wp-block-themeisle-blocks-form-textarea {
		.otter-form-textarea-input {
			height: 200px;
			border-style: solid;
		}
	}

	.otter-form-consent {
		margin-left: 5px;
		label {
			margin-left: 10px;
		}

		input {
			transform: scale(1.5);
		}
	}

	.o-form-redirect-link {
		color: var(--submit-msg-color);
	}

	.o-form-server-response {
		text-align: left;
		padding: 1rem;
		font-size: var(--message-font-size);
		border-radius: 10%;

		&.o-success {
			color: var(--submit-msg-color);
		}

		&.o-error {
			color: var(--submit-error-color);
		}

		&.o-info {
			color: rgb(79, 123, 204);
		}

		&.o-warning {
			color: rgb(255, 196, 0);
		}
	}

	@keyframes spinner {
		to {
			transform: rotate(360deg);
		}
	}

	.spinner {
		position: relative;
		padding: 2rem;
		&:before {
			content: "";
			box-sizing: border-box;
			position: absolute;
			top: 50%;
			left: 50%;
			width: 20px;
			height: 20px;
			margin-top: -10px;
			margin-left: -10px;
			border-radius: 50%;
			border-top: 2px solid var(--submit-color, white);
			border-right: 2px solid transparent;
			animation: spinner 0.6s linear infinite;
		}
	}

	.wp-block-themeisle-blocks-form-multiple-choice.is-style-inline-list:not(:has(.o-form-choices select)) .o-form-choices {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 8px;
	}

	.wp-block-themeisle-blocks-form-multiple-choice {
		label, select {
			color: var(--input-color);
		}

		select {
			width: var(--input-width);
			border-color: var(--input-color);
			padding: var(--padding);

			@media (max-width: 1024px) {
				padding: var(--padding-tablet);
			}

			@media (max-width: 640px) {
				padding: var(--padding-mobile);
			}
		}
	}

	.wp-block-themeisle-blocks-form-file input[type="file"] {
		border: 0px;
	}

	.wp-block-themeisle-blocks-form-stripe-field {
		display: flex;
		flex-direction: column;
		justify-content: center;

		border-width: var(--stripe-border-width);
		border-style: solid;
		border-color: var(--stripe-border-color);
		border-radius: var(--stripe-border-radius);

		.o-stripe-checkout {
			display: flex;
			padding: 10px;

			img {
				border-radius: 4px;
				margin: 10px;
				width: 56px;
				height: 56px;
				border: 0;
			}

			.o-stripe-checkout-description {
				display: flex;
				flex-direction: row;
				justify-content: space-between;
				align-items: center;
				flex-grow: 1;

				h3 {
					font-style: normal;
					font-weight: 500;
					font-size: calc( var(--label-font-size) * 1.5 );
					line-height: 20px;
					letter-spacing: -0.154px;
					margin: 0;
					padding-top: 0;
					color: var(--label-color);
				}

				h5 {
					opacity: .5;
					margin-top: 0;
					padding-top: 0;
					font-style: normal;
					font-weight: 500;
					font-size: calc( var(--label-font-size) * 1.5 );
					line-height: 20px;
					letter-spacing: -0.154px;
					margin: 0;
					color: var(--label-color);
				}
			}
		}
	}

}

.o-form-multiple-choice-field {
	display: flex;
    align-items: center;
    flex-direction: row;
	gap: 5px;
}
