/* Shared by the site's own pages: the loading screen between pages (for pages
   without their own) and the PREFS dialog. See public/js/effects.js. */

#fx-loading {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: #000;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s;
}

#fx-loading.show {
	opacity: 1;
	pointer-events: auto;
}

#fx-loading .fx-text {
	position: fixed;
	right: 72px;
	bottom: 28px;
	color: #fff;
	font-family: "Silkscreen", monospace;
	font-size: 18px;
}

#fx-loading .fx-spin {
	position: fixed;
	right: 14px;
	bottom: 14px;
	width: 46px;
	height: 46px;
	border: 2px dotted #fff;
	border-radius: 50%;
	animation: fxSpin 2s infinite linear;
}

@keyframes fxSpin {
	to { transform: rotate(360deg); }
}

/* ------------------------------------------------ PREFS dialog */

#fx-prefs {
	position: fixed;
	inset: 0;
	z-index: 200000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.7);
	animation: fxFade 0.15s ease-out;
}

@keyframes fxFade {
	from { opacity: 0; }
}

.fx-prefs-box {
	width: 100%;
	max-width: 460px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 1.2em 1.4em 1.4em;
	background: #000;
	border: 1px solid #fff;
	box-shadow: 0 8px #ffff00, 0 0 60px rgba(0, 0, 0, 0.8);
	color: #fff;
	font-family: "Chakra Petch", sans-serif;
	animation: fxPop 0.2s cubic-bezier(.2, 1.4, .5, 1);
}

@keyframes fxPop {
	from { transform: scale(0.92); }
}

.fx-prefs-box h2 {
	margin: 0;
	font-family: "Michroma", sans-serif;
	font-size: 1.1em;
	letter-spacing: 4px;
	color: #ffff00;
}

.fx-hint {
	margin: 0.2em 0 1em;
	color: #888;
	font-size: 0.85em;
}

.fx-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	padding: 0.65em 0;
	border-top: 1px solid #222;
}

.fx-row b {
	display: block;
	font-weight: 600;
}

.fx-row span {
	display: block;
	color: #888;
	font-size: 0.8em;
}

.fx-switch {
	display: flex;
	flex: 0 0 auto;
	border: 1px solid #fff;
}

.fx-switch button {
	padding: 0.35em 0.8em;
	background: none;
	border: 0;
	color: #888;
	font-family: "Silkscreen", monospace;
	cursor: pointer;
}

.fx-switch button.on {
	background: #fff;
	color: #000;
}

.fx-slider input {
	flex: 0 1 180px;
	accent-color: #ffff00;
}

.fx-prefs-actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.6em;
	margin-top: 1em;
}

.fx-btn {
	padding: 0.45em 1em;
	background: none;
	border: 1px solid #fff;
	color: #fff;
	font-family: "Silkscreen", monospace;
	cursor: pointer;
}

.fx-btn:hover,
.fx-btn.fx-yellow {
	background: #ffff00;
	border-color: #ffff00;
	color: #000;
}

.fx-btn.fx-yellow:hover {
	background: #fff;
	border-color: #fff;
}

/* ------------------------------------------------ cursors

   Like TSUKI: the pointer tells you where a link goes. An arrow for another
   page here, a yellow box for another site, a crosshair for things that do
   something on this page. (effects.js adds the classes.) */

html.fx-cursors,
html.fx-cursors body {
	cursor: url("/cursors/default.svg") 1 0, default;
}

html.fx-cursors .cur-go {
	cursor: url("/cursors/go.svg") 2 12, pointer;
}

html.fx-cursors .cur-out {
	cursor: url("/cursors/out.svg") 12 12, pointer;
}

html.fx-cursors .cur-action,
html.fx-cursors button,
html.fx-cursors summary,
html.fx-cursors label,
html.fx-cursors select,
html.fx-cursors input[type=range],
html.fx-cursors input[type=checkbox] {
	cursor: url("/cursors/action.svg") 12 12, pointer;
}

html.fx-cursors input:not([type=range]):not([type=checkbox]),
html.fx-cursors textarea {
	cursor: text;
}
