/**
 * Airabot Chatbot — admin settings screen.
 *
 * Design tokens mirror the Airabot admin panel (admin/index.html :root) so the
 * plugin feels like part of the same product: Sora type, #4F6EF7 primary, the
 * indigo→violet accent gradient, 16px/12px radii and the layered shadow scale.
 */

/**
 * Sora ships with the plugin rather than loading from Google Fonts: a
 * third-party font request from wp-admin sends every administrator's IP to
 * Google, which is both a privacy problem for site owners in the EU and
 * grounds for rejection from the WordPress.org directory.
 *
 * This is the variable font (weights 100-800 in one 25KB file), licensed
 * under the SIL Open Font License 1.1 — see assets/fonts/LICENSE.txt.
 */
@font-face {
	font-family: 'Sora';
	font-style: normal;
	font-weight: 100 800;
	font-display: swap;
	src: url('fonts/sora-variable.woff2') format('woff2');
}

.airabot-wrap {
	--ab-p: #4F6EF7;
	--ab-pd: #3B5BDB;
	--ab-pl: rgba(79, 110, 247, .1);
	--ab-ok: #10B981;
	--ab-warn: #F59E0B;
	--ab-err: #EF4444;
	--ab-bg: #F5F7FA;
	--ab-surf: #FFFFFF;
	--ab-surf2: #EEF0F5;
	--ab-bdr: rgba(0, 0, 0, .08);
	--ab-bdr2: rgba(0, 0, 0, .14);
	--ab-t1: #1A1A2E;
	--ab-t2: #4A4A68;
	--ab-t3: #8A8AA3;
	--ab-r: 16px;
	--ab-r2: 12px;
	--ab-sh: 0 1px 3px rgba(0, 0, 0, .07), 0 1px 2px rgba(0, 0, 0, .05);
	--ab-sh2: 0 4px 16px rgba(0, 0, 0, .09), 0 2px 6px rgba(0, 0, 0, .05);
	--ab-accentg: linear-gradient(135deg, #4F6EF7, #7C53F4);

	max-width: 820px;
	margin-right: 20px;
	font-family: 'Sora', ui-sans-serif, system-ui, -apple-system, sans-serif;
	color: var(--ab-t1);
}

/* Header */

.airabot-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: inherit;
	font-weight: 700;
	color: var(--ab-t1);
	margin-bottom: 4px;
}

.airabot-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: var(--ab-r2);
	background: var(--ab-accentg);
	color: #fff;
	font-size: 17px;
	line-height: 1;
	box-shadow: 0 4px 12px rgba(79, 110, 247, .28);
}

/* Cards */

.airabot-card {
	background: var(--ab-surf);
	border: 1px solid var(--ab-bdr);
	border-radius: var(--ab-r);
	box-shadow: var(--ab-sh);
	padding: 22px 26px;
	margin: 18px 0;
}

.airabot-card h2 {
	margin: 0 0 6px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	color: var(--ab-t1);
	padding: 0;
}

.airabot-card-login {
	max-width: 640px;
}

.airabot-muted {
	color: var(--ab-t3);
}

.airabot-small {
	font-size: 12px;
}

.airabot-wrap p {
	font-size: 13px;
	line-height: 1.6;
}

/* Account bar */

.airabot-account {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	background: var(--ab-surf);
	border: 1px solid var(--ab-bdr);
	border-left: 3px solid var(--ab-ok);
	border-radius: var(--ab-r2);
	box-shadow: var(--ab-sh);
	padding: 14px 18px;
	margin: 18px 0;
	font-size: 13px;
	color: var(--ab-t2);
}

.airabot-account form {
	margin: 0;
}

/* Form controls */

.airabot-wrap .form-table th {
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	color: var(--ab-t2);
	letter-spacing: .01em;
}

.airabot-select {
	border: 1.5px solid var(--ab-bdr2);
	border-radius: 10px;
	padding: 10px 13px;
	font-size: 13px;
	font-family: inherit;
	color: var(--ab-t1);
	background: var(--ab-surf);
	outline: none;
	box-shadow: none;
	transition: border-color .2s, box-shadow .2s;
}

