@charset "UTF-8";

/* Settings pages */
.mail-doctor-field-note {
	margin-top: 6px;
	color: var(--mail-doctor-color-muted);
	font-style: italic;
}

.mail-doctor-field-note--warning {
	color: var(--mail-doctor-color-warning);
}

.mail-doctor-settings {
	display: flex;
	gap: 24px;
	margin-top: 24px;
}

/* Nav Css Starts here */
.mail-doctor-settings-nav {
	flex: 0 0 240px;
	position: sticky !important;
	top: 48px;
	/* or whatever offset clears the header */
	align-self: flex-start;
}

.mail-doctor-settings-nav__toggle {
	display: none;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin-bottom: 12px;
	padding: 10px 12px;
	border: 1px solid var(--mail-doctor-color-border);
	border-radius: 6px;
	background: var(--mail-doctor-color-surface);
	color: var(--mail-doctor-color-text);
	font-weight: 600;
	cursor: pointer;
}

.mail-doctor-settings-nav__toggle .dashicons {
	color: var(--mail-doctor-color-muted);
}

.mail-doctor-settings-nav__toggle[aria-expanded="true"] .dashicons {
	color: var(--mail-doctor-color-accent);
}

.mail-doctor-settings-nav ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.mail-doctor-settings-nav a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 6px;
	text-decoration: none;
	color: var(--mail-doctor-color-text);
	font-weight: 500;
	border: 1px solid transparent;
	transition: background 0.15s ease, color 0.15s ease;
}

.mail-doctor-settings-nav a.is-active {
	background: var(--mail-doctor-color-accent-soft);
	color: var(--mail-doctor-color-accent);
	font-weight: 600;
}

.mail-doctor-settings-nav a:hover,
.mail-doctor-settings-nav a:focus {
	background: var(--mail-doctor-color-neutral-soft);
	color: var(--mail-doctor-color-accent);
	outline: none;
}

.mail-doctor-settings-nav .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	color: inherit;
	opacity: 0.7;
}

.mail-doctor-settings-nav a.is-active .dashicons,
.mail-doctor-settings-nav a:hover .dashicons {
	opacity: 1;
	color: var(--mail-doctor-color-accent);
}

.mail-doctor-settings-nav__badge {
	margin-left: auto;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	background: var(--mail-doctor-color-border);
	color: var(--mail-doctor-color-muted);
	white-space: nowrap;
}

.mail-doctor-settings-nav__badge--status-positive {
	background: rgba(20, 143, 46, 0.12);
	color: #147f2e;
}

.mail-doctor-settings-nav__badge--status-warning {
	background: rgba(221, 143, 0, 0.15);
	color: #b56400;
}

.mail-doctor-settings-nav__badge--status-muted,
.mail-doctor-settings-nav__badge--status-neutral {
	background: rgba(120, 130, 155, 0.16);
	color: var(--mail-doctor-color-muted);
}

.mail-doctor-settings-content {
	flex: 1;
	background: var(--mail-doctor-color-surface);
	border: 1px solid var(--mail-doctor-color-border);
	border-radius: 6px;
	padding: 24px;
	box-shadow: var(--mail-doctor-shadow-sm);
}

.mail-doctor-settings-header {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 28px;
}

.mail-doctor-settings-header__eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 11px;
	color: var(--mail-doctor-color-accent);
	/* Use accent color for branding */
	font-weight: 700;
}

.mail-doctor-settings-header__title {
	margin: 0;
	font-size: 28px;
	/* Slightly larger */
	font-weight: 700;
	color: var(--mail-doctor-color-text);
	letter-spacing: -0.02em;
	/* Tighter tracking */
}

.mail-doctor-settings-header__description {
	margin: 0;
	max-width: 640px;
	font-size: 15px;
	/* Improved readability */
	color: var(--mail-doctor-color-muted);
	line-height: 1.6;
}

