/* Flight Connections widget (widgets/flight-connections-widget.php,
   assets/js/flight-connections.js). Desktop: map left, panel right (panel
   scrolls inside the map's height). Up to 900px: map on top (shorter), panel
   below in the page flow. Site tokens with fallbacks, as destination-map.css. */

.caguide_fc {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	gap: 0;
	border: 1px solid var(--border, #e6ddd0);
	background: #fff;
	color: var(--ink, #2b2420);
	font-family: "Noto Sans", sans-serif;
	font-size: 15px;
	line-height: 1.4;
	margin-bottom: 30px;
}

/* The theme's button styles (capitals, tall line height) are for call-to-action
   buttons - the widget's list rows, city chips and links are plain text. */
.caguide_fc button,
.caguide_fc .caguide_fc_facts dd,
.caguide_fc .caguide_fc_facts dt {
	text-transform: none;
	letter-spacing: normal;
	line-height: 1.35;
}

.caguide_fc_map {
	position: relative;
	min-height: 600px;
	background: #eef0f2;
}

.caguide_fc_map.is-failed {
	display: none;
}

.caguide_fc_panel {
	display: flex;
	flex-direction: column;
	max-height: 600px;
	border-left: 1px solid var(--border, #e6ddd0);
	min-width: 0;
}

.caguide_fc_controls {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
	gap: 10px 8px;
	align-items: end;
	padding: 16px;
	border-bottom: 1px solid var(--border, #e6ddd0);
	background: var(--background, #f6f3ee);
}

.caguide_fc_field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	margin: 0;
}

.caguide_fc_field_month {
	grid-column: 1 / -1;
}

.caguide_fc_field_label {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--muted, #6f6458);
}

.caguide_fc .caguide_fc_select {
	width: 100%;
	min-height: 44px;
	padding: 8px 10px;
	border: 1px solid var(--border, #e6ddd0);
	border-radius: 0;
	background-color: #fff;
	color: var(--ink, #2b2420);
	font: inherit;
	font-size: 15px;
}

.caguide_fc .caguide_fc_select:disabled {
	color: var(--muted, #6f6458);
	background-color: #f3f0eb;
}

.caguide_fc .caguide_fc_swap {
	width: 40px;
	height: 44px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--border, #e6ddd0);
	border-radius: 0;
	background: #fff;
	color: var(--ink, #2b2420);
	cursor: pointer;
}

.caguide_fc .caguide_fc_swap svg {
	transform: rotate(90deg);
}

.caguide_fc .caguide_fc_swap:disabled {
	opacity: 0.4;
	cursor: default;
}

.caguide_fc .caguide_fc_swap:not(:disabled):hover {
	border-color: var(--pink-action, #e8334f);
	color: var(--pink-action, #e8334f);
}

.caguide_fc_results {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 16px;
}

.caguide_fc_hint,
.caguide_fc_sub {
	margin: 0 0 12px;
	font-size: 14px;
	color: var(--muted, #6f6458);
}

.caguide_fc .caguide_fc_group_title,
.caguide_fc .caguide_fc_title {
	margin: 0 0 8px;
	font-family: "Noto Sans", sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--ink, #2b2420);
}

.caguide_fc_group {
	margin-bottom: 16px;
}

.caguide_fc_chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.caguide_fc .caguide_fc_chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 6px 10px;
	border: 1px solid var(--border, #e6ddd0);
	border-radius: 0;
	background: #fff;
	color: var(--ink, #2b2420);
	font: inherit;
	font-size: 14px;
	line-height: 1.2;
	cursor: pointer;
}

.caguide_fc .caguide_fc_chip:hover,
.caguide_fc .caguide_fc_chip:focus-visible {
	border-color: var(--pink-action, #e8334f);
	color: var(--ink, #2b2420);
	background: #fff;
}

.caguide_fc_chip_n {
	font-size: 12px;
	color: var(--muted, #6f6458);
}

.caguide_fc_head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.caguide_fc .caguide_fc_link {
	padding: 0;
	border: 0;
	background: none;
	color: var(--pink-action, #e8334f);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.caguide_fc .caguide_fc_link:hover {
	text-decoration: underline;
	background: none;
	color: var(--pink-action, #e8334f);
}

.caguide_fc_back {
	margin-bottom: 12px;
}

.caguide_fc_list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--border, #e6ddd0);
}

.caguide_fc_list li {
	margin: 0;
	border-bottom: 1px solid var(--border, #e6ddd0);
}

.caguide_fc .caguide_fc_row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto 14px;
	grid-template-areas: "city badge arrow" "freq freq arrow";
	gap: 2px 8px;
	align-items: center;
	width: 100%;
	padding: 10px 4px 10px 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: var(--ink, #2b2420);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.caguide_fc .caguide_fc_row:hover,
.caguide_fc .caguide_fc_row:focus-visible {
	background: var(--background, #f6f3ee);
	color: var(--ink, #2b2420);
}

.caguide_fc_row_city {
	grid-area: city;
	font-weight: 600;
	font-size: 15px;
}

.caguide_fc_row_country {
	font-weight: 400;
	font-size: 13px;
	color: var(--muted, #6f6458);
}

.caguide_fc_row_freq {
	grid-area: freq;
	font-size: 13px;
	color: var(--muted, #6f6458);
}

.caguide_fc_row_arrow {
	grid-area: arrow;
	font-size: 20px;
	color: var(--muted, #6f6458);
}

.caguide_fc_badge {
	grid-area: badge;
	padding: 2px 6px;
	font-size: 12px;
	font-weight: 600;
	color: #7a4b00;
	background: #fdf0d5;
	white-space: nowrap;
}

/* ----- route card ----- */

.caguide_fc_card {
	border-top: 3px solid var(--pink-action, #e8334f);
}

.caguide_fc_ends {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 8px;
	padding: 16px 0;
	border-bottom: 1px solid var(--border, #e6ddd0);
}

.caguide_fc_end {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.caguide_fc_end_b {
	text-align: right;
}

.caguide_fc_code {
	font-size: 28px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0.02em;
}

/* An airport without an IATA code keeps the line, so both ends stay aligned. */
.caguide_fc_code:empty::before {
	content: "\00a0";
}

.caguide_fc_city {
	font-size: 15px;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.caguide_fc_country {
	font-size: 12px;
	color: var(--muted, #6f6458);
}

.caguide_fc_plane {
	color: var(--pink-action, #e8334f);
	transform: rotate(90deg);
}

.caguide_fc_facts {
	display: grid;
	grid-template-columns: 110px minmax(0, 1fr);
	gap: 0;
	margin: 0;
}

.caguide_fc_facts dt,
.caguide_fc_facts dd {
	margin: 0;
	padding: 10px 0;
	border-bottom: 1px solid var(--border, #e6ddd0);
	font-size: 14px;
}

.caguide_fc_facts dt {
	color: var(--muted, #6f6458);
	font-weight: 400;
}

.caguide_fc_facts dd {
	font-weight: 600;
}

.caguide_fc_days,
.caguide_fc_airlines {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.caguide_fc_day {
	display: inline-block;
	min-width: 28px;
	padding: 2px 0;
	font-size: 12px;
	font-weight: 600;
	text-align: center;
	color: #b9afa4;
	border: 1px solid var(--border, #e6ddd0);
}

.caguide_fc_day.is-on {
	color: #fff;
	background: var(--pink-action, #e8334f);
	border-color: var(--pink-action, #e8334f);
}

.caguide_fc_airline {
	padding: 2px 8px;
	font-size: 13px;
	font-weight: 600;
	background: var(--background, #f6f3ee);
	border: 1px solid var(--border, #e6ddd0);
}

.caguide_fc_note {
	margin: 12px 0 0;
	padding: 8px 10px;
	font-size: 14px;
	background: #fdf0d5;
	color: #5c3a00;
}

.caguide_fc_checked {
	margin: 0;
	padding: 10px 16px;
	font-size: 12px;
	color: var(--muted, #6f6458);
	border-top: 1px solid var(--border, #e6ddd0);
}

/* ----- all routes list (server-rendered, for search engines and no-JS) ----- */

.caguide_fc_all {
	margin-bottom: 30px;
	border: 1px solid var(--border, #e6ddd0);
}

.caguide_fc_all > summary {
	padding: 12px 16px;
	font-weight: 600;
	cursor: pointer;
	background: var(--background, #f6f3ee);
}

.caguide_fc_all_body {
	padding: 4px 16px 12px;
}

.caguide_fc_all .caguide_fc_all_country {
	margin: 16px 0 6px;
	font-size: 16px;
}

.caguide_fc_all ul {
	margin: 0 0 8px;
	padding-left: 18px;
	font-size: 14px;
}

.caguide_fc_all li {
	margin: 2px 0;
}

@media (max-width: 900px) {
	.caguide_fc {
		grid-template-columns: minmax(0, 1fr);
	}
	.caguide_fc_map {
		min-height: 0;
		height: clamp(320px, 52vw, 440px);
	}
	.caguide_fc_panel {
		max-height: none;
		border-left: 0;
		border-top: 1px solid var(--border, #e6ddd0);
	}
	.caguide_fc_results {
		overflow: visible;
	}
	/* From and To each get the full width (long city names), swap button beside both. */
	.caguide_fc_controls {
		padding: 12px;
		grid-template-columns: minmax(0, 1fr) 44px;
	}
	.caguide_fc_controls > .caguide_fc_field:nth-child(1) {
		grid-column: 1;
		grid-row: 1;
	}
	.caguide_fc_controls > .caguide_fc_swap {
		grid-column: 2;
		grid-row: 1 / span 2;
		align-self: center;
		width: 44px;
		height: 60px;
	}
	.caguide_fc .caguide_fc_controls > .caguide_fc_swap svg {
		transform: none;
	}
	.caguide_fc_controls > .caguide_fc_field:nth-child(3) {
		grid-column: 1;
		grid-row: 2;
	}
	.caguide_fc_controls > .caguide_fc_field_month {
		grid-row: 3;
	}
	.caguide_fc_results {
		padding: 12px;
	}
	.caguide_fc_facts {
		grid-template-columns: 96px minmax(0, 1fr);
	}
}

@media (max-width: 400px) {
	.caguide_fc_map {
		height: 260px;
	}
	.caguide_fc_code {
		font-size: 22px;
	}
}

.caguide_fc_loading {
	grid-column: 1 / -1;
	margin: 0;
	padding: 16px;
	color: var(--muted, #6f6458);
}
