@import 'notices';
@import 'animation';
@import '../../../everest-forms/assets/css/variables/variables';

.everest-forms {
	.evf-field-country {
		span {
			&.select2-container {
				margin-bottom: 0;
			}

			&.selection {
				display: block;
			}

			&.dropdown-wrapper {
				display: none;
			}
		}
	}
}

table.wp-list-table {
	.column-indicators {
		width: 35px;
		text-align: center;

		a:focus {
			box-shadow: none;
		}

		.dashicons {
			width: 14px;
			height: 14px;
			font-size: 14px;
			margin-top: 3px;
		}

		.indicator-star {
			color: $color_gray-lighten;

			.dashicons {
				margin-right: 6px;
			}

			&:hover,
			&.unstar {
				color: $orange;
			}
		}

		.indicator-read {
			color: $green;

			&:hover,
			&.unread {
				color: $color_gray-lighten;
			}
		}
	}

	tbody#the-list {
		tr.unread {
			font-weight: 600;
		}
	}
}

#everest-forms-entry-fields {
	h2.hndle {
		span.dashicons-star-filled {
			color: $orange;
		}
	}
}

#everest-forms-builder {
	.everest-forms-addable-list {
		.everest-forms-addable-list-wrap {
			padding: 15px;
			margin-bottom: 15px;
			background-color: $color_gray-light-skin;
			border: 1px solid $color_gray-lighten;

			ul {
				margin-top: 0;
			}
		}

		.everest-forms-addable-list-title {
			margin-top: 0;
		}

		ul {
			li {
				display: flex;
				flex-wrap: wrap;
				margin-bottom: 15px;

				input,
				select {
					margin-bottom: 0;
				}

				span {
					flex: 1;
					margin-right: 10px;

					&.actions {
						flex: 0 0 58px;
						display: flex;
						align-items: center;
						margin-right: 0;
					}
				}
			}
		}

		&.everest-forms-border-container {
			ul {
				margin: 5px 0 15px;
			}

			select {
				margin-bottom: 0;
			}
		}
	}

	// Slider Input Styles
	.everest-forms-range-slider {
		margin-top: 30px;

		.evf-range-affix-group {
			display: flex;
			justify-content: space-between;
			margin-bottom: 4px;
		}

		.evf-slider-group {
			display: flex;
			align-items: center;
			margin-top: 15px;
			margin-bottom: 10px;
		}

		.evf-slider {
			display: flex;
			flex: 1;
			position: relative;

			> .irs {
				flex: 1;

				.irs {
					position: absolute;
					width: 100%;

					.irs-line {
						background: $color_gray-light;
						top: 0;
					}
				}

				.irs,
				.irs-bar,
				.irs-handle {
					top: 50%;
					transform: translateY(-50%);
				}

				&.irs--flat {
					.irs-single,
					.irs-min,
					.irs-max {
						top: -25px;
					}
				}

				&.irs--big {
					.irs-single,
					.irs-min,
					.irs-max {
						top: -35px;
					}
				}

				&.irs--modern {
					.irs-single,
					.irs-min,
					.irs-max {
						top: -25px;
					}

					.irs-handle {
						transform: translateY(10px);
					}
				}

				&.irs--sharp {
					.irs-single,
					.irs-min,
					.irs-max {
						top: -30px;
					}
				}

				&.irs--round {
					.irs-single,
					.irs-min,
					.irs-max {
						top: -35px;
					}
				}

				&.irs--square {
					.irs-handle {
						transform: translateY(-50%) rotate(45deg);
					}

					.irs-single,
					.irs-min,
					.irs-max {
						top: -32px;
					}
				}
			}

			.ui-slider-handle {
				width: 20px;
				height: 20px;
				cursor: pointer;
				margin-left: -8px;
				position: absolute;
				top: 50%;
				transform: translateY(-50%);
				border-radius: 16px;
				border: none;
				background: $color_gray-normal none;
				box-shadow: 0 0 15px transparentize($color_gray-base, 0.8);
				z-index: auto;
			}
		}

		.ui-slider-range {
			height: 100%;
			margin-left: -8px;
			border-top-left-radius: 2px;
			border-bottom-left-radius: 2px;
			background-color: $everestforms;
		}

		.evf-slider-input-wrapper {
			margin-left: 16px;
			display: flex;
			align-items: center;

			.evf-slider-input {
				max-width: 80px;
				margin-bottom: 0;
			}
		}

		.evf-range-slider-reset-icon {
			width: 16px;
			height: 16px;
			font-size: 16px;
			cursor: pointer;
			margin-left: 10px;
			color: $color_gray-light;
			transition: all 0.2s ease 0s;
		}
	}

	.evf-tab-content {
		.everest-forms-panel-sidebar {
			.evf-panel-tab {
				.logo {
					height: 45px;
					width: 45px;
					overflow: hidden;
					border-radius: 4px;
					margin: 0 15px 0 0;
					position: relative;
					border: 1px solid $color_gray-lighten;

					img {
						max-width: 100%;
					}
				}
			}

			.everest-forms-field-option-row-add_local_page,
			.everest-forms-field-option-row-add_custom_link {
				input,
				select {
					margin-bottom: 8px;
				}
			}

			.evf-range-slider-min-max {
				margin-bottom: 0;
			}
		}

		.everest-forms-panel-content-wrap {
			.everest-forms-field {
				&.everest-forms-field-password {
					.everest-forms-confirm {
						.evf-field-password-input {
							position: relative;

							.toggle-password {
								position: absolute;
								top: 50%;
								right: 10px;
								transform: translateY(-50%);
							}
						}
					}
				}

				&.everest-forms-field-credit-card {
					.everest-forms-credit-card-cardnumber {
						padding: 0 8px;
						display: flex;
						align-items: center;
						min-height: 30px;
						border-radius: 4px;
						border: 1px solid $color_gray-lighten;

						.everest-forms-card-icon {
							svg {
								height: 16px;
							}

							.Icon-fill {
								fill: $color_gray-base;
							}
						}

						input {
							border: none;
							box-shadow: none;
							min-height: auto;
							margin: 0;

							&.card-number {
								width: 100px;
							}

							&.card-expiration {
								width: 85px;
								text-align: right;
								margin-left: auto;
							}

							&.card-cvc {
								width: 40px;
							}
						}
					}
				}

				&.everest-forms-field-file-upload,
				&.everest-forms-field-image-upload {
					.everest-forms-uploader {
						display: flex;
						flex-direction: column;
						align-items: center;
						padding: 20px;
						border-radius: 4px;
						border: 1px dashed $color_gray-lighten;

						svg {
							margin-bottom: 10px;
							background: $color_gray-light-skin;
							height: 48px;
							width: 48px;
							padding: 8px;
							border-radius: 4px;
						}

						span {
							display: block;
							font-size: 14px;

							&.everest-forms-upload-title {
								margin-bottom: 5px;
							}

							&.everest-forms-upload-hint {
								color: $color_gray-light;
							}
						}
					}

					input {
						display: none;
					}

					&.active {
						svg {
							background: darken($color_gray-light-skin, 5%);
						}
					}
				}
			}
		}

		.evf-panel-content-section {
			.evf-provider-options,
			.evf-connection-block {
				input,
				label {
					display: inline-block;
				}

				> h4,
				> label {
					margin-top: 0;
					margin-bottom: 10px;
				}

				.evf-conditional-container {
					margin-top: 20px;
				}

				&.evf-provider-groups {
					max-width: 400px;

					ul {
						margin: 0 0 15px;
					}
				}
			}

			.evf-content-section-title {
				display: flex;
				align-items: center;
				justify-content: space-between;
			}

			.evf-provider-connections-wrap {
				select {
					width: 100%;
				}

				.evf-provider-connection {
					display: none;
					animation: fadeIn 0.5s;
					margin: 20px 0;
					border-radius: 4px;
					padding-bottom: 20px;
					border: 1px solid $color_gray-lighten;

					&.active-connection {
						display: block;
					}

					.evf-provider-connection-header,
					.evf-connection-block {
						padding: 0 20px;
						margin-bottom: 20px;

						p {
							margin: 0;

							label {
								margin-bottom: 0;
							}
						}

						&:last-child {
							margin-bottom: 0;
						}
					}

					.evf-provider-accounts,
					.evf-provider-lists {
						width: 300px;
					}

					.evf-provider-accounts,
					.evf-marketing-integration {
						width: 300px;
					}

					.evf-connection-block {
						&.evf-provider-accounts,
						&.evf-provider-lists {
							select {
								width: 90%;

								&:disabled {
									opacity: 0.65;
									cursor: no-drop;
								}
							}

							.evf-loading {
								width: 15px;
								height: 15px;
								margin-top: 8px;
								background-size: 15px 15px;
							}
						}
					}
				}
			}

			.evf-connection-block {
				&.evf-provider-accounts,
				&.evf-marketing-integration {
					select {
						width: 90%;
					}
				}
			}

			.evf-conditional-container {
				display: none;
				border: 1px solid $color_gray-lighten;

				.evf-logic {
					display: flex;
					flex-wrap: wrap;
					align-items: center;

					select {
						width: 80px;
						margin: 0 7px;
					}

					p {
						margin-top: 0;
						margin-bottom: 10px !important;
					}
				}

				.evf-conditional-wrapper {
					display: flex;
					margin-bottom: 20px;

					select {
						margin-right: 10px;
						margin-bottom: 0;
					}

					select,
					input {
						width: 50%;
					}

					.evf-conditional-condition {
						width: 80px;
					}
				}
			}
		}

		.evf-field-conditional-container {
			display: none;

			.evf-field-logic {
				display: flex;
				flex-wrap: wrap;
				align-items: center;
				margin-bottom: 15px;
				min-height: 36px;

				p:last-child {
					padding: 7px 12px;
					// margin-left: auto;
					border: 1px solid #cdd0d8;
					border-radius: 4px;
					min-height: 36px;
					background: transparent;

					a:hover {
						color: white;
					}
				}

				p {
					margin-left: 8px;
				}

				select {
					margin-bottom: 0;
				}
			}

			.evf-field-conditional-wrapper {
				.evf-conditional-group {
					display: flex;
					flex-wrap: wrap;
					align-items: center;
					margin-bottom: 10px;

					.evf-form-group {
						display: flex;
						flex-wrap: wrap;

						select {
							margin-right: 4px;
							margin-bottom: 0;

							&.evf-field-conditional-field-select {
								width: 94px;
							}

							&.evf-field-conditional-condition {
								width: 55px;
							}
						}

						.evf-field-conditional-input {
							width: 110px;
							margin-right: 5px;
						}
					}

					.conditonal-rule-add,
					.conditonal-rule-remove {
						width: 28px;
						height: 28px;
						display: flex;
						align-items: center;
						justify-content: center;
						border-radius: 3px;
						color: $color_gray-base;
						background: $color-white;
						border: 1px solid $color_gray-lighten;
					}

					.conditonal-rule-add {
						font-size: 11px;
						margin-right: 5px;

						&:hover {
							background: $blue;
							color: $color-white;
							border: 1px solid $blue;
						}
					}

					.conditonal-rule-remove {
						&:hover {
							background: $red;
							color: $color-white;
							border: 1px solid $red;
						}
					}

					@media screen and (max-width: 600px) {
						flex-direction: column;
						align-items: flex-start;
						gap: 12px;

						.evf-form-group {
							flex-direction: column;
							width: 100% !important;
							margin-right: 0 !important;
							gap: 12px;

							.evf-field-conditional-field-select,
							.evf-field-conditional-condition,
							.evf-field-conditional-input {
								width: 100% !important;
								margin-right: 0 !important;
								margin-bottom: 0 !important;
							}
						}

						.conditonal-rule-add {
							margin-right: 0 !important;
							width: 45px !important;
						}

						.conditonal-rule-remove {
							width: 45px !important;
						}
					}
				}

				.conditional_or {
					display: block;
					margin-top: 16px;
					font-weight: bold;
				}

				&:nth-last-child(2) {
					&:not(:first-child) {
						margin-bottom: 0;
					}
				}
			}

			.conditonal-group-add {
				margin: 12px 0 0;
				font-size: 13px;
				line-height: 24px;
				padding: 4px 12px;

				@media screen and (max-width: 600px) {
					min-height: auto;
				}
			}

			.conditonal-logic-add {
				margin-top: -21px;
				margin-left: 160px;
				position: absolute;
			}
		}

		.everest-forms-panel-content {
			.evf-field-conditional-container {
				border: 1px solid $color_gray-lighten;

				.evf-field-logic {
					p {
						margin: 0 0 0 8px;
					}
				}

				.evf-field-conditional-wrapper {
					.evf-conditional-group {
						.evf-form-group {
							margin-right: 10px;
							width: calc(100% - 94px);

							select {
								margin-right: 10px;
							}

							.evf-field-conditional-field-select,
							.evf-field-conditional-input {
								width: calc(50% - 46px);
							}

							.evf-field-conditional-input {
								margin-right: 0;
							}
						}

						.conditonal-rule-add {
							width: auto;
							padding: 0 10px;
							margin-right: 10px;
						}
					}
				}

				&.everest-forms-border-container {
					padding-bottom: 24px;
				}
			}
		}

		.everest-forms-field-option-row-rating-icon {
			.everest-forms-rating-icon-container {
				display: flex;
				flex-wrap: wrap;

				label {
					flex: 1;
					padding: 4px;
					display: flex;
					justify-content: center;
					background: $color_gray-more-lighten;
					border: 1px solid $color_gray-lighten;
				}

				input[type='radio'] {
					display: none;
				}

				svg {
					width: 32px;
					height: 32px;
					font-size: 18px;
					fill: adjust-color(
						$color_gray-normal,
						$saturation: +4%,
						$lightness: -2%
					);
				}

				input:checked {
					+ label {
						color: $color-white;
						background: $everestforms;
						border-color: $everestforms;

						svg {
							fill: $color-white;
						}
					}
				}
			}
		}
	}
}

