/**
 * ALC Flight Board — styles. Light, calm, high-legibility redesign:
 * big times, clear columns (Time · Flight · Destination · Gate/Belt · Status),
 * generous spacing, capped rows with "Show all". Scoped under .alc-board-app.
 */

.alc-board-app {
	--alb-bg: #ffffff;
	--alb-bg-soft: #f7f5fb;
	--alb-line: #ece9f4;
	--alb-line-soft: #f1eef8;
	--alb-ink: #241f3a;
	--alb-ink-soft: #565072;
	--alb-faint: #8d87a8;
	--alb-violet: #6c4df6;
	--alb-violet-deep: #4f33d8;
	--alb-sky: #2f8cf4;
	--alb-green: #0e9f6e;
	--alb-green-soft: #e6f6f0;
	--alb-amber: #b45309;
	--alb-amber-soft: #fdf1df;
	--alb-red: #dc2626;
	--alb-red-soft: #fdeeee;
	--alb-sky-soft: #eaf4ff;
	--alb-gray-soft: #f1f0f6;

	font-family: "Zalando Sans", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	color: var(--alb-ink);
	background: var(--alb-bg);
	border: 1px solid var(--alb-line);
	border-radius: 18px;
	overflow: hidden;
	line-height: 1.45;
	box-shadow: 0 6px 20px rgba(76, 58, 176, 0.08);
	max-width: 100%;
}

.alc-board-app *,
.alc-board-app *::before,
.alc-board-app *::after { box-sizing: border-box; }

.alc-board-app button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.alc-board-app input { font: inherit; }
.alc-mono, .alc-c-time, .alc-fno, .alc-icao, .alc-c-gate { font-variant-numeric: tabular-nums; }

/* ---------- top bar: segmented tabs + live + tools ---------- */
.alc-topbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
	background: linear-gradient(180deg, #ffffff, #fdfcff);
	border-bottom: 1px solid var(--alb-line);
}
.alc-tabs {
	display: inline-flex;
	background: var(--alb-bg-soft);
	border: 1px solid var(--alb-line);
	border-radius: 12px;
	padding: 4px;
	gap: 4px;
}
.alc-tab {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 16px;
	border-radius: 9px;
	font-size: 14px;
	font-weight: 700;
	color: var(--alb-ink-soft);
	transition: background 0.15s ease, color 0.15s ease;
}
.alc-tab svg { opacity: 0.75; }
.alc-tab:hover { color: var(--alb-ink); }
.alc-tab-on {
	background: #fff;
	color: var(--alb-violet-deep);
	box-shadow: 0 2px 8px rgba(76, 58, 176, 0.14);
}
.alc-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.alc-live {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.08em;
	color: var(--alb-green);
	background: var(--alb-green-soft);
	border: 1px solid #c7ead9;
	border-radius: 999px;
	padding: 5px 12px;
}
.alc-live-dot {
	width: 8px; height: 8px; border-radius: 50%;
	background: #10b981;
	box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
	animation: alc-pulse 2s infinite;
}
@keyframes alc-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.alc-lang {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	color: var(--alb-ink-soft);
	border: 1px solid var(--alb-line);
	background: #fff;
	border-radius: 999px;
	padding: 5px 11px;
}
.alc-lang:hover { border-color: var(--alb-violet); color: var(--alb-violet-deep); }
.alc-refresh {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--alb-ink-soft);
	background: #fff;
	border: 1px solid var(--alb-line);
	border-radius: 10px;
	padding: 7px 13px;
}
.alc-refresh:hover:not(:disabled) { border-color: var(--alb-violet); color: var(--alb-violet-deep); }
.alc-refresh:disabled { opacity: 0.55; cursor: default; }
.alc-spin { animation: alc-spin 0.9s linear infinite; }
@keyframes alc-spin { to { transform: rotate(360deg); } }

/* ---------- auto-refresh progress ---------- */
.alc-progress { height: 3px; background: var(--alb-bg-soft); }
.alc-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--alb-violet), var(--alb-sky)); }

