@charset "UTF-8";

/* Logs list and modal */
.mail-doctor-filter-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: var(--mail-doctor-space-md);
	margin: var(--mail-doctor-space-xl) 0 var(--mail-doctor-space-lg);
	padding: var(--mail-doctor-space-md) var(--mail-doctor-space-lg);
	background: var(--mail-doctor-color-surface);
	border: 1px solid var(--mail-doctor-color-border);
	border-radius: var(--mail-doctor-radius-md);
	box-shadow: var(--mail-doctor-shadow-xs);
}

.mail-doctor-filter-bar label {
	display: flex;
	flex-direction: column;
	gap: var(--mail-doctor-space-xxs);
	min-width: 180px;
}

.mail-doctor-filter-bar label .mail-doctor-filter-bar__label {
	color: var(--mail-doctor-color-muted);
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.mail-doctor-filter-bar input[type="text"],
.mail-doctor-filter-bar input[type="number"],
.mail-doctor-filter-bar select {
	min-width: 160px;
	width: 100%;
	padding: 6px 10px;
	min-height: 36px;
	height: 36px;
	line-height: 1.4;
	border-radius: var(--mail-doctor-radius-sm);
	border: 1px solid var(--mail-doctor-color-border);
	background-color: var(--mail-doctor-color-surface);
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mail-doctor-filter-bar .select2-container {
	min-width: 160px;
	width: 100% !important;
	min-height: 36px;
}

.mail-doctor-filter-bar .select2-container--default .select2-selection--single {
	height: 36px;
	min-height: 36px;
	padding: 6px 36px 6px 10px;
	border-radius: var(--mail-doctor-radius-sm);
	border: 1px solid var(--mail-doctor-color-border);
	display: flex;
	align-items: center;
	box-sizing: border-box;
}

.mail-doctor-filter-bar .select2-container--default .select2-selection--single .select2-selection__rendered {
	flex: 1 1 auto;
	margin: 0;
	padding: 0;
	line-height: 1.4;
}

.mail-doctor-filter-bar .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 100%;
	top: 50%;
	transform: translateY(-50%);
	right: 10px;
}

.mail-doctor-filter-bar input[type="text"]:focus-visible,
.mail-doctor-filter-bar input[type="number"]:focus-visible,
.mail-doctor-filter-bar select:focus-visible {
	border-color: rgba(34, 113, 177, 0.6);
	box-shadow: 0 0 0 1px rgba(34, 113, 177, 0.35);
	outline: none;
}

.mail-doctor-filter-bar .select2-container--default.select2-container--focus .select2-selection--single,
.mail-doctor-filter-bar .select2-container--default .select2-selection--single:focus {
	border-color: rgba(34, 113, 177, 0.6);
	box-shadow: 0 0 0 1px rgba(34, 113, 177, 0.35);
	outline: none;
}

.mail-doctor-filter-bar .button {
	border-radius: var(--mail-doctor-radius-sm);
}

.mail-doctor-filter-bar .button+.button {
	margin-left: var(--mail-doctor-space-xs);
}

.mail-doctor-filter-bar .button:focus-visible {
	outline: 2px solid var(--mail-doctor-color-accent);
	outline-offset: 1px;
}

.mail-doctor-filter-bar-actions {
	display: flex;
	gap: var(--mail-doctor-space-xs);
	flex-wrap: wrap;
	margin-left: auto;
}

.mail-doctor-filter-bar-actions .button {
	margin-left: 0;
}

.maildoctor-admin-wrap .wp-list-table {
	border-spacing: 0;
	border-collapse: separate;
	border: 1px solid var(--mail-doctor-color-border);
	border-radius: var(--mail-doctor-radius-md);
	overflow: auto;
	box-shadow: var(--mail-doctor-shadow-xs);
	background: var(--mail-doctor-color-surface);
}

.maildoctor-admin-wrap .wp-list-table thead th {
	background: rgba(34, 113, 177, 0.04);
	color: var(--mail-doctor-color-muted);
	font-weight: 600;
}

.maildoctor-admin-wrap .wp-list-table tbody tr {
	transition: background 0.18s ease, box-shadow 0.18s ease;
}

.maildoctor-admin-wrap .wp-list-table tbody tr:nth-child(odd) {
	background: rgba(246, 247, 247, 0.55);
}

.maildoctor-admin-wrap .wp-list-table tbody tr:hover,
.maildoctor-admin-wrap .wp-list-table tbody tr:focus-within {
	background: var(--mail-doctor-color-neutral-soft);
	box-shadow: inset 2px 0 0 rgba(34, 113, 177, 0.35);
}

.maildoctor-admin-wrap .wp-list-table td,
.maildoctor-admin-wrap .wp-list-table th {
	padding: var(--mail-doctor-space-md) var(--mail-doctor-space-lg);
	vertical-align: middle;
}

.maildoctor-admin-wrap .wp-list-table td.column-status {
	position: relative;
}

.maildoctor-admin-wrap .wp-list-table td.column-status .mail-doctor-badge {
	display: inline-flex;
	align-items: center;
	gap: var(--mail-doctor-space-xs);
}

.maildoctor-admin-wrap .wp-list-table td.column-status .mail-doctor-badge.is-ok {
	box-shadow: 0 0 0 1px rgba(29, 122, 29, 0.25);
}

.maildoctor-admin-wrap .wp-list-table td.column-status .mail-doctor-badge.is-warn {
	box-shadow: 0 0 0 1px rgba(138, 75, 31, 0.25);
}

.maildoctor-admin-wrap .wp-list-table td.column-status .mail-doctor-badge.is-fail {
	box-shadow: 0 0 0 1px rgba(214, 54, 56, 0.3);
}

.maildoctor-admin-wrap .wp-list-table td.column-actions {
	min-width: 120px;
	white-space: normal;
	overflow-wrap: anywhere;
}

.maildoctor-admin-wrap .wp-list-table td.column-actions .mail-doctor-log-action {
	color: var(--mail-doctor-color-accent);
	text-decoration: none;
	padding: 0;
	margin: 0;
}

.maildoctor-admin-wrap .wp-list-table td.column-actions .mail-doctor-log-action:hover,
.maildoctor-admin-wrap .wp-list-table td.column-actions .mail-doctor-log-action:focus-visible {
	text-decoration: underline;
	outline: none;
}

.maildoctor-admin-wrap .wp-list-table .no-items,
.mail-doctor-log-empty,
.mail-doctor-log-loading {
	padding: var(--mail-doctor-space-xl);
	text-align: center;
	color: var(--mail-doctor-color-muted);
}

.mail-doctor-log-empty strong,
.mail-doctor-log-loading strong {
	display: block;
	margin-bottom: var(--mail-doctor-space-sm);
	color: var(--mail-doctor-color-text);
	font-size: 16px;
}

.mail-doctor-log-loading::after {
	content: '';
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-left: var(--mail-doctor-space-xs);
	border: 2px solid var(--mail-doctor-color-accent);
	border-top-color: transparent;
	border-radius: 50%;
	animation: mail-doctor-spinner 0.8s linear infinite;
	vertical-align: middle;
}

.mail-doctor-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: var(--mail-doctor-space-lg);
}

