/* ── AI Email Marketing — Admin + Frontend Styles ──
   Admin rules are scoped to .aiem-wrap; this file also loads on the public
   site for the subscribe form (see "Frontend" section at the bottom). */

/* ── Page header bar (matches the email editor's top bar) ─────────────── */
.aiem-wrap:not(.aiem-ee) > h1 {
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
	background: #fff; border: 1px solid #dcdcde; border-radius: 6px;
	padding: 10px 14px; margin: 12px 0 16px;
	font-size: 16px; font-weight: 600; line-height: 1.4; color: #1d2327;
	min-height: 30px;
}
@media (min-width: 783px) {
	.aiem-wrap:not(.aiem-ee) > h1 { position: sticky; top: 32px; z-index: 20; }
}
/* .wrap.aiem-wrap + state selectors out-rank core's ".wrap .page-title-action:active",
   which sets margin-left:4px/top:-3px — the button jumped left on mousedown and the click was lost. */
.wrap.aiem-wrap > h1 .page-title-action,
.wrap.aiem-wrap > h1 .page-title-action:active,
.wrap.aiem-wrap > h1 .page-title-action:focus,
.aiem-wrap > h1 > .button {
	position: static; top: auto; margin: 0 0 0 auto;
	font-size: 13px; font-weight: 400;
}
.wrap.aiem-wrap > h1 .page-title-action,
.wrap.aiem-wrap > h1 .page-title-action:active,
.wrap.aiem-wrap > h1 .page-title-action:focus {
	background: #2271b1; border-color: #2271b1; color: #fff; border-radius: 3px; padding: 0 12px; min-height: 30px; line-height: 28px;
}
.wrap.aiem-wrap > h1 .page-title-action:hover,
.wrap.aiem-wrap > h1 .page-title-action:active { background: #135e96; border-color: #135e96; color: #fff; }
.wrap.aiem-wrap > h1 .page-title-action:focus { box-shadow: 0 0 0 1px #fff, 0 0 0 3px #2271b1; outline: 2px solid transparent; }
.aiem-back { font-size: 13px; font-weight: 400; text-decoration: none; white-space: nowrap; padding-right: 10px; border-right: 1px solid #dcdcde; }
.aiem-h1-meta { font-size: 13px; font-weight: 400; color: #6b7280; }
#aiem-process-queue-result { font-size: 13px; font-weight: 400; color: #4b5563; }

/* Section titles */
.aiem-wrap > h2, .aiem-wrap > h3,
.aiem-wrap > form > h2.title, .aiem-wrap > h2.title {
	font-size: 14px; font-weight: 600; color: #1d2327; margin: 24px 0 10px; padding: 0;
}

/* ── Cards ────────────────────────────────────────────────────────────── */
.aiem-panel, .aiem-ai-box, .aiem-editor-box, .aiem-wf-section,
.aiem-two-col > div, .aiem-col-actions, .aiem-toolbar {
	background: #fff; border: 1px solid #dcdcde; border-radius: 6px;
}
.aiem-panel, .aiem-ai-box, .aiem-editor-box { padding: 16px; margin-bottom: 16px; }
.aiem-panel h3, .aiem-ai-box h3, .aiem-editor-box h3, .aiem-two-col > div > h3 {
	margin: 0 0 14px; font-size: 14px; font-weight: 600; color: #1d2327;
	text-transform: none; letter-spacing: 0;
}
.aiem-prose h2 { font-size: 15px; margin: 22px 0 6px; }
.aiem-prose h2:first-child { margin-top: 0; }
.aiem-prose { font-size: 13px; line-height: 1.6; }

/* Toolbars (filters above tables) */
.aiem-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 16px; font-size: 13px; color: #6b7280; }
.aiem-toolbar label { color: #1d2327; font-weight: 600; }

/* Two-column pages (Audience, Workflows) */
.aiem-two-col { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.aiem-two-col > div { padding: 16px; }
.aiem-two-col .aiem-panel { border: 0; padding: 0; margin: 0; }
@media (max-width: 1100px) { .aiem-two-col { grid-template-columns: minmax(0, 1fr); } }

/* ── Tables ───────────────────────────────────────────────────────────── */
.aiem-wrap .wp-list-table {
	border: 1px solid #dcdcde; border-radius: 6px; border-spacing: 0; border-collapse: separate;
	box-shadow: none; overflow: hidden;
}
.aiem-wrap .wp-list-table thead th {
	background: #fff; border-bottom: 1px solid #dcdcde;
	font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: #6b7280;
	padding: 10px 12px;
}
.aiem-wrap .wp-list-table tbody td, .aiem-wrap .wp-list-table tbody th {
	padding: 10px 12px; vertical-align: middle; border-bottom: 1px solid #f0f0f1; font-size: 13px; box-shadow: none;
}
.aiem-wrap .wp-list-table tbody tr:last-child td { border-bottom: 0; }
.aiem-wrap .wp-list-table.striped > tbody > :nth-child(odd) { background: #fff; }
.aiem-wrap .wp-list-table tbody tr:hover { background: #faf5ff; }
.aiem-wrap .wp-list-table code { background: #f3f4f6; border-radius: 3px; }
/* Tables inside a card lose their own frame */
.aiem-panel .wp-list-table, .aiem-two-col > div .wp-list-table { border: 0; border-radius: 0; }
.aiem-panel .wp-list-table thead th:first-child, .aiem-panel .wp-list-table tbody td:first-child,
.aiem-two-col > div .wp-list-table thead th:first-child, .aiem-two-col > div .wp-list-table tbody td:first-child { padding-left: 0; }

.aiem-panel-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.aiem-panel-table th { text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: #6b7280; padding: 4px 8px 8px 0; border-bottom: 1px solid #dcdcde; }
.aiem-panel-table td { padding: 9px 8px 9px 0; border-bottom: 1px solid #f0f0f1; }
.aiem-panel-table tr:last-child td { border-bottom: 0; }

.aiem-wrap .tablenav { height: auto; margin: 12px 0; }
.aiem-pager { display: flex; align-items: center; justify-content: flex-end; gap: 4px; flex-wrap: wrap; font-size: 13px; }
.aiem-pager-count { color: #6b7280; margin-right: 8px; font-variant-numeric: tabular-nums; }
.aiem-pager-btn {
	display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; box-sizing: border-box;
	border: 1px solid #dcdcde; border-radius: 4px; background: #fff; color: #2271b1; font-size: 16px; line-height: 1; text-decoration: none;
}
a.aiem-pager-btn:hover { background: #f6f7f7; border-color: #2271b1; color: #135e96; }
a.aiem-pager-btn:focus { box-shadow: 0 0 0 2px #2271b1; outline: 2px solid transparent; }
.aiem-pager-btn.is-disabled { color: #c3c4c7; background: #f6f7f7; }
.aiem-pager-jump { display: inline-flex; align-items: center; gap: 6px; margin: 0 4px; color: #6b7280; }
.aiem-pager-jump input[type="number"] { width: 60px; min-height: 30px; text-align: center; }

/* Subscriber search */
.aiem-search-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 16px 0 8px; }
.aiem-search-bar input[type="search"] { min-height: 30px; max-width: 320px; }
.aiem-search-meta { color: #6b7280; font-size: 13px; }

/* ── Settings-style forms ─────────────────────────────────────────────── */
.aiem-wrap .form-table { margin-top: 0; }
.aiem-wrap .form-table th { font-size: 13px; font-weight: 600; color: #1d2327; padding: 14px 10px 14px 0; width: 180px; }
.aiem-wrap .form-table td { padding: 12px 10px; }
.aiem-wrap .form-table .description { font-size: 12px; color: #6b7280; }
.aiem-form-table th { width: 150px; }
/* A titled section followed by its table renders as one card */
.aiem-wrap h2.title + .form-table, .aiem-wrap h2.title + form > .form-table, .aiem-campaign-main > .form-table {
	background: #fff; border: 1px solid #dcdcde; border-radius: 6px; border-collapse: separate; border-spacing: 0; margin-bottom: 16px;
}
.aiem-wrap h2.title + .form-table th, .aiem-wrap h2.title + form > .form-table th, .aiem-campaign-main > .form-table th { padding-left: 16px; }
.aiem-wrap h2.title + .form-table tr + tr > *, .aiem-wrap h2.title + form > .form-table tr + tr > *, .aiem-campaign-main > .form-table tr + tr > * { border-top: 1px solid #f0f0f1; }
.aiem-wrap p.submit { margin: 0 0 8px; padding: 10px 14px; background: #fff; border: 1px solid #dcdcde; border-radius: 6px; position: sticky; bottom: 0; z-index: 10; }

.aiem-wf-field-label { display: block; font-size: 12px; font-weight: 600; color: #4b5563; margin-bottom: 4px; }
.aiem-required { color: #dc2626; }
.aiem-checkbox { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0; font-size: 13px; }

/* ── Badges ───────────────────────────────────────────────────────────── */
.aiem-badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; line-height: 18px; text-transform: capitalize; letter-spacing: 0; white-space: nowrap; }
.aiem-status-draft, .aiem-status-pending { background: #f3f4f6; color: #4b5563; }
.aiem-status-scheduled  { background: #dbeafe; color: #1d4ed8; }
.aiem-status-sending    { background: #ede9fe; color: #6d28d9; }
.aiem-status-sent, .aiem-status-subscribed { background: #dcfce7; color: #166534; }
.aiem-status-unsubscribed, .aiem-status-failed { background: #fee2e2; color: #991b1b; }
.aiem-status-unconfirmed { background: #fef3c7; color: #92400e; }
.aiem-status-bounced    { background: #ffedd5; color: #9a3412; }

.aiem-danger { color: #dc2626 !important; }
.aiem-danger:hover { color: #991b1b !important; }
.aiem-wf-toggle { color: #2271b1 !important; }

/* ── Stat cards ───────────────────────────────────────────────────────── */
.aiem-stat-grid, .aiem-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 0 0 16px; }
.aiem-stat-card { background: #fff; border: 1px solid #dcdcde; border-radius: 6px; padding: 14px 16px; text-align: left; position: relative; }
.aiem-stat-label { font-size: 12px; color: #6b7280; margin: 0 0 6px; text-transform: none; letter-spacing: 0; }
.aiem-stat-value { font-size: 24px; font-weight: 600; color: #1d2327; line-height: 1.1; }
.aiem-stat-card { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.aiem-stat-icon { position: absolute; top: 12px; right: 12px; color: #a78bfa; }
.aiem-stat-icon .dashicons { font-size: 18px; width: 18px; height: 18px; }

/* ── Dashboard ────────────────────────────────────────────────────────── */
.aiem-dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
@media (max-width: 960px) { .aiem-dashboard-grid { grid-template-columns: 1fr; } }
.aiem-bar-chart { display: flex; align-items: flex-end; gap: 4px; height: 130px; padding: 0 2px; }
.aiem-bar-col   { display: flex; flex-direction: column; align-items: center; flex: 1; height: 100%; justify-content: flex-end; min-width: 0; }
.aiem-bar-tip   { font-size: 10px; color: #6b7280; margin-bottom: 2px; min-height: 14px; }
.aiem-bar       { width: 100%; background: #7c3aed; border-radius: 2px 2px 0 0; min-height: 2px; transition: height .3s; }
.aiem-bar-label { font-size: 10px; color: #9ca3af; margin-top: 4px; white-space: nowrap; }

/* ── Campaign editor ──────────────────────────────────────────────────── */
.aiem-campaign-editor { display: flex; gap: 16px; }
.aiem-campaign-main   { flex: 1; min-width: 0; max-width: 980px; }
.aiem-html-editor { font-family: monospace; font-size: 12px; line-height: 1.5; }
#aiem-generate-status { font-size: 13px; color: #6b7280; margin-left: 8px; }
.aiem-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #d1d5db; border-top-color: #7c3aed; border-radius: 50%; animation: aiem-spin .6s linear infinite; vertical-align: middle; margin-left: 8px; }
@keyframes aiem-spin { to { transform: rotate(360deg); } }
.aiem-action-bar {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
	background: #fff; border: 1px solid #dcdcde; border-radius: 6px; padding: 10px 14px; margin-bottom: 8px;
	position: sticky; bottom: 0; z-index: 10;
}
.aiem-schedule-wrap { display: flex; align-items: center; gap: 6px; margin-left: auto; }
#aiem-action-result { font-size: 13px; padding: 4px 2px; min-height: 20px; }

/* ── Audience ─────────────────────────────────────────────────────────── */
.aiem-row { display: block; margin-bottom: 16px; }
.aiem-col-actions { display: flex; flex-direction: row; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding: 10px 14px; font-size: 13px; }
#aiem-import-box, #aiem-add-subscriber-box { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#aiem-add-subscriber-box form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#aiem-import-result { font-size: 13px; color: #166534; }
.aiem-bulk-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }

/* ── Workflows ────────────────────────────────────────────────────────── */
.aiem-wf-section { margin-bottom: 10px; }
.aiem-wf-section-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid #dcdcde; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: #6b7280; }
.aiem-wf-section-body { padding: 14px; }
.aiem-wf-action-row { border: 0; padding: 0; background: none; }
.aiem-wf-action-label { font-size: 13px; font-weight: 600; color: #1d2327; margin-bottom: 12px; }
.aiem-wf-action-fields { padding-top: 0; }

/* ── Form builder ─────────────────────────────────────────────────────── */
.aiem-field-placeholder-wrap { display: inline-flex; align-items: center; gap: 6px; }

/* Focus + accent */
.aiem-wrap input[type="text"]:focus, .aiem-wrap input[type="email"]:focus, .aiem-wrap input[type="url"]:focus,
.aiem-wrap input[type="number"]:focus, .aiem-wrap input[type="password"]:focus, .aiem-wrap select:focus, .aiem-wrap textarea:focus {
	border-color: #7c3aed; box-shadow: 0 0 0 1px #7c3aed;
}

/* ── Dashboard: range, KPI cards, chart, bars, donut ──────────────────── */
.aiem-range { display: inline-flex; margin-left: auto; border: 1px solid #dcdcde; border-radius: 5px; overflow: hidden; font-size: 13px; font-weight: 400; }
.aiem-range a { padding: 5px 12px; text-decoration: none; color: #4b5563; border-right: 1px solid #dcdcde; background: #fff; }
.aiem-range a:last-child { border-right: 0; }
.aiem-range a:hover { background: #f6f7f7; color: #1d2327; }
.aiem-range a.is-on { background: #1d2327; color: #fff; font-weight: 600; }

.aiem-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 1280px) { .aiem-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 782px)  { .aiem-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.aiem-kpi { background: #fff; border: 1px solid #dcdcde; border-radius: 6px; padding: 14px 16px; }
.aiem-kpi-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.aiem-kpi-label { font-size: 13px; color: #1d2327; white-space: nowrap; }
.aiem-kpi-label .dashicons { font-size: 14px; width: 14px; height: 14px; color: #9ca3af; vertical-align: -2px; cursor: help; }
.aiem-kpi-period { font-size: 11px; color: #6b7280; white-space: nowrap; }
.aiem-kpi-key { display: block; width: 20px; height: 4px; border-radius: 2px; margin: 8px 0 12px; }
.aiem-kpi-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.aiem-kpi-value { font-size: 26px; font-weight: 600; line-height: 1.1; color: #1d2327; font-variant-numeric: tabular-nums; }
.aiem-trend { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px 2px 4px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.aiem-trend .dashicons { font-size: 14px; width: 14px; height: 14px; }
.aiem-trend.is-good { background: #dcfce7; color: #166534; }
.aiem-trend.is-bad  { background: #fee2e2; color: #991b1b; }
.aiem-trend.is-flat { background: #f3f4f6; color: #4b5563; }

.aiem-card-head, .aiem-chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.aiem-card-head h3, .aiem-chart-head h3 { margin: 0; }
.aiem-card-head > span, .aiem-card-head > a { font-size: 12px; color: #6b7280; }
.aiem-card-head > a { text-decoration: none; color: #2271b1; }
.aiem-dash-empty { color: #6b7280; font-size: 13px; margin: 8px 0; }
.aiem-muted { color: #6b7280; font-size: 12px; }

.aiem-legend { display: flex; gap: 4px 6px; flex-wrap: wrap; }
.aiem-legend-item { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid transparent; border-radius: 12px; padding: 2px 8px; font-size: 13px; color: #1d2327; cursor: pointer; }
.aiem-legend-item:hover { background: #f6f7f7; }
.aiem-legend-item:focus-visible { outline: 2px solid #7c3aed; outline-offset: 1px; }
.aiem-legend-key { width: 14px; height: 3px; border-radius: 2px; flex: none; }
.aiem-legend-item.is-off { color: #9ca3af; text-decoration: line-through; }
.aiem-legend-item.is-off .aiem-legend-key { opacity: .3; }

.aiem-chart { position: relative; height: 300px; outline: none; cursor: crosshair; }
.aiem-chart:focus-visible { box-shadow: 0 0 0 2px #7c3aed; border-radius: 4px; }
.aiem-chart svg { display: block; }
.aiem-grid { stroke: #f0f0f1; stroke-width: 1; }
.aiem-axis { fill: #6b7280; font-size: 11px; font-family: inherit; }
.aiem-crosshair { stroke: #9ca3af; stroke-width: 1; }
.aiem-chart-readout, .aiem-tip {
	display: none; position: absolute; z-index: 30; pointer-events: none;
	background: #1d2327; color: #fff; border-radius: 6px; padding: 8px 10px; font-size: 12px; line-height: 1.5; white-space: nowrap;
}
.aiem-readout-date { color: #c3c4c7; margin-bottom: 4px; }
.aiem-readout-row { display: flex; align-items: center; gap: 6px; }
.aiem-readout-row strong { font-weight: 600; min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.aiem-readout-row span:last-child { color: #c3c4c7; }
.aiem-readout-key { width: 10px; height: 3px; border-radius: 2px; flex: none; }
.aiem-tip { position: fixed; z-index: 100000; }
.aiem-tip strong { display: block; font-size: 13px; }
.aiem-tip span { color: #c3c4c7; }
.aiem-chart-table { margin-top: 8px; font-size: 12px; }
.aiem-chart-table summary { cursor: pointer; color: #2271b1; width: max-content; }
.aiem-chart-table table { margin-top: 8px; max-width: 720px; }
.aiem-chart-table td, .aiem-chart-table th { font-variant-numeric: tabular-nums; }

.aiem-dash-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1280px) { .aiem-dash-row { grid-template-columns: minmax(0, 1fr); } }
.aiem-hbars { display: grid; gap: 14px; }
.aiem-hbar { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; outline: none; }
.aiem-hbar-name { color: #1d2327; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aiem-hbar-track { display: block; height: 22px; background: #f3f4f6; border-radius: 0 4px 4px 0; }
.aiem-hbar-fill { display: block; height: 100%; background: #6250d6; border-radius: 0 4px 4px 0; min-width: 3px; }
.aiem-hbar:hover .aiem-hbar-fill, .aiem-hbar:focus .aiem-hbar-fill { background: #4f3fc0; }
.aiem-hbar-val { font-weight: 600; color: #1d2327; min-width: 28px; text-align: right; font-variant-numeric: tabular-nums; }

.aiem-donut-wrap { display: flex; align-items: center; gap: 20px; }
.aiem-donut { position: relative; width: 150px; height: 150px; flex: none; }
.aiem-donut svg { width: 100%; height: 100%; transform: rotate(0deg); }
.aiem-donut-seg { outline: none; cursor: default; transition: stroke-width .12s; }
.aiem-donut-seg:hover, .aiem-donut-seg:focus { stroke-width: 6; }
.aiem-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.aiem-donut-center strong { font-size: 22px; font-weight: 600; line-height: 1.1; color: #1d2327; }
.aiem-donut-center span { font-size: 11px; color: #6b7280; }
.aiem-donut-stats { margin: 0; display: grid; gap: 10px; min-width: 0; flex: 1; }
.aiem-donut-stats dt { font-size: 12px; color: #6b7280; }
.aiem-donut-stats dd { margin: 0; font-size: 18px; font-weight: 600; color: #1d2327; }
.aiem-donut-stats dd.is-text { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aiem-donut-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 14px 0 0; font-size: 12px; color: #4b5563; }
.aiem-donut-legend li { margin: 0; display: inline-flex; align-items: center; gap: 5px; }
.aiem-donut-legend strong { color: #1d2327; }
.aiem-swatch { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.aiem-dash .aiem-dashboard-grid { margin-top: 0; }

/* ── Frontend subscribe form ── */
.aiem-subscribe-form { max-width: 500px; }
.aiem-field-row {
	display: flex;
	gap: 8px;
	margin-bottom: 8px;
	flex-wrap: wrap;
}
.aiem-input {
	flex: 1;
	min-width: 0;
	padding: 10px 14px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	outline: none;
	transition: border-color 0.15s;
}
.aiem-input:focus { border-color: #7c3aed; }
.aiem-btn {
	padding: 10px 20px;
	background: linear-gradient(135deg, #7c3aed, #ec4899);
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: opacity 0.15s;
}
.aiem-btn:hover { opacity: 0.9; }
.aiem-btn:disabled { opacity: 0.6; cursor: wait; }
.aiem-form-message {
	padding: 8px 12px;
	border-radius: 6px;
	font-size: 13px;
	margin-top: 4px;
}
.aiem-form-message.success { background: #dcfce7; color: #166534; }
.aiem-form-message.error   { background: #fee2e2; color: #991b1b; }

/* ── Frontend form extras ── */
.aiem-form-title       { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.aiem-form-description { margin: 0 0 12px; font-size: 14px; color: #6b7280; }
.aiem-gdpr-row         { margin-bottom: 8px; }
.aiem-gdpr-label       { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: #374151; cursor: pointer; }
.aiem-gdpr-label input { margin-top: 2px; flex-shrink: 0; }

/* Settings → Sending: pace estimate */
.aiem-pace { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 10px 14px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; max-width: 640px; }
.aiem-pace-item { display: flex; flex-direction: column; min-width: 120px; }
.aiem-pace-item strong { font-size: 16px; color: #1d2327; font-variant-numeric: tabular-nums; }
.aiem-pace-item span { font-size: 12px; color: #6b7280; }
.aiem-pace-note { flex-basis: 100%; font-size: 12px; color: #6b7280; }
