/**
 * Stili per gli shortcode ANIEF Layout Email
 */

.anief-email-shortcode-layout,
.anief-email-shortcode-invio,
.anief-email-shortcode-allegati,
.anief-email-shortcode-header-footer,
.anief-email-shortcode-test,
.anief-email-shortcode-preview {
	background: #ffffff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 24px;
	margin: 16px 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.anief-email-shortcode-layout h3,
.anief-email-shortcode-invio h3,
.anief-email-shortcode-allegati h3,
.anief-email-shortcode-header-footer h3,
.anief-email-shortcode-test h3,
.anief-email-shortcode-preview h3 {
	margin-top: 0;
	margin-bottom: 16px;
	color: #202124;
	font-size: 20px;
	border-bottom: 2px solid #1a73e8;
	padding-bottom: 8px;
}

/* Form Frontend Editabile */
.anief-email-frontend-form {
	margin-top: 20px;
}

.anief-form-field {
	margin-bottom: 16px;
}

.anief-form-field label {
	display: block;
	font-weight: 500;
	margin-bottom: 6px;
	color: #202124;
	font-size: 14px;
}

.anief-form-field input[type="color"] {
	width: 100%;
	height: 40px;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	padding: 2px 4px;
	cursor: pointer;
}

.anief-form-field input[type="text"],
.anief-form-field input[type="email"],
.anief-form-field input[type="number"],
.anief-form-field select,
.anief-form-field textarea {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	font-size: 14px;
	transition: border-color 0.2s, box-shadow 0.2s;
	font-family: inherit;
}

.anief-form-field input[type="text"]:focus,
.anief-form-field input[type="email"]:focus,
.anief-form-field input[type="number"]:focus,
.anief-form-field select:focus,
.anief-form-field textarea:focus {
	outline: none;
	border-color: #1a73e8;
	box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.anief-form-field textarea {
	resize: vertical;
	min-height: 80px;
	line-height: 1.5;
}

.anief-form-field input[type="checkbox"] {
	width: auto;
	margin-right: 8px;
}

.anief-form-field label:has(input[type="checkbox"]) {
	display: flex;
	align-items: center;
	font-weight: normal;
	cursor: pointer;
}

.anief-form-field small {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: #6b7280;
	font-style: italic;
}

.anief-form-field select {
	background-color: #ffffff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 36px;
}

.anief-form-actions {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid #e8eaed;
	display: flex;
	align-items: center;
	gap: 12px;
}

.anief-save-btn {
	background: #1a73e8;
	color: #ffffff;
	border: none;
	border-radius: 4px;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s;
}

.anief-save-btn:hover {
	background: #1557b0;
}

.anief-save-btn:active {
	background: #0d47a1;
}

.anief-save-btn:disabled {
	background: #9aa0a6;
	cursor: not-allowed;
}

.anief-send-test-btn {
	background: #188038;
	color: #ffffff;
	border: none;
	border-radius: 4px;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s;
}

.anief-send-test-btn:hover {
	background: #137333;
}

.anief-send-test-btn:active {
	background: #0d522a;
}

.anief-send-test-btn:disabled {
	background: #9aa0a6;
	cursor: not-allowed;
}

.anief-save-status {
	font-size: 13px;
	font-weight: 500;
}

.anief-save-status.saving {
	color: #1a73e8;
}

.anief-save-status.success {
	color: #188038;
}

.anief-save-status.error {
	color: #b00020;
}

/* Preview Actions */
.anief-preview-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
	padding: 12px;
	background: #f8f9fa;
	border-radius: 6px;
	border: 1px solid #e0e0e0;
}

.anief-refresh-preview-btn {
	background: #1a73e8;
	color: #ffffff;
	border: none;
	border-radius: 4px;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s;
}

.anief-refresh-preview-btn:hover {
	background: #1557b0;
}

.anief-refresh-preview-btn:active {
	background: #0d47a1;
}

.anief-refresh-preview-btn:disabled {
	background: #9aa0a6;
	cursor: not-allowed;
}

.anief-preview-status {
	font-size: 12px;
	font-weight: 500;
}

.anief-preview-status.saving {
	color: #1a73e8;
}

.anief-preview-status.success {
	color: #188038;
}

.anief-preview-status.error {
	color: #b00020;
}

.anief-email-preview-wrapper {
	margin-top: 16px;
}

.anief-email-settings-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	margin-top: 16px;
}

