/* Import Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap");

/* Global Parameters */

/* Font Face */
/* Smooth transition for theme changes */
body {
	font-family: "Space Mono",
		system-ui,
		-apple-system,
		"Segoe UI",
		Roboto,
		"Helvetica Neue", Arial,
		"Noto Sans",
		"Liberation Sans",
		sans-serif,
		"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
	transition: color 0.3s, background-color 0.3s;
}

/* Smooth scrolling for anchor links */
html {
	scroll-behavior: smooth;
}

/* Loader Styles */
.loader {
	position: fixed;
	width: 100%;
	height: 100%;
	z-index: 1000;
	top: 40%;
	left: 0px;
	opacity: 0.5;
	/* IE compatibility */
	filter: alpha(opacity=50);
}

/* Global Transition */
/* Smooth opacity changes */
* {
	transition: opacity 1s;
}

/* Loading State */
/* Hidden when loading */
.loading {
	opacity: 0;
}

/* Main Content Scaling */
/* Adjust height to account for header/footer */
main {
	min-height: calc(100vh - 130px);
}

.leaflet-map {
	width: 100%;
	height: clamp(300px, 58vh, 760px);
	height: clamp(300px, 58dvh, 760px);
	background: #000;
}

@media (max-width: 767.98px) {
	.leaflet-map {
		height: clamp(260px, 50dvh, 560px);
	}

	.leaflet-map-station {
		width: 100%;
		max-width: none;
		min-width: 0;
		aspect-ratio: 1 / 1;
		height: auto;
	}
}


.leaflet-map-station {
	width: 25%;
	max-width: 420px;
	min-width: 220px;
	aspect-ratio: 1 / 1;
	height: auto;
	background: #000;
}

/* Map page: station markers */
.station-marker,
.station-group-marker {
	background: none;
	border: none;
}

.station-marker span,
.station-group-marker span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 50rem;
	border: 2px solid #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
	transition: transform 0.15s, background-color 0.15s, opacity 0.15s;
}

.station-marker span {
	background: #0d6efd;
	color: #fff;
}

.station-marker:hover span,
.station-marker.is-highlighted span {
	background: #ffc107;
	color: #000;
	transform: scale(1.25);
}

.station-group-marker span {
	background: #212529;
	color: #fff;
	cursor: pointer;
	/* looks like a stack of markers */
	box-shadow: 3px -3px 0 -1px #0d6efd, 3px -3px 0 1px #fff, 0 1px 4px rgba(0, 0, 0, 0.5);
}

.station-group-marker:hover span {
	transform: scale(1.1);
}

.station-group-marker.is-expanded span {
	opacity: 0.4;
}

/* Map page: station list */
.station-list {
	max-height: clamp(300px, 58dvh, 760px);
	overflow-y: auto;
}

@media (max-width: 991.98px) {
	.station-list {
		max-height: 45dvh;
	}
}

.station-row {
	cursor: pointer;
}

.station-row.active-station {
	background-color: rgba(var(--bs-warning-rgb), 0.15);
}

