@charset "UTF-8";

/* Core palette and reusable components */
:root {
	--mail-doctor-color-surface: #ffffff;
	--mail-doctor-color-border: #e2e4e7;
	/* Softer border */
	--mail-doctor-color-text: #1d2327;
	--mail-doctor-color-muted: #50575e;
	--mail-doctor-color-accent: #2271b1;
	--mail-doctor-color-accent-soft: #eef5ff;
	--mail-doctor-color-success: #1d7a1d;
	--mail-doctor-color-danger: #d63638;
	--mail-doctor-color-warning: #8a4b1f;
	--mail-doctor-color-neutral-soft: #f6f7f7;
	--mail-doctor-color-highlight: #ffb74d;
	/* Spacing scale */
	--mail-doctor-space-xxs: 4px;
	--mail-doctor-space-xs: 6px;
	--mail-doctor-space-sm: 8px;
	--mail-doctor-space-md: 12px;
	--mail-doctor-space-lg: 16px;
	--mail-doctor-space-xl: 24px;
	--mail-doctor-space-xxl: 32px;
	/* Radii */
	--mail-doctor-radius-sm: 3px;
	--mail-doctor-radius-md: 6px;
	--mail-doctor-radius-lg: 10px;
	/* Shadows */
	--mail-doctor-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	/* Modern diffuse */
	--mail-doctor-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--mail-doctor-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	--mail-doctor-shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.mail-doctor-card {
	background: var(--mail-doctor-color-surface);
	border: 1px solid var(--mail-doctor-color-border);
	border-radius: var(--mail-doctor-radius-md);
	padding: var(--mail-doctor-space-lg);
	margin-bottom: var(--mail-doctor-space-xl);
	position: relative;
	overflow-wrap: break-word;
	box-shadow: var(--mail-doctor-shadow-sm);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mail-doctor-card:hover {
	transform: translateY(-1px);
	/* Lift effect */
	box-shadow: var(--mail-doctor-shadow-md);
}

.mail-doctor-card--inline {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--mail-doctor-space-lg);
}

.mail-doctor-card--stacked {
	display: flex;
	flex-direction: column;
	gap: var(--mail-doctor-space-lg);
}

.mail-doctor-card__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--mail-doctor-space-md);
	margin-bottom: var(--mail-doctor-space-md);
}

.mail-doctor-card__meta {
	margin: 0;
	font-size: 12px;
	color: var(--mail-doctor-color-muted);
}

.mail-doctor-hidden {
	display: none !important;
}

/* Modern Inputs */
.maildoctor-admin-wrap input[type="text"],
.maildoctor-admin-wrap input[type="email"],
.maildoctor-admin-wrap input[type="password"],
.maildoctor-admin-wrap select,
.maildoctor-admin-wrap textarea {
	padding: 6px 10px;
	border-radius: 4px;
	border-color: var(--mail-doctor-color-border);
	line-height: 1.5;
}

.maildoctor-admin-wrap input[type="text"]:focus,
.maildoctor-admin-wrap input[type="email"]:focus,
.maildoctor-admin-wrap input[type="password"]:focus,
.maildoctor-admin-wrap select:focus,
.maildoctor-admin-wrap textarea:focus {
	border-color: var(--mail-doctor-color-accent);
	box-shadow: 0 0 0 1px var(--mail-doctor-color-accent);
	outline: none;
}

select.mail-doctor-select {
	width: 240px;
	max-width: 100%;
	display: inline-block;
}

.mail-doctor-select--compact {
	width: 100%;
	max-width: 260px;
}

.mail-doctor-table td,
.mail-doctor-table th {
	padding: 12px 16px;
}

/**
 * Ensure datepicker popover remains readable on log filters.
 */
.ui-datepicker {
	background: var(--mail-doctor-color-surface);
	border: 1px solid var(--mail-doctor-color-border);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
	color: var(--mail-doctor-color-text);
	font-size: 13px;
}

.ui-datepicker-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 12px;
	background: var(--mail-doctor-color-neutral-soft);
	border-bottom: 1px solid var(--mail-doctor-color-border);
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
	position: static;
	left: auto;
	right: auto;
	top: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid transparent;
	background: transparent;
	color: var(--mail-doctor-color-text);
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover,
.ui-datepicker .ui-datepicker-prev:focus,
.ui-datepicker .ui-datepicker-next:focus {
	background: var(--mail-doctor-color-accent-soft);
	border-color: rgba(34, 113, 177, 0.35);
	color: var(--mail-doctor-color-accent);
	outline: none;
}

.ui-datepicker .ui-datepicker-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	color: var(--mail-doctor-color-text);
	margin: 0 auto;
}

.ui-datepicker .ui-datepicker-title select {
	margin: 0;
	padding: 4px 8px;
	border-radius: 3px;
	border: 1px solid var(--mail-doctor-color-border);
	background: var(--mail-doctor-color-surface);
	font-size: 13px;
}

.ui-datepicker table {
	width: 100%;
	border-collapse: collapse;
}

.ui-datepicker-calendar th {
	padding: 6px 4px;
	font-weight: 600;
	color: var(--mail-doctor-color-muted);
	text-transform: uppercase;
	font-size: 11px;
}

.ui-datepicker-calendar td {
	text-align: center;
	padding: 2px 4px;
}

.ui-datepicker-calendar td a,
.ui-datepicker-calendar td span {
	display: block;
	padding: 6px 0;
	text-decoration: none;
	border-radius: 4px;
	color: inherit;
	transition: background 0.15s ease, color 0.15s ease;
}

.ui-datepicker-calendar td a:hover {
	background: var(--mail-doctor-color-accent-soft);
}

.ui-datepicker-calendar .ui-state-active {
	background: var(--mail-doctor-color-accent);
	color: #fff !important;
}

.ui-datepicker-calendar .ui-state-hover {
	background: var(--mail-doctor-color-accent-soft);
	color: var(--mail-doctor-color-text);
}

.spinner.is-active {
	visibility: visible;
}

.maildoctor-admin-wrap .maildoctor-header {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
	margin: 0 0 20px;
}

.maildoctor-header .nav-tab-wrapper {
	margin-bottom: 0;
	width: 100%;
}

.maildoctor-branding {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.maildoctor-branding__title {
	margin: 0;
	font-size: 24px;
	font-weight: 600;
	color: var(--mail-doctor-color-text);
}

.maildoctor-header__tabs .nav-tab {
	font-size: 13px;
}

body.mail-doctor-modal-open {
	overflow: hidden;
}