/* Favicon Generator — scoped under .aah-tool via the shared wrapper. */

.aah-favicon__drop {
	border: 2px dashed var(--aah-border);
	border-radius: 8px;
	padding: 2rem 1rem;
	text-align: center;
	cursor: pointer;
	background: var(--aah-bg-soft);
}

.aah-favicon__drop:hover,
.aah-favicon__drop:focus-visible,
.aah-favicon__drop--over {
	border-color: var(--aah-crimson);
	outline: none;
}

.aah-favicon__drop-text {
	font-size: 1.1em;
	font-weight: 700;
	margin: 0 0 0.4rem;
}

.aah-favicon__error {
	color: var(--aah-crimson-dark);
	font-weight: 600;
}

.aah-favicon__error:empty {
	display: none;
}

.aah-favicon__warning {
	color: #8a6d00;
	font-weight: 600;
}

.aah-favicon__warning:empty {
	display: none;
}

.aah-favicon__label {
	font-weight: 700;
}

.aah-favicon__source img {
	max-width: 160px;
	max-height: 160px;
	border: 1px solid var(--aah-border);
	border-radius: 6px;
	/* Checkerboard so transparency is visible. */
	background-image:
		linear-gradient(45deg, #cccccc 25%, transparent 25%),
		linear-gradient(-45deg, #cccccc 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #cccccc 75%),
		linear-gradient(-45deg, transparent 75%, #cccccc 75%);
	background-size: 16px 16px;
	background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.aah-favicon__settings {
	margin-top: 1rem;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 2rem;
	align-items: flex-start;
}

.aah-favicon__group {
	margin: 0;
	padding: 0.75rem 1rem 1rem;
	border: 1px solid var(--aah-border);
	border-radius: 6px;
}

.aah-favicon__group legend {
	font-weight: 700;
	padding: 0 0.4rem;
}

.aah-favicon__check {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0.25rem 0;
	font-weight: 400;
}

.aah-favicon__check input {
	width: auto;
	margin: 0;
	accent-color: var(--aah-crimson);
}

.aah-favicon__field input[type="color"] {
	width: 64px;
	height: 44px;
	padding: 2px;
	border: 1px solid var(--aah-border);
	border-radius: 6px;
	background: var(--aah-bg);
	cursor: pointer;
}

.aah-favicon__results {
	margin-top: 1.25rem;
}

.aah-favicon__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 0.75rem;
}

.aah-favicon__cell {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
	padding: 0.75rem 0.5rem;
	border: 1px solid var(--aah-border);
	border-radius: 6px;
	text-align: center;
	background: var(--aah-bg);
}

.aah-favicon__cell img {
	/* Checkerboard so transparency is visible. */
	background-image:
		linear-gradient(45deg, #cccccc 25%, transparent 25%),
		linear-gradient(-45deg, #cccccc 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #cccccc 75%),
		linear-gradient(-45deg, transparent 75%, #cccccc 75%);
	background-size: 12px 12px;
	background-position: 0 0, 0 6px, 6px -6px, -6px 0;
	border: 1px solid var(--aah-border);
	border-radius: 4px;
}

.aah-favicon__cell a {
	text-decoration: none;
}

.aah-favicon__actions {
	margin-top: 1rem;
}

.aah-favicon__code {
	margin-top: 1.25rem;
}

.aah-favicon__code textarea {
	width: 100%;
	min-height: 150px;
	resize: vertical;
	font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
	font-size: 0.9em;
	line-height: 1.5;
}

.aah-favicon__status {
	color: var(--aah-muted);
	font-weight: 600;
}

.aah-favicon__status:empty {
	display: none;
}
