:root {
	--bg: #101214;
	--row: #171a1f;
	--accent: #f6be1d;
	--dim: #a0a4ad;
	--w-status: 60px;
	--text: #f0f0f0;
	--border: #252932;
	--border-light: #303540;
}

:root[data-theme="light"] {
	--bg: #e3e5ea;
	--row: #ffffff;
	--accent: #7a6aa6;
	--dim: #5a6070;
	--text: #1b1f27;
	--border: #d2d5df;
	--border-light: #c5c9d6;
}

body {
	background: var(--bg);
	color: var(--text);
	font-family: 'Source Sans Pro', sans-serif;
	margin: 0;
	padding: 10px;
	transition: background 0.3s ease, color 0.3s ease;
}

/* Typography - Heading Styles */
h1, h2, h3, h4, h5, h6 {
	color: var(--text);
	font-family: 'Source Sans Pro', sans-serif;
	line-height: 1.2;
	margin: 0;
}

h1 {
	font-size: 1.9rem;
	font-weight: 700;
}

h2 {
	font-size: 1.7rem;
	font-weight: 600;
}

h3 {
	font-size: 1.6rem;
	font-weight: 600;
}

h4 {
	font-size: 1.5rem;
	font-weight: 600;
}

h5 {
	font-size: 1.25rem;
	font-weight: 500;
}

h6 {
	font-size: 1rem;
	font-weight: 500;
}

.tabs {
	border-bottom: 2px solid var(--border);
	display: flex;
	gap: 5px;
	margin-bottom: 10px;
}

.tab {
	background: var(--row);
	border: none;
	color: var(--dim);
	cursor: pointer;
	display: block;
	flex: 1;
	font-weight: bold;
	padding: 15px;
	text-align: center;
	text-decoration: none;
	transition: all 0.3s ease;
}

.tab.active {
	background: var(--accent);
	color: #fff;
}

:root:not([data-theme="light"]) .tab.active {
	color: var(--bg);
}

.tab:hover {
	background: var(--row);
}

.tab.active:hover {
	background: var(--accent);
}

.board {
	border-collapse: collapse;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	table-layout: fixed;
	width: 100%;
}

tr {
	align-items: center;
	display: flex;
	width: 100%;
}

.flight-row {
	align-items: center;
	animation: fadeInUp 0.5s ease-out forwards;
	background: var(--row);
	border-bottom: 1px solid var(--border);
	opacity: 0;
	transform: translateY(10px);
	transition: background 0.3s ease;
}

