.geg-app {
	font-family: var(--wp--preset--font-family--body, inherit);
	color: var(--wp--preset--color--contrast, #111827);
}

.geg-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 18px;
	box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
	padding: clamp(1.5rem, 3vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
	.geg-card {
		background: #0f172a;
		border-color: rgba(148, 163, 184, 0.3);
		box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
	}

	.geg-app {
		color: #e2e8f0;
	}

	.geg-card textarea,
	.geg-card input {
		background: rgba(15, 23, 42, 0.6);
		border-color: rgba(148, 163, 184, 0.4);
		color: #f8fafc;
	}
}

.geg-card__header {
	margin-bottom: 1.25rem;
}

.geg-title {
	font-size: clamp(1.5rem, 3vw, 2.2rem);
	margin: 0 0 0.5rem;
}

.geg-intro {
	margin: 0;
	font-size: 1rem;
	color: #475569;
}

.geg-form {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.geg-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.geg-field textarea,
.geg-field input {
	width: 100%;
	border-radius: 12px;
	border: 1px solid #cbd5f5;
	padding: 0.85rem 1rem;
	font-size: 1rem;
	font-family: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.geg-field textarea:focus,
.geg-field input:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.geg-help {
	font-size: 0.875rem;
	color: #64748b;
	margin: 0;
}

.geg-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.25rem;
}

.geg-toggle {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	font-size: 0.95rem;
}

.geg-toggle input {
	width: auto;
	accent-color: #2563eb;
}

.geg-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

.geg-button {
	border: none;
	border-radius: 999px;
	font-size: 0.95rem;
	font-weight: 600;
	padding: 0.75rem 1.75rem;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.geg-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.geg-button--primary {
	background: linear-gradient(135deg, #2563eb, #7c3aed);
	color: #fff;
	box-shadow: 0 15px 25px rgba(79, 70, 229, 0.35);
}

.geg-button--primary:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 20px 30px rgba(79, 70, 229, 0.4);
}

.geg-button--ghost {
	background: rgba(15, 23, 42, 0.05);
	color: inherit;
}

.geg-button--ghost:hover:not(:disabled) {
	background: rgba(37, 99, 235, 0.12);
}

.geg-alert {
	margin-top: 1rem;
	border-radius: 12px;
	padding: 0.85rem 1.1rem;
	background: rgba(37, 99, 235, 0.08);
	color: #0f172a;
	font-weight: 500;
}

.geg-alert.is-error {
	background: rgba(239, 68, 68, 0.12);
	color: #7f1d1d;
}

.geg-toolbar {
	margin-top: 1.25rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.geg-results {
	margin-top: 1.25rem;
	display: grid;
	gap: 1rem;
}

.geg-results__set {
	border: 1px solid #cbd5f5;
	border-radius: 14px;
	padding: 1rem;
	background: rgba(248, 250, 252, 0.8);
}

.geg-results__set-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-weight: 600;
	margin: 0 0 0.75rem;
	color: #0f172a;
}

.geg-results__badge {
	font-size: 0.8rem;
	padding: 0.15rem 0.65rem;
	border-radius: 999px;
	background: rgba(37, 99, 235, 0.1);
	color: #1d4ed8;
}

.geg-pair {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 0.5rem;
	padding: 0.65rem 0.35rem;
	border-top: 1px dashed rgba(148, 163, 184, 0.65);
	align-items: center;
}

.geg-pair:first-of-type {
	border-top: none;
}

.geg-name {
	font-weight: 600;
	display: flex;
	flex-direction: column;
}

.geg-name small {
	font-weight: 400;
	color: #475569;
}

.geg-arrow {
	text-align: center;
	font-size: 0.95rem;
	color: #94a3b8;
}

.geg-block-controls {
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 1rem;
	background: rgba(248, 250, 252, 0.8);
	margin-bottom: 1rem;
	display: grid;
	gap: 0.75rem;
}

.geg-block-placeholder {
	border: 1px dashed #cbd5f5;
	border-radius: 12px;
	padding: 0.75rem 1rem;
	font-style: italic;
	color: #475569;
}

@media (max-width: 600px) {
	.geg-card {
		padding: 1.5rem;
	}

	.geg-pair {
		grid-template-columns: 1fr;
	}

	.geg-arrow {
		display: none;
	}
}