.evf-pro-loader {
	display: block;
	padding: 70px;
	background: $color-white;
	box-shadow: 0 1px 5px rgba(51, 56, 64, 0.1);

	.evf-loading.evf-loading-active {
		margin: 0 auto;
		float: none;
		display: block;
	}
}

@import 'medium';

.evf-divider {
	margin: 20px 0;
	background: none;
	border-color: $color_gray-lighten;
	border-width: 2px;
	border-bottom: 0;
	border-top-style: solid;

	&.dashed {
		border-top-style: dashed;
	}

	&.dotted {
		border-top-style: dotted;
	}

	&.thick {
		border-top-style: solid;
		border-width: 3px;
		border-color: $color_gray-lighten;
	}

	&.double {
		border-top-style: double;
		border-width: 3px;
	}
}

/* EVF Entries Columns Adjustment */
.evf_entries_setting_form {
	padding: 16px 16px;

	.evf-row {
		text-align: start;
	}

	ul {
		text-align: left !important;
		border: 1px solid #e1e1e1;
		border-radius: 4px;
		padding: 8px 12px;
		font-size: 14px;
		min-height: 275px;
		max-height: 275px;
		overflow: hidden;
		margin-top: 20px;

		&::-webkit-scrollbar {
			width: 8px;
			background-color: lighten(#7545bb, 40%);
			border-radius: 8px;
		}

		&::-webkit-scrollbar-thumb {
			background-color: #7545bb;
			outline: 1px solid #7545bb;
			border-radius: 8px;
			height: 1em;
			background-clip: padding-box;
		}

		&:hover {
			overflow-y: scroll;
		}

		li {
			display: flex;
			justify-content: space-between;
			padding: 8px 12px;
			border-radius: 4px;
			margin: 0;
			font-weight: 400;

			&:hover {
				cursor: move;
				color: #7545bb;
				background-color: #faf8fc;
				border: 1px solid #cab7e5;
			}

			&:active {
				border: 1px dashed #7545bb;
				box-shadow: 0 2px 35px rgba(160, 191, 212, 0.125);
			}
		}
	}
}

.jconfirm {
	.jconfirm-box-container {
		.jconfirm-box {
			border-radius: 8px !important;

			.jconfirm-buttons {
				display: flex;
				flex-direction: row-reverse;
				padding: 0 16px;
				align-items: center;

				.btn-default,
				.btn-default:hover {
					color: rgb(128, 128, 128);
					background-color: transparent;
					font-size: 15px;
					text-transform: capitalize;
					font-weight: 500;
				}
			}
		}
	}
}

.evf-select2-close-btn,
.evf-select2-unselect-all-btn,
.evf-select2-select-all-btn {
	display: inline-block;
	text-decoration: none !important;
	font-size: 13px;
	line-height: 2.15384615;
	min-height: 30px;
	margin: 5px 0 5px 5px;
	padding: 0 10px;
	cursor: pointer;
	border-width: 1px;
	border-style: solid;
	-webkit-appearance: none;
	border-radius: 3px;
	white-space: nowrap;
	box-sizing: border-box;
}

.everest-forms-panel-field {
	.inline {
		padding-left: 16px;
	}

	.evf-form-col-12 {
		width: 100%;
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-start;
		align-items: center;
	}

	.evf-toggle-section {
		margin-bottom: 12px;
	}

	.widefat {
		background-color: white !important;
		border: 1px solid rgba(0, 0, 0, 0.35);
	}
}

.evf-tab-content {
	.everest-forms-panel {
		.everest-forms-panel-sidebar-content {
			.panel-wrap {
				.everest-forms-panel-content {
					.evf-content-section {
						.everest-forms-panel-field {
							.select2 {
								min-width: 350px !important;
							}
						}
					}
				}
			}
		}
	}
}

#wp-evf-input-type-wysiwyg-editor-container {
	pointer-events: none;
}

