// ------------------------------------------------------------------------------------------------
// WIDGET CONTENT
// ------------------------------------------------------------------------------------------------

@if $general {

	.widget-content {

		input[type="checkbox"] {

			+ label {
				margin-bottom: 0;
			}
		}

		label {
			display: inline-block;
			margin-bottom: 4px;
		}

		input[type="number"] {
			text-align: start;
		}

		> .wd-widget-field {
			margin-block: 8px;

			.description {
				padding: 2px 0 0 0 !important;
				font-size: 12px;
			}
		}

		.select2 {
			max-width: 100% !important;

			&.select2-container--xts {

				.select2-selection {
					border-color: #8C8F94 !important;
				}
			}
		}

		[class*="wd-type-attach_image"] {

			label {
				width: 100%;
			}

			img {
				max-width: 100%;
			}
		}
	}

	.wd-widget-field {

		&.wd-type-checkbox {
			display: flex;
			flex-wrap: wrap;
			align-items: center;
			margin-block: 12px;

			label {
				flex-shrink: 0;
				margin-bottom: 1px;
				margin-inline-end: 9px;

				&:after {
					display: none;
				}
			}

			input[type*=checkbox] {
				margin: 0;
			}
		}
	}

	.block-editor-block-list__layout {

		.id_base {

			&:is(
			[value="woodmart-instagram"],
			[value="woodmart-recent-posts"],
			[value="woodmart-woocommerce-layered-nav"],
			[value="woodmart-twitter"],
			[value="wd-product-category-filter"],
			[value="woodmart-author-information"],
			[value="woodmart-banner"],
			[value="woocommerce_products"]) {

				~ .widget-content {
					--xts-input-height: 42px;
					display: flex;
					flex-wrap: wrap;
					gap: 14px;
		
					> .wd-widget-field,
					> p {
						flex: 1 1 calc(50% - 8px);
						margin: 0;
						min-width: 250px;
		
						input[type=number],
						select {
							min-height: 35px;
						}

						input[type=number] {
							text-align: start;
						}
		
						br {
							display: none;
						}
						
						> label {
							line-height: 1;
							margin-bottom: 7px;
						}

						textarea {
							border-width: 1px;
							border-radius: 3px;
						}
					}

					> p:has([type="checkbox"]) {
						display: flex;
						align-items: center;
						flex-basis: 100%;

						label {
							margin-bottom: 0;
						}
					}
		
					> :is(
					.wd-type-select2,
					.wd-type-checkbox,
					[class*="wd-type-attach_image"],
					.wd-type-textarea) {
						flex-basis: 100%;
					}

					.woodmart-image-src {
						max-width: 50px;
						margin-inline-end: 10px; // NOTE BANNER IMG
					}
	
					.wd-type-attach_image {
						margin-inline-end: 5px;
					}

					.select2-selection,
					textarea {
						border-color: #757575 !important;
					}

					.select2-selection__rendered {
						padding: 3px 6px 6px 6px;
					}
		
					> .wd-type-checkbox {
		
						label {
							margin-bottom: 0;
						}
					}
		
					> .wd-type-select2 {
						
						li {
							margin-bottom: 0; // NOTE CHECK AFTER GUTENBERG UPDATE
						}
					}
				}
			}
		}
	}

} // END IF