/* =========================================================
 * AviationStack Test Widget — Frontend Styles
 * Standalone design system (does not depend on a host theme).
 * Every color in this file traces back to the token set below —
 * change the eight variables here and the whole widget re-themes.
 * ========================================================= */

:root {
	--blue-dark  : #011565;
	--yellow     : #ffcd00;
	--white      : #ffffff;
	--off-white  : #f5f6f8;
	--border     : #d0d5e3;
	--border-dark: #b0b8d0;
	--text-main  : #1a1f36;
	--text-muted : #5a6480;
}

/* =========================================================
 * 1. HERO SEARCH — [flight_search_hero]
 * Departures / Arrivals / Flight Status tabs inside a floating
 * search card that overlaps the bottom of a hero banner.
 * ========================================================= */

.asw-hero {
    position: relative;
    width: 100%;
    /* min-height: 380px; */
    display: flex;
    align-items: flex-start;
    justify-content: center;
    /* background-color: var(--blue-dark); */
    background-size: cover;
    background-position: center;
    overflow: hidden;
    padding: 2em 0;
    box-sizing: border-box;
    margin-top: -230px;
}

.home .asw-hero {
	margin-top: -190px;
}

.home .asw-hero-search {
	border-radius: 0;
}

.asw-hero.asw-hero--has-image::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(1, 21, 101, 0.35) 0%, rgba(1, 21, 101, 0.85) 100%);
}

.asw-hero-inner {
	position: relative;
	z-index: 1;
	width: 100%;
/* 	max-width: 860px; */
	max-width: 100%;
	text-align: center;
}

.asw-hero-title {
	margin: 0 0 32px;
	color: var(--white);
	font-size: 40px;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
}

.asw-hero-search {
	background: var(--white);
	border-radius: 14px 14px 0 0;
	box-shadow: 0 -12px 32px rgba(1, 21, 101, 0.18), 0 4px 18px rgba(1, 21, 101, 0.12);
	text-align: left;
	overflow: hidden;
}

.asw-hero-tabs {
	display: flex;
	border-bottom: 1px solid var(--border);
	background: var(--off-white);
}

.asw-hero-tab {
	flex: 1 1 0;
	appearance: none;
	background: transparent;
	border: none;
	border-bottom: 3px solid transparent;
	padding: 18px 12px;
	font-size: 15px;
	font-weight: 700;
	color: var(--text-muted);
	cursor: pointer;
	transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.asw-hero-tab:hover {
	color: var(--blue-dark);
}

.asw-hero-tab.asw-active {
	color: var(--blue-dark);
	background: var(--white);
	border-bottom-color: var(--yellow);
}

.asw-hero-panels {
	padding: 22px 24px 26px;
}

.asw-hero-panel {
	display: none;
}

.asw-hero-panel.asw-active {
	display: block;
}

.asw-hero-panel-label {
	display: block;
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text-muted);
}