.anief-email-setting-group {
	background: #f8f9fa;
	padding: 16px;
	border-radius: 6px;
	border: 1px solid #e0e0e0;
}

.anief-email-setting-group h4 {
	margin-top: 0;
	margin-bottom: 12px;
	color: #1a73e8;
	font-size: 16px;
}

.anief-email-setting-group ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.anief-email-setting-group ul li {
	padding: 6px 0;
	border-bottom: 1px solid #e8eaed;
}

.anief-email-setting-group ul li:last-child {
	border-bottom: none;
}

.anief-email-colors-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.anief-email-colors-list li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px;
	background: #ffffff;
	border-radius: 4px;
	border: 1px solid #e0e0e0;
}

.color-preview {
	width: 32px;
	height: 32px;
	border-radius: 4px;
	border: 2px solid #e0e0e0;
	flex-shrink: 0;
}

.color-label {
	font-size: 14px;
	color: #202124;
}

.anief-email-settings-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.anief-email-settings-list li {
	padding: 10px 0;
	border-bottom: 1px solid #e8eaed;
	font-size: 15px;
}

.anief-email-settings-list li:last-child {
	border-bottom: none;
}

.anief-email-settings-list li strong {
	color: #1a73e8;
	font-weight: 600;
}

.anief-email-logo-display {
	text-align: center;
	padding: 16px;
	background: #ffffff;
	border-radius: 4px;
	border: 1px solid #e0e0e0;
}

.anief-email-logo-display img {
	max-width: 100%;
	height: auto;
}

.anief-email-header-section,
.anief-email-footer-section {
	margin-bottom: 20px;
}

.anief-email-header-section:last-child,
.anief-email-footer-section:last-child {
	margin-bottom: 0;
}

.anief-email-header-section h4,
.anief-email-footer-section h4 {
	margin-top: 0;
	margin-bottom: 12px;
	color: #1a73e8;
	font-size: 16px;
}

.anief-email-header-preview,
.anief-email-footer-preview {
	border-radius: 6px;
	border: 1px solid #e0e0e0;
	text-align: center;
}

.anief-email-test-body {
	margin-top: 16px;
}

.anief-email-test-body h4 {
	margin-top: 0;
	margin-bottom: 12px;
	color: #1a73e8;
	font-size: 16px;
}

.anief-email-body-preview {
	background: #f8f9fa;
	padding: 16px;
	border-radius: 6px;
	border: 1px solid #e0e0e0;
	font-size: 15px;
	line-height: 1.6;
}

.anief-email-preview-container {
	margin-top: 16px;
}

.anief-email-preview-container iframe {
	background: #ffffff;
}

/* Contenuto riservato - Design vecchio (mantenuto per compatibilità) */
.anief-restricted-content-wrapper {
	background: #fff8e1;
	border: 2px solid #ffc107;
	border-radius: 8px;
	padding: 32px 24px;
	margin: 16px 0;
	text-align: center;
}

.anief-restricted-content-image {
	margin-bottom: 20px;
}

.anief-restricted-content-text {
	font-size: 16px;
	line-height: 1.6;
	color: #333;
}

.anief-restricted-content-text p {
	margin: 0;
}

.anief-restricted-content-text p:not(:last-child) {
	margin-bottom: 12px;
}

/* Contenuto riservato - Design minimal senza icona */
.anief-restricted-box-wrapper {
	background: transparent;
	border: none;
	padding: 24px 0;
	margin: 24px 0;
	text-align: center;
}

.anief-restricted-box-image {
	margin-bottom: 16px;
	text-align: center;
}

.anief-restricted-box-image img {
	border-radius: 4px;
}

.anief-restricted-box-text {
	font-size: 15px;
	line-height: 1.6;
	color: #4b5563;
	text-align: center;
}

.anief-restricted-box-text p {
	margin: 0 0 8px 0;
}

.anief-restricted-box-text p:last-child {
	margin-bottom: 0;
}

.anief-restricted-box-text strong {
	color: #1f2937;
	font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
	.anief-email-settings-grid {
		grid-template-columns: 1fr;
	}

	.anief-email-shortcode-layout,
	.anief-email-shortcode-invio,
	.anief-email-shortcode-allegati,
	.anief-email-shortcode-header-footer,
	.anief-email-shortcode-test,
	.anief-email-shortcode-preview {
		padding: 16px;
	}

	.anief-restricted-box-image img {
		width: 100% !important;
		max-width: 100% !important;
	}
}