.evf-entry-view-wrapper {
	/* Make Quicktags toolbar look like expected stacked design */
	.wp-editor-wrap {
		&.html-active {
			.quicktags-toolbar {
				display: flex;

				.ed_button {
					width: fit-content;
					color: #2271b1;
					border-color: #2271b1;
				}
			}
		}

		textarea:focus {
			outline: 0;
			border-color: #7c3aed;
			box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
		}
	}
}

.evf-tools-export-entries {
	h4 {
		margin: 16px 0 8px;
	}

	.evf-tools-entries-export-options-date {
		margin-bottom: 16px;

		label:nth-child(3) {
			margin-left: 14px;
		}
	}

	.evf-tools-entries-export-options-format {
		select.evf-tools-entries-export-options-export-format-select {
			margin: 0 !important;
		}
	}

	.evf-tools-entries-export-options-search {
		margin: 24px 0 16px;

		.evf-tools-entries-export-options-search-options {
			display: flex;
			column-gap: 30px;
			align-items: center;

			.evf-tools-entries-export-options-search-comparison-select {
				margin: 0 !important;
			}

			.dropdown-wrapper {
				display: inline;
			}
		}
	}
}

.evf-content-section {
	.everest-forms-panel-field {
		.evf-webhook-headers-wrapper {
			display: flex;
			flex-direction: column;
			row-gap: 16px;
			margin-bottom: 16px;

			.evf-webhook-header {
				display: flex;
				align-items: center;
				column-gap: 16px;
			}
		}
	}

	.evf-webhook-section {
		margin-bottom: 50px;
	}

	.evf-add-new-webhook {
		margin-bottom: 20px;
	}

	.confirmation-conditonal-logic-add {
		&-wrapper {
			max-width: 100%;
			width: 100%;

			.confirmation-conditonal-logic-add {
				display: flex;
				align-items: center;
				justify-content: center;
				width: max-content;
				padding: 8px 20px 8px 16px;
				gap: 4px;
				border-color: #7545bb;
				background: transparent;
				margin: auto;
				transition: all 0.3s ease-in-out;

				svg {
					width: 18px;
					height: 18px;
					transition: all 0.3s ease-in-out;
				}

				p {
					margin: 0;
					font-size: 14px;
					line-height: 24px;
					color: #7545bb;
					font-weight: 500;
					transition: all 0.3s ease-in-out;
				}

				&:hover {
					background: #7545bb;

					svg {
						path {
							stroke: #ffffff;
						}
					}

					p {
						color: #ffffff;
					}
				}
			}
		}
	}
}

