/**
 * Route Lookup — dark theme UI.
 * Uses --lz-* CSS custom properties defined in aerth-pages.css, with hex fallbacks.
 *
 * @package Lorearium
 */

/* ============================================================
   Container
   ============================================================ */

.lz-route-lookup {
	max-width: 1280px;
	margin: 0 auto;
	padding: 24px 24px 64px;
}

/* ============================================================
   Form
   ============================================================ */

.lz-route-form {
	display: grid;
	grid-template-columns: 1fr 1fr auto;
	gap: 12px;
	align-items: end;
	background: var( --lz-surface2, #1e1a14 );
	border: 1px solid var( --lz-border, rgba( 200, 169, 110, .15 ) );
	padding: 20px;
	margin-bottom: 20px;
}

.lz-route-select-wrap {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.lz-route-select-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var( --lz-muted, #7a7268 );
}

.lz-route-select {
	background: rgba( 0, 0, 0, .3 );
	border: 1px solid var( --lz-border, rgba( 200, 169, 110, .15 ) );
	padding: 8px 12px;
	color: var( --lz-text, #e8dcc8 );
	font-size: 13px;
	width: 100%;
}

.lz-route-submit-wrap {
	display: flex;
	align-items: flex-end;
}

#lz-route-submit {
	padding: 10px 20px;
	background: rgba( 221, 161, 94, .12 );
	border: 1px solid rgba( 221, 161, 94, .4 );
	color: var( --lz-gold, #dda15e );
	font-size: 12px;
	letter-spacing: .1em;
	text-transform: uppercase;
	cursor: pointer;
	white-space: nowrap;
}

#lz-route-submit:hover:not( :disabled ) {
	background: rgba( 221, 161, 94, .2 );
}

#lz-route-submit:disabled {
	opacity: .5;
	cursor: not-allowed;
}

@media ( max-width: 640px ) {
	.lz-route-form {
		grid-template-columns: 1fr;
	}

	.lz-route-submit-wrap {
		justify-content: stretch;
	}

	#lz-route-submit {
		width: 100%;
	}
}

/* ============================================================
   Time-of-day toggle buttons
   ============================================================ */

.lz-tod-btns {
	display: flex;
	gap: 6px;
	margin-bottom: 16px;
}