.station-index {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50rem;
	background: #0d6efd;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}

.station-row.active-station .station-index {
	background: #ffc107;
	color: #000;
}

.leaflet-layer,
.leaflet-control-zoom-in,
.leaflet-control-zoom-out,
.leaflet-control-attribution {
	filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

/* Text Alignment */
/* Justify text alignment */
.text-justify {
	text-align: justify;
}

/* Dev Icons Hover Effect */
/* Glow effect on hover */
[class*="devicon"]:hover {
	text-shadow: 0 0 2.5px var(--bs-body-color);
}

/* List Group Item Hover Effect */
.list-group-item.hover:hover {
	/* Slight transparency on hover */
	opacity: 80%;
}

/* Border Styles */
/* Dynamic outline color */
.outline-bg {
	--bs-border-opacity: 1;
	outline-color: rgba(var(--bs-body-bg-rgb), var(--bs-border-opacity)) !important;
}

/* Dynamic border color */
.border-bg {
	--bs-border-opacity: 1;
	border-color: rgba(var(--bs-body-bg-rgb), var(--bs-border-opacity)) !important;
}

/* Thick solid outline */
.outline-10 {
	outline-style: solid;
	outline-width: 10px !important;
}

/* Hidden Elements */
/* Completely hide element */
.status-hidden {
	display: none;
}

/* Status Icon Sizing */
/* Default size for small screens */
.status-icon {
	font-size: 0.8em;
}

/* Responsive Icon Sizing */
@media (min-width: 576px) {

	/* Small screens */
	.status-icon {
		font-size: 1.2em;
	}

	.border-sm-start-0 {
		border-left: 0 !important;
		/* Remove left border */
	}
}

@media (min-width: 768px) {

	/* Medium screens */
	.status-icon {
		font-size: 1.5em;
	}
}

@media (min-width: 992px) {

	/* Large screens */
	.status-icon {
		font-size: 2.2em;
	}
}

@media (min-width: 1200px) {

	/* Extra large screens */
	.status-icon {
		font-size: 3em;
	}
}

@media (min-width: 1400px) {

	/* Extra extra large screens */
	.status-icon {
		font-size: 3.5em;
	}
}

/* Light Mode - Nord Theme */
[data-bs-theme="nord-light"] {
	--bs-primary: #88C0D0;
	--bs-primary-rgb: 136, 192, 208;
	/* Frost - Light Blue */
	--bs-secondary: #81A1C1;
	--bs-secondary-rgb: 129, 161, 193;
	/* Frost - Blue */
	--bs-secondary-color: #4C566A;
	/* Muted */
	--bs-success: #A3BE8C;
	--bs-success-rgb: 163, 190, 140;
	/* Green */
	--bs-info: #B48EAD;
	--bs-info-rgb: 180, 142, 173;
	/* Purple */
	--bs-warning: #EBCB8B;
	--bs-warning-rgb: 235, 203, 139;
	/* Yellow */
	--bs-danger: #BF616A;
	--bs-danger-rgb: 191, 97, 106;
	/* Red */
	--bs-light: #ECEFF4;
	--bs-light-rgb: 236, 239, 244;
	/* Snow Storm - Light */
	--bs-dark: #4C566A;
	--bs-dark-rgb: 76, 86, 106;
	/* Polar Night - Dark */

	/* Extended Bootstrap Colors */
	--bs-gray: #B0BEC5;
	--bs-gray-rgb: 176, 190, 197;
	--bs-gray-dark: #546E7A;
	--bs-gray-dark-rgb: 84, 110, 122;
	--bs-white: #FFFFFF;
	--bs-white-rgb: 255, 255, 255;
	--bs-black: #000000;
	--bs-black-rgb: 0, 0, 0;

	/* Background & Text */
	--bs-body-bg: #D8DEE9;
	--bs-body-bg-rgb: 216, 222, 233;
	/* Snow Storm - Lighter */
	--bs-body-color: #2E3440;
	--bs-body-color-rgb: 46, 52, 64;
	/* Polar Night - Darkest */

	/* Nav Tabs - Active */
	--bs-emphasis-color: #2E3440;
	--bs-border-color: #2E3440;
	--bs-link-color: #81A1C1;
	--bs-link-hover-color: #88C0D0;
	/* Darkest text */
	--bs-nav-tabs-link-active-bg: #88C0D0;
	/* Frost - Light Blue */
	--bs-nav-tabs-link-active-border-color: #81A1C1;
	/* Frost - Blue */
}

/* Dark Mode - Nord Theme */
[data-bs-theme="nord-dark"] {
	--bs-primary: #88C0D0;
	--bs-primary-rgb: 136, 192, 208;
	/* Frost - Light Blue */
	--bs-secondary: #81A1C1;
	--bs-secondary-rgb: 129, 161, 193;
	/* Frost - Blue */
	--bs-secondary-color: #6D7075;
	/* Muted */
	--bs-success: #A3BE8C;
	--bs-success-rgb: 163, 190, 140;
	/* Green */
	--bs-info: #B48EAD;
	--bs-info-rgb: 180, 142, 173;
	/* Purple */
	--bs-warning: #EBCB8B;
	--bs-warning-rgb: 235, 203, 139;
	/* Yellow */
	--bs-danger: #BF616A;
	--bs-danger-rgb: 191, 97, 106;
	/* Red */
	--bs-light: #434C5E;
	--bs-light-rgb: 67, 76, 94;
	/* Polar Night - Darker */
	--bs-dark: #2E3440;
	--bs-dark-rgb: 46, 52, 64;
	/* Polar Night - Darkest */

	/* Extended Bootstrap Colors */
	--bs-gray: #A5A5A5;
	--bs-gray-rgb: 165, 165, 165;
	--bs-gray-dark: #6D7075;
	--bs-gray-dark-rgb: 109, 112, 117;
	--bs-white: #FFFFFF;
	--bs-white-rgb: 255, 255, 255;
	--bs-black: #000000;
	--bs-black-rgb: 0, 0, 0;

	/* Background & Text */
	--bs-body-bg: #2E3440;
	--bs-body-bg-rgb: 46, 52, 64;
	/* Dark background */
	--bs-body-color: #D8DEE9;
	--bs-body-color-rgb: 216, 222, 233;
	/* Light text */

	/* Nav Tabs - Active */
	--bs-emphasis-color: #D8DEE9;
	--bs-border-color: #D8DEE9;
	--bs-link-color: #81A1C1;
	--bs-link-hover-color: #88C0D0;
	/* Light text */
	--bs-nav-tabs-link-active-bg: #434C5E;
	/* Polar Night - Darker */
	--bs-nav-tabs-link-active-border-color: #88C0D0;
	/* Frost - Light Blue */
}