#everest-forms-builder {
	.everest-forms-row-options {
		display: block;
		padding: 15px 20px;
		box-sizing: border-box;

		.everest-forms-row-option {
			.everest-forms-border-container-title {
				display: block;
				font-size: 1em;
				margin: 0.8em 0;
				padding: 8px 0 0 0;
			}

			.inline {
				padding: 0;
			}

			.everest-forms-border-container {
				border: none;
				padding: 0;
			}
		}
	}

	.everest-forms-field-option-row-lookup_option_lists {
		.select2 {
			width: 100% !important;
		}
	}
}

.everest-forms {
	.everest-forms-integration-content {
		.integration-connection-detail {
			width: 100%;

			@media (min-width: 960px) {
				width: calc(100% - 400px);
			}
		}

		.evf-connection-form.salesforce-connection-form {
			margin-bottom: 20px;

			@media (min-width: 992px) {
				display: grid;
				grid-template-columns: 200px auto;
				align-items: center;
				row-gap: 1.5em;
			}

			input {
				@media (min-width: 992px) {
					margin-bottom: 0;
				}

				@media (min-width: 1200px) {
					width: calc(100% - 20px);
				}

				@media (min-width: 1400px) {
					width: calc(100% - 20px);
				}
			}
		}

		.evf-salesforce-account:not(.everest-forms-hidden) {
			@media (min-width: 992px) {
				display: grid;
				grid-template-columns: 200px auto;
				align-items: center;
				row-gap: 1.5em;
			}
		}

		.evf-salesforce-account {
			@media (min-width: 992px) {
				margin-top: 1.5em;
			}

			input {
				width: 100%;
				margin-bottom: 15px;

				@media (min-width: 992px) {
					margin-bottom: 0;
				}

				@media (min-width: 1200px) {
					width: calc(50% - 20px);
				}

				@media (min-width: 1400px) {
					width: calc(33% - 20px);
				}
			}

			.everest-forms-btn {
				margin-top: 8px;
			}
		}

		.evf-account-connect {
			.everest-forms-btn {
				@media (max-width: 991px) {
					margin-top: 8px;
				}
			}
		}
	}
}