.lz-tod-btn {
	padding: 6px 14px;
	font-size: 11px;
	letter-spacing: .1em;
	text-transform: uppercase;
	background: rgba( 255, 255, 255, .04 );
	border: 1px solid var( --lz-border, rgba( 200, 169, 110, .15 ) );
	color: var( --lz-muted, #7a7268 );
	cursor: pointer;
	transition: color .15s, background .15s, border-color .15s;
}

.lz-tod-btn.active {
	color: var( --lz-gold, #dda15e );
	border-color: rgba( 221, 161, 94, .4 );
	background: rgba( 221, 161, 94, .08 );
}

.lz-tod-btn:hover:not( .active ) {
	color: var( --lz-text, #e8dcc8 );
}

/* Inline result ToD row */
.lz-tod-btns--inline {
	margin-top: 0;
	margin-bottom: 20px;
}

/* ============================================================
   Loading / error
   ============================================================ */

.lz-route-loading {
	color: var( --lz-muted, #7a7268 );
	font-style: italic;
	font-size: 13px;
	margin-bottom: 16px;
}

.lz-route-error {
	background: rgba( 197, 49, 49, .06 );
	border: 1px solid rgba( 197, 49, 49, .25 );
	padding: 16px 20px;
}

.lz-route-error p {
	margin: 0 0 8px;
	font-size: 13px;
}

.lz-route-error p:last-child {
	margin-bottom: 0;
}

.lz-route-hint {
	color: var( --lz-muted, #7a7268 ) !important;
	font-size: 12px !important;
}

/* ============================================================
   Result wrapper
   ============================================================ */

.lz-route-result-wrap {
	animation: lz-fade-in .2s ease;
}

@keyframes lz-fade-in {
	from { opacity: 0; transform: translateY( 4px ); }
	to   { opacity: 1; transform: translateY( 0 ); }
}

/* ============================================================
   Stop chain
   ============================================================ */

.lz-route-chain {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

.lz-route-stop {
	text-align: center;
}

.lz-route-stop-name {
	color: var( --lz-gold, #dda15e );
	font-size: 15px;
	text-decoration: none;
	display: block;
}

.lz-route-stop-name:hover {
	text-decoration: underline;
}

.lz-route-stop-parent {
	font-size: 10px;
	color: var( --lz-muted, #7a7268 );
	letter-spacing: .06em;
	text-transform: uppercase;
	margin-top: 2px;
}

.lz-route-arrow {
	color: var( --lz-muted, #7a7268 );
	font-size: 18px;
}

/* ============================================================
   Summary line
   ============================================================ */

.lz-route-summary {
	font-size: 12px;
	color: var( --lz-muted, #7a7268 );
	margin-bottom: 20px;
	border-bottom: 1px solid var( --lz-border, rgba( 200, 169, 110, .15 ) );
	padding-bottom: 12px;
}

/* ============================================================
   Narrative edges
   ============================================================ */

.lz-route-narrative {
	margin-bottom: 24px;
}

.lz-route-edge {
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid rgba( 255, 255, 255, .06 );
}

.lz-route-edge:last-child {
	border-bottom: none;
}

.lz-route-edge-label {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var( --lz-gold, #dda15e );
	border-bottom: 1px solid rgba( 221, 161, 94, .15 );
	padding-bottom: 6px;
	margin-bottom: 8px;
}

.lz-route-edge-stats {
	color: var( --lz-muted, #7a7268 );
	font-size: 11px;
}

.lz-route-edge-desc {
	font-size: 13px;
	line-height: 1.6;
	color: var( --lz-text, #e8dcc8 );
	margin: 0;
}

/* Hazard chips on an edge */
.lz-route-hazards {
	margin-top: 8px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.lz-route-hazard-chip {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: .06em;
	padding: 2px 8px;
	background: rgba( 197, 49, 49, .1 );
	border: 1px solid rgba( 197, 49, 49, .3 );
	color: #c87070;
}

/* Umbra tint */
.lz-route-narrative.lz-tod-umbra .lz-route-edge-label {
	color: #7a5c8f;
	border-bottom-color: rgba( 122, 92, 143, .2 );
}

/* ============================================================
   Metadata grid
   ============================================================ */

.lz-route-meta-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 200px, 1fr ) );
	gap: 12px;
	margin-top: 20px;
}

.lz-route-meta-card {
	background: var( --lz-surface, #171310 );
	border: 1px solid var( --lz-border, rgba( 200, 169, 110, .15 ) );
	padding: 12px 16px;
}

.lz-route-meta-label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: var( --lz-gold, #dda15e );
	margin-bottom: 8px;
	border-bottom: 1px solid rgba( 200, 169, 110, .1 );
	padding-bottom: 4px;
}

.lz-route-meta-body {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.lz-route-meta-chip {
	font-size: 11px;
	padding: 2px 8px;
	background: rgba( 255, 255, 255, .04 );
	border: 1px solid var( --lz-border, rgba( 200, 169, 110, .15 ) );
	color: var( --lz-muted, #7a7268 );
}

/* ============================================================
   Region filter chips
   ============================================================ */

.lz-route-region-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
	min-height: 1px;
}

.lz-route-region-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var( --lz-muted, #7a7268 );
	margin-right: 2px;
}

.lz-route-region-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 10px;
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
	background: rgba( 255, 255, 255, .04 );
	border: 1px solid var( --lz-border, rgba( 200, 169, 110, .15 ) );
	color: var( --lz-muted, #7a7268 );
	cursor: pointer;
	transition: color .15s, background .15s, border-color .15s;
}

.lz-route-region-chip.active {
	color: var( --lz-gold, #dda15e );
	border-color: rgba( 221, 161, 94, .4 );
	background: rgba( 221, 161, 94, .08 );
}

.lz-route-region-chip:hover:not( .active ) {
	color: var( --lz-text, #e8dcc8 );
	border-color: rgba( 200, 169, 110, .3 );
}

.lz-route-region-count {
	font-size: 10px;
	opacity: .65;
}

/* ============================================================
   Autocomplete inputs
   ============================================================ */

.lz-route-ac-wrap {
	position: relative;
}

.lz-route-ac-input {
	width: 100%;
	background: rgba( 0, 0, 0, .3 );
	border: 1px solid var( --lz-border, rgba( 200, 169, 110, .15 ) );
	padding: 8px 12px;
	color: var( --lz-text, #e8dcc8 );
	font-size: 13px;
	box-sizing: border-box;
}

.lz-route-ac-input::placeholder {
	color: var( --lz-muted, #7a7268 );
}

.lz-route-ac-input:focus {
	outline: none;
	border-color: rgba( 221, 161, 94, .4 );
}

.lz-route-ac-dropdown {
	position: absolute;
	top: calc( 100% + 2px );
	left: 0;
	right: 0;
	background: #1e1a14;
	border: 1px solid rgba( 221, 161, 94, .25 );
	max-height: 220px;
	overflow-y: auto;
	z-index: 200;
	list-style: none;
	margin: 0;
	padding: 0;
}

.lz-route-ac-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 7px 12px;
	cursor: pointer;
	border-bottom: 1px solid rgba( 255, 255, 255, .04 );
}

.lz-route-ac-item:last-child {
	border-bottom: none;
}

.lz-route-ac-item:hover,
.lz-route-ac-item.focused {
	background: rgba( 221, 161, 94, .1 );
}

.lz-route-ac-name {
	font-size: 13px;
	color: var( --lz-text, #e8dcc8 );
}

.lz-route-ac-type {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var( --lz-muted, #7a7268 );
	flex-shrink: 0;
}