:root:not([data-theme="light"]) .flight-row {
	border-bottom-color: var(--border-light);
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.original-time {
	margin-top: -10px;
	position: absolute;
}

.flight-row td { 
	font-size: 0.9rem; 
	padding: 12px 8px; 
}

.flight-number-cell {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
}

.flight-code {
	display: inline-block;
}

.flight-code:not(:last-child)::after {
	content: ",";
	margin-right: 3px; 
}

@media (max-width: 800px) {
	.flight-number-cell::before {
		color: var(--dim);
		content: "FLIGHT NUMBER:";
		font-size: 0.65rem;
		margin-right: 5px;
	}

	.flight-row.expanded .flight-number-cell {
		border-top: 1px dashed var(--border-light);
	}
}

.table-header {
	background: var(--row);
	border-bottom: 2px solid var(--border);
}

.table-header tr {
	align-items: center;
}

.table-header th {
	color: var(--dim);
	font-size: 0.85rem;
	font-weight: bold;
	letter-spacing: 0.5px;
	padding: 12px;
	text-align: left;
	text-transform: uppercase;
}

.airline-cell {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.airline-logo-container {
	align-items: center;
	display: flex;
	flex-flow: row wrap;
	gap: 1px;
}

.airline-name-fallback {
	background: #fff;
	border-radius: 3px;
	color: #000;
	font-size: 12px;
	height: 22px;
	justify-content: center;
	line-height: 21px;
	padding: 0 5px;
}

.aircraft-info {
	color: var(--dim);
	font-size: 0.65rem;
	line-height: 1.2;
}

.city-cell {
	align-items: center;
	display: flex;
	gap: 8px;
}

.country-flag {
	font-size: 1.2rem;
	line-height: 1;
}

.airline-logo {
	background: white;
	border: 1px solid var(--border-light);
	border-radius: 5px;
	height: 22px;
	object-fit: contain;
	padding: 0 5px;
	width: 38px;
}

:root[data-theme="light"] .airline-logo {
	border-color: #e0e0e0;
}

/* Aligns the status text and orb perfectly in one cell */
.status-cell {
	align-items: center;
	display: flex;
	gap: 8px;
	justify-content: flex-start;
}

.status-text {
	border: 1px solid var(--border-light);
	border-radius: 3px;
	color: var(--dim);
	font-size: 0.78rem;
	font-weight: bold;
	min-width: 75px;
	padding: 0.4rem;
	text-align: center;
	text-transform: uppercase;
	white-space: nowrap;
}	

.status-text.status-on {
	border-style: dashed;
	border-color: #3b8c6e;
	color: #3b8c6e;
}

.status-text.status-del {
	background-color: rgba(184, 145, 42, 0.25);
	border-color: #b8912a;
	color: #b8912a;
}

.status-text.status-can {
	background-color: rgba(192, 75, 75, 0.25);
	border-color: #c04b4b;
	color: #c04b4b;
}

.status-text.status-boarding {
	background-color: rgba(59, 140, 110, 0.25);
	border-color: #3b8c6e;
	color: #3b8c6e;
}

@keyframes boarding-dash {
	from {
		background-position: 0 0, 0 0;
	}
	to {
		background-position: 0 0, 8px 0;
	}
}

.status-text.status-landed {
	background-color: rgba(59, 111, 176, 0.25);
	border-color: #3b6fb0;
	color: #3b6fb0;
}

.status-text.status-departed {
	background-color: rgba(141, 141, 141, 0.25);
	border-color: var(--dim);
	color: var(--dim);
}

.status-delay-amount {
	display: block;
	font-size: 0.7rem;
	font-weight: 400;
	margin-top: 2px;
	color: var(--dim);
}

.status-text.status-gateclosed {
	background-color: transparent;
	border-color: var(--dim);
	border-style: dashed;
	color: var(--dim);
}

.orb-can { 
	background: #c04b4b; 
	box-shadow: 0 0 8px rgba(192, 75, 75, 0.7); 
}

.past {
	filter: grayscale(1);
	opacity: 0;
	visibility: hidden;
}

.past.loaded {
	opacity: 0.4;
	visibility: visible;
}

.orb {
	border-radius: 50%;
	display: inline-block;
	height: 12px;
	width: 12px;
}

.orb-on {
	background: #3b8c6e;
	/* box-shadow: 0 0 8px rgba(59, 140, 110, 0.7); */
}

.orb-landed {
	background: #3b6fb0;
	/* box-shadow: 0 0 8px rgba(59, 111, 176, 0.7); */
}

.orb-del {
	background: #b8912a;
	/* box-shadow: 0 0 8px rgba(184, 145, 42, 0.7); */
}

.details {
	background: #000;
	display: none;
}

.det-item {
	border-bottom: 1px solid #111;
	display: flex;
	justify-content: space-between;
	padding: 10px 15px;
}

.lbl {
	color: var(--dim);
	font-size: 0.7rem;
	text-transform: uppercase;
}

.val {
	font-size: 0.75rem;
	font-weight: bold;
	text-align: right;
	width: var(--w-status); 
}

.seo-box {
	background: var(--row);
	border: 1px solid var(--border-light);
	border-radius: 8px;
	margin-top: 40px;
	padding: 20px;
	transition: all 0.3s ease;
}

.seo-box a {
	color: var(--accent);
	font-weight: bold;
	text-decoration: none;
}

.seo-content a {
	color: var(--accent);
	text-decoration: none;
}

.seo-content a:hover,
.seo-box a:hover {
	text-decoration: underline;
}

.container {
	margin-inline: auto;
	max-width: 1300px;
}

.header-top {
	align-items: center;
	display: flex;
	justify-content: space-between;
	margin-bottom: 12px;
	width: 100%;
}

.page-title-container {
	align-items: center;
	display: flex;
	flex-flow: row wrap;
	gap: 12px;
}

.page-logo-link {
	display: inline-block;
	line-height: 0;
}

.page-logo {
	height: 32px;
	object-fit: contain;
	width: 32px;
}

:root[data-theme="light"] .page-logo {
	filter: hue-rotate(195deg) saturate(.4);
}

@media (max-width: 800px) {
	.page-title-container {
		align-items: center;
		display: flex;
		flex-flow: row-reverse;
		gap: 12px;
	}

	.page-logo {
		height: 60px;
		width: 60px;
	}
}

.clock-container {
	align-items: center;
	color: var(--accent);
	display: flex;
	gap: 10px;
}

.clock-placeholder {
	animation: headerSkeletonShimmer 1.2s ease-in-out infinite;
	background: linear-gradient(90deg, var(--row), var(--border-light), var(--row));
	background-size: 200% 100%;
	border-radius: 999px;
	display: inline-block;
	height: 40px;
	min-width: 220px;
}

.header-actions {
	align-items: center;
	display: flex;
	gap: 15px;
}

/* Header skeletons to avoid layout shift before JS loads actions */
.header-skeleton {
	align-items: center;
	display: flex;
	gap: 10px;
}

.header-skeleton-pill {
	animation: headerSkeletonShimmer 1.2s ease-in-out infinite;
	background: linear-gradient(90deg, var(--row), var(--border-light), var(--row));
	background-size: 200% 100%;
	border-radius: 999px;
	height: 28px;
}

.header-skeleton-btn {
	width: 190px;
}

.header-skeleton-theme {
	width: 60px;
}

.header-skeleton-clock {
	width: 210px;
}

@keyframes headerSkeletonShimmer {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

.flight-board-button {
	background: var(--accent);
	border: none;
	border-radius: 5px;
	color: var(--bg);
	cursor: pointer;
	display: inline-block;
	font-family: 'Source Sans Pro', sans-serif;
	font-size: 0.85rem;
	font-weight: 600;
	padding: 10px 16px;
	text-decoration: none;
	transition: opacity 0.3s ease, transform 0.2s ease;
	white-space: nowrap;
}

.flight-board-button:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

:root[data-theme="light"] .flight-board-button {
	color: #fff;
}

.menu-toggle {
	align-items: center;
	background: transparent;
	border: none;
	color: var(--accent);
	cursor: pointer;
	display: flex;
	font-size: 1.2rem;
	justify-content: center;
	padding: 8px;
	transition: opacity 0.3s ease;
}

.menu-toggle:hover {
	opacity: 0.8;
}

/* Drawer/Sidebar */
.drawer-overlay {
	background: rgba(0, 0, 0, 0.5);
	bottom: 0;
	display: none;
	left: 0;
	position: fixed;
	right: 0;
	top: 0;
	z-index: 999;
}

.drawer-overlay.active {
	display: block;
}

.drawer {
	background: var(--row);
	border-left: 2px solid var(--border);
	bottom: 0;
	box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
	display: flex;
	flex-direction: column;
	height: 100vh;
	overflow-y: auto;
	position: fixed;
	right: -400px;
	top: 0;
	transition: right 0.3s ease;
	width: 400px;
	z-index: 1000;
}

.drawer.active {
	right: 0;
}

.drawer-header {
	align-items: center;
	border-bottom: 2px solid var(--border);
	display: flex;
	justify-content: space-between;
	padding: 20px;
}

.drawer-header h2 {
	color: var(--accent);
	font-size: 1.5rem;
	margin: 0;
}

.drawer-close {
	background: transparent;
	border: none;
	color: var(--text);
	cursor: pointer;
	font-size: 1.5rem;
	padding: 5px;
	transition: opacity 0.3s ease;
}

.drawer-close:hover {
	opacity: 0.7;
}

.drawer-content {
	flex: 1;
	padding: 20px;
}

.drawer-menu-section {
	border-bottom: 1px solid var(--border-light);
	padding-bottom: 20px;
}

.drawer-menu-section:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.drawer-accordion-header {
	align-items: center;
	background: transparent;
	border: none;
	color: var(--text);
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	padding: 15px 0;
	transition: color 0.3s ease;
	width: 100%;
}

.drawer-accordion-header:hover {
	color: var(--accent);
}

.drawer-accordion-header h3 {
	color: var(--accent);
	font-size: 1.2rem;
	margin: 0;
	pointer-events: none;
}

.drawer-accordion-header:hover h3 {
	color: var(--accent);
}

.accordion-icon {
	color: var(--accent);
	font-size: 0.9rem;
	transition: transform 0.3s ease;
}

.drawer-accordion-content {
	list-style: none;
	margin: 0;
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	padding: 0;
	transition: max-height 0.3s ease, opacity 0.3s ease;
}

.drawer-menu-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.drawer-menu-list li {
	margin-bottom: 10px;
}

.drawer-menu-list a {
	border-radius: 5px;
	color: var(--text);
	display: block;
	padding: 12px 15px;
	text-decoration: none;
	transition: background 0.3s ease, color 0.3s ease;
}

.drawer-menu-list a:hover {
	background: var(--border-light);
	color: var(--accent);
}

.drawer-menu-list a.active {
	background: var(--bg);
	color: var(--accent);
	font-weight: 600;
}

.update-frequency {
	font-weight: 300;
	text-transform: initial;
}

.gate-cell.multi-gate {
	align-items: center;
	display: flex;
	gap: 2px;
	height: 40px;
	justify-content: flex-end;
	padding-block: 2px !important;
}

.gate-code {
	display: block;
	font-weight: bold;
}

.gate-code:not(:last-child)::after {
	content: ",";
	margin-right: 1px;
}

@media (min-width: 801px) {
	/* Time column width on desktop */
	.table-header th:first-child {
		max-width: 90px;
	}

	.time-cell {
		display: flex;
		gap: 5px;
		max-width: 90px;
	}

	/* Gate column width on desktop */
	.table-header th:last-child {
		max-width: 75px;
	}

	.gate-cell {
		max-width: 75px;
	}

	/* Status column width on desktop */
	.table-header th:nth-child(5) {
		max-width: 110px;
	}

	.status-cell-wrapper {
		max-width: 110px;
	}
}

@media (max-width: 800px) {
	.header-top {
		align-items: flex-start;
		flex-direction: column;
		gap: 1rem;
	}

	.page-title {
		margin-top: 0;
	}

	.clock-container {
		display: flex;
		justify-content: space-between;
		width: 100%;
	}

	.header-actions {
		display: flex;
		flex-wrap: wrap;
		gap: 10px;
	}

	/* Mobile: hide airline, status & flight number by default, show when row expanded */
	.status-cell-wrapper,
	.airline-cell-wrapper,
	.flight-number-cell {
		display: none;
	}

	.flight-row.expanded .status-cell-wrapper,
	.flight-row.expanded .airline-cell-wrapper,
	.flight-row.expanded .flight-number-cell {
		display: block;
		width: 100%;
	}

	.flight-board-button {
		font-size: 0.75rem;
		padding: 8px 12px;
	}

	.drawer {
		right: -100%;
		width: 100%;
	}

	.table-header tr {
		display: none;
	}

	.flight-row {
		align-items: flex-start;
		display: flex;
		flex-flow: row wrap;
	}

	.time-cell {
		align-items: center;
		display: flex;
		gap: 6px;
		order: 1;
		width: 55px !important;
	}

	.time-orb {
		align-items: center;
		display: inline-flex;
		justify-content: center;
	}

	.destination-cell {
		order: 2;
		width: calc(100% - 140px) !important;
	}

	.airline-cell-wrapper {
		order: 4;
		width: calc(100% - 120px) !important;
	}

	.flight-number-cell {
		order: 6;
		width: 100% !important;
	}

	.flight-row.expanded .status-cell-wrapper {
		align-items: flex-end;
		display: flex;
		flex: 1;
		justify-content: flex-end;
		min-height: 40px;
		order: 5;
	}

	.gate-cell {
		position: absolute;
		right: 0;
		top: 0px;
	}

	.status-cell {
		flex-flow: row-reverse;
	}

	.city-name {
		word-break: break-word;
	}

	.airline-cell {
		flex-flow: column-reverse;
	}
}

.seo-content {
	color: var(--dim);
	line-height: 1.8;
	margin-top: 40px;
	opacity: 1;
	padding: 20px;
}

main.seo-content {
	margin-top: 0;
}

.seo-content h1 {
	color: var(--accent);
	font-size: 1.8rem;
	margin-bottom: 20px;
}

.seo-content p {
	margin-bottom: 15px;
}

:root[data-theme="dark"] .seo-content {
	color: #a8a8a8;
}

.search-filter {
	align-items: center;
	display: flex;
	margin: 15px 0;
	position: relative;
	width: 100%;
}

.search-input {
	background: var(--row);
	border: 1px solid var(--border-light);
	border-radius: 4px;
	color: var(--text);
	font-family: 'Source Sans Pro', sans-serif;
	font-size: 0.9rem;
	padding: 12px 45px 12px 15px;
	transition: all 0.3s ease;
	width: 100%;
}

.search-icon {
	color: var(--dim);
	font-size: 1rem;
	pointer-events: none;
	position: absolute;
	right: 15px;
}

.search-input:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
	outline: none;
}

.search-input::placeholder {
	color: var(--dim);
}

.flight-row.hidden {
	display: none;
}

.theme-toggle {
	align-items: center;
	background: var(--border-light);
	border: 2px solid var(--border);
	border-radius: 15px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	display: inline-flex;
	height: 30px;
	justify-content: space-between;
	margin-left: 15px;
	padding: 0 5px;
	position: relative;
	transition: all 0.3s ease;
	vertical-align: middle;
	width: 60px;
}

.theme-toggle:hover {
	border-color: var(--accent);
}

.theme-toggle-slider {
	background: var(--accent);
	border-radius: 50%;
	height: 24px;
	left: 3px;
	position: absolute;
	transition: transform 0.3s ease;
	width: 24px;
}

:root[data-theme="light"] .theme-toggle-slider {
	transform: translateX(30px);
}

.theme-toggle-icon {
	color: var(--text);
	font-size: 14px;
	transition: opacity 0.3s ease;
	z-index: 1;
}

:root[data-theme="light"] .theme-toggle-icon {
	color: #fff;
}

:root:not([data-theme="light"]) .theme-toggle-icon {
	color: var(--bg);
}

.theme-toggle-icon.moon {
	margin-inline: 5px;
}

.fas.fa-sun.theme-toggle-icon.sun {
	margin-inline: 13px 0;
}

:root[data-theme="dark"] .theme-toggle-icon.sun {
	opacity: 0;
}

:root[data-theme="light"] .theme-toggle-icon.moon {
	opacity: 0;
}

/* Cookie Consent Banner */
.cookie-consent {
	align-items: center;
	animation: slideUp 0.3s ease-out;
	background: var(--row);
	border-top: 2px solid var(--border);
	bottom: 0;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
	display: flex;
	justify-content: center;
	left: 0;
	padding: 20px;
	position: fixed;
	right: 0;
	z-index: 1000;
}

@keyframes slideUp {
	from {
		transform: translateY(100%);
	}
	to {
		transform: translateY(0);
	}
}

.cookie-consent-content {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	justify-content: space-between;
	max-width: 1200px;
	width: 100%;
}

.cookie-consent-text {
	flex: 1;
	min-width: 250px;
}

.cookie-consent-text p {
	color: var(--text);
	font-size: 14px;
	line-height: 1.5;
	margin: 0;
}

.cookie-consent-buttons {
	display: flex;
	flex-shrink: 0;
	gap: 10px;
}

.cookie-btn {
	border: none;
	border-radius: 5px;
	cursor: pointer;
	font-family: 'Source Sans Pro', sans-serif;
	font-size: 14px;
	font-weight: 600;
	padding: 10px 20px;
	transition: all 0.3s ease;
}

.cookie-btn-accept {
	background: var(--accent);
	color: #fff;
}

.cookie-btn-accept:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

.cookie-btn-decline {
	background: var(--border);
	color: var(--text);
}

.cookie-btn-decline:hover {
	background: var(--border-light);
}

@media (max-width: 800px) {
	.cookie-consent {
		padding: 15px;
	}
	
	.cookie-consent-content {
		align-items: stretch;
		flex-direction: column;
	}
	
	.cookie-consent-buttons {
		width: 100%;
	}
	
	.cookie-btn {
		flex: 1;
	}
}
