/* Aetheris AI Chat — admin styles. Scoped to .aetheris-wrap so we don't bleed
   into core WP admin styling.

   Palette mirrors dashboard/tailwind.config.js so the in-WP admin matches
   the marketing site and the SaaS dashboard:
     ink     #1a1814   primary type, brand mark outer ring, links on hover
     ink-2   #3a342c   secondary type
     copper  #b8693d   accents, primary buttons, brand mark inner dot
     paper   #faf8f5   page background tint
     mist    #ece6dc   inset card backgrounds
     edge    #d2c8bc   hairline borders
     sage    #5a7d5a   success state (status dot, "saved" notice)
     rose    #b94a4a   danger / inactive states
*/

.aetheris-wrap {
	--aetheris-ink: #1a1814;
	--aetheris-ink-2: #3a342c;
	--aetheris-paper: #faf8f5;
	--aetheris-mist: #ece6dc;
	--aetheris-edge: #d2c8bc;
	--aetheris-copper: #b8693d;
	--aetheris-copper-dim: #a15d36;
	--aetheris-copper-soft: #f7e9dd;
	--aetheris-sage: #5a7d5a;
	--aetheris-rose: #b94a4a;

	max-width: 1180px;
	color: var(--aetheris-ink);
}

/* ── Header ──────────────────────────────────────────────────── */

.aetheris-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--aetheris-edge);
	margin: 1rem 0 1.5rem;
}

.aetheris-mark {
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	display: inline-flex;
	filter: drop-shadow(0 1px 2px rgba(26, 24, 20, 0.18));
}

.aetheris-mark svg {
	width: 100%;
	height: 100%;
	display: block;
}

.aetheris-title-block {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.aetheris-wrap .aetheris-title {
	font-weight: 600;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.5rem;
	line-height: 1.1;
	color: var(--aetheris-ink);
	margin: 0;
}

.aetheris-wrap .aetheris-title-eyebrow {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
	font-size: 0.6rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--aetheris-ink-2);
	opacity: 0.65;
}

.aetheris-wrap .aetheris-title .copper-dot {
	color: var(--aetheris-copper);
}

.aetheris-wrap .aetheris-version {
	font-size: 0.7rem;
	color: var(--aetheris-ink-2);
	background: var(--aetheris-copper-soft);
	padding: 2px 8px;
	border-radius: 999px;
	font-weight: 500;
	font-family: ui-monospace, "SF Mono", Menlo, monospace;
	letter-spacing: 0;
	margin-left: auto;
}

/* ── Layout ──────────────────────────────────────────────────── */

.aetheris-grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
	gap: 1.25rem;
	align-items: flex-start;
}

@media (max-width: 960px) {
	.aetheris-grid {
		grid-template-columns: 1fr;
	}
}

.aetheris-card {
	background: #fff;
	border: 1px solid var(--aetheris-edge);
	border-radius: 8px;
	padding: 1.25rem 1.5rem;
	margin-bottom: 1.25rem;
	box-shadow: 0 1px 0 rgba(26, 24, 20, 0.02);
}

.aetheris-card h2 {
	margin-top: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.05rem;
	color: var(--aetheris-ink);
	border-bottom: 1px solid var(--aetheris-edge);
	padding-bottom: 0.5rem;
	margin-bottom: 1rem;
	font-weight: 600;
}

.aetheris-card h3 {
	margin-top: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 0.95rem;
	color: var(--aetheris-ink);
	font-weight: 600;
}

/* ── Forms ───────────────────────────────────────────────────── */

.aetheris-form .form-table th {
	width: 180px;
	padding-left: 0;
	color: var(--aetheris-ink);
	font-weight: 500;
}

.aetheris-form input[type="text"],
.aetheris-form input[type="url"],
.aetheris-form input[type="password"],
.aetheris-form input[type="email"],
.aetheris-form select {
	min-width: 320px;
	max-width: 100%;
	border-color: var(--aetheris-edge);
}

.aetheris-form input[type="text"]:focus,
.aetheris-form input[type="url"]:focus,
.aetheris-form input[type="password"]:focus,
.aetheris-form input[type="email"]:focus,
.aetheris-form select:focus {
	border-color: var(--aetheris-copper);
	box-shadow: 0 0 0 1px var(--aetheris-copper);
	outline: none;
}

/* WP-default primary button — re-skinned in copper */
.aetheris-wrap .button-primary,
.aetheris-wrap input[type="submit"].button-primary {
	background: var(--aetheris-copper);
	border-color: var(--aetheris-copper-dim);
	color: var(--aetheris-paper);
	text-shadow: none;
	box-shadow: none;
}

.aetheris-wrap .button-primary:hover,
.aetheris-wrap input[type="submit"].button-primary:hover {
	background: var(--aetheris-copper-dim);
	border-color: var(--aetheris-copper-dim);
	color: var(--aetheris-paper);
}