/* ---------- controls: search + filter chips ---------- */
.alc-controls {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 14px 18px;
	background: #fff;
}
.alc-search { position: relative; flex: 1; }
.alc-search .alc-icon {
	position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
	color: var(--alb-faint);
	pointer-events: none;
}
.alc-search input {
	width: 100%;
	height: 44px;
	padding: 0 14px 0 38px;
	font-size: 14.5px;
	color: var(--alb-ink);
	background: var(--alb-bg-soft);
	border: 1.5px solid var(--alb-line);
	border-radius: 12px;
	outline: none;
}
.alc-search input::placeholder { color: var(--alb-faint); }
.alc-search input:focus { border-color: var(--alb-violet); background: #fff; box-shadow: 0 0 0 3px rgba(108, 77, 246, 0.12); }
.alc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.alc-chip {
	display: inline-flex; align-items: center; gap: 7px;
	height: 38px;
	padding: 0 15px;
	font-size: 13px;
	font-weight: 700;
	color: var(--alb-ink-soft);
	background: #fff;
	border: 1.5px solid var(--alb-line);
	border-radius: 999px;
}
.alc-chip:hover { border-color: var(--alb-violet); color: var(--alb-violet-deep); }
.alc-chip-on { background: var(--alb-violet); border-color: var(--alb-violet); color: #fff; }
.alc-chip-n { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--alb-faint); }
.alc-chip-on .alc-chip-n { color: rgba(255, 255, 255, 0.85); }

/* ---------- table ---------- */
.alc-table { border-top: 1px solid var(--alb-line); background: #fff; }
.alc-thead, .alc-row {
	display: grid;
	grid-template-columns: 118px 148px minmax(180px, 1fr) 104px 148px;
	gap: 14px;
	align-items: center;
	padding: 0 20px;
}
.alc-thead {
	height: 44px;
	background: var(--alb-bg-soft);
	border-bottom: 1px solid var(--alb-line);
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--alb-faint);
}
.alc-th { text-align: left; }
.alc-th-city, .alc-c-city { min-width: 0; }
.alc-th-belt, .alc-c-gate { text-align: center; }
.alc-th-status, .alc-c-status { text-align: right; }
.alc-th:hover { color: var(--alb-violet-deep); }
.alc-arrow { font-size: 9px; margin-left: 3px; }

.alc-rowwrap + .alc-rowwrap { border-top: 1px solid var(--alb-line-soft); }
.alc-row { width: 100%; text-align: left; min-height: 64px; }
.alc-row:hover { background: var(--alb-bg-soft); }
.alc-rowwrap.alc-is-delayed { background: var(--alb-red-soft); }
.alc-rowwrap.alc-is-delayed .alc-row:hover { background: #fbe4e4; }

/* time cell: big effective time + small scheduled time */
.alc-c-time { display: flex; flex-direction: column; gap: 1px; }
.alc-time-main { font-size: 17px; font-weight: 800; letter-spacing: 0.01em; display: inline-flex; align-items: center; gap: 8px; }
.alc-live-dot-row { width: 7px; height: 7px; border-radius: 50%; background: #10b981; flex-shrink: 0; }
.alc-time-sched { font-size: 11.5px; color: var(--alb-faint); }
.alc-time-sched.alc-late { color: var(--alb-red); font-weight: 700; }

/* flight cell: number + airline */
.alc-c-flight { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.alc-fno { font-size: 15px; font-weight: 800; color: var(--alb-violet-deep); }
.alc-al { font-size: 12.5px; color: var(--alb-ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* city cell */
.alc-c-city { display: flex; align-items: center; gap: 8px; min-width: 0; }
.alc-city-name { font-size: 15.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alc-icao {
	font-size: 11px;
	font-weight: 700;
	color: var(--alb-sky);
	background: var(--alb-sky-soft);
	border-radius: 6px;
	padding: 2px 6px;
	flex-shrink: 0;
}

/* gate/belt chip */
.alc-c-gate { display: flex; justify-content: center; }
.alc-gate-chip {
	font-size: 14px;
	font-weight: 800;
	color: var(--alb-ink);
	background: var(--alb-gray-soft);
	border-radius: 9px;
	padding: 5px 12px;
	min-width: 44px;
	text-align: center;
}

/* status pill */
.alc-c-status { display: flex; justify-content: flex-end; }
.alc-badge {
	display: inline-flex; align-items: center; gap: 7px;
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid transparent;
	font-size: 11.5px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	white-space: nowrap;
}
.alc-badge-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.alc-st-ok        { background: var(--alb-green-soft); color: var(--alb-green); border-color: #c7ead9; }
.alc-dot-ok       { background: #10b981; }
.alc-st-est       { background: var(--alb-amber-soft); color: var(--alb-amber); border-color: #f3ddb8; }
.alc-dot-est      { background: #f59e0b; }
.alc-st-board     { background: #f0eaff; color: var(--alb-violet-deep); border-color: #d9ccfd; animation: alc-pulse 2s infinite; }
.alc-dot-board    { background: var(--alb-violet); }
.alc-st-checkin   { background: var(--alb-sky-soft); color: #1f6fd1; border-color: #cbe4fb; }
.alc-dot-checkin  { background: var(--alb-sky); }
.alc-st-delayed   { background: var(--alb-red-soft); color: var(--alb-red); border-color: #f6cfcf; }
.alc-dot-delayed  { background: var(--alb-red); }
.alc-st-default   { background: var(--alb-gray-soft); color: var(--alb-ink-soft); border-color: var(--alb-line); }
.alc-dot-default  { background: var(--alb-faint); }

.alc-norows { padding: 56px 20px; text-align: center; color: var(--alb-faint); font-size: 14px; }

/* ---------- expanded detail ---------- */
.alc-detail {
	padding: 6px 20px 18px;
	background: var(--alb-bg-soft);
	border-top: 1px solid var(--alb-line-soft);
}
.alc-grid4 {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	padding-top: 12px;
}
.alc-d { min-width: 0; }
.alc-d-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--alb-faint); margin-bottom: 2px; font-weight: 700; }
.alc-d-value { font-size: 14px; color: var(--alb-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alc-d-value.alc-mono { font-variant-numeric: tabular-nums; }
.alc-detail-foot { margin-top: 12px; font-size: 12px; color: var(--alb-faint); }

/* ---------- show more ---------- */
.alc-more { padding: 4px 20px 16px; display: flex; justify-content: center; }
.alc-more-btn {
	font-size: 13.5px;
	font-weight: 800;
	color: var(--alb-violet-deep);
	background: #fff;
	border: 1.5px solid var(--alb-line);
	border-radius: 999px;
	padding: 11px 26px;
	width: 100%;
	transition: border-color 0.15s ease;
}
.alc-more-btn:hover { border-color: var(--alb-violet); background: var(--alb-bg-soft); }

/* ---------- footer ---------- */
.alc-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 12px 20px;
	background: var(--alb-bg-soft);
	border-top: 1px solid var(--alb-line);
	font-size: 12px;
	color: var(--alb-faint);
}
.alc-warn { color: var(--alb-amber); font-weight: 600; }
.alc-dim { color: var(--alb-faint); }
.alc-upd { font-variant-numeric: tabular-nums; }
.alc-empty { padding: 24px; text-align: center; color: var(--alb-faint); }

/* ---------- responsive ---------- */
@media (min-width: 760px) {
	.alc-controls { flex-direction: row; align-items: center; }
}

@media (max-width: 759.98px) {
	.alc-thead { display: none; }
	.alc-row, .alc-detail { padding-left: 16px; padding-right: 16px; }
	.alc-row {
		grid-template-columns: auto 1fr auto;
		grid-template-areas:
			"time city status"
			"flight flight gate";
		row-gap: 8px;
		padding-top: 14px;
		padding-bottom: 14px;
		min-height: 0;
	}
	.alc-c-time { grid-area: time; }
	.alc-time-main { font-size: 18px; }
	.alc-time-sched { display: none; }
	.alc-c-city { grid-area: city; justify-content: flex-end; text-align: right; }
	.alc-city-name { font-size: 16px; }
	.alc-c-status { grid-area: status; }
	.alc-c-flight { grid-area: flight; flex-direction: row; align-items: baseline; gap: 8px; }
	.alc-c-gate { grid-area: gate; justify-content: flex-end; }
	.alc-gate-chip { font-size: 13px; }
	.alc-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.alc-topbar { padding: 12px 14px; }
	.alc-controls { padding: 12px 14px; }
}