.asw-hero-form {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.asw-hero-form input[type="text"] {
	flex: 1 1 220px;
	min-width: 180px;
	padding: 14px 16px;
	border: 1px solid var(--border-dark);
	border-radius: 8px;
	font-size: 15px;
	color: var(--text-main);
	background: var(--white);
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.asw-hero-form input[type="text"]::placeholder {
	color: var(--text-muted);
}

.asw-hero-form input[type="text"]:focus {
	outline: none;
	border-color: var(--blue-dark);
	box-shadow: 0 0 0 3px rgba(1, 21, 101, 0.12);
}

.asw-hero-form select {
	padding: 14px 16px;
	border: 1px solid var(--border-dark);
	border-radius: 8px;
	font-size: 15px;
	color: var(--text-main);
	background: var(--white);
}

.asw-hero-form button {
	appearance: none;
	border: none;
	border-radius: 8px;
	padding: 14px 30px;
	background: var(--yellow);
	color: var(--blue-dark);
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.18s ease, transform 0.05s ease;
}

.asw-hero-form button:hover {
	background: #e6b800;
}

.asw-hero-form button:active {
	transform: translateY(1px);
}

.asw-hero-results {
	margin-top: 20px;
}

.asw-hero-results:empty {
	margin-top: 0;
}

.asw-hero-results p {
	margin: 0;
	color: var(--text-muted);
	font-size: 14px;
}

@media (max-width: 640px) {
	.asw-hero {
		min-height: 320px;
		padding: 40px 14px 40px;
	}

	.asw-hero-title {
		font-size: 28px;
		margin-bottom: 22px;
	}

	.asw-hero-tab {
		font-size: 13px;
		padding: 14px 6px;
	}

	.asw-hero-panels {
		padding: 18px 16px 20px;
	}

	.asw-hero-form button {
		flex: 1 1 100%;
	}
}

/* =========================================================
 * 2. LEGACY INLINE WIDGETS — [flight_status] / [airport_board]
 * ========================================================= */

.asw-widget {
	max-width: 700px;
	margin: 20px 0;
	font-family: inherit;
	color: var(--text-main);
}

.asw-widget h3 {
	margin-bottom: 8px;
	font-size: 20px;
	font-weight: 700;
	color: var(--blue-dark);
}

.asw-widget form {
	display: flex;
	gap: 8px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.asw-widget input[type=text] {
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: 8px;
	flex: 1;
	min-width: 160px;
	font-size: 15px;
	color: var(--text-main);
	background: var(--white);
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.asw-widget input[type=text]:focus {
	outline: none;
	border-color: var(--blue-dark);
	box-shadow: 0 0 0 3px rgba(1, 21, 101, 0.12);
}

.asw-widget select {
	padding: 10px;
	border: 1px solid var(--border);
	border-radius: 8px;
	font-size: 15px;
	color: var(--text-main);
	background: var(--white);
}

.asw-widget button {
	padding: 10px 22px;
	border: none;
	border-radius: 8px;
	background: var(--blue-dark);
	color: var(--white);
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	transition: background 0.18s ease;
}

.asw-widget button:hover {
	background: #021d8a;
}

.asw-widget button:active {
	background: #010d45;
}

.asw-error {
	color: #b3261e;
	font-size: 14px;
}

/* Flight status card (single flight lookup) */

.asw-flight-card {
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 18px;
	margin-bottom: 10px;
	background: var(--off-white);
}

.asw-flight-card .asw-status {
	display: inline-block;
	padding: 3px 12px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* Status badges — built from the shared token set only. */

.asw-status-active,
.asw-status-landed,
.asw-status-scheduled {
	background: #e5eaff;
	color: var(--blue-dark);
}

.asw-status-delayed {
	background: #fff6d9;
	color: #8a6d00;
}

.asw-status-cancelled,
.asw-status-diverted {
	background: var(--blue-dark);
	color: var(--white);
}

.asw-flight-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-top: 12px;
	font-size: 13px;
	color: var(--text-muted);
}

@media (max-width: 600px) {
	.asw-flight-grid {
		grid-template-columns: 1fr;
	}
}

/* =========================================================
 * 3. RESULTS TABLE — shared by legacy board, hero panels, and
 * the always-on [airport_flight_board]. Fully self-contained;
 * no dependency on a host theme's table classes.
 * ========================================================= */

.asw-table-wrap {
	max-width: 100%;
	overflow-x: auto;
	border: 1px solid var(--border);
	border-radius: 10px;
}

.asw-flight-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	background: var(--white);
}

.asw-flight-table th {
	text-align: left;
	padding: 10px 14px;
	background: var(--off-white);
	color: var(--text-muted);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
}

.asw-flight-table td {
	padding: 10px 14px;
	color: var(--text-main);
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
}

.asw-flight-table tbody tr:last-child td {
	border-bottom: none;
}

.asw-flight-table tbody tr:hover td {
	background: var(--off-white);
}

.asw-status-badge {
	display: inline-block;
	padding: 3px 12px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.asw-status-badge.asw-badge-open {
	background: #e5eaff;
	color: var(--blue-dark);
}

.asw-status-badge.asw-badge-scheduled {
	background: #fff8e1;
	color: #8a6d00;
}

.asw-status-badge.asw-badge-warn {
	background: #fff6d9;
	color: #8a6d00;
}

.asw-status-badge.asw-badge-closed {
	background: var(--blue-dark);
	color: var(--white);
}

@media (max-width: 767px) {
	.asw-flight-table {
		font-size: 12px;
	}

	.asw-flight-table th,
	.asw-flight-table td {
		padding: 8px 10px;
	}
}

/* =========================================================
 * 4. Always-on board — [airport_flight_board]
 * ========================================================= */

.asw-board {
	max-width: 900px;
}

.asw-board .asw-subsection-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
	font-size: 20px;
	font-weight: 700;
	color: var(--blue-dark);
}

.asw-board .asw-subsection-title svg {
	width: 22px;
	height: 22px;
	fill: var(--blue-dark);
}

.asw-board .asw-search-tabs {
	display: flex;
	gap: 4px;
	margin-bottom: 14px;
	border-bottom: 1px solid var(--border);
}

.asw-board .asw-search-tab-btn {
	appearance: none;
	background: transparent;
	border: none;
	border-bottom: 3px solid transparent;
	padding: 10px 16px;
	font-size: 14px;
	font-weight: 700;
	color: var(--text-muted);
	cursor: pointer;
}

.asw-board .asw-search-tab-btn.asw-active {
	color: var(--blue-dark);
	border-bottom-color: var(--yellow);
}

.asw-flight-panel {
	display: none;
}

.asw-flight-panel.asw-active {
	display: block;
}