.aetheris-wrap .button-primary:focus,
.aetheris-wrap input[type="submit"].button-primary:focus {
	background: var(--aetheris-copper-dim);
	border-color: var(--aetheris-copper-dim);
	box-shadow: 0 0 0 1px var(--aetheris-copper);
}

/* ── Snippet block ───────────────────────────────────────────── */

.aetheris-snippet {
	background: var(--aetheris-ink);
	color: var(--aetheris-paper);
	padding: 0.75rem 1rem;
	border-radius: 6px;
	overflow-x: auto;
	font-size: 12px;
	line-height: 1.5;
	font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.aetheris-snippet code {
	background: transparent;
	color: inherit;
	padding: 0;
}

.aetheris-help {
	margin-left: 0.75rem;
	color: var(--aetheris-ink-2);
	opacity: 0.8;
	font-size: 0.85rem;
}

/* ── Toggle switch ──────────────────────────────────────────── */

.aetheris-switch {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 22px;
	vertical-align: middle;
}

.aetheris-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.aetheris-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background: var(--aetheris-edge);
	border-radius: 999px;
	transition: background 0.2s ease;
}

.aetheris-slider::before {
	content: "";
	position: absolute;
	height: 16px;
	width: 16px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s ease;
	box-shadow: 0 1px 2px rgba(26, 24, 20, 0.2);
}

.aetheris-switch input:checked + .aetheris-slider {
	background: var(--aetheris-copper);
}

.aetheris-switch input:checked + .aetheris-slider::before {
	transform: translateX(20px);
}

/* ── Status sidebar ─────────────────────────────────────────── */

.aetheris-status-card .aetheris-status {
	margin: 0;
	padding: 0;
	list-style: none;
}

.aetheris-status li {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.4rem 0;
	color: var(--aetheris-ink);
	font-size: 0.9rem;
}

.aetheris-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--aetheris-rose);
	display: inline-block;
}

.aetheris-dot.on {
	background: var(--aetheris-sage);
}

/* ── Stat cards ─────────────────────────────────────────────── */

.aetheris-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.aetheris-stat {
	background: #fff;
	border: 1px solid var(--aetheris-edge);
	border-radius: 8px;
	padding: 1rem 1.25rem;
	position: relative;
	overflow: hidden;
}

.aetheris-stat::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 3px;
	height: 100%;
	background: var(--aetheris-copper);
}

.aetheris-stat-value {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.85rem;
	font-weight: 700;
	color: var(--aetheris-ink);
	line-height: 1.1;
}

.aetheris-stat-label {
	margin-top: 0.4rem;
	color: var(--aetheris-ink-2);
	opacity: 0.7;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-weight: 600;
}

/* ── Steps list (Help page) ─────────────────────────────────── */

.aetheris-steps {
	margin: 0;
	padding-left: 0;
	list-style: none;
	counter-reset: aetheris-step;
}

.aetheris-steps > li {
	counter-increment: aetheris-step;
	position: relative;
	padding-left: 3rem;
	margin-bottom: 1.25rem;
}

.aetheris-steps > li::before {
	content: counter(aetheris-step, decimal-leading-zero);
	position: absolute;
	left: 0;
	top: 0.05rem;
	font-family: ui-monospace, "SF Mono", Menlo, monospace;
	font-size: 0.75rem;
	color: var(--aetheris-copper);
	font-weight: 600;
}

.aetheris-steps strong {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--aetheris-ink);
}

.aetheris-steps li p {
	margin: 0.4rem 0 0;
	color: var(--aetheris-ink-2);
	line-height: 1.55;
}

.aetheris-list {
	margin: 0.5rem 0 0;
	padding-left: 1.25rem;
	color: var(--aetheris-ink-2);
}

.aetheris-list li {
	margin-bottom: 0.4rem;
	line-height: 1.55;
}

.aetheris-tip {
	background: var(--aetheris-copper-soft);
	border-color: rgba(184, 105, 61, 0.35);
}

.aetheris-tip h3 {
	color: var(--aetheris-copper-dim);
}

.aetheris-advanced summary {
	cursor: pointer;
	padding: 0.5rem 0;
	font-weight: 600;
	color: var(--aetheris-copper);
}

.aetheris-table {
	margin-top: 0.5rem;
}

.button-link.aetheris-toggle-visibility {
	margin-left: 0.5rem;
	font-size: 0.85rem;
	color: var(--aetheris-copper);
}

.button-link.aetheris-toggle-visibility:hover {
	color: var(--aetheris-copper-dim);
}

/* ── Notices (admin_notices integration) ─────────────────────── */

.aetheris-wrap .notice {
	border-left-width: 3px;
}

.aetheris-wrap .notice-success {
	border-left-color: var(--aetheris-sage);
}

.aetheris-wrap .notice-error {
	border-left-color: var(--aetheris-rose);
}

.aetheris-wrap .notice-warning {
	border-left-color: var(--aetheris-copper);
}
