/* Ruach Skies — front-end styles
 *
 * Everything is scoped to .rusk and driven by the custom properties below,
 * so a theme can re-colour the plugin with a few overrides, e.g.
 *   .rusk { --rusk-accent: #7a1f5c; }
 * Fonts are inherited from the theme on purpose.
 */

.rusk {
	--rusk-ink: #16202e;
	--rusk-muted: #5b6474;
	--rusk-line: #e2e5ea;
	--rusk-surface: #f5f6f8;
	--rusk-card: #ffffff;
	--rusk-accent: #0b6e69;
	--rusk-accent-hover: #095a56;
	--rusk-accent-ink: #ffffff;
	--rusk-accent-soft: #e4f1ef;
	--rusk-warn: #7a5200;
	--rusk-warn-soft: #fff6e0;
	--rusk-danger: #b3261e;
	--rusk-danger-soft: #fcebea;
	--rusk-ok: #1e7b45;
	--rusk-ok-soft: #e6f4ec;
	--rusk-radius: 8px;
	--rusk-radius-sm: 6px;
	--rusk-focus: 0 0 0 3px rgba(11, 110, 105, .28);

	max-width: 1040px;
	margin: 0 auto;
	color: var(--rusk-ink);
	line-height: 1.5;
	box-sizing: border-box;
}
.rusk *, .rusk *::before, .rusk *::after { box-sizing: inherit; }
.rusk [hidden] { display: none !important; }
.rusk .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rusk-muted { color: var(--rusk-muted); }
.rusk-time, .rusk-card-price, .rusk-mx-cell, .rusk-tl-time, .rusk-trip-price, .rusk-pnr { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- Buttons */
.rusk-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 42px; padding: 0 18px;
	border: 1px solid transparent; border-radius: var(--rusk-radius-sm);
	font: inherit; font-size: 15px; font-weight: 600; line-height: 1;
	text-decoration: none; cursor: pointer; white-space: nowrap;
	transition: background-color .15s, border-color .15s, color .15s;
}
.rusk-btn:focus-visible, .rusk button:focus-visible, .rusk a:focus-visible,
.rusk input:focus-visible, .rusk select:focus-visible { outline: none; box-shadow: var(--rusk-focus); }
.rusk-btn-primary { background: var(--rusk-accent); color: var(--rusk-accent-ink); }
.rusk-btn-primary:hover { background: var(--rusk-accent-hover); color: var(--rusk-accent-ink); }
.rusk-btn-primary:disabled { background: #a9b3bd; cursor: not-allowed; }
.rusk-btn-ghost { background: var(--rusk-card); color: var(--rusk-ink); border-color: var(--rusk-line); }
.rusk-btn-ghost:hover { border-color: var(--rusk-ink); color: var(--rusk-ink); }
.rusk-btn-block { width: 100%; }
.rusk-link-btn { background: none; border: 0; padding: 0; color: var(--rusk-accent); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }

/* ---------------------------------------------------------------- Fields */
.rusk-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; align-items: flex-end; }
.rusk-field { display: flex; flex-direction: column; flex: 1 1 170px; min-width: 0; }
.rusk-field-small { flex: 0 1 110px; }
.rusk-field label { font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--rusk-ink); }
.rusk-field label small { font-weight: 400; color: var(--rusk-muted); }
.rusk-field input, .rusk-field select, .rusk-passenger-fieldset input, .rusk-passenger-fieldset select {
	width: 100%; min-height: 44px; padding: 9px 12px;
	border: 1px solid #c9ced6; border-radius: var(--rusk-radius-sm);
	background: var(--rusk-card); color: var(--rusk-ink); font: inherit; font-size: 15px;
}
.rusk-field input:focus, .rusk-field select:focus { border-color: var(--rusk-accent); }
.rusk-field.is-invalid input, .rusk-airport.is-invalid input, .is-invalid > input { border-color: var(--rusk-danger); }

.rusk-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.rusk-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--rusk-accent); flex: none; }

.rusk-alert { padding: 11px 14px; border-radius: var(--rusk-radius-sm); margin: 12px 0; font-size: 14px; }
.rusk-alert p { margin: 0; }
.rusk-alert p + p { margin-top: 4px; }
.rusk-alert-error { color: var(--rusk-danger); background: var(--rusk-danger-soft); }
.rusk-alert-info { color: var(--rusk-ink); background: var(--rusk-accent-soft); }
.rusk-alert a { color: inherit; font-weight: 600; }