.airabot-select:focus {
	border-color: var(--ab-p);
	box-shadow: 0 0 0 3px var(--ab-pl);
}

.airabot-select {
	width: 100%;
	max-width: 440px;
	height: auto;
}

/* Primary button — matches the admin panel's .btn-p */

.airabot-wrap .button-primary {
	background: var(--ab-accentg);
	border: none;
	border-radius: 10px;
	padding: 9px 20px;
	height: auto;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	color: #fff;
	text-shadow: none;
	box-shadow: 0 4px 12px rgba(79, 110, 247, .28);
	transition: opacity .2s, transform .15s;
}

.airabot-wrap .button-primary:hover,
.airabot-wrap .button-primary:focus {
	background: var(--ab-accentg);
	opacity: .92;
	transform: translateY(-1px);
	color: #fff;
	box-shadow: 0 4px 12px rgba(79, 110, 247, .28);
}

.airabot-wrap .button-secondary {
	border-radius: 9px;
	border: 1.5px solid var(--ab-bdr2);
	background: var(--ab-surf);
	color: var(--ab-t2);
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	height: auto;
	padding: 6px 14px;
}

.airabot-wrap .button-secondary:hover {
	border-color: var(--ab-p);
	color: var(--ab-p);
	background: var(--ab-pl);
}

/* What a connected site can and cannot do, shown before connecting */

.airabot-perms {
	list-style: none;
	margin: 16px 0 22px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.airabot-perms li {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--ab-t2);
}

.airabot-perm-yes,
.airabot-perm-no {
	flex-shrink: 0;
	font-weight: 700;
	line-height: 1.45;
}

.airabot-perm-yes {
	color: var(--ab-ok);
}

.airabot-perm-no {
	color: var(--ab-t3);
}

/* Widget type cards */

.airabot-types {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
	gap: 14px;
	margin-top: 14px;
}

.airabot-type {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	border: 1.5px solid var(--ab-bdr);
	border-radius: var(--ab-r2);
	padding: 16px 18px;
	cursor: pointer;
	background: var(--ab-surf);
	transition: border-color .2s, background .2s, box-shadow .2s, transform .15s;
}

.airabot-type:hover {
	border-color: var(--ab-p);
	transform: translateY(-1px);
	box-shadow: var(--ab-sh2);
}

.airabot-type.is-selected {
	border-color: var(--ab-p);
	background: var(--ab-pl);
	box-shadow: 0 0 0 3px var(--ab-pl);
}

.airabot-type input[type="radio"] {
	margin: 2px 0 0;
	accent-color: var(--ab-p);
}

.airabot-type input[type="radio"]:checked::before {
	background-color: var(--ab-p);
}

.airabot-type-icon {
	font-size: 22px;
	line-height: 1.1;
}

.airabot-type-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.airabot-type-body strong {
	font-size: 13px;
	font-weight: 700;
	color: var(--ab-t1);
}

.airabot-type-body span {
	font-size: 12px;
	line-height: 1.5;
	color: var(--ab-t3);
}

/* Toggle */

.airabot-toggle {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ab-t1);
	margin-top: 4px;
}

.airabot-toggle input[type="checkbox"] {
	accent-color: var(--ab-p);
}

/* Embed preview — mirrors the admin panel's .copy-box */

.airabot-card-preview {
	background: var(--ab-bg);
}

.airabot-code {
	display: block;
	margin-top: 10px;
	padding: 13px 15px;
	background: #1A1A2E;
	color: #A7F3D0;
	border-radius: 10px;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
	line-height: 1.6;
	word-break: break-all;
	white-space: pre-wrap;
}

/* Notices — soften WP's default square corners to match the cards */

.airabot-wrap .notice {
	border-radius: 10px;
	box-shadow: var(--ab-sh);
	margin: 16px 0;
	font-size: 13px;
}
