/* Dark mode additions on top of style.css (Bootstrap already defines the [data-bs-theme="dark"] variables) */
[data-bs-theme="dark"] {
	color-scheme: dark;
	--bs-link-color: #4fd1b5;
	--bs-link-color-rgb: 79, 209, 181;
	--bs-link-hover-color: #85e0cd;
}

/* File and folder icons are dark blue by default */
[data-bs-theme="dark"] table .fa-fw {
	color: #8fb8de !important;
}

/* The logos are drawn for a light background */
[data-bs-theme="dark"] .footer-container {
	background: #e9ecef;
	border-radius: 12px;
	padding: 10px;
}

[data-bs-theme="dark"] pre {
	color: #dee2e6;
}

/* Sun / moon switch next to the filter */
.theme-switch {
	position: relative;
	flex: none;
	align-self: center;
	width: 58px;
	height: 30px;
	margin-left: 12px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 30px;
	background: rgba(255, 255, 255, .14);
	cursor: pointer;
	transition: background-color .25s ease;
}

.theme-switch:hover {
	background: rgba(255, 255, 255, .22);
}

.theme-switch:focus-visible {
	outline: 2px solid #18bc9c;
	outline-offset: 2px;
}

.theme-switch svg {
	position: absolute;
	top: 7px;
	width: 14px;
	height: 14px;
	color: rgba(255, 255, 255, .65);
}

.theme-switch .sun { left: 8px; }
.theme-switch .moon { right: 8px; }

.theme-switch .knob {
	position: absolute;
	top: 2px;
	left: 2px;
	display: block;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
	transition: transform .25s ease;
}

/* The icon under the knob is repeated on top of it, in colour */
.theme-switch .sun { z-index: 1; color: #f39c12; }

[data-bs-theme="dark"] .theme-switch .knob { transform: translateX(28px); }
[data-bs-theme="dark"] .theme-switch .sun { z-index: auto; color: rgba(255, 255, 255, .65); }
[data-bs-theme="dark"] .theme-switch .moon { z-index: 1; color: #2c3e50; }

@media (prefers-reduced-motion: reduce) {
	.theme-switch,
	.theme-switch .knob { transition: none; }
}

/* Welcome text and dataset descriptions (html/about.html) */
.about {
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem .25rem;
	border-left: 4px solid #18bc9c;
	border-radius: 6px;
	background: var(--bs-tertiary-bg, #f4f6f7);
}

.about h1 { font-size: 1.35rem; }

/* Results of the search in sub-folders (js/search.js) */
#deep-search { margin: 1.5rem 0; }
#deep-search h2 { font-size: 1.1rem; }
#deep-search ul { padding-left: 1.2rem; word-break: break-all; }
.search-note { font-size: .875em; opacity: .75; }
