.arw-route-widget {
	background: var(--white, #fff);
	border: 1px solid var(--border, #d0d5e3);
	border-radius: 8px;
	overflow: hidden;
	width: 100% !important;
	max-width: 100% !important;
	container-type: inline-size;
	container-name: arw;
}

/* ---- header ---- */
.arw-route-header {
	background: var(--blue-dark, #011565);
	padding: 20px 20px 18px;
	position: relative;
	border-top: 3px solid var(--yellow, #ffcd00);
}
.arw-eyebrow {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--yellow, #ffcd00);
	margin-bottom: 8px;
}
.arw-route-title {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	font-size: 19px;
	font-weight: 700;
	color: var(--white, #fff);
}
.arw-route-title .arw-city { color: var(--white, #fff); }
.arw-route-title .arw-code {
	font-family: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, monospace;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--blue-dark, #011565);
	background: var(--yellow, #ffcd00);
	border-radius: 4px;
	padding: 2px 6px;
}
.arw-plane-icon {
	width: 16px;
	height: 16px;
	fill: var(--yellow, #ffcd00);
	transform: rotate(90deg);
	flex-shrink: 0;
	margin: 0 2px;
}
.arw-distance {
	margin-top: 8px;
	font-family: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, monospace;
	font-size: 13px;
	color: rgba(255,255,255,0.65);
}

/* ---- airline table ---- */
.arw-airline-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}
.arw-airline-table thead th {
	text-align: center;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--text-muted, #5a6480);
	padding: 10px 16px;
	border-bottom: 1px solid var(--border, #d0d5e3);
	background: var(--off-white, #f5f6f8);
}
.arw-th-airline { width: 27%; }
.arw-th-days    { width: 23%; }
.arw-th-product { width: 22%; }
.arw-th-count   { width: 28%; text-align: center; }

.arw-airline-row td {
	padding: 12px 16px;
	border-bottom: 1px solid var(--border, #d0d5e3);
	vertical-align: middle;
}
.arw-airline-row:last-child td { border-bottom: none; }
.arw-airline-row:hover { background: var(--off-white, #f5f6f8); }

.arw-airline-name {
	display: flex;
	align-items: center;
	gap: 10px;
}
.arw-avatar {
	flex-shrink: 0;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-family: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, monospace;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.02em;
}
.arw-avatar-sm { width: 18px; height: 18px; font-size: 8px; }
.arw-airline-row:hover { cursor: pointer; }
.arw-airline-text { min-width: 0; }
.arw-airline-name strong {
	display: block;
	font-size: 13px;
	line-height: 1.3;
	color: var(--text-main, #1a1f36);
}
.arw-alliance {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--text-muted, #5a6480);
	margin-top: 2px;
}
.arw-new-badge {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--blue-dark, #011565);
	margin-top: 2px;
}

/* day-of-week grid, styled like split-flap board segments */
.arw-day-grid { display: flex; gap: 2px; }
.arw-day-pill {
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 3px;
	background: var(--off-white, #f5f6f8);
	border: 1px solid var(--border, #d0d5e3);
	color: var(--border-dark, #b0b8d0);
	font-family: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, monospace;
	font-size: 10px;
	font-weight: 700;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), inset 0 -1px 0 rgba(176,184,208,0.4);
}
.arw-day-pill.active {
	background: var(--blue-dark, #011565);
	border-color: var(--blue-dark, #011565);
	color: var(--yellow, #ffcd00);
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), inset 0 -2px 0 rgba(0,0,0,0.25);
}

.arw-product {
	font-size: 12px;
	line-height: 1.3;
	color: var(--text-muted, #5a6480);
}

/* flight-count as a digital-readout chip, flickers on once like a
   split-flap board settling on its final value */
.arw-count { text-align: center; }
.arw-count-chip {
	display: inline-block;
	background: var(--blue-dark, #011565);
	color: var(--yellow, #ffcd00);
	font-family: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, monospace;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.4;
	white-space: normal;
	padding: 5px 9px;
	border-radius: 4px;
	max-width: 100%;
}
@keyframes arw-flap-settle {
	0%   { opacity: 0.3; }
	25%  { opacity: 1; }
	50%  { opacity: 0.4; }
	75%  { opacity: 1; }
	100% { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
	.arw-count-chip { animation: arw-flap-settle 0.5s steps(4, end) 1; }
}

/* narrower rendered widths (e.g. a col-md-8 column, a sidebar) get
   tighter spacing before falling back to the fully stacked layout */
@container arw (max-width: 520px) {
	.arw-th-airline { width: 30%; }
	.arw-th-days    { width: 22%; }
	.arw-th-product { width: 20%; }
	.arw-th-count   { width: 28%; }
	.arw-airline-table thead th,
	.arw-airline-row td {
		padding-left: 12px;
		padding-right: 12px;
	}
	.arw-day-pill { width: 18px; height: 18px; font-size: 9px; }
	.arw-product { display: none; }
	.arw-th-product { display: none; }
}

/* fully stacked "boarding pass stub" layout, keyed to the widget's own
   rendered width via container query rather than the viewport, so it
   correctly triggers inside narrow columns even on a wide desktop */
@container arw (max-width: 380px) {
	.arw-airline-table thead { display: none; }
	.arw-airline-table, .arw-airline-table tbody, .arw-airline-table tr, .arw-airline-table td {
		display: block;
		width: 100%;
	}
	.arw-airline-row {
		position: relative;
		padding: 16px 18px;
		border-bottom: none;
		border-top: 1px dashed var(--border, #d0d5e3);
	}
	.arw-airline-row:first-child { border-top: none; }
	.arw-airline-row td {
		padding: 4px 0;
		border-bottom: none;
	}
	.arw-airline-row td[data-label]::before {
		content: attr(data-label);
		display: block;
		font-size: 10px;
		font-weight: 700;
		letter-spacing: 0.08em;
		text-transform: uppercase;
		color: var(--text-muted, #5a6480);
		margin-bottom: 3px;
	}
	.arw-days-cell { margin: 6px 0; }
	.arw-count { text-align: left; }
	.arw-product,
	.arw-th-product { display: block; }
}

/* ---- detail section: airline tabs + weekly/monthly flight grid ---- */
.arw-detail {
	border-top: 1px solid var(--border, #d0d5e3);
}
.arw-tabs {
	display: flex;
	flex-wrap: wrap;
	background: var(--off-white, #f5f6f8);
	border-bottom: 1px solid var(--border, #d0d5e3);
}
.arw-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none!important;
    border: none!important;
    border-bottom: 2px solid transparent;
    cursor: pointer!important;
    padding: 10px 14px!important;
    font-size: 11px!important;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted, #5a6480)!important;
}
.arw-tab:hover { color: var(--text-main, #1a1f36)!important; }
.arw-tab.active {
	color: var(--blue-dark, #011565)!important;
	border-bottom-color: var(--yellow, #ffcd00)!important;
	background: var(--white, #fff)!important;
}

.arw-detail-body { padding: 20px 24px 24px; }
.arw-detail-title {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 700;
	color: var(--text-main, #1a1f36);
}
.arw-detail-sub {
	margin: 0 0 16px;
	font-size: 13px;
	color: var(--text-muted, #5a6480);
}

.arw-week-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-bottom: 14px;
}
.arw-week-prev, .arw-week-next {
    background: var(--off-white, #f5f6f8)!important;
    border: 1px solid var(--border, #d0d5e3)!important;
    border-radius: 4px!important;
    width: 28px;
    height: 28px;
    font-size: 16px!important;
    line-height: 1;
    color: var(--blue-dark, #011565)!important;
    cursor: pointer!important;
    padding: unset!important;
}
.arw-week-prev:hover, .arw-week-next:hover { background: var(--border, #d0d5e3); }
.arw-week-label {
	font-family: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, monospace;
	font-size: 13px;
	font-weight: 700;
	color: var(--text-main, #1a1f36);
}

.arw-grid-wrap { overflow-x: auto; }
.arw-flight-grid {
	width: 100%;
	min-width: 560px;
	border-collapse: collapse;
}
.arw-flight-grid th {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--text-muted, #5a6480);
	text-align: center;
	padding: 8px 4px;
	border-bottom: 1px solid var(--border, #d0d5e3);
}
.arw-flight-grid th:first-child { text-align: left; }
.arw-grid-date {
	display: block;
	font-family: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, monospace;
	font-weight: 400;
	text-transform: none;
	color: var(--text-muted, #5a6480);
	margin-top: 2px;
}
.arw-flight-grid td {
	padding: 6px 4px;
	text-align: center;
	border-bottom: 1px solid var(--border, #d0d5e3);
}
.arw-grid-flight {
	text-align: left !important;
	font-family: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, monospace;
	font-size: 12px;
	font-weight: 700;
	color: var(--text-main, #1a1f36);
	white-space: nowrap;
}
.arw-grid-time {
	display: inline-block;
	background: var(--blue-dark, #011565);
	color: var(--yellow, #ffcd00);
	font-family: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, monospace;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 6px;
	border-radius: 3px;
	min-width: 44px;
}
.arw-grid-blank {
	color: var(--border-dark, #b0b8d0);
	font-size: 12px;
}
.arw-grid-empty {
	text-align: center;
	color: var(--text-muted, #5a6480);
	padding: 20px;
}

@media (max-width: 640px) {
	.arw-detail-body { padding: 16px 18px 20px; }
}