.evf-content-section-title {
	.evf-landing-page-content-header-button {
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: flex-start;
		padding: 8px 16px 10px;
		gap: 10px;
		background: #7545bb;
		border-radius: 4px;
	}

	.evf-content-general-form-preview {
		display: inline-block;
		background-color: #7545bb;
		color: #ffffff;
		font-size: 16px;
		font-weight: 500;
		line-height: 21px;
	}
}

.evf-content-section-body {
	.everest-forms-layout {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(110px, max-content));
		column-gap: 16px;

		.inline {
			padding-left: 0;

			input[type='radio'] {
				display: none;

				&:checked ~ img {
					outline: 2px solid #3582c4;
					outline-offset: -2px;
					border-radius: 4px;
					opacity: 1;
				}
			}

			img {
				opacity: 0.35;
				transition: all 0.01s ease-in-out;
				border: 0;
			}

			&:hover {
				img {
					opacity: 1;
					border-color: #3582c4;
				}
			}
		}
	}

	// Orientation part in PDF Submission addon
	.row {
		display: inline-flex;
		align-items: center;
		margin-right: 16px;

		input {
			margin-top: 0;
		}

		label {
			padding-left: 0;
			margin-bottom: 0 !important;
		}
	}

	// Image upload button delete icon
	.everest-forms-panel-field-image {
		.everest-forms-custom-image-container {
			.everest-forms-custom-image-delete {
				object-fit: cover;
				display: inline-flex;
				position: relative;
				border-radius: 8px;
				height: 100px;
				width: auto;
				overflow: hidden;
				object-fit: cover;
				object-position: center;
				margin: auto;
				display: inline-flex;
				position: relative;
				justify-content: center;
				cursor: pointer;
				user-select: none;

				i {
					display: none;
				}

				&:hover {
					&::before {
						content: '';
						background: #000;
						position: absolute;
						width: 100%;
						height: 100%;
						opacity: 0.6;
					}

					i {
						position: absolute;
						display: contents;

						&:hover {
							&::before,
							&::after {
								transform: translate(-50%, -50%) scale(1.1);
							}
						}

						&::before {
							content: '';
							background: #d52626;
							width: 42px;
							height: 42px;
							position: absolute;
							border-radius: 50%;
							top: 50%;
							left: 50%;
							transform: translate(-50%, -50%);
						}

						&::after {
							content: '\e907';
							position: absolute;
							font-size: 22px;
							color: #fff;
							top: 50%;
							left: 50%;
							transform: translate(-50%, -50%);
						}
					}
				}
			}
		}
	}
}

