/**
 * Authority Mailer SMTP - Tools Page Styles
 *
 * @package Authority_Mailer
 * @since   1.0.3
 */

/* Import wizard layout styles for two-column layout */
.authority-mailer-wizard-layout {
	width: 100%;
	margin: 0 auto;
}

.authority-mailer-wizard-body {
	display: flex;
	gap: 32px;
	align-items: flex-start;
}

.authority-mailer-wizard-main {
	flex: 1;
	min-width: 0;
}

.authority-mailer-wizard-sidebar {
	width: 340px;
	position: sticky;
	top: 32px;
	align-self: start;
}

/* Tools Page Wrapper */
.am-tools-page {
	background: #f8f9fc;
}

/* Tools Description */
.am-tools-description {
	color: var(--am-text-muted, #6c757d);
	margin-bottom: 24px;
	font-size: 15px;
	line-height: 1.6;
}

/* Error Messages */
.am-tools-error {
	background: #fef2f2;
	border-left: 4px solid #dc3545;
	padding: 12px 16px;
	margin: 16px 0;
	border-radius: 4px;
	color: #721c24;
	font-size: 14px;
	animation: slideDown 0.3s ease;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Tools Form */
.am-tools-form {
	margin-bottom: 24px;
}

.am-form-group {
	margin-bottom: 20px;
}

.am-form-label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	color: var(--am-text, #1a202c);
	font-size: 14px;
}

.am-input-group {
	display: flex;
	gap: 12px;
	align-items: stretch;
}

.am-form-input {
	flex: 1;
	padding: 12px 16px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	font-size: 15px;
	transition: border-color 0.2s ease;
}

.am-form-input:focus {
	outline: none;
	border-color: var(--am-primary, #6366F1);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.am-form-input::placeholder {
	color: #a0aec0;
}

/* Buttons */
.am-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
}

.am-btn svg {
	width: 16px;
	height: 16px;
}

.am-btn-primary {
	background: var(--am-primary, #6366F1);
	color: #ffffff;
}

.am-btn-primary:hover {
	background: var(--am-primary-dark, #4f46e5);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.am-btn-primary:active {
	transform: translateY(0);
}

.am-btn-primary:disabled {
	background: #cbd5e0;
	cursor: not-allowed;
	transform: none;
}

.am-btn-secondary {
	background: #f7fafc;
	color: var(--am-text, #1a202c);
	border: 1px solid #e2e8f0;
}

.am-btn-secondary:hover {
	background: #edf2f7;
	border-color: #cbd5e0;
}

/* Loading Indicator */
.am-tools-loading {
	text-align: center;
	padding: 40px;
	color: var(--am-text-muted, #6c757d);
}

.am-spinner {
	border: 4px solid #f3f4f6;
	border-top: 4px solid var(--am-primary, #6366F1);
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: spin 1s linear infinite;
	margin: 0 auto 16px;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Results Container */
.am-tools-results {
	margin-top: 32px;
}

.am-results-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 2px solid #e2e8f0;
}

.am-results-header h3 {
	margin: 0;
	font-size: 20px;
	color: var(--am-text, #1a202c);
	font-weight: 700;
}

.am-results-header h3 span {
	color: var(--am-primary, #6366F1);
}

/* Checks Grid */
.am-checks-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 20px;
}

.am-check-item {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 20px;
	transition: all 0.2s ease;
}

.am-check-item:hover {
	border-color: #cbd5e0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.am-check-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.am-check-header h4 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--am-text, #1a202c);
}

/* Check Badges */
.am-check-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.am-check-badge.pass {
	background: #d4edda;
	color: #155724;
}

.am-check-badge.fail {
	background: #f8d7da;
	color: #721c24;
}

.am-check-badge.clean {
	background: #d4edda;
	color: #155724;
}

.am-check-badge.unknown {
	background: #e2e8f0;
	color: #4a5568;
}

/* Check Description */
.am-check-description {
	font-size: 13px;
	color: var(--am-text-muted, #6c757d);
	line-height: 1.6;
	margin-bottom: 12px;
}

/* Check Details */
.am-check-details {
	background: #f7fafc;
	border-left: 3px solid #e2e8f0;
	padding: 12px;
	border-radius: 4px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--am-text, #1a202c);
	word-break: break-word;
}

.am-check-details.pass {
	border-left-color: #28a745;
	background: #f0fdf4;
}

.am-check-details.fail {
	border-left-color: #dc3545;
	background: #fef2f2;
}

.am-check-details.clean {
	border-left-color: #28a745;
	background: #f0fdf4;
}

.am-check-details.unknown {
	border-left-color: #cbd5e0;
	background: #f7fafc;
}

/* Responsive Design */
@media (max-width: 768px) {
	.am-input-group {
		flex-direction: column;
	}

	.am-btn {
		width: 100%;
		justify-content: center;
	}

	.am-results-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.am-results-header button {
		width: 100%;
	}

	.am-checks-grid {
		grid-template-columns: 1fr;
	}

	.authority-mailer-wizard-body {
		flex-direction: column;
	}

	.authority-mailer-wizard-sidebar {
		width: 100%;
		position: static;
	}
}

/* ========================================
   DELIVERABILITY CHECKER UX IMPROVEMENTS
   ======================================== */

/* Overall Deliverability Summary Banner */
.am-deliverability-summary {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 20px;
	border-radius: 8px;
	margin-bottom: 24px;
	border: 2px solid;
	animation: fadeInSlide 0.4s ease;
}

@keyframes fadeInSlide {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.am-deliverability-summary.am-summary-success {
	background: #f0fdf4;
	border-color: #22c55e;
}

.am-deliverability-summary.am-summary-warning {
	background: #fffbeb;
	border-color: #f59e0b;
}

.am-summary-icon {
	font-size: 32px;
	line-height: 1;
	flex-shrink: 0;
}

.am-summary-content {
	flex: 1;
}

.am-summary-title {
	margin: 0 0 8px 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--am-text, #1a202c);
}

.am-summary-description {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--am-text-muted, #6c757d);
}

/* Action Buttons for Failed Checks */
.am-check-actions {
	display: flex;
	gap: 12px;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #e2e8f0;
	flex-wrap: wrap;
}

.am-action-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
	border: 1px solid transparent;
}

.am-action-primary {
	background: var(--am-primary, #6366F1);
	color: #ffffff;
	border-color: var(--am-primary, #6366F1);
}

.am-action-primary:hover {
	background: var(--am-primary-dark, #4f46e5);
	border-color: var(--am-primary-dark, #4f46e5);
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2);
}

.am-action-secondary {
	background: #ffffff;
	color: var(--am-text, #1a202c);
	border-color: #cbd5e0;
}

.am-action-secondary:hover {
	background: #f7fafc;
	border-color: #a0aec0;
	transform: translateY(-1px);
}

/* Pro Feature Nudge */
.am-pro-nudge {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #e2e8f0;
}

.am-pro-nudge-link {
	font-size: 13px;
	color: var(--am-primary, #6366F1);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s ease;
}

.am-pro-nudge-link:hover {
	color: var(--am-primary-dark, #4f46e5);
	text-decoration: underline;
}

.am-pro-nudge-link::after {
	content: ' →';
}

/* Social Proof */
.am-social-proof {
	text-align: center;
	padding: 16px;
	margin: 24px 0;
	background: #f7fafc;
	border-radius: 6px;
	font-size: 14px;
	color: var(--am-text-muted, #6c757d);
	border: 1px solid #e2e8f0;
	animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* DIY Section */
.am-diy-section {
	margin-top: 32px;
	padding: 24px;
	background: #ffffff;
	border: 2px dashed #cbd5e0;
	border-radius: 8px;
}

.am-diy-title {
	margin: 0 0 16px 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--am-text, #1a202c);
}

.am-diy-links {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 16px;
}

.am-diy-link {
	display: flex;
	align-items: center;
	padding: 12px 16px;
	background: #f7fafc;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	color: var(--am-primary, #6366F1);
	text-decoration: none;
	font-weight: 500;
	font-size: 14px;
	transition: all 0.2s ease;
}

.am-diy-link:hover {
	background: #edf2f7;
	border-color: var(--am-primary, #6366F1);
	transform: translateX(4px);
}

.am-diy-link::after {
	content: '→';
	margin-left: auto;
}

.am-diy-reassurance {
	margin: 0;
	padding: 12px;
	background: #f0fdf4;
	border-left: 3px solid #22c55e;
	border-radius: 4px;
	font-size: 13px;
	color: var(--am-text-muted, #6c757d);
	line-height: 1.5;
}

/* Responsive adjustments for new elements */
@media (max-width: 768px) {
	.am-check-actions {
		flex-direction: column;
	}

	.am-action-btn {
		width: 100%;
	}

	.am-deliverability-summary {
		flex-direction: column;
		text-align: center;
	}

	.am-summary-icon {
		font-size: 48px;
	}
}