.mail-doctor-modal:not(.mail-doctor-hidden) {
	animation: mail-doctor-overlay-fade 0.2s ease;
}

.mail-doctor-modal__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(12, 18, 28, 0.45);
	backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.mail-doctor-modal:not(.mail-doctor-hidden) .mail-doctor-modal__overlay {
	opacity: 1;
}

.mail-doctor-modal__content {
	position: relative;
	background: var(--mail-doctor-color-surface);
	border-radius: var(--mail-doctor-radius-lg);
	max-width: 640px;
	width: 90%;
	max-height: 80vh;
	overflow: auto;
	padding: var(--mail-doctor-space-xl);
	box-shadow: var(--mail-doctor-shadow-lg);
	z-index: 2;
	transform: translateY(12px) scale(0.97);
	opacity: 0;
	transition: transform 0.24s ease, opacity 0.24s ease;
}

.mail-doctor-modal:not(.mail-doctor-hidden) .mail-doctor-modal__content {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.mail-doctor-modal__close {
	position: absolute;
	top: 10px;
	right: 10px;
	border: none;
	background: var(--mail-doctor-color-neutral-soft);
	color: var(--mail-doctor-color-text);
	font-size: 24px;
	cursor: pointer;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.mail-doctor-modal__close:hover,
.mail-doctor-modal__close:focus-visible {
	background: var(--mail-doctor-color-accent-soft);
	color: var(--mail-doctor-color-accent);
	outline: none;
	box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.25);
}

.mail-doctor-modal__body {
	margin: 0;
}

.mail-doctor-modal__body dl {
	display: grid;
	grid-template-columns: 160px 1fr;
	gap: var(--mail-doctor-space-sm) var(--mail-doctor-space-lg);
	margin: 0;
}

.mail-doctor-modal__body dt {
	font-weight: 600;
	color: var(--mail-doctor-color-muted);
}

.mail-doctor-modal__body dd {
	margin: 0;
	color: var(--mail-doctor-color-text);
}

.mail-doctor-modal__body pre {
	margin: 0;
	padding: var(--mail-doctor-space-sm);
	background: var(--mail-doctor-color-neutral-soft);
	border-radius: var(--mail-doctor-radius-sm);
	max-height: 180px;
	overflow: auto;
}

@media (max-width: 960px) {
	.mail-doctor-filter-bar {
		gap: var(--mail-doctor-space-sm);
	}

	.mail-doctor-filter-bar label {
		min-width: 45%;
	}
}

@media (max-width: 782px) {
	.mail-doctor-filter-bar {
		flex-direction: column;
		align-items: stretch;
	}

	.mail-doctor-filter-bar label,
	.mail-doctor-filter-bar input[type="text"],
	.mail-doctor-filter-bar input[type="number"],
	.mail-doctor-filter-bar select {
		min-width: 100%;
	}

	.mail-doctor-filter-bar .button,
	.mail-doctor-filter-bar-actions {
		width: 100%;
	}

	.mail-doctor-filter-bar .button {
		margin-left: 0;
	}

	.mail-doctor-filter-bar-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.mail-doctor-modal {
		padding: var(--mail-doctor-space-md);
	}

	.mail-doctor-modal__content {
		padding: var(--mail-doctor-space-lg);
	}

	.mail-doctor-modal__body dl {
		grid-template-columns: 1fr;
	}
}

@keyframes mail-doctor-spinner {
	to {
		transform: rotate(360deg);
	}
}

@keyframes mail-doctor-overlay-fade {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}