/* ---------------------------------------------------------------- Search form */
.rusk-search { background: var(--rusk-card); border: 1px solid var(--rusk-line); border-radius: var(--rusk-radius); padding: 18px 20px 6px; }
.rusk-trip-type { border: 0; padding: 0; margin: 0 0 14px; gap: 18px; }
.rusk-trip-type label { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: 14px; cursor: pointer; }
.rusk-trip-type input { accent-color: var(--rusk-accent); }
.rusk-standard-legs .rusk-airport { flex: 1 1 210px; }
.rusk-field-date { flex: 0 1 170px; }
.rusk-field-submit { flex: 0 0 auto; }
.rusk-swap {
	flex: none; align-self: flex-end; width: 36px; height: 44px; margin: 0 -6px;
	border: 1px solid var(--rusk-line); border-radius: var(--rusk-radius-sm); background: var(--rusk-card);
	color: var(--rusk-muted); font-size: 18px; cursor: pointer;
}
.rusk-swap:hover { color: var(--rusk-accent); border-color: var(--rusk-accent); }
.rusk-leg { position: relative; padding-right: 40px; }
.rusk-leg-remove { position: absolute; right: 0; bottom: 0; width: 34px; height: 44px; border: 0; background: none; color: var(--rusk-muted); font-size: 22px; cursor: pointer; }
.rusk-leg:nth-child(-n+2) .rusk-leg-remove { visibility: hidden; }
.rusk-add-leg { margin-bottom: 14px; }