// Form URL
.everest-forms-panel-field {
	.everest-forms-form-landing-page-form-url {
		display: flex;
		align-items: center;
		width: 100%;

		.everest-forms-home-page-url {
			display: flex;
			align-items: center;
			padding: 10px 12px;
			text-align: center;
			white-space: nowrap;
			background-color: #e9ecef;
			border: 1px solid #cdd0d8;
			border-radius: 4px;
			border-top-right-radius: 0;
			border-bottom-right-radius: 0;
			cursor: not-allowed;

			@media (min-width: 783px) {
				padding: 5px 8px 5px 10px;
			}
		}

		input {
			flex: 1 1 auto;
			width: 1%;
			min-width: 0;
			margin-left: -1px;
			border-top-left-radius: 0;
			border-bottom-left-radius: 0;
		}
	}
}

.evf-salesforce-account:not(.everest-forms-hidden) {
	display: block;

	@media (min-width: 992px) {
		margin-top: 0.5em;
	}

	input {
		width: 100%;
		margin: 0;
		margin-bottom: 15px;
		display: block !important;

		@media (min-width: 1200px) {
			width: calc(33% - 20px);
		}
	}
}

.evf-content-pdf-submission-settings {
	.evf-content-section-body {
		.everest-forms-panel-field-toggle {
			display: block;

			@media (min-width: 360px) {
				display: grid;
				grid-template-columns: 285px auto;
			}
		}
	}
}

// Color Picker field CSS
.everest-forms-field-color {
	.evf-color-picker-bg {
		width: 40px;
		float: left;
		height: 30px;
		border-radius: 4px 0 0 4px;

		@media (min-width: 783px) {
			height: 30px;
		}

		input {
			padding: 0;
			margin: 0;
			border: 0;
			background: 0;
			height: 48px;
			position: relative;
			top: -4px;
			width: 46px;
			left: -2px;

			@media (min-width: 783px) {
				height: 38px;
			}
		}
	}

	.colorpickpreview {
		width: calc(100% - 40px);
		border-radius: 0 4px 4px 0;
	}
}