.mail-doctor-section-summary {
	display: grid;
	gap: 12px;
	margin-bottom: 24px;
	padding: 14px 18px;
	border: 1px solid var(--mail-doctor-color-border);
	border-radius: 8px;
	background: var(--mail-doctor-color-surface-elevated, #fff);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

@media (min-width: 680px) {
	.mail-doctor-section-summary {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.mail-doctor-section-summary__item {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.mail-doctor-section-summary__eyebrow {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--mail-doctor-color-muted);
	font-weight: 600;
}

.mail-doctor-section-summary__value {
	font-size: 14px;
	color: var(--mail-doctor-color-text);
}

.mail-doctor-smtp-grid {
	display: grid;
	gap: 24px;
	align-items: stretch;
}

@media (min-width: 960px) {
	.mail-doctor-smtp-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.mail-doctor-smtp-actions {
	display: flex;
	flex-direction: column;
	gap: 24px;
	flex-wrap: wrap;
}

.mail-doctor-smtp-actions__panel {
	flex: 1 1 0;
	min-width: 0;
}

.mail-doctor-smtp-actions__save {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.mail-doctor-smtp-actions__save .regular-text {
	width: 100%;
}

@media (min-width: 880px) {
	.mail-doctor-smtp-actions {
		flex-direction: row;
		flex-wrap: wrap;
	}

	.mail-doctor-smtp-actions__save {
		flex-direction: row;
		align-items: flex-start;
		flex-wrap: wrap;
	}

	.mail-doctor-smtp-actions__save .button {
		margin-top: 0;
	}

	.mail-doctor-smtp-actions__panel {
		flex: 1 1 320px;
	}

	.mail-doctor-smtp-actions__save .regular-text {
		flex: 1 1 220px;
		max-width: 100%;
		min-width: 0;
	}
}

.mail-doctor-smtp-grid .mail-doctor-settings-panel {
	min-width: 0;
}

.mail-doctor-warning-placeholder {
	display: inline-block;
	margin-top: 8px;
	padding: 6px 10px;
	border-radius: 6px;
	background: rgba(221, 143, 0, 0.12);
	color: #8c5a00;
}

.mail-doctor-field-block {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px 0;
	border-top: 1px solid var(--mail-doctor-color-border);
}

.mail-doctor-settings-panel>.mail-doctor-field-block:first-child {
	border-top: none;
	padding-top: 0;
}

.mail-doctor-field-block__label {
	font-weight: 600;
	color: var(--mail-doctor-color-text);
}

.mail-doctor-field-block__control {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mail-doctor-field-block__control label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.mail-doctor-settings-stack {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.mail-doctor-settings-panel {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.mail-doctor-settings-panel__header {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 6px;
}

@media (min-width: 640px) {
	.mail-doctor-settings-panel__header {
		flex-direction: row;
		align-items: baseline;
		justify-content: space-between;
	}
}

.mail-doctor-settings-panel__eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 11px;
	font-weight: 600;
	color: var(--mail-doctor-color-muted);
}

.mail-doctor-settings-panel__title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--mail-doctor-color-text);
}

.mail-doctor-settings-panel__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

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

.mail-doctor-settings-table {
	width: 100%;
	margin: 0;
	border-spacing: 0 12px;
	border-collapse: separate;
}

.mail-doctor-settings-table th {
	width: 220px;
	padding: 0;
	padding-right: 18px;
	text-align: left;
	vertical-align: top;
	font-weight: 600;
	color: var(--mail-doctor-color-text);
}

.mail-doctor-settings-table td {
	padding: 0;
	vertical-align: top;
}

.mail-doctor-settings-panel--transport .mail-doctor-settings-table th {
	width: 160px;
}

.mail-doctor-settings-panel--transport .mail-doctor-settings-table td {
	min-width: 0;
}

.mail-doctor-settings-panel--transport .mail-doctor-settings-table .regular-text,
.mail-doctor-settings-panel--transport .mail-doctor-settings-table select,
.mail-doctor-settings-panel--transport .mail-doctor-settings-table input[type="number"],
.mail-doctor-settings-panel--transport .mail-doctor-settings-table input[type="text"],
.mail-doctor-settings-panel--transport .mail-doctor-settings-table input[type="email"] {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.mail-doctor-settings-table .description {
	margin-top: 6px;
	color: var(--mail-doctor-color-muted);
}

.mail-doctor-settings-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 8px;
}

.mail-doctor-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(34, 113, 177, 0.12);
	color: var(--mail-doctor-color-accent);
	font-size: 11px;
	font-weight: 600;
	text-transform: none;
}

.mail-doctor-chip--muted {
	background: rgba(120, 130, 155, 0.16);
	color: var(--mail-doctor-color-muted);
}

.mail-doctor-chip--accent {
	background: rgba(81, 56, 255, 0.15);
	color: #4a3ad1;
}

.mail-doctor-chip--priority {
	background: rgba(221, 143, 0, 0.15);
	color: #b56400;
}

.mail-doctor-chip--compact {
	padding: 2px 6px;
}

.mail-doctor-api-keys {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.mail-doctor-api-keys__layout {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}

.mail-doctor-api-keys__column {
	flex: 1 1 320px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.mail-doctor-api-keys__column--form {
	max-width: 360px;
}

.mail-doctor-api-keys__column--list {
	flex: 2 1 480px;
}

.mail-doctor-api-keys__form {
	display: flex;
	flex-direction: column;
	gap: 18px;
	margin-bottom: 20px;
}

.mail-doctor-api-keys__field,
.mail-doctor-api-keys__scopes {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mail-doctor-api-keys__label {
	font-weight: 600;
	color: var(--mail-doctor-color-text);
}

.mail-doctor-api-keys__scope-option {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px 12px;
	border: 1px solid var(--mail-doctor-color-border);
	border-radius: 6px;
	background: var(--mail-doctor-color-neutral-soft);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mail-doctor-api-keys__scope-option input {
	margin-right: 8px;
}

.mail-doctor-api-keys__scope-option:hover,
.mail-doctor-api-keys__scope-option:focus-within {
	border-color: rgba(34, 113, 177, 0.5);
	box-shadow: 0 0 0 1px rgba(34, 113, 177, 0.15);
}

.mail-doctor-api-keys__scope-option--full {
	border-color: rgba(214, 54, 56, 0.4);
	background: rgba(214, 54, 56, 0.05);
}

.mail-doctor-api-keys__scope-label {
	font-weight: 600;
}

.mail-doctor-api-keys__scope-description {
	color: var(--mail-doctor-color-muted);
	font-size: 12px;
}

.mail-doctor-api-keys__scope-hint {
	margin: 0;
	color: var(--mail-doctor-color-muted);
}

.mail-doctor-api-keys__notice {
	margin-bottom: 12px;
}

.mail-doctor-api-keys__secret {
	border: 1px dashed var(--mail-doctor-color-border);
	border-radius: 6px;
	padding: 16px;
	background: rgba(34, 113, 177, 0.05);
}

.mail-doctor-api-keys__secret-field {
	display: flex;
	gap: 8px;
	align-items: center;
}

.mail-doctor-api-keys__secret-field input {
	flex: 1;
}

.mail-doctor-api-keys__secret-field .button {
	white-space: nowrap;
}

.mail-doctor-api-keys__heading {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--mail-doctor-color-text);
}

.mail-doctor-api-keys__description {
	margin: 0;
	color: var(--mail-doctor-color-muted);
	font-size: 13px;
	line-height: 1.5;
}

.mail-doctor-api-keys__list {
	position: relative;
	overflow-x: auto;
}

.mail-doctor-api-keys__table {
	min-width: 100%;
}

.mail-doctor-api-keys__cell--scopes {
	min-width: 180px;
}

.mail-doctor-api-keys__name {
	display: block;
	font-weight: 600;
}

.mail-doctor-api-keys__id {
	display: block;
	font-size: 12px;
	color: var(--mail-doctor-color-muted);
}

.mail-doctor-api-keys__status {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 4px;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	background: var(--mail-doctor-color-neutral-soft);
}

.mail-doctor-api-keys__status--active {
	color: var(--mail-doctor-color-success);
}

.mail-doctor-api-keys__status--revoked {
	color: var(--mail-doctor-color-danger);
}

.mail-doctor-api-keys__badge {
	display: inline-block;
	margin: 0 6px 6px 0;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--mail-doctor-color-accent-soft);
	color: var(--mail-doctor-color-accent);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.mail-doctor-api-keys__muted {
	font-size: 12px;
	color: var(--mail-doctor-color-muted);
}

.mail-doctor-api-keys__empty {
	margin: 16px 0 0;
	color: var(--mail-doctor-color-muted);
}

.mail-doctor-api-keys__cell--actions {
	white-space: nowrap;
}

.mail-doctor-api-keys__revoke {
	padding: 0;
	font-weight: 600;
}

.mail-doctor-settings-actions__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.mail-doctor-settings-panel--actions .mail-doctor-settings-actions {
	margin-top: 0;
	justify-content: space-between;
}

.mail-doctor-settings-panel--profiles-list .mail-doctor-profile-card {
	margin-bottom: 16px;
}

.mail-doctor-settings-panel--profiles-new .mail-doctor-profile-card {
	margin: 0;
}

.mail-doctor-settings-panel--woocommerce .mail-doctor-table {
	margin-top: 12px;
}

.mail-doctor-settings-panel--woocommerce-preview .mail-doctor-woo-preview {
	margin-top: 8px;
}

.mail-doctor-settings-panel--woocommerce-preview .mail-doctor-woo-preview__controls {
	gap: var(--mail-doctor-space-sm);
}

.mail-doctor-woo-preview {
	margin-top: 1em;
}

.mail-doctor-woo-table {
	margin-top: var(--mail-doctor-space-lg);
	display: flex;
	flex-direction: column;
	gap: var(--mail-doctor-space-md);
}

.mail-doctor-woo-table__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--mail-doctor-space-sm);
	align-items: center;
}

.mail-doctor-woo-table__actions .button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.mail-doctor-woo-table__actions .button-link {
	padding: 0;
	height: auto;
	line-height: 1.4;
}

.mail-doctor-woo-table__grid {
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	border-radius: var(--mail-doctor-radius-md);
	box-shadow: var(--mail-doctor-shadow-xs);
}

.mail-doctor-woo-table__grid thead th {
	background: var(--mail-doctor-color-neutral-soft);
	color: var(--mail-doctor-color-muted);
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	position: sticky;
	top: 0;
	z-index: 1;
	padding-top: var(--mail-doctor-space-sm);
	padding-bottom: var(--mail-doctor-space-sm);
}

.mail-doctor-woo-table__grid tbody tr {
	border-top: 1px solid var(--mail-doctor-color-border);
	transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.mail-doctor-woo-table__grid tbody tr:nth-child(odd) {
	background: rgba(246, 247, 247, 0.5);
}

.mail-doctor-woo-table__grid tbody tr:hover,
.mail-doctor-woo-table__grid tbody tr:focus-within {
	background: var(--mail-doctor-color-surface);
	box-shadow: inset 2px 0 0 rgba(34, 113, 177, 0.35);
}

.mail-doctor-woo-table__cell {
	vertical-align: top;
	padding: var(--mail-doctor-space-lg) var(--mail-doctor-space-md);
}

.mail-doctor-woo-table__cell--email {
	width: 42%;
}

.mail-doctor-woo-table__cell--status {
	width: 20%;
}

.mail-doctor-woo-table__cell--override {
	width: 38%;
}

.mail-doctor-woo-table__email {
	display: flex;
	flex-direction: column;
	gap: var(--mail-doctor-space-xs);
}

.mail-doctor-woo-table__title {
	font-size: 15px;
	font-weight: 600;
	color: var(--mail-doctor-color-text);
}

.mail-doctor-woo-table__summary {
	margin: 0;
	font-size: 13px;
	color: var(--mail-doctor-color-muted);
}

.mail-doctor-woo-table__description {
	margin-top: var(--mail-doctor-space-sm);
	display: flex;
	flex-wrap: wrap;
	gap: var(--mail-doctor-space-xs);
	align-items: center;
}

.mail-doctor-woo-table__hint {
	color: var(--mail-doctor-color-muted);
	font-size: 12px;
}

.mail-doctor-badge--status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	font-size: 12px;
	border-radius: var(--mail-doctor-radius-sm);
}

.mail-doctor-badge--status.is-ok {
	background: rgba(29, 122, 29, 0.12);
	color: var(--mail-doctor-color-success);
}

.mail-doctor-badge--status.is-fail {
	background: rgba(214, 54, 56, 0.12);
	color: var(--mail-doctor-color-danger);
}

.mail-doctor-badge--status::before {
	font-family: dashicons;
	font-size: 14px;
	line-height: 1;
}

.mail-doctor-badge--status.is-ok::before {
	content: "\f147";
}

.mail-doctor-badge--status.is-fail::before {
	content: "\f335";
}

.mail-doctor-badge--status.is-neutral {
	background: rgba(34, 113, 177, 0.12);
	color: var(--mail-doctor-color-accent);
}

.mail-doctor-badge--status.is-neutral::before {
	content: "\f470";
}

.mail-doctor-toggle {
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--mail-doctor-space-sm);
}

.mail-doctor-toggle__control {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: -1px;
	border: 0;
	padding: 0;
	clip: rect(0 0 0 0);
}

.mail-doctor-toggle__label {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
}

.mail-doctor-toggle__track {
	position: relative;
	width: 48px;
	height: 26px;
	border-radius: 999px;
	background: var(--mail-doctor-color-border);
	transition: background 0.18s ease;
}

.mail-doctor-toggle__thumb {
	position: absolute;
	top: 3px;
	left: 4px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	transition: transform 0.18s ease;
}

.mail-doctor-toggle__text {
	font-weight: 600;
	font-size: 13px;
	color: var(--mail-doctor-color-text);
}

.mail-doctor-toggle__control:checked+.mail-doctor-toggle__label .mail-doctor-toggle__track {
	background: rgba(34, 113, 177, 0.7);
}

.mail-doctor-toggle__control:checked+.mail-doctor-toggle__label .mail-doctor-toggle__thumb {
	transform: translateX(20px);
}

.mail-doctor-toggle__control:focus-visible+.mail-doctor-toggle__label .mail-doctor-toggle__track {
	outline: 2px solid var(--mail-doctor-color-accent);
	outline-offset: 2px;
}

.mail-doctor-toggle__help {
	position: relative;
	border: none;
	background: transparent;
	color: var(--mail-doctor-color-muted);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
}

.mail-doctor-toggle__help:hover,
.mail-doctor-toggle__help:focus {
	color: var(--mail-doctor-color-accent);
}

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

.mail-doctor-toggle__help::after {
	content: attr(data-mail-doctor-tooltip);
	position: absolute;
	inset-inline-start: 50%;
	bottom: calc(100% + 10px);
	transform: translateX(-50%);
	background: var(--mail-doctor-color-text);
	color: var(--mail-doctor-color-surface);
	padding: 6px 10px;
	border-radius: var(--mail-doctor-radius-sm);
	font-size: 12px;
	line-height: 1.4;
	min-width: 180px;
	max-width: 220px;
	box-shadow: var(--mail-doctor-shadow-xs);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease;
	pointer-events: none;
}

.mail-doctor-toggle__help:hover::after,
.mail-doctor-toggle__help:focus::after {
	opacity: 1;
	visibility: visible;
}

.mail-doctor-toggle__help::before {
	content: "";
	position: absolute;
	bottom: calc(100% + 4px);
	left: 50%;
	transform: translateX(-50%);
	border-width: 6px;
	border-style: solid;
	border-color: var(--mail-doctor-color-text) transparent transparent transparent;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease;
}

.mail-doctor-toggle__help:hover::before,
.mail-doctor-toggle__help:focus::before {
	opacity: 1;
	visibility: visible;
}

.mail-doctor-empty--panel {
	display: flex;
	align-items: flex-start;
	gap: var(--mail-doctor-space-md);
	padding: var(--mail-doctor-space-lg);
	border: 1px solid var(--mail-doctor-color-border);
	border-radius: var(--mail-doctor-radius-md);
	background: var(--mail-doctor-color-neutral-soft);
	box-shadow: var(--mail-doctor-shadow-xs);
}

.mail-doctor-empty--panel .dashicons {
	font-size: 28px;
	color: var(--mail-doctor-color-muted);
}

.mail-doctor-empty__content {
	display: flex;
	flex-direction: column;
	gap: var(--mail-doctor-space-xs);
}

.mail-doctor-empty__content h4 {
	margin: 0;
	font-size: 17px;
	font-weight: 600;
}

.mail-doctor-empty__content p {
	margin: 0;
	font-size: 13px;
	color: var(--mail-doctor-color-muted);
}

.mail-doctor-woo-preview__breadcrumbs {
	display: inline-flex;
	align-items: center;
	gap: var(--mail-doctor-space-xs);
	margin-bottom: var(--mail-doctor-space-sm);
	padding: 6px 10px;
	border-radius: 999px;
	background: var(--mail-doctor-color-neutral-soft);
	color: var(--mail-doctor-color-muted);
	font-size: 12px;
}

.mail-doctor-woo-preview__breadcrumbs .dashicons {
	font-size: 14px;
}

.mail-doctor-woo-preview__crumb {
	position: relative;
	padding-inline-start: 12px;
}

.mail-doctor-woo-preview__crumb+.mail-doctor-woo-preview__crumb::before {
	content: "›";
	position: absolute;
	inset-inline-start: 4px;
	color: var(--mail-doctor-color-border);
}

.mail-doctor-woo-preview__controls {
	display: grid;
	grid-template-columns: minmax(220px, 1.6fr) minmax(140px, 0.9fr) auto auto;
	grid-auto-rows: minmax(36px, auto);
	gap: var(--mail-doctor-space-sm);
	align-items: stretch;
}

.mail-doctor-woo-preview__controls .mail-doctor-select {
	min-width: 220px;
	max-width: 280px;
}

.mail-doctor-woo-preview__controls .select2-container {
	width: 100% !important;
	min-width: 220px;
}

.mail-doctor-woo-preview__controls .select2-container--default .select2-selection--single {
	min-height: 36px;
	height: 100%;
	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-woo-preview__controls .select2-container--default .select2-selection--single .select2-selection__rendered {
	margin: 0;
	padding: 0;
	line-height: 1.4;
	flex: 1 1 auto;
}

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

.mail-doctor-woo-preview__controls .button,
.mail-doctor-woo-preview__controls .button.button-secondary,
.mail-doctor-woo-preview__controls .small-text {
	min-height: 36px;
	line-height: 1.4;
	align-self: stretch;
}

.mail-doctor-woo-preview__controls .button,
.mail-doctor-woo-preview__controls .button.button-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 16px;
}

.mail-doctor-woo-preview__controls .small-text {
	width: 100%;
	max-width: 180px;
	padding: 6px 10px;
	border-radius: var(--mail-doctor-radius-sm);
}

.mail-doctor-woo-preview__status {
	margin-top: 0.75rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
	padding: 8px 12px;
	border-radius: var(--mail-doctor-radius-sm);
	background: var(--mail-doctor-color-neutral-soft);
	display: inline-flex;
	align-items: center;
	gap: var(--mail-doctor-space-xs);
}

.mail-doctor-woo-preview__status.is-error {
	color: var(--mail-doctor-color-danger);
	background: rgba(214, 54, 56, 0.12);
}

.mail-doctor-woo-preview__status.is-success {
	color: var(--mail-doctor-color-success);
	background: rgba(29, 122, 29, 0.12);
}

.mail-doctor-woo-preview__status.is-loading {
	color: var(--mail-doctor-color-accent);
	background: rgba(34, 113, 177, 0.12);
}

.mail-doctor-woo-preview__status .spinner {
	float: none;
	margin: 0;
	flex-shrink: 0;
}

.mail-doctor-woo-preview__output {
	margin-top: 1rem;
	padding: 1.25rem;
	background: var(--mail-doctor-color-neutral-soft);
	border: 1px solid var(--mail-doctor-color-border);
	border-radius: var(--mail-doctor-radius-sm);
	box-shadow: var(--mail-doctor-shadow-xs);
	max-height: 480px;
	overflow: auto;
}

.mail-doctor-woo-preview__output iframe {
	width: 100%;
	min-height: 480px;
	border: 0;
}

.mail-doctor-woo-preview__output iframe:focus {
	outline: 2px solid var(--mail-doctor-color-accent);
	outline-offset: 2px;
}

.mail-doctor-woo-preview__plain {
	margin: 0;
	white-space: pre-wrap;
	font-family: Menlo, Consolas, Monaco, monospace;
	font-size: 13px;
	line-height: 1.5;
	background: #111;
	color: #fff;
	padding: 12px;
	border-radius: var(--mail-doctor-radius-sm);
	overflow: auto;
}

.mail-doctor-password-field {
	position: relative;
	display: inline-block;
}

.mail-doctor-password-field input[type="password"],
.mail-doctor-password-field input[type="text"] {
	padding-right: 40px;
}

.mail-doctor-password-field .mail-doctor-toggle-password {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	padding: 4px;
	border: none;
	background: transparent;
	cursor: pointer;
	color: var(--mail-doctor-color-muted);
	line-height: 1;
}

.mail-doctor-password-field .mail-doctor-toggle-password:focus {
	outline: 2px solid var(--mail-doctor-color-accent);
	outline-offset: 1px;
}

.mail-doctor-password-field .mail-doctor-toggle-password .dashicons-hidden {
	display: none;
}

.mail-doctor-password-field .mail-doctor-toggle-password.is-visible .dashicons-visibility {
	display: none;
}

.mail-doctor-password-field .mail-doctor-toggle-password.is-visible .dashicons-hidden {
	display: inline-block;
}

.mail-doctor-profile-list {
	display: block;
}

.mail-doctor-tab-layout,
.mail-doctor-profile-layout {
	display: grid;
	gap: 16px;
}

@media (min-width: 960px) {

	.mail-doctor-tab-layout,
	.mail-doctor-profile-layout {
		grid-template-columns: 260px minmax(0, 1fr);
		align-items: flex-start;
	}
}

.mail-doctor-tab-menu ul,
.mail-doctor-profile-menu ul {
	display: flex;
	flex-wrap: nowrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: thin;
}

@media (min-width: 960px) {

	.mail-doctor-tab-menu ul,
	.mail-doctor-profile-menu ul {
		flex-direction: column;
		overflow: visible;
	}
}

.mail-doctor-tab-menu__link,
.mail-doctor-profile-menu__link {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--mail-doctor-color-border);
	border-radius: 10px;
	background: var(--mail-doctor-color-surface);
	color: var(--mail-doctor-color-text);
	font-weight: 600;
	text-align: left;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
	min-width: 220px;
}

@media (min-width: 960px) {

	.mail-doctor-tab-menu__link,
	.mail-doctor-profile-menu__link {
		min-width: 0;
	}
}

.mail-doctor-tab-menu__link .dashicons,
.mail-doctor-profile-menu__link .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	color: var(--mail-doctor-color-accent);
}

.mail-doctor-tab-menu__link:hover,
.mail-doctor-tab-menu__link:focus,
.mail-doctor-profile-menu__link:hover,
.mail-doctor-profile-menu__link:focus {
	border-color: rgba(34, 113, 177, 0.3);
	background: var(--mail-doctor-color-accent-soft);
	box-shadow: inset 2px 0 0 var(--mail-doctor-color-accent);
	outline: none;
}

.mail-doctor-tab-menu__link.is-active,
.mail-doctor-profile-menu__link.is-active {
	border-color: rgba(34, 113, 177, 0.3);
	background: var(--mail-doctor-color-accent-soft);
	box-shadow: inset 2px 0 0 var(--mail-doctor-color-accent);
}

.mail-doctor-tab-menu__label,
.mail-doctor-profile-menu__label {
	font-size: 14px;
	line-height: 1.3;
}

.mail-doctor-tab-menu__sublabel,
.mail-doctor-profile-menu__sublabel {
	font-size: 12px;
	font-weight: 500;
	color: var(--mail-doctor-color-muted);
}

.mail-doctor-tab-menu__badge,
.mail-doctor-profile-menu__badge {
	margin-top: 4px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(120, 130, 155, 0.16);
	color: var(--mail-doctor-color-muted);
	font-size: 11px;
	font-weight: 600;
}

.mail-doctor-tab-menu__badge--priority,
.mail-doctor-profile-menu__badge--priority {
	background: rgba(221, 143, 0, 0.15);
	color: #b56400;
}

.mail-doctor-tab-panels,
.mail-doctor-profile-panels {
	position: relative;
	border: 1px solid var(--mail-doctor-color-border);
	border-radius: 12px;
	background: var(--mail-doctor-color-surface);
	padding: 20px;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.mail-doctor-tab-pane,
.mail-doctor-profile-pane {
	display: none;
}

.mail-doctor-tab-pane.is-active,
.mail-doctor-profile-pane.is-active {
	display: block;
}

.mail-doctor-tab-pane__header,
.mail-doctor-profile-pane__header {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--mail-doctor-color-border);
	margin-bottom: 16px;
}

.mail-doctor-tab-pane__headline,
.mail-doctor-profile-pane__headline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.mail-doctor-tab-pane__title,
.mail-doctor-profile-pane__title {
	font-size: 18px;
}

.mail-doctor-tab-pane__eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 11px;
	color: var(--mail-doctor-color-muted);
	font-weight: 600;
}

.mail-doctor-tab-pane__hint {
	margin: 0;
	font-size: 13px;
	color: var(--mail-doctor-color-muted);
}

.mail-doctor-tab-pane__meta,
.mail-doctor-profile-pane__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	color: var(--mail-doctor-color-muted);
	font-weight: 500;
}

.mail-doctor-tab-pane__body,
.mail-doctor-profile-pane__body {
	margin-top: 4px;
	display: grid;
	gap: 16px;
}

.mail-doctor-logging-layout {
	display: flex;
	flex-direction: column;
}

.mail-doctor-logging-layout .mail-doctor-tab-menu ul {
	flex-direction: row;
	flex-wrap: wrap;
	overflow-x: auto;
	gap: 8px;
}

.mail-doctor-logging-layout .mail-doctor-tab-menu__link {
	width: auto;
	min-width: 180px;
}

.mail-doctor-logging-layout .mail-doctor-tab-panels {
	padding: 24px;
	width: 100%;
	box-sizing: border-box;
}

.mail-doctor-profile-pane__body {
	margin-top: 4px;
}

.mail-doctor-profile-card {
	border: 1px solid var(--mail-doctor-color-border);
	border-radius: 10px;
	padding: 16px;
	margin: 0;
	background: var(--mail-doctor-color-surface);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.mail-doctor-profile-card summary {
	display: flex;
	flex-direction: column;
	gap: 10px;
	font-weight: 600;
	margin: 0;
	list-style: none;
	cursor: pointer;
}

.mail-doctor-profile-card summary::-webkit-details-marker {
	display: none;
}

.mail-doctor-profile-card[open] {
	border-color: var(--mail-doctor-color-accent-soft);
	box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.mail-doctor-profile-card[open] summary {
	color: var(--mail-doctor-color-accent);
}

.mail-doctor-profile-card__headline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.mail-doctor-profile-card__title {
	font-size: 16px;
}

.mail-doctor-profile-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-weight: 400;
	color: var(--mail-doctor-color-muted);
}

.mail-doctor-profile-card summary:focus-visible {
	outline: 2px solid var(--mail-doctor-color-accent);
	border-radius: 6px;
}

.mail-doctor-profile-table {
	margin-top: 16px;
}

.mail-doctor-profile-table .description {
	margin-top: 4px;
}

.mail-doctor-integrations {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.mail-doctor-integrations__nav {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.mail-doctor-integrations__tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 999px;
	border: 1px solid var(--mail-doctor-color-border);
	background: var(--mail-doctor-color-surface);
	color: var(--mail-doctor-color-muted);
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.mail-doctor-integrations__tab .dashicons {
	font-size: 16px;
}

.mail-doctor-integrations__tab.is-active,
.mail-doctor-integrations__tab:focus-visible,
.mail-doctor-integrations__tab:hover {
	border-color: rgba(34, 113, 177, 0.35);
	background: var(--mail-doctor-color-accent-soft);
	color: var(--mail-doctor-color-accent);
	outline: none;
}

.mail-doctor-integrations__panes {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.mail-doctor-integrations__pane[hidden] {
	display: none;
}

.mail-doctor-integrations__pane {
	animation: mdFadeIn 0.18s ease;
}

.maildoctor-admin-wrap .mail-doctor-field-copy {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.maildoctor-admin-wrap .mail-doctor-field-copy input[type="text"] {
	flex: 1 1 340px;
	min-width: 220px;
}

.maildoctor-admin-wrap .mail-doctor-field-copy .button {
	white-space: nowrap;
}

.maildoctor-admin-wrap .mail-doctor-field-inline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.maildoctor-admin-wrap .mail-doctor-field-inline .description {
	flex-basis: 100%;
	margin: 6px 0 0;
}

.maildoctor-admin-wrap .mail-doctor-copy-trigger.is-copied {
	border-color: rgba(29, 122, 29, 0.35);
	background: rgba(29, 122, 29, 0.12);
	color: var(--mail-doctor-color-success);
}

.maildoctor-admin-wrap .mail-doctor-copy-trigger.is-error {
	border-color: rgba(214, 54, 56, 0.35);
	background: rgba(214, 54, 56, 0.12);
	color: var(--mail-doctor-color-danger);
}

.maildoctor-admin-wrap .mail-doctor-regenerate-secret.is-pending {
	opacity: 0.65;
}

@keyframes mdFadeIn {
	from {
		opacity: 0;
		transform: translateY(6px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 960px) {
	.mail-doctor-api-keys__layout {
		flex-direction: column;
	}

	.mail-doctor-api-keys__column {
		max-width: none;
	}

	.mail-doctor-settings {
		flex-direction: column;
	}

	.mail-doctor-settings-content {
		padding: 20px;
	}

	.mail-doctor-woo-preview__controls {
		grid-template-columns: minmax(0, 1fr);
	}

	.mail-doctor-woo-preview__controls .mail-doctor-select,
	.mail-doctor-woo-preview__controls .select2-container {
		max-width: 100%;
	}

	.mail-doctor-woo-preview__controls .small-text {
		max-width: 100%;
	}

	.mail-doctor-woo-preview__controls .button,
	.mail-doctor-woo-preview__controls .button.button-secondary {
		width: 100%;
		justify-content: center;
	}

	.mail-doctor-woo-table__actions {
		gap: var(--mail-doctor-space-xs);
	}

	.mail-doctor-woo-table__grid {
		display: block;
	}

	.mail-doctor-woo-table__grid thead {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0 0 0 0);
		border: 0;
	}

	.mail-doctor-woo-table__row {
		display: block;
		padding: var(--mail-doctor-space-lg);
	}

	.mail-doctor-woo-table__cell {
		display: flex;
		flex-direction: column;
		width: 100%;
		padding: var(--mail-doctor-space-sm) 0;
	}

	.mail-doctor-woo-table__cell::before {
		content: attr(data-label);
		font-size: 11px;
		letter-spacing: 0.06em;
		text-transform: uppercase;
		color: var(--mail-doctor-color-muted);
		margin-bottom: 4px;
	}

	.mail-doctor-woo-table__cell--override {
		padding-bottom: 0;
	}

	.mail-doctor-toggle {
		align-items: flex-start;
	}

	.mail-doctor-toggle__label {
		gap: var(--mail-doctor-space-sm);
	}

	.mail-doctor-toggle__text {
		font-size: 14px;
	}
}

@media (max-width: 860px) {
	.mail-doctor-settings-nav__toggle {
		display: inline-flex;
	}

	.mail-doctor-settings-nav ul {
		display: none;
	}

	.mail-doctor-settings-nav.is-open ul {
		display: flex;
		margin-top: 8px;
	}

	.mail-doctor-settings {
		flex-direction: column;
	}

	.mail-doctor-settings-nav {
		position: static;
		width: 100%;
	}
}

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

	.mail-doctor-api-keys__secret-field .button {
		align-self: flex-start;
	}

	.mail-doctor-settings-header__title {
		font-size: 22px;
	}

	.mail-doctor-settings-table th {
		width: auto;
		padding-bottom: 6px;
	}

	.mail-doctor-settings-table tr {
		display: block;
		padding: 12px 0;
		border-bottom: 1px solid var(--mail-doctor-color-border);
	}

	.mail-doctor-settings-table tr:last-child {
		border-bottom: 0;
		padding-bottom: 0;
	}

	.mail-doctor-settings-table th,
	.mail-doctor-settings-table td {
		display: block;
		padding-right: 0;
	}

	.mail-doctor-settings-actions {
		flex-direction: column;
		align-items: flex-start;
	}

	.mail-doctor-woo-preview__controls {
		gap: var(--mail-doctor-space-sm);
	}

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

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

	.mail-doctor-woo-table__cell {
		padding: var(--mail-doctor-space-xs) 0;
	}

	.mail-doctor-woo-table__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.mail-doctor-woo-table__actions .button {
		width: 100%;
		justify-content: center;
	}
}