/* Airport combobox */
.rusk-airport-box { position: relative; }
.rusk-airport-list {
	position: absolute; z-index: 50; top: calc(100% + 4px); left: 0; min-width: 100%; width: max-content; max-width: min(420px, 92vw);
	max-height: 320px; overflow-y: auto; margin: 0; padding: 4px; list-style: none;
	background: var(--rusk-card); border: 1px solid var(--rusk-line); border-radius: var(--rusk-radius);
	box-shadow: 0 12px 28px -8px rgba(22, 32, 46, .22);
}
.rusk-airport-option { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: var(--rusk-radius-sm); cursor: pointer; }
.rusk-airport-option[aria-selected="true"], .rusk-airport-option:hover { background: var(--rusk-accent-soft); }
.rusk-airport-code { flex: none; width: 44px; font-weight: 700; font-size: 15px; letter-spacing: .5px; color: var(--rusk-accent); }
.rusk-airport-text { display: flex; flex-direction: column; min-width: 0; }
.rusk-airport-city { font-weight: 600; font-size: 14px; }
.rusk-airport-name { font-size: 12px; color: var(--rusk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rusk-airport-none { padding: 10px; font-size: 13px; color: var(--rusk-muted); }

/* ---------------------------------------------------------------- Results: summary + change search */
.rusk-summary {
	display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
	padding: 14px 18px; margin-bottom: 12px;
	background: var(--rusk-card); border: 1px solid var(--rusk-line); border-radius: var(--rusk-radius);
}
.rusk-summary-text { display: flex; flex-direction: column; min-width: 0; }
.rusk-summary-route { font-size: 18px; font-weight: 700; }
.rusk-summary-meta { font-size: 14px; color: var(--rusk-muted); }
.rusk-modify-panel { margin-bottom: 16px; }
.rusk-results-loading { text-align: center; padding: 48px 0; color: var(--rusk-muted); }
.rusk-results-loading .rusk-spinner { margin: 0 auto 12px; }

/* ---------------------------------------------------------------- Results: airline grid */
.rusk-matrix-wrap { margin-bottom: 14px; border: 1px solid var(--rusk-line); border-radius: var(--rusk-radius); background: var(--rusk-card); overflow: hidden; }
.rusk-matrix { overflow-x: auto; scrollbar-width: thin; }
.rusk-mx-grid {
	display: grid;
	grid-template-columns: 104px repeat(var(--rusk-cols), minmax(112px, 1fr));
	min-width: max-content;
}
.rusk-mx-grid > * {
	display: flex; align-items: center; justify-content: center;
	min-height: 44px; padding: 6px 10px; margin: 0;
	border: 0; border-right: 1px solid var(--rusk-line); border-bottom: 1px solid var(--rusk-line);
	background: var(--rusk-card); color: var(--rusk-ink); font: inherit; font-size: 14px; text-align: center;
}
.rusk-mx-grid > button { cursor: pointer; }
.rusk-mx-grid > button:hover { background: var(--rusk-surface); }
.rusk-mx-grid > button:disabled { color: #b0b6bf; cursor: default; background: var(--rusk-card); }
.rusk-mx-grid > [aria-pressed="true"] { background: var(--rusk-accent-soft); box-shadow: inset 0 -3px 0 var(--rusk-accent); }
.rusk-mx-corner, .rusk-mx-rowhead {
	position: sticky; left: 0; z-index: 1; justify-content: flex-start !important;
	font-weight: 600; font-size: 13px !important; color: var(--rusk-muted) !important;
}
.rusk-mx-airline { flex-direction: column; gap: 4px; min-height: 76px !important; }
.rusk-mx-name { font-size: 12px; line-height: 1.25; font-weight: 600; max-width: 110px; }
.rusk-mx-cell { font-weight: 600; }
.rusk-mx-cell.is-cheapest { color: var(--rusk-ok); }
.rusk-mx-cell.is-empty { color: #b0b6bf; font-weight: 400; }

/* Logos */
.rusk-logo { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; border-radius: 6px; overflow: hidden; background: var(--rusk-card); }
.rusk-logo img { width: 100%; height: 100%; object-fit: contain; }
.rusk-logo-text { background: var(--rusk-surface); color: var(--rusk-muted); font-size: 12px; font-weight: 700; letter-spacing: .5px; }

/* ---------------------------------------------------------------- Results: toolbar + cards */
.rusk-results-toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 10px; }
.rusk-results-count { margin: 0; font-weight: 700; }
.rusk-active-filter { display: flex; gap: 8px; align-items: center; font-size: 14px; padding: 4px 10px; border-radius: 999px; background: var(--rusk-accent-soft); }
.rusk-sort { margin-left: auto; display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--rusk-muted); }
.rusk-sort select { min-height: 38px; padding: 6px 10px; border: 1px solid var(--rusk-line); border-radius: var(--rusk-radius-sm); font: inherit; font-size: 14px; background: var(--rusk-card); color: var(--rusk-ink); }

.rusk-flight-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rusk-flight-card { background: var(--rusk-card); border: 1px solid var(--rusk-line); border-radius: var(--rusk-radius); }
.rusk-flight-card.is-open { border-color: #c3c9d1; }
.rusk-card-top { display: grid; grid-template-columns: 190px 1fr auto; gap: 18px; align-items: center; padding: 16px 18px; }
.rusk-card-airline { display: flex; gap: 10px; align-items: center; min-width: 0; }
.rusk-card-airline-name { font-weight: 700; font-size: 15px; line-height: 1.25; }
.rusk-card-sub { font-size: 12px; color: var(--rusk-muted); }
.rusk-card-legs { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rusk-card-buy { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; padding-left: 18px; border-left: 1px dashed var(--rusk-line); }
.rusk-card-price { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.rusk-card-actions { display: flex; gap: 8px; }
.rusk-card-actions .rusk-btn { min-height: 38px; padding: 0 14px; font-size: 14px; }

/* The flight line: time/code — track with a dot per stop — time/code */
.rusk-legline { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.rusk-legline-end { display: flex; flex-direction: column; line-height: 1.15; }
.rusk-legline-arr { text-align: right; }
.rusk-time { font-size: 20px; font-weight: 700; }
.rusk-time sup { font-size: 11px; font-weight: 700; color: var(--rusk-warn); margin-left: 2px; }
.rusk-code { font-size: 13px; color: var(--rusk-muted); font-weight: 600; letter-spacing: .5px; }
.rusk-legline-mid { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 90px; }
.rusk-legline-dur { font-size: 12px; color: var(--rusk-muted); }
.rusk-legline-track {
	position: relative; display: flex; justify-content: space-evenly; align-items: center;
	width: 100%; height: 10px;
}
.rusk-legline-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid #c3c9d1; }
.rusk-legline-track::after { content: ""; position: absolute; right: -2px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--rusk-accent); }
.rusk-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--rusk-card); border: 2px solid var(--rusk-warn); }
.rusk-legline-stops { font-size: 12px; font-weight: 600; color: var(--rusk-warn); }
.rusk-legline-stops.is-direct { color: var(--rusk-ok); }

.rusk-card-details { padding: 4px 18px 18px; border-top: 1px solid var(--rusk-line); }

/* ---------------------------------------------------------------- Itinerary timeline (details, confirmation, account) */
.rusk-itinerary { display: grid; gap: 18px; padding-top: 14px; }
.rusk-leg-head h4 { margin: 0; font-size: 15px; }
.rusk-leg-head p { margin: 0 0 8px; font-size: 13px; color: var(--rusk-muted); }
.rusk-timeline { list-style: none; margin: 0; padding: 0; }
.rusk-timeline li { display: grid; grid-template-columns: 64px 1fr; gap: 14px; position: relative; }
.rusk-tl-time { font-weight: 700; text-align: right; }
.rusk-tl-place { display: flex; flex-direction: column; padding-left: 18px; position: relative; }
.rusk-tl-place small { font-size: 12px; color: var(--rusk-muted); }
.rusk-tl-stop .rusk-tl-place::before {
	content: ""; position: absolute; left: -5px; top: 7px; width: 10px; height: 10px; border-radius: 50%;
	background: var(--rusk-card); border: 2px solid var(--rusk-accent);
}
.rusk-tl-flight { padding: 6px 0; }
.rusk-tl-flight .rusk-tl-time { font-weight: 400; font-size: 13px; color: var(--rusk-muted); }
.rusk-tl-flight .rusk-tl-place { border-left: 2px solid #c3c9d1; margin-left: -1px; font-size: 14px; }
.rusk-tl-layover {
	display: block !important; margin: 6px 0 6px 78px; padding: 7px 12px;
	border-radius: var(--rusk-radius-sm); background: var(--rusk-warn-soft); color: var(--rusk-warn); font-size: 13px;
}

/* ---------------------------------------------------------------- Passenger form */
.rusk-passenger-fieldset { border: 1px solid var(--rusk-line); border-radius: var(--rusk-radius); padding: 16px; margin: 0 0 18px; background: var(--rusk-card); }
.rusk-passenger-fieldset legend { font-weight: 700; padding: 0 6px; }
.rusk-signin-prompt { margin-top: 0; }
.rusk-terms-box { margin: 18px 0 8px; padding: 14px 16px; border: 1px solid var(--rusk-line); border-radius: var(--rusk-radius); background: var(--rusk-surface); }
.rusk-terms-box p { margin: 6px 0 0 28px; font-size: 13px; }
.rusk-terms a { color: var(--rusk-accent); font-weight: 600; }
.rusk-submit-booking { min-width: 220px; }

/* Booking summary */
.rusk-booking-summary { background: var(--rusk-surface); border-radius: var(--rusk-radius); padding: 16px 18px; margin: 16px 0; }
.rusk-booking-summary h3 { margin-top: 0; }
.rusk-price-breakdown { width: 100%; border-collapse: collapse; }
.rusk-price-breakdown td { padding: 5px 0; border: 0; }
.rusk-price-breakdown td:last-child { text-align: right; }
.rusk-price-total td { border-top: 1px solid var(--rusk-line); padding-top: 9px; font-weight: 700; }
.rusk-price-changed-notice { color: var(--rusk-warn); font-size: 13px; margin-top: 8px; }

/* Payment methods */
.rusk-payment-methods { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rusk-payment-method-option {
	min-height: 44px; padding: 0 18px; border: 1px solid var(--rusk-line); border-radius: var(--rusk-radius-sm);
	background: var(--rusk-card); color: var(--rusk-ink); font: inherit; font-weight: 600; cursor: pointer;
}
.rusk-payment-method-option.is-selected { border-color: var(--rusk-accent); background: var(--rusk-accent-soft); box-shadow: inset 0 0 0 1px var(--rusk-accent); }

/* ---------------------------------------------------------------- Confirmation */
.rusk-confirmation-success h2 { color: var(--rusk-ok); }
.rusk-confirmation-failed h2 { color: var(--rusk-danger); }
.rusk-pnr { font-size: 1.25em; letter-spacing: 2px; font-weight: 800; }
.rusk-spinner {
	width: 28px; height: 28px; border: 3px solid var(--rusk-line); border-top-color: var(--rusk-accent);
	border-radius: 50%; animation: rusk-spin .8s linear infinite; margin-top: 10px;
}
@keyframes rusk-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- Account: sign in / create account */
.rusk-auth { max-width: 460px; }
.rusk-auth-card { background: var(--rusk-card); border: 1px solid var(--rusk-line); border-radius: var(--rusk-radius); padding: 8px 24px 24px; }
.rusk-auth-tabs { display: flex; margin: 0 -24px 18px; border-bottom: 1px solid var(--rusk-line); }
.rusk-auth-tabs button {
	flex: 1; min-height: 50px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--rusk-muted); cursor: pointer;
	box-shadow: inset 0 -2px 0 transparent;
}
.rusk-auth-tabs button[aria-selected="true"] { color: var(--rusk-ink); box-shadow: inset 0 -2px 0 var(--rusk-accent); }
.rusk-auth-panel h2 { font-size: 20px; margin: 10px 0 4px; }
.rusk-auth-panel > p { margin: 0 0 14px; font-size: 14px; }
.rusk-auth-panel .rusk-field { margin-bottom: 14px; }
.rusk-auth-panel .rusk-row { margin-bottom: 0; }
.rusk-auth-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 14px; }
.rusk-auth-row a { color: var(--rusk-accent); }
.rusk-auth .rusk-terms { margin: 4px 0 18px; }
.rusk-password { position: relative; }
.rusk-password input { padding-right: 64px; }
.rusk-password-toggle { position: absolute; right: 4px; top: 4px; bottom: 4px; padding: 0 10px; border: 0; background: none; color: var(--rusk-accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.rusk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- Account: dashboard */
.rusk-dash-head, .rusk-booking-head {
	display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-start;
	padding-bottom: 18px; margin-bottom: 8px; border-bottom: 1px solid var(--rusk-line);
}
.rusk-dash-head h2, .rusk-booking-head h2 { margin: 0; font-size: 24px; }
.rusk-dash-head p, .rusk-booking-head p { margin: 2px 0 0; }
.rusk-dash-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rusk-dash-section { margin-top: 26px; }
.rusk-dash-section h3 { font-size: 17px; margin: 0 0 10px; }
.rusk-trips { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rusk-line); border-radius: var(--rusk-radius); background: var(--rusk-card); }
.rusk-trip + .rusk-trip { border-top: 1px solid var(--rusk-line); }
.rusk-trip-link { display: flex; gap: 16px; justify-content: space-between; align-items: center; padding: 16px 18px; color: inherit; text-decoration: none; }
.rusk-trip-link:hover { background: var(--rusk-surface); }
.rusk-trip-main { display: flex; flex-direction: column; min-width: 0; }
.rusk-trip-route { font-weight: 700; font-size: 16px; }
.rusk-trip-meta { font-size: 14px; color: var(--rusk-muted); }
.rusk-trip-side { display: grid; grid-template-columns: auto auto; gap: 2px 16px; align-items: center; justify-items: end; text-align: right; }
.rusk-trip-ref { font-size: 13px; color: var(--rusk-muted); }
.rusk-trip-price { grid-column: 1 / -1; font-weight: 700; }
.rusk-trips-past .rusk-trip-route { font-weight: 600; }

.rusk-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.rusk-badge-confirmed { background: var(--rusk-ok-soft); color: var(--rusk-ok); }
.rusk-badge-processing, .rusk-badge-pending, .rusk-badge-review { background: var(--rusk-warn-soft); color: var(--rusk-warn); }
.rusk-badge-closed, .rusk-badge-refunded { background: var(--rusk-surface); color: var(--rusk-muted); }
.rusk-booking-head .rusk-badge { margin-bottom: 8px; }

.rusk-refs { display: flex; gap: 22px; margin: 0; }
.rusk-refs dt { font-size: 12px; color: var(--rusk-muted); }
.rusk-refs dd { margin: 0; font-weight: 700; }
.rusk-back { margin: 0 0 12px; font-size: 14px; }
.rusk-back a { color: var(--rusk-accent); text-decoration: none; }
.rusk-pax-list { list-style: none; margin: 0; padding: 0; }
.rusk-pax-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rusk-line); }
.rusk-help { margin-top: 26px; padding: 14px 16px; border-radius: var(--rusk-radius); background: var(--rusk-surface); font-size: 14px; }
.rusk-help p { margin: 0; }
.rusk-help a { color: var(--rusk-accent); }

.rusk-empty { padding: 26px 18px; text-align: center; border: 1px dashed var(--rusk-line); border-radius: var(--rusk-radius); color: var(--rusk-muted); list-style: none; }
.rusk-empty p { margin: 0 0 12px; }
.rusk-notice { padding: 14px 16px; background: var(--rusk-surface); border-radius: var(--rusk-radius); }

/* ---------------------------------------------------------------- Small screens */
@media (max-width: 760px) {
	.rusk-search { padding: 14px 14px 2px; }
	.rusk-standard-legs .rusk-airport, .rusk-field-date { flex: 1 1 100%; }
	.rusk-swap { align-self: center; margin: -6px auto; transform: rotate(90deg); height: 36px; }
	.rusk-field-submit, .rusk-field-submit .rusk-btn { flex: 1 1 100%; width: 100%; }
	.rusk-leg { padding-right: 0; padding-top: 30px; border-top: 1px solid var(--rusk-line); }
	.rusk-leg .rusk-field { flex: 1 1 100%; }
	.rusk-leg-remove { top: 0; bottom: auto; height: 30px; }

	.rusk-card-top { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 14px; }
	.rusk-legline { gap: 8px; }
	.rusk-legline-mid { min-width: 0; }
	.rusk-legline-stops { text-align: center; }
	.rusk-card-buy { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; min-width: 0; padding: 12px 0 0; border-left: 0; border-top: 1px dashed var(--rusk-line); }
	.rusk-card-price { font-size: 19px; }
	.rusk-time { font-size: 18px; }
	.rusk-card-details { padding: 4px 14px 14px; }
	.rusk-timeline li { grid-template-columns: 50px 1fr; gap: 10px; }
	.rusk-tl-layover { margin-left: 60px; }
	.rusk-sort { margin-left: 0; }

	.rusk-trip-link { flex-direction: column; align-items: stretch; }
	.rusk-trip-side { justify-items: start; text-align: left; grid-template-columns: auto 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.rusk-spinner { animation-duration: 2.4s; }
	.rusk-btn { transition: none; }
}

/* ---------------------------------------------------------------- Admin */
.rusk-stat-grid .card { background: #fff; border: 1px solid #e2e2e2; border-radius: 6px; padding: 18px; text-align: center; }
.rusk-stat-grid .card h2 { font-size: 28px; margin: 0 0 4px; }
.rusk-stat-grid .card p { margin: 0; color: #666; }

.rusk .rusk-leg-layovers { margin: 4px 0 0; color: #7a4b00; font-size: 14px; }
.rusk .rusk-leg-layovers strong { color: inherit; }

/* Country picker ------------------------------------------------------ */
.rusk .rusk-field-country { flex: 1 1 220px; min-width: 0; }
.rusk .rusk-country { position: relative; }
.rusk .rusk-country-value { position: absolute; left: 12px; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.rusk .rusk-country-button { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 8px 12px; background: var(--rusk-card, #fff); color: var(--rusk-ink); border: 1px solid #c9ced6; border-radius: var(--rusk-radius-sm, 6px); font: inherit; text-align: left; cursor: pointer; }
.rusk .rusk-country-button:hover { border-color: #b9c0ca; }
.rusk .rusk-country-button:focus-visible, .rusk .rusk-country.is-open .rusk-country-button { outline: none; border-color: var(--rusk-accent); box-shadow: 0 0 0 3px rgba(11,110,105,.18); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rusk-accent) 18%, transparent); }
.rusk .rusk-country.is-invalid .rusk-country-button { border-color: #c0362c; }
.rusk .rusk-country-current { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rusk .rusk-country-current span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rusk .rusk-country-current img, .rusk .rusk-country-list img { width: 24px; height: 16px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); object-fit: cover; }
.rusk .rusk-country-placeholder { color: var(--rusk-muted); }
.rusk .rusk-country-chevron { flex: none; color: var(--rusk-muted); transition: transform .15s; }
.rusk .rusk-country.is-open .rusk-country-chevron { transform: rotate(180deg); }
.rusk .rusk-country-panel { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; right: 0; min-width: 260px; background: var(--rusk-card, #fff); border: 1px solid var(--rusk-line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16,24,40,.14); overflow: hidden; }
.rusk .rusk-country-search { display: block; width: calc(100% - 20px); margin: 10px; padding: 9px 12px; border: 1px solid var(--rusk-line); border-radius: 8px; background: var(--rusk-surface, #f4f6f8); font: inherit; }
.rusk .rusk-country-search:focus { outline: none; border-color: var(--rusk-accent); background: #fff; }
.rusk .rusk-country-list { list-style: none; margin: 0; padding: 4px 0 6px; max-height: 280px; overflow-y: auto; border-top: 1px solid var(--rusk-line); overscroll-behavior: contain; }
.rusk .rusk-country-list li { display: flex; align-items: center; gap: 12px; padding: 9px 14px; cursor: pointer; }
.rusk .rusk-country-list li.is-active { background: var(--rusk-surface, #f4f6f8); }
.rusk .rusk-country-list li.is-selected { font-weight: 600; color: var(--rusk-accent); }
.rusk .rusk-country-list .rusk-country-empty { color: var(--rusk-muted); cursor: default; }
@media (max-width: 760px) { .rusk .rusk-country-panel { min-width: 0; } .rusk .rusk-country-list { max-height: 240px; } }