// Reset Button CSS
.everest-forms-field-reset {
	.everest-forms-reset-button {
		.evf-reset-button {
			padding: 10px 15px;
			background: #db5855;
			border: 1px solid #db5855;
			color: #fff;
			border-radius: 3px;
			transition: all 0.3s ease-in-out;
			font-size: 14px;
			line-height: 22px;
			letter-spacing: 0.3px;

			&:hover {
				background-color: #c82333;
				border-color: #bd2130;
			}
		}
	}
}

// Address field input boxes layout fixes
.everest-forms_page_evf-builder {
	#everest-forms-builder {
		.evf-tab-content {
			.everest-forms-panel {
				.everest-forms-field-option-address {
					.everest-forms-field-option-row-state {
						.placeholder {
							width: 90%;

							input[type='text'] {
								width: 99%;
							}
						}
					}

					.everest-forms-field-option-row-country {
						.default {
							select {
								width: 99%;
							}
						}

						.country-list {
							.sub-label {
								font-weight: 400;
							}
						}
					}
				}
			}
		}
	}
}

// EVF Progress Bar CSS in builder
.everest-forms-field-wrap {
	.everest-forms-field-progress {
		progress {
			display: block;
			width: 100%;
			padding: 20px;
		}

		.evf-progress-percentage {
			position: relative;
			font-weight: 500;
			color: #0075ff;
			top: -5px;
		}

		progress[value='0'] ~ .evf-progress-percentage {
			color: #999;
		}
	}
}

// For printing an individual entry.
@media print {
	// ── Hide all UI chrome ──────────────────────────────────────────
	#wpfooter,
	#adminmenumain,
	#wpadminbar,
	#screen-meta,
	#screen-meta-links,
	.page-title-action,
	.wp-header-end,
	#wp-auth-check-wrap,
	.evf-entry-header,
	.evf-section-header-actions,
	.evf-nav-btn,
	.evf-back-link,
	#screen-meta,
	.wp-heading-inline,
	#message {
		display: none !important;
	}

	// ── Hide sidebar except payment ─────────────────────────────────
	.evf-entry-sidebar {
		display: block !important;
		position: static !important;
		width: 100% !important;
		margin-top: 0 !important;
	}

	.evf-entry-sidebar > *:not(#everest-forms-entry-payment) {
		display: none !important;
	}

	// ── Reset page chrome ───────────────────────────────────────────
	body {
		background: none !important;
	}

	#wpcontent,
	#wpbody,
	#wpbody-content,
	#post-body,
	#post-body-content,
	.wrap {
		margin: 0 !important;
		padding: 0 !important;
		background: none !important;
		float: none !important;
	}

	// ── Entry view wrapper ──────────────────────────────────────────
	.evf-entry-view-wrapper {
		padding: 0 !important;
		margin: 0 !important;
		background: none !important;
	}

	// ── Flatten grid to single column ───────────────────────────────
	.evf-entry-content-wrapper {
		display: block !important;
		padding: 0 !important;
		gap: 0 !important;
	}

	.evf-entry-main-content {
		display: block !important;
		width: 100% !important;
		gap: 0 !important;
	}

	// ── Strip card chrome ───────────────────────────────────────────
	.evf-entry-section,
	.evf-entry-section.stuffbox {
		border: none !important;
		box-shadow: none !important;
		padding: 0 !important;
		margin: 0 0 20px 0 !important;
		overflow: visible !important;
		page-break-inside: avoid;
	}

	.evf-section-header {
		padding: 0 !important;
		border-bottom: 1px solid #ccc !important;
		margin-bottom: 10px !important;
	}

	.evf-section-title {
		font-size: 13px !important;
		font-weight: 500 !important;
		color: #000 !important;
		padding-bottom: 6px !important;
	}

	.evf-section-content {
		padding: 0 !important;

		// Hide stray <strong> siblings — duplicates of .evf-field-label
		> strong {
			display: none !important;
		}
	}

	// ── Field rows ──────────────────────────────────────────────────
	.evf-field-row {
		display: grid !important;
		grid-template-columns: 140px 1fr !important;
		gap: 2px 10px !important;
		margin-bottom: 6px !important;
		page-break-inside: avoid;
	}

	.evf-field-label {
		font-size: 11px !important;
		font-weight: 500 !important;
		color: #50575e !important;

		strong {
			font-weight: 500;
		}
	}

	.evf-field-value {
		background: none !important;
		border: none !important;
		padding: 0 !important;
		font-size: 12px !important;
		color: #000 !important;
		line-height: 1.5 !important;

		a {
			color: #000 !important;
			text-decoration: underline !important;
		}
	}

	// ── Entry Details table ─────────────────────────────────────────
	.evf-details-table-wrapper {
		overflow: visible !important;
		border: none !important;
	}

	.evf-details-table {
		width: 100% !important;
		min-width: 0 !important;
		table-layout: fixed !important;
		font-size: 11px !important;
		border-collapse: collapse !important;

		thead tr th {
			background: #f6f7f7 !important;
			font-weight: 500 !important;
			font-size: 11px !important;
			white-space: normal !important;
			word-break: break-word !important;
			padding: 5px 6px !important;
			border: 1px solid #ddd !important;
			text-align: left !important;
			-webkit-print-color-adjust: exact;
			print-color-adjust: exact;
		}

		tbody tr td {
			white-space: normal !important;
			word-break: break-word !important;
			padding: 5px 6px !important;
			border: 1px solid #ddd !important;
			background: #fff !important;
			font-size: 11px !important;
			vertical-align: top !important;
		}
	}

	// ── Status badge ────────────────────────────────────────────────
	.evf-status-badge {
		font-size: 10px !important;
		padding: 2px 4px !important;
		border-radius: 3px !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	// ── Payment Details box ─────────────────────────────────────────
	#everest-forms-entry-payment {
		display: block !important;
		border: none !important;
		box-shadow: none !important;
		padding: 0 !important;
		margin: 0 0 20px 0 !important;
		page-break-inside: avoid;

		> h2 {
			font-size: 13px !important;
			font-weight: 500 !important;
			color: #000 !important;
			padding-bottom: 6px !important;
			border-bottom: 1px solid #ccc !important;
			margin-bottom: 10px !important;
			background: none !important;
			border-radius: 0 !important;
		}

		.inside {
			margin: 0 !important;
			padding: 0 !important;
		}

		.everest-forms-entry-payment-meta {
			p {
				font-size: 12px !important;
				color: #000 !important;
				margin: 0 0 4px 0 !important;
				padding: 0 !important;
				line-height: 1.5 !important;

				strong {
					font-weight: 500 !important;
					color: #000 !important;
				}

				a {
					color: #000 !important;
					text-decoration: underline !important;
				}
			}
		}
	}

	// ── Legacy postbox compatibility ────────────────────────────────
	#poststuff .stuffbox > h2 {
		border: none !important;
		box-shadow: none !important;
		padding: 0 !important;
		margin: 0 0 8px 0 !important;
	}

	#everest-forms-entry-fields {
		box-shadow: none !important;

		h2.hndle {
			margin-bottom: 10px;
		}

		.inside tr th {
			background: #f6f7f7;
			-webkit-print-color-adjust: exact;
			print-color-adjust: exact;

			strong {
				color: #50575e;
			}
		}
	}

	.widefat th,
	.widefat td {
		background: #fff !important;
		border: none !important;
	}
}

