/**
 * Email Delivery admin — matches Basic Forms / WP admin module chrome.
 *
 * @package EmailSmtp
 */

/* Match Code Snippet / Basic Forms: fill the WP admin content column. */
.wrap.wpps-email-delivery.wpps-ed-wrap,
.wrap.wpps-email-delivery {
	margin: 20px 20px 20px 0;
	max-width: none !important;
	width: auto;
	box-sizing: border-box;
	--wpps-ed-accent: var(--wpps-accent, var(--wp-admin-theme-color, #2271b1));
	--wpps-ed-accent-hover: var(--wpps-accent-hover, var(--wp-admin-theme-color-darker-10, #135e96));
	--wpps-ed-accent-bg: color-mix(in srgb, var(--wp-admin-theme-color, #2271b1) 12%, #fff);
	--wpps-ed-black: #1d2327;
	--wpps-ed-muted: #50575e;
	--wpps-ed-gray: #646970;
	--wpps-ed-border: #c3c4c7;
	--wpps-ed-divider: #dcdcde;
	--wpps-ed-surface: #f0f0f1;
	--wpps-ed-bg: #f6f7f7;
	--wpps-ed-white: #fff;
	--wpps-ed-success: #00a32a;
	--wpps-ed-danger: #d63638;
	--wpps-ed-warning: #dba617;
	--wpps-ed-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.wrap.wpps-email-delivery .wpps-page-hero,
.wrap.wpps-email-delivery .nav-tab-wrapper,
.wrap.wpps-email-delivery .wpps-ed-settings-layout,
.wrap.wpps-email-delivery .wpps-ed-panel {
	max-width: none;
}

.wrap.wpps-email-delivery .nav-tab.wpps-ed-nav-tab--disabled {
	color: #a7aaad;
	background: #f6f7f7;
	border-color: #dcdcde;
	cursor: not-allowed;
	opacity: 0.75;
}

.wpps-ed-settings-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
	gap: 24px;
	align-items: start;
	width: 100%;
}

.wpps-ed-settings-main {
	min-width: 0;
}

.wpps-ed-sidebar {
	min-width: 0;
	position: sticky;
	top: 46px;
	align-self: start;
	z-index: 1;
}

.wpps-ed-sidebar-sticky {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.wpps-ed-sidebar .wpps-ed-panel {
	position: static;
	margin: 0;
}

.wpps-ed-sidebar-panel > summary.wpps-ed-panel-title {
	cursor: pointer;
	list-style: none;
	user-select: none;
}

.wpps-ed-sidebar-panel > summary.wpps-ed-panel-title::-webkit-details-marker {
	display: none;
}

.wpps-ed-sidebar-panel__summary {
	display: flex !important;
	align-items: center;
	gap: 8px;
}

.wpps-ed-sidebar-panel__summary::after {
	float: none;
	margin-left: 0;
	flex-shrink: 0;
}

.wpps-ed-sidebar-panel__summary-text {
	flex: 1;
	min-width: 0;
	padding-right: 4px;
}

.wpps-ed-sidebar-panel__summary .button {
	flex-shrink: 0;
	margin-right: 0;
}

.wpps-ed-sidebar-meta {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--wpps-ed-divider);
}

@media screen and (max-width: 1100px) {
	.wpps-ed-settings-layout {
		grid-template-columns: 1fr;
	}

	.wpps-ed-sidebar {
		position: static;
	}
}

@media screen and (max-width: 782px) {
	.wpps-ed-sidebar {
		top: 46px;
	}
}

.wrap.wpps-email-delivery .wpps-page-hero__meta {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

/* Panels — same language as .wpps-bf-panel */
.wpps-ed-panel {
	background: var(--wpps-ed-white);
	border: 1px solid var(--wpps-ed-border);
	box-shadow: var(--wpps-ed-shadow);
	margin-bottom: 24px;
}

.wpps-ed-panel-title {
	margin: 0;
	padding: 16px 20px;
	font-size: 16px;
	font-weight: 600;
	color: var(--wpps-ed-black);
	border-bottom: 1px solid var(--wpps-ed-divider);
}

.wpps-ed-panel-title--row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.wpps-ed-panel-body {
	padding: 20px;
}

.wpps-ed-details-panel > summary.wpps-ed-panel-title {
	cursor: pointer;
	list-style: none;
}

.wpps-ed-details-panel > summary.wpps-ed-panel-title::-webkit-details-marker {
	display: none;
}

.wpps-ed-details-panel > summary.wpps-ed-panel-title::after {
	content: "\f140";
	font-family: dashicons;
	float: right;
	color: var(--wpps-ed-gray);
}

.wpps-ed-details-panel[open] > summary.wpps-ed-panel-title::after {
	content: "\f142";
}

.wpps-ed-reliability-summary {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.wpps-ed-reliability-summary::after {
	float: none;
	margin-left: auto;
	flex-shrink: 0;
}

.wpps-ed-reliability-summary__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	flex: 1;
}

.wpps-ed-reliability-summary__title {
	font-size: 16px;
	font-weight: 600;
	color: var(--wpps-ed-black);
}

.wpps-ed-reliability-summary__sub {
	font-size: 12px;
	font-weight: 400;
	color: var(--wpps-ed-gray);
}

.wpps-ed-reliability-body {
	padding: 0 !important;
}

.wpps-ed-reliability-intro {
	margin: 0;
	padding: 16px 20px 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--wpps-ed-muted);
}

.wpps-ed-reliability-fallback-note {
	margin: 10px 20px 0;
	padding: 10px 12px 10px 14px;
	border-left: 3px solid var(--wpps-ed-accent, #2271b1);
	background: var(--wpps-ed-bg);
	color: var(--wpps-ed-muted);
	font-size: 13px;
	line-height: 1.45;
}

.wpps-ed-reliability-form {
	margin: 0;
	padding: 14px 20px 0;
}

/* One left edge for title, copy, and controls inside each feature block. */
.wpps-ed-feature-card {
	--wpps-ed-feature-pad-x: 16px;
	margin: 0 0 14px;
	border: 1px solid var(--wpps-ed-divider);
	background: var(--wpps-ed-white);
}

.wpps-ed-feature-card__head {
	padding: 14px var(--wpps-ed-feature-pad-x) 12px;
	background: var(--wpps-ed-bg);
	border-bottom: 1px solid var(--wpps-ed-divider);
}

.wpps-ed-feature-card__title {
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 650;
	color: var(--wpps-ed-black);
}

.wpps-ed-feature-card__why {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--wpps-ed-muted);
}

.wpps-ed-feature-card__body {
	padding: 14px var(--wpps-ed-feature-pad-x) 16px;
}

.wpps-ed-feature-card__body > .description {
	margin: 10px 0 0;
	padding: 0;
}

.wpps-ed-feature-card__warn {
	margin: 10px 0 0;
	padding: 10px 12px;
	background: #fcf9e8;
	border: 1px solid #f0e6a6;
	color: #646970;
	font-size: 13px;
	line-height: 1.45;
}

.wpps-ed-field-label {
	display: block;
	margin: 0 0 6px;
	padding: 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--wpps-ed-black);
}

.wpps-ed-reliability-panel .wpps-ed-feature-card__body > select,
.wpps-ed-reliability-panel .wpps-ed-feature-card__body > .wpps-ed-field-label + select {
	display: block;
	width: 100%;
	max-width: 420px;
	margin: 0;
	box-sizing: border-box;
}

.wpps-ed-reliability-panel .wpps-ed-feature-card__body > .description {
	max-width: 640px;
}

/* Flush check rows — nested bordered cards were shifting text right of titles/links. */
.wpps-ed-reliability-panel .wpps-ed-check-card {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	box-sizing: border-box;
}

.wpps-ed-reliability-panel .wpps-ed-check-card input[type="hidden"] {
	display: none;
}

.wpps-ed-reliability-panel .wpps-ed-check-card input[type="checkbox"] {
	float: none;
	flex: 0 0 auto;
	width: 1rem;
	height: 1rem;
	margin: 0.2rem 0 0;
	padding: 0;
}

.wpps-ed-reliability-panel .wpps-ed-check-card > span {
	display: block;
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.wpps-ed-reliability-panel .wpps-ed-check-card strong {
	display: block;
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--wpps-ed-black);
}

.wpps-ed-reliability-panel .wpps-ed-check-card em {
	display: block;
	margin: 4px 0 0;
	font-style: normal;
	font-size: 12px;
	line-height: 1.45;
	color: var(--wpps-ed-gray);
}

.wpps-ed-reliability-fields {
	margin-top: 14px;
}

.wpps-ed-reliability-panel .wpps-ed-reliability-fields {
	margin-left: 0;
	margin-right: 0;
}

.wpps-ed-reliability-panel .wpps-ed-reliability-fields .wpps-ed-field {
	margin: 0;
	padding: 0;
}

.wpps-ed-reliability-panel .wpps-ed-reliability-fields .wpps-ed-field label {
	display: block;
	margin: 0;
	padding: 0;
}

.wpps-ed-reliability-panel .wpps-ed-reliability-fields .wpps-ed-field .regular-text,
.wpps-ed-reliability-panel .wpps-ed-reliability-fields .wpps-ed-field input[type="email"],
.wpps-ed-reliability-panel .wpps-ed-reliability-fields .wpps-ed-field input[type="url"],
.wpps-ed-reliability-panel .wpps-ed-reliability-fields .wpps-ed-field textarea {
	width: 100%;
	max-width: 100%;
	margin: 0;
	box-sizing: border-box;
}

.wpps-ed-webhook-endpoints {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid var(--wpps-ed-divider);
}

.wpps-ed-webhook-endpoints__title {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 650;
	color: var(--wpps-ed-black);
}

.wpps-ed-reliability-footer {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 0 18px;
}

/* Status badges */
.wpps-ed-status {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	border: 1px solid transparent;
}

.wpps-ed-status--connected {
	background: #d4edda;
	color: #155724;
	border-color: #c3e6cb;
}

.wpps-ed-status--incomplete {
	background: #fff3cd;
	color: #856404;
	border-color: #ffeeba;
}

.wpps-ed-status--failed {
	background: #f8d7da;
	color: #721c24;
	border-color: #f5c6cb;
}

.wpps-ed-muted {
	color: var(--wpps-ed-gray);
	font-size: 12px;
}

.wpps-ed-role-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.4;
	padding: 2px 8px;
	border-radius: 3px;
	border: 1px solid transparent;
	margin-right: 4px;
	white-space: nowrap;
}

.wpps-ed-role-badge--primary {
	background: #e7f3ff;
	color: #0a4b78;
	border-color: #c5d9ed;
}

.wpps-ed-role-badge--fallback {
	background: #f0f0f1;
	color: #50575e;
	border-color: #dcdcde;
}

.wpps-ed-code-sample {
	margin: 8px 0 10px;
	padding: 12px 14px;
	max-width: 100%;
	overflow-x: auto;
	background: #1e1e1e;
	color: #f3f3f3;
	border: 1px solid var(--wpps-ed-divider);
	font-family: Consolas, Monaco, monospace;
	font-size: 12px;
	line-height: 1.55;
	white-space: pre;
}

.wpps-ed-code-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wpps-ed-copy-row {
	display: grid;
	grid-template-columns: minmax(110px, 140px) minmax(0, 1fr) auto;
	align-items: start;
	gap: 8px 12px;
	margin: 0;
	padding: 10px 12px;
	background: var(--wpps-ed-surface);
	border: 1px solid var(--wpps-ed-divider);
	border-radius: 4px;
}

.wpps-ed-copy-row strong {
	min-width: 0;
	text-transform: none;
	font-size: 13px;
	line-height: 1.4;
	padding-top: 4px;
}

.wpps-ed-copy-row .wpps-ed-callback-url {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	word-break: break-all;
	overflow-wrap: anywhere;
	white-space: normal;
	line-height: 1.45;
	padding: 6px 8px;
	margin: 0;
	font-size: 12px;
}

.wpps-ed-copy-row .button {
	justify-self: end;
	align-self: start;
	flex-shrink: 0;
}

@media screen and (max-width: 782px) {
	.wpps-ed-copy-row {
		grid-template-columns: 1fr auto;
	}

	.wpps-ed-copy-row strong {
		grid-column: 1 / -1;
		padding-top: 0;
	}
}

.wpps-ed-feedback {
	margin-top: 12px;
}

.wpps-ed-feedback:empty {
	display: none;
}

/* Checklist */
.wpps-ed-checklist {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wpps-ed-checklist li {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 10px 0;
	border-bottom: 1px solid var(--wpps-ed-divider);
}

.wpps-ed-checklist li:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.wpps-ed-checklist li:first-child {
	padding-top: 0;
}

.wpps-ed-check {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin-top: 2px;
	border: 2px solid var(--wpps-ed-border);
	border-radius: 50%;
	background: var(--wpps-ed-white);
	box-sizing: border-box;
}

.wpps-ed-checklist li.is-done .wpps-ed-check {
	border-color: var(--wpps-ed-success);
	background: var(--wpps-ed-success);
	box-shadow: inset 0 0 0 3px #fff;
}

.wpps-ed-checklist li em {
	display: block;
	margin-top: 2px;
	font-style: normal;
	color: var(--wpps-ed-gray);
	font-size: 13px;
}

.wpps-ed-domain-health__summary {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--wpps-ed-divider);
}

.wpps-ed-domain-health__domain {
	display: block;
	font-size: 14px;
	color: var(--wpps-ed-black);
	word-break: break-all;
}

.wpps-ed-domain-health__score {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	color: var(--wpps-ed-muted);
}

.wpps-ed-domain-health__checked {
	font-size: 12px;
	color: var(--wpps-ed-gray);
}

.wpps-ed-domain-health {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wpps-ed-domain-health__item {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 0;
	border-bottom: 1px solid var(--wpps-ed-divider);
	font-size: 13px;
}

.wpps-ed-domain-health__item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.wpps-ed-domain-health__item:first-child {
	padding-top: 0;
}

.wpps-ed-domain-health__item strong {
	font-weight: 600;
}

.wpps-ed-domain-health__item span {
	color: var(--wpps-ed-gray);
	line-height: 1.4;
}

.wpps-ed-domain-health__tip {
	display: block;
	margin-top: 2px;
	font-style: normal;
	font-size: 12px;
	color: var(--wpps-ed-muted);
	line-height: 1.4;
}

.wpps-ed-domain-health__item--success strong {
	color: var(--wpps-ed-success);
}

.wpps-ed-domain-health__item--warning strong {
	color: #996800;
}

.wpps-ed-domain-health__item--muted strong {
	color: var(--wpps-ed-gray);
}

.wpps-ed-domain-health__note {
	margin: 12px 0 0;
}

#wpps-ed-domain-health-panel.is-loading {
	opacity: 0.7;
	pointer-events: none;
}

.wpps-ed-feedback {
	margin-top: 12px;
}

/* Connections table */
.wpps-ed-connections-table {
	border: none !important;
	box-shadow: none !important;
}

.wpps-ed-connections-table td,
.wpps-ed-connections-table th {
	padding: 12px 16px;
}

.wpps-ed-connections-table tr.is-editing {
	background: var(--wpps-ed-accent-bg);
}

.wpps-ed-connections-table th:last-child,
.wpps-ed-connections-table td.wpps-ed-conn-actions-cell {
	width: 1%;
	white-space: nowrap;
	text-align: right;
}

.wpps-ed-conn-actions {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 4px;
}

.wpps-ed-conn-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	margin: 0;
	border: 1px solid var(--wpps-ed-divider);
	border-radius: 6px;
	background: #fff;
	color: var(--wpps-ed-gray, #646970);
	text-decoration: none;
	box-shadow: none;
	cursor: pointer;
	line-height: 1;
	transition: border-color 0.12s ease, color 0.12s ease, background-color 0.12s ease;
}

.wpps-ed-conn-action .dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
	line-height: 1;
}

.wpps-ed-conn-action:hover,
.wpps-ed-conn-action:focus {
	border-color: var(--wpps-ed-accent);
	color: var(--wpps-ed-accent);
	background: var(--wpps-ed-accent-bg);
	outline: none;
	box-shadow: 0 0 0 1px var(--wpps-ed-accent);
}

.wpps-ed-conn-action--primary:hover,
.wpps-ed-conn-action--primary:focus {
	color: #996800;
	border-color: #dba617;
	background: #fcf9e8;
	box-shadow: 0 0 0 1px #dba617;
}

.wpps-ed-conn-action--fallback:hover,
.wpps-ed-conn-action--fallback:focus {
	color: #135e96;
	border-color: #72aee6;
	background: #f0f6fc;
	box-shadow: 0 0 0 1px #72aee6;
}

.wpps-ed-conn-action--clear-fallback:hover,
.wpps-ed-conn-action--clear-fallback:focus {
	color: #646970;
	border-color: #8c8f94;
	background: #f6f7f7;
	box-shadow: 0 0 0 1px #8c8f94;
}

.wpps-ed-conn-action--delete:hover,
.wpps-ed-conn-action--delete:focus {
	color: #b32d2e;
	border-color: #d63638;
	background: #fcf0f1;
	box-shadow: 0 0 0 1px #d63638;
}

.wpps-ed-conn-provider {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.wpps-ed-conn-provider img,
.wpps-ed-provider-icon {
	display: block;
	flex-shrink: 0;
	border-radius: 4px;
}

.wpps-ed-conn-form-head {
	display: inline-flex;
	align-items: center;
	gap: 12px;
}

.wpps-ed-conn-form-head__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.wpps-ed-conn-form-head__title {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--wpps-ed-black);
}

.wpps-ed-conn-form-head__sub {
	font-size: 12px;
	font-weight: 400;
	color: var(--wpps-ed-gray);
}

.wpps-ed-conn-form-panel .wpps-ed-panel-title {
	padding: 14px 20px;
}

.wpps-ed-conn-form-body {
	padding: 0 !important;
}

.wpps-ed-connection-form {
	margin: 0;
}

.wpps-ed-conn-section {
	padding: 18px 20px 4px;
	border-bottom: 1px solid var(--wpps-ed-divider);
}

.wpps-ed-conn-section:last-of-type {
	border-bottom: none;
}

.wpps-ed-conn-section__title {
	margin: 0 0 14px;
	font-size: 13px;
	font-weight: 650;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--wpps-ed-muted);
}

.wpps-ed-conn-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 18px;
	margin-bottom: 14px;
}

.wpps-ed-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.wpps-ed-field--full {
	grid-column: 1 / -1;
}

.wpps-ed-field label {
	font-size: 13px;
	font-weight: 600;
	color: var(--wpps-ed-black);
}

.wpps-ed-field .regular-text,
.wpps-ed-field input[type="email"],
.wpps-ed-field input[type="text"],
.wpps-ed-field input[type="password"],
.wpps-ed-field input[type="url"],
.wpps-ed-field select {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.wpps-ed-open-help-modal {
	margin-left: 6px;
	vertical-align: baseline;
}

body.wpps-ed-modal-open {
	overflow: hidden;
}

.wpps-ed-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100100;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
	background: rgba(0, 0, 0, 0.55);
}

.wpps-ed-modal.is-open {
	display: flex;
}

.wpps-ed-modal-dialog {
	display: flex;
	flex-direction: column;
	width: min(560px, 100%);
	max-height: min(85vh, 720px);
	overflow: hidden;
	background: var(--wpps-ed-white, #fff);
	border: 1px solid var(--wpps-ed-border, #c3c4c7);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.wpps-ed-modal-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	border-bottom: 1px solid var(--wpps-ed-divider, #dcdcde);
	background: var(--wpps-ed-bg, #f6f7f7);
	flex: 0 0 auto;
}

.wpps-ed-modal-header h2 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--wpps-ed-black, #1d2327);
}

.wpps-ed-modal-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #50575e;
	cursor: pointer;
	text-decoration: none;
	flex: 0 0 auto;
}

.wpps-ed-modal-close:hover {
	color: #1d2327;
}

.wpps-ed-modal-body {
	padding: 16px 18px 8px;
	overflow: auto;
	flex: 1 1 auto;
	font-size: 13px;
	line-height: 1.5;
	color: var(--wpps-ed-muted, #50575e);
}

.wpps-ed-modal-body p {
	margin: 0 0 12px;
}

.wpps-ed-modal-body strong {
	color: var(--wpps-ed-black, #1d2327);
}

.wpps-ed-help-list {
	margin: 0 0 14px 1.25em;
	padding: 0;
}

.wpps-ed-help-list li {
	margin: 0 0 8px;
}

.wpps-ed-modal-body code {
	font-size: 12px;
}

.wpps-ed-modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 12px 18px;
	border-top: 1px solid var(--wpps-ed-divider, #dcdcde);
	background: var(--wpps-ed-bg, #f6f7f7);
	flex: 0 0 auto;
}

.wpps-ed-field .description {
	margin: 0;
}

.wpps-ed-conn-options {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin: 0 0 16px;
}

@media (max-width: 1100px) {
	.wpps-ed-conn-options {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.wpps-ed-check-card {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	padding: 12px 14px;
	background: var(--wpps-ed-bg);
	border: 1px solid var(--wpps-ed-divider);
	cursor: pointer;
}

.wpps-ed-check-card input {
	margin: 3px 0 0;
}

.wpps-ed-check-card strong {
	display: block;
	font-size: 13px;
	color: var(--wpps-ed-black);
}

.wpps-ed-check-card em {
	display: block;
	margin-top: 2px;
	font-style: normal;
	font-size: 12px;
	color: var(--wpps-ed-gray);
	line-height: 1.4;
}

.wpps-ed-conn-fields {
	margin: 0;
}

.wpps-ed-conn-form-panel .wpps-ed-conn-fields th {
	width: 180px;
	padding: 12px 16px 12px 0;
	vertical-align: top;
}

.wpps-ed-conn-form-panel .wpps-ed-conn-fields td {
	padding: 12px 0;
}

.wpps-ed-conn-form-panel .wpps-ed-conn-fields .regular-text,
.wpps-ed-conn-form-panel .wpps-ed-conn-fields input[type="password"],
.wpps-ed-conn-form-panel .wpps-ed-conn-fields input[type="text"],
.wpps-ed-conn-form-panel .wpps-ed-conn-fields input[type="email"],
.wpps-ed-conn-form-panel .wpps-ed-conn-fields select {
	max-width: 420px;
	width: 100%;
}

.wpps-ed-conn-footer {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px 20px 18px;
	background: var(--wpps-ed-bg);
	border-top: 1px solid var(--wpps-ed-divider);
}

.wpps-ed-conn-footer__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.wpps-ed-conn-footer .wpps-ed-feedback {
	margin: 0;
}

.wpps-ed-connection-form-mount {
	margin-top: 16px;
}

@media (max-width: 782px) {
	.wpps-ed-conn-grid,
	.wpps-ed-conn-options {
		grid-template-columns: 1fr;
	}

	.wpps-ed-conn-form-panel .wpps-ed-conn-fields th,
	.wpps-ed-conn-form-panel .wpps-ed-conn-fields td {
		display: block;
		width: auto;
		padding: 6px 0;
	}
}

/* Provider grid */
.wpps-ed-provider-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 12px;
	margin-top: 12px;
}

.wpps-ed-provider-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 18px 14px 14px;
	text-align: center;
	text-decoration: none;
	color: var(--wpps-ed-black);
	background: var(--wpps-ed-white);
	border: 1px solid var(--wpps-ed-border);
	box-shadow: var(--wpps-ed-shadow);
	transition: border-color 0.12s ease, box-shadow 0.12s ease;
	cursor: pointer;
	font: inherit;
	width: 100%;
	margin: 0;
	appearance: none;
	-webkit-appearance: none;
}

.wpps-ed-provider-tile__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 52px;
	padding: 0 8px;
	box-sizing: border-box;
}

.wpps-ed-provider-icon {
	display: block;
	width: auto;
	max-width: 100%;
	height: 44px;
	object-fit: contain;
	object-position: center;
	background: transparent;
}

.wpps-ed-provider-icon--sm {
	height: 24px;
	width: auto;
	max-width: 96px;
}

.wpps-ed-provider-icon--form {
	height: 28px;
	width: auto;
	max-width: 140px;
}

.wpps-ed-import-banner {
	margin: 0 0 16px;
}

.wpps-ed-import-banner__actions {
	margin: 8px 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.wpps-ed-connection-form-mount:empty {
	display: none;
}

button.wpps-ed-conn-action.wpps-ed-edit-connection {
	font-family: inherit;
}

.wpps-ed-provider-tile:hover,
.wpps-ed-provider-tile:focus {
	border-color: var(--wpps-ed-accent);
	color: var(--wpps-ed-black);
	box-shadow: 0 0 0 1px var(--wpps-ed-accent);
	outline: none;
}

.wpps-ed-provider-tile.is-active {
	border-color: var(--wpps-ed-accent);
	background: var(--wpps-ed-accent-bg);
	box-shadow: 0 0 0 1px var(--wpps-ed-accent);
}

.wpps-ed-provider-tile.is-caution .wpps-ed-provider-tile__meta {
	color: #996800;
}

.wpps-ed-provider-tile__name {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
}

.wpps-ed-provider-tile__meta {
	font-size: 11px;
	color: var(--wpps-ed-gray);
	line-height: 1.3;
}

.wpps-ed-callback-url {
	display: inline-block;
	max-width: 100%;
	word-break: break-all;
	overflow-wrap: anywhere;
	padding: 4px 6px;
	background: var(--wpps-ed-surface);
	border: 1px solid var(--wpps-ed-divider);
}

.wpps-ed-copy-row .wpps-ed-callback-url {
	background: var(--wpps-ed-white, #fff);
}

@media (max-width: 782px) {
	.wpps-ed-provider-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.wpps-ed-tab-panel.is-loading {
	opacity: 0.72;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

/* Overview analytics (Email Logs) */
.wpps-ed-overview-card {
	--wpps-ed-chart-sent: #2f80ed;
	--wpps-ed-chart-failed: #9b51e0;
	overflow: hidden;
}

.wpps-ed-overview-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--wpps-ed-divider);
}

.wpps-ed-overview-card__title {
	margin: 0;
	font-size: 16px;
	font-weight: 650;
	color: var(--wpps-ed-black);
}

.wpps-ed-overview-range {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 28px;
	padding: 0;
	border: 0;
	background: transparent;
}

.wpps-ed-overview-range__input {
	position: static;
	width: auto;
	min-width: 8.5rem;
	max-width: 11rem;
	height: 28px;
	margin: 0;
	padding: 0 2px;
	border: 0;
	border-radius: 2px;
	background: transparent;
	box-shadow: none;
	color: var(--wpps-ed-muted);
	font-size: 13px;
	line-height: 1.2;
	cursor: pointer;
}

.wpps-ed-overview-range__input:focus {
	outline: 1px solid var(--wpps-ed-accent, #2271b1);
	outline-offset: 1px;
	color: var(--wpps-ed-black);
}

.wpps-ed-overview-range__sep {
	display: inline;
	color: var(--wpps-ed-muted);
	font-size: 13px;
	line-height: 1;
	user-select: none;
}

.wpps-ed-overview-card__body {
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.wpps-ed-overview-stats {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: 0;
	border-bottom: 1px solid var(--wpps-ed-divider);
}

.wpps-ed-overview-stat {
	flex: 1 1 0;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	gap: 14px;
	padding: 16px 20px;
	min-width: 0;
}

.wpps-ed-overview-stat + .wpps-ed-overview-stat {
	border-left: 1px solid var(--wpps-ed-divider);
}

.wpps-ed-overview-stat__label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--wpps-ed-muted);
}

.wpps-ed-overview-swatch {
	width: 10px;
	height: 10px;
	border-radius: 2px;
	flex: 0 0 auto;
}

.wpps-ed-overview-swatch--sent {
	background: var(--wpps-ed-chart-sent);
}

.wpps-ed-overview-swatch--failed {
	background: var(--wpps-ed-chart-failed);
}

.wpps-ed-overview-stat__value {
	font-size: 28px;
	line-height: 1;
	font-weight: 700;
	color: var(--wpps-ed-black);
	letter-spacing: -0.02em;
	margin-left: auto;
}

.wpps-ed-overview-chart-wrap {
	position: relative;
	padding: 8px 8px 4px;
	min-width: 0;
	width: 100%;
	box-sizing: border-box;
}

.wpps-ed-overview-chart {
	display: block;
	width: 100%;
	max-width: none;
	height: 280px;
	cursor: crosshair;
}

.wpps-ed-overview-chart__empty {
	position: absolute;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	margin: 0;
	color: var(--wpps-ed-gray);
	font-size: 13px;
	background: color-mix(in srgb, var(--wpps-ed-white) 85%, transparent);
	pointer-events: none;
	z-index: 2;
}

/* `display: flex` must not override the HTML hidden attribute. */
.wpps-ed-overview-chart__empty:not([hidden]) {
	display: flex;
}

.wpps-ed-overview-tooltip {
	position: absolute;
	z-index: 3;
	min-width: 140px;
	padding: 10px 12px;
	border: 1px solid var(--wpps-ed-divider);
	border-radius: 6px;
	background: var(--wpps-ed-white);
	box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
	pointer-events: none;
	transform: translate(-50%, calc(-100% - 12px));
}

.wpps-ed-overview-tooltip[hidden] {
	display: none !important;
}

.wpps-ed-overview-tooltip__date {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 600;
	color: var(--wpps-ed-black);
}

.wpps-ed-overview-tooltip__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0;
	font-size: 12px;
	color: var(--wpps-ed-muted);
}

.wpps-ed-overview-tooltip__row + .wpps-ed-overview-tooltip__row {
	margin-top: 4px;
}

.wpps-ed-overview-tooltip__row strong {
	color: var(--wpps-ed-black);
	font-weight: 650;
}

.wpps-ed-overview-tooltip__swatch {
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 6px;
	border-radius: 2px;
	vertical-align: middle;
}

.wpps-ed-recent-logs__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--wpps-ed-divider);
}

.wpps-ed-recent-logs__title {
	margin: 0;
	font-size: 16px;
	font-weight: 650;
	color: var(--wpps-ed-black);
}

.wpps-ed-recent-logs__view-all {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	color: var(--wpps-ed-accent);
}

.wpps-ed-recent-logs__view-all .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
	line-height: 1;
}

.wpps-ed-recent-logs__view-all:hover,
.wpps-ed-recent-logs__view-all:focus {
	color: var(--wpps-ed-accent-hover);
}

.wpps-ed-recent-logs__table-wrap {
	overflow-x: auto;
}

.wpps-ed-recent-logs__table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}

.wpps-ed-recent-logs__table th,
.wpps-ed-recent-logs__table td {
	padding: 12px 16px;
	text-align: left;
	border-bottom: 1px solid var(--wpps-ed-divider);
	font-size: 13px;
}

.wpps-ed-recent-logs__table th {
	font-weight: 600;
	color: var(--wpps-ed-gray);
	background: var(--wpps-ed-bg);
}

.wpps-ed-recent-logs__table tr:last-child td {
	border-bottom: 0;
}

.wpps-ed-recent-logs__to {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color: var(--wpps-ed-black);
	word-break: break-all;
}

.wpps-ed-recent-logs__subject {
	color: var(--wpps-ed-muted);
	max-width: 280px;
}

.wpps-ed-recent-logs__date {
	color: var(--wpps-ed-muted);
	white-space: nowrap;
}

.wpps-ed-log-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.5;
}

.wpps-ed-log-badge--success {
	background: #edf8ef;
	color: #1a7f37;
}

.wpps-ed-log-badge--failed {
	background: #fcebec;
	color: #b32d2e;
}

.wpps-ed-log-badge--pending {
	background: #f0f0f1;
	color: #50575e;
}

@media (max-width: 600px) {
	.wpps-ed-overview-card__header,
	.wpps-ed-recent-logs__header {
		flex-direction: column;
		align-items: flex-start;
	}

	.wpps-ed-overview-range {
		width: 100%;
		flex-wrap: wrap;
	}

	.wpps-ed-overview-range__input {
		flex: 1 1 auto;
		min-width: 0;
		max-width: none;
	}

	.wpps-ed-overview-stats {
		flex-direction: column;
	}

	.wpps-ed-overview-stat + .wpps-ed-overview-stat {
		border-left: 0;
		border-top: 1px solid var(--wpps-ed-divider);
	}

	.wpps-ed-overview-stat__value {
		margin-left: 0;
	}

	.wpps-ed-overview-chart {
		height: 220px;
	}
}
