/*
 * AltSofts — Svetli i tamni režim + stilizacija prekidača
 */

:root {
	color-scheme: light;
}

:root[data-theme="dark"] {
	color-scheme: dark;
	--wp--preset--color--base: #0B1120;
	--wp--preset--color--surface: #151F32;
	--wp--preset--color--contrast: #F8FAFC;
	--wp--preset--color--muted: #94A3B8;
	--wp--preset--color--border: #283548;
	--wp--preset--color--primary: #60A5FA;
	--wp--preset--color--primary-contrast: #0B1120;
	--wp--preset--color--accent: #34D399;
}

/* Prekidač svetlog i tamnog režima u zaglavlju */
.altsofts-theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.altsofts-theme-toggle:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

.altsofts-theme-toggle:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

.altsofts-theme-toggle svg {
	width: 1.125rem;
	height: 1.125rem;
	flex-shrink: 0;
}

/* Prikaz ikonice Meseca u svetlom režimu i Sunca u tamnom režimu */
.altsofts-theme-toggle .altsofts-icon-sun {
	display: none;
}

.altsofts-theme-toggle .altsofts-icon-moon {
	display: block;
}

:root[data-theme="dark"] .altsofts-theme-toggle .altsofts-icon-sun {
	display: block;
}

:root[data-theme="dark"] .altsofts-theme-toggle .altsofts-icon-moon {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.altsofts-theme-toggle {
		transition: none;
	}
}