.evf-connection-form-wrapper {
	.evf_integration_checkbox_wrapper {
		display: flex;
		flex-direction: row;
		align-items: center;
		gap: 10px;
		margin-top: 20px;
		margin-bottom: 20px;
		margin-left: 5px;
	}
}

.everest-forms {
	.everest-forms-settings {
		&-container {
			> h2 {
				margin: 0;
				margin-bottom: 32px;
				color: #383838;
				font-size: 24px !important;
				font-weight: 600;
				line-height: 34px;
				padding-bottom: 16px;
				border-bottom: 1px solid #eee8f7;
			}

			.everest-forms-integration-back-button {
				padding: 8px 12px;
				border: 1px solid #2271b1;
				display: block;
				width: max-content;
				margin-bottom: 20px;
				border-radius: 3px;
				font-size: 14px;
				line-height: 16px;

				&:focus {
					outline: none;
					box-shadow: none;
				}
			}
		}
	}
}

#everest-forms-panel-field-settingspdf_submission-everest_forms_pdf_footer_template-wrap
	img {
	width: 125px;
}

label[for='evf-global-settings-right-footer'] {
	width: 145px;
	height: 200px;
}

label[for='evf-global-settings-center-footer'] {
	width: 145px;
	height: 200px;
}

label[for='evf-global-settings-left-footer'] {
	width: 145px;
	height: 200px;
}

.jconfirm-buttons .evf_entries_save_action {
	font-size: 15px !important;
	font-weight: 600 !important;
	background-color: #7545bb !important;
	color: #fff !important;
	border-radius: 4px !important;
	padding: 10px 20px !important;
	text-transform: capitalize !important;
}
