.ywaf-emails__headings,
.ywaf-emails__email__head {
	display        : flex;
	align-items    : center;
	flex-direction : row;
	gap            : 8px;
}

.ywaf-emails__headings {
	padding : 25px 25px 0;
}

.ywaf-emails__heading {
	font-size   : 1.2em;
	font-weight : 600;
}

.ywaf-emails__heading-name,
.ywaf-emails__heading-sent {
	flex : 1;
}

.ywaf-emails__heading-actions,
.ywaf-emails__email__column-actions {
	flex       : 0 0 50px;
	text-align : right;
}

.ywaf-emails__heading-status,
.ywaf-emails__email__column-status {
	flex       : 0 0 80px;
	text-align : center;
}

.ywaf-emails__email__column-name {
	flex        : 1;
	font-size   : 14px;
	line-height : 1.5;

	.description {
		margin-top : 8px;
		font-size  : .9em;
	}
}

.ywaf-emails__email__column-sent {
	flex      : 1;
	font-size : .9em;
}

.ywaf-emails__email {
	background    : var(--yith-content-bg);
	border-radius : 5px;
	box-shadow    : 0 0 0 1px var(--yith-light-border-color), 0 3px 11px 6px var(--yith-light-shadow);
	transition    : background-color .2s ease-in-out;
	margin-bottom : 25px;
	margin-top    : 25px;

	.ywaf-emails__email__head {
		padding       : 25px;
		border-radius : inherit;

		.yith-plugin-fw__action-button {
			opacity    : 0;
			transition : .3s;
		}
	}

	&:hover, &.ywaf-emails__email--open {
		.ywaf-emails__email__head {
			background : var(--yith-table-row-highlight);
		}
	}

	&.ywaf-emails__email--open {
		.ywaf-emails__email__head {
			border-bottom-left-radius  : 0;
			border-bottom-right-radius : 0;
			background                 : var(--yith-table-row-highlight);
		}
	}

	&:hover {
		.ywaf-emails__email__head {
			.yith-plugin-fw__action-button {
				opacity : 1;
			}
		}
	}
}

.ywaf-emails__email__options {
	display                    : none;
	padding                    : 25px;
	background                 : #fff;
	border-bottom-right-radius : inherit;
	border-bottom-left-radius  : inherit;
}

.ywaf-emails__email__actions {
	text-align : right;
}

.yith-plugin-ui .ywaf-emails__email__save.yith-plugin-fw__button--primary {
	display     : inline-flex;
	align-items : center;
	gap         : 12px;

	.ywaf-emails__email__save__saved-icon {
		display : none;
		width   : 1.3em;
		margin  : 0 -4px;
	}

	&.is-saved {
		background : var(--yith-update);
		color      : var(--yith-update-text);
		border     : 1px solid var(--yith-update);

		&:focus {
			box-shadow : 0 0 0 3px var(--yith-update-focus);
		}

		&:hover {
			background : var(--yith-update-hover);
			border     : 1px solid var(--yith-update-hover);
		}

		.ywaf-emails__email__save__saved-icon {
			display : block;
		}
	}
}

.ywaf-emails__email__placeholders {
	display     : inline-flex;
	align-items : center;
	flex-wrap   : wrap;
	gap         : 8px;

	code {
		font-size     : 12px;
		border-radius : 4px;
		line-height   : 1.5;
		display       : inline-block;
		padding       : 4px 8px;
		margin        : 0;
	}
}

.ywaf-email-field__row {
	&:not(.ywaf-email-field__row--empty-value) {
		.ywaf-email-field__default-content {
			display : none;
		}
	}

	&.ywaf-email-field__row--empty-value {
		.ywaf-email-field__field,
		.ywaf-email-field__use-default {
			display : none;
		}
	}

	.ywaf-email-field__use-default {
		color           : var(--yith-link);
		display         : inline-flex;
		align-items     : center;
		cursor          : pointer;
		text-decoration : underline;
		font-size       : 12px;
	}

	.ywaf-email-field__default-content {
		position      : relative;
		padding       : 16px;
		border        : 1px dashed var(--yith-field-border-color);
		border-radius : var(--yith-field-border-radius);
		box-shadow    : var(--yith-field-shadow);
		color         : rgba(71, 85, 105, 0.7);
		background    : #fff;
		box-sizing    : border-box;

		.ywaf-email-field__edit {
			position : absolute;
			top      : 8px;
			right    : 8px;
		}
	}

	.yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-textarea-editor-field-wrapper):not(.yith-plugin-fw-media-field-wrapper) {
		display        : flex;
		flex-direction : row;
		align-items    : center;
		flex-wrap      : wrap;
	}

	.yith-plugin-fw-text-button-field-wrapper {
		.yith-plugin-fw-buttons-field-wrapper {
			margin : 0 0 0 5px;
		}

		.ywaf-send-result {
			width       : 100%;
			font-size   : 12px;
			line-height : 2.4;

			&:before {
				display                 : inline-block;
				font-family             : "dashicons";
				font-size               : 15px;
				line-height             : inherit;
				speak                   : none;
				-webkit-font-smoothing  : antialiased;
				-moz-osx-font-smoothing : grayscale;
				vertical-align          : middle;
			}

			&.send-success:before {
				color   : #79ba49;
				content : "\f147";
			}

			&.send-fail:before {
				color   : #ba0a11;
				content : "\f158";
			}
		}
	}

	.yith-colorpicker-group {
		display               : grid;
		grid-template-columns : 50% 50%;
	}
}

.ywaf-emails__email__options__form {
	.ywaf-emails__email__options__container {
		display : flex;
		gap     : 20px;

		.yith-plugin-fw__tab-panel {
			padding : 30px 0 20px 0;
			flex    : 1 1 100%;
		}

		.ywaf-emails__email__preview__container {
			flex    : 1 1 100%;
			padding : 30px 0 20px 0;

			.ywaf-emails__email__preview {
				height        : 100%;
				border-radius : 15px;
				overflow      : hidden;

				#outer_wrapper {
					height : 100%;
				}
			}
		}
	}
}
