/* ==================================================
   Taxi Widget - Design "Nacht & Signalgelb"
   Dunkler Hintergrund, Signalgelb als einziger Akzent,
   passend zu taxitime-theme ab Version 5.
   ================================================== */

.taxi-widget {
	--tw-bg: #0e1014;
	--tw-surface: #171a21;
	--tw-surface-2: #1f232c;
	--tw-border: #2a2f3a;
	--tw-text: #f4f5f7;
	--tw-muted: #9aa1ae;
	--tw-faint: #6b7280;
	--tw-accent: #ffd000;
	--tw-accent-hover: #ffdc3d;
	--tw-accent-ink: #111111;
	--tw-success: #34d399;
	--tw-danger: #f87171;

	max-width: 520px;
	margin: 0 auto;
	background: var(--tw-bg);
	color: var(--tw-text);
	border: 1px solid var(--tw-border);
	border-radius: 20px;
	padding: 22px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	box-sizing: border-box;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.taxi-widget *,
.taxi-widget *::before,
.taxi-widget *::after {
	box-sizing: border-box;
}

@media (max-width: 560px) {
	.taxi-widget {
		border-radius: 0;
		border-left: 0;
		border-right: 0;
		padding: 16px;
		box-shadow: none;
	}
}

/* Typografie */

.taxi-widget__title {
	font-size: 20px;
	font-weight: 800;
	margin: 0 0 8px;
	color: var(--tw-text);
}

.taxi-widget__hint {
	font-size: 13px;
	color: var(--tw-muted);
	margin: 0 0 14px;
}

.taxi-widget__label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: var(--tw-faint);
	margin: 12px 0 6px;
}

.taxi-widget__label-inline {
	color: var(--tw-muted);
	font-size: 13px;
	margin-right: 4px;
}

.taxi-widget__error {
	color: var(--tw-danger);
	font-size: 13px;
	margin: 8px 0 0;
	min-height: 16px;
}

/* Eingaben */

.taxi-widget__input {
	width: 100%;
	background: var(--tw-surface);
	border: 1px solid var(--tw-border);
	border-radius: 12px;
	padding: 13px 14px;
	color: var(--tw-text);
	font-size: 16px; /* 16px verhindert Auto-Zoom auf iOS */
}

.taxi-widget__input::placeholder {
	color: var(--tw-faint);
}

.taxi-widget__input:focus {
	outline: none;
	border-color: var(--tw-accent);
	box-shadow: 0 0 0 3px rgba(255, 208, 0, 0.18);
}

/* Buttons */

.taxi-widget__button {
	display: block;
	width: 100%;
	border: none;
	border-radius: 12px;
	padding: 15px;
	font-size: 16px;
	font-weight: 800;
	cursor: pointer;
	margin-top: 12px;
	transition: background 0.15s, opacity 0.15s;
}

.taxi-widget__button:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.taxi-widget__button--primary {
	background: var(--tw-accent);
	color: var(--tw-accent-ink);
}

.taxi-widget__button--primary:not(:disabled):hover {
	background: var(--tw-accent-hover);
}

.taxi-widget__button--secondary {
	background: transparent;
	border: 1.5px solid var(--tw-border);
	color: var(--tw-text);
}

.taxi-widget__button--secondary:hover {
	border-color: var(--tw-muted);
}

.taxi-widget__button--danger {
	background: transparent;
	border: 1.5px solid var(--tw-danger);
	color: var(--tw-danger);
}

.taxi-widget__button-row {
	display: flex;
	gap: 12px;
}

.taxi-widget__button-row .taxi-widget__button {
	flex: 1;
}

.taxi-widget__link {
	background: none;
	border: none;
	color: var(--tw-accent);
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	padding: 4px 0;
}

/* Kopfzeile im Widget */

.taxi-widget__toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.taxi-widget__toolbar-actions {
	display: flex;
	gap: 16px;
}

.taxi-widget__user {
	font-weight: 800;
	font-size: 18px;
	color: var(--tw-text);
}

/* Abholort / Ziel mit Adressvorschlaegen */

.taxi-widget__route-inputs {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 12px;
}

.taxi-widget__address {
	position: relative;
	display: flex;
	align-items: center;
}

.taxi-widget__address .taxi-widget__input {
	padding-left: 36px;
}

.taxi-widget__dot {
	position: absolute;
	left: 14px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	z-index: 1;
}

.taxi-widget__dot--start {
	background: var(--tw-success);
}

.taxi-widget__dot--end {
	background: var(--tw-accent);
}

.taxi-widget__icon-btn {
	position: absolute;
	right: 8px;
	width: 34px;
	height: 34px;
	border: none;
	border-radius: 8px;
	background: var(--tw-surface-2);
	color: var(--tw-accent);
	font-size: 18px;
	cursor: pointer;
}

.taxi-widget__address .taxi-widget__input[data-field="start-address"] {
	padding-right: 50px;
}

.taxi-widget__suggestions {
	display: none;
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	z-index: 1000;
	list-style: none;
	margin: 0;
	padding: 6px;
	background: var(--tw-surface-2);
	border: 1px solid var(--tw-border);
	border-radius: 12px;
	max-height: 260px;
	overflow-y: auto;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.taxi-widget__suggestions li {
	padding: 11px 12px;
	border-radius: 8px;
	font-size: 14px;
	color: var(--tw-text);
	cursor: pointer;
}

.taxi-widget__suggestions li:hover {
	background: rgba(255, 208, 0, 0.12);
}

.taxi-widget__suggestions li.is-empty {
	color: var(--tw-faint);
	cursor: default;
}

/* Umschalter & Tabs */

.taxi-widget__pin-switch,
.taxi-widget__auth-tabs {
	display: flex;
	background: var(--tw-surface);
	border: 1px solid var(--tw-border);
	border-radius: 999px;
	padding: 4px;
	margin-bottom: 12px;
}

.taxi-widget__pin-option,
.taxi-widget__auth-tab {
	flex: 1;
	background: none;
	border: none;
	color: var(--tw-muted);
	font-weight: 700;
	font-size: 12px;
	padding: 9px 4px;
	border-radius: 999px;
	cursor: pointer;
}

.taxi-widget__pin-option.is-active,
.taxi-widget__auth-tab.is-active {
	background: var(--tw-accent);
	color: var(--tw-accent-ink);
}

/* Karte */

.taxi-widget__map {
	width: 100%;
	height: 280px;
	border-radius: 14px;
	margin-bottom: 12px;
	background: var(--tw-surface);
	border: 1px solid var(--tw-border);
	overflow: hidden;
}

@media (max-width: 560px) {
	.taxi-widget__map {
		height: 240px;
	}
}

.taxi-widget .leaflet-container {
	background: #1a1d23;
	font-family: inherit;
}

.taxi-widget .leaflet-control-attribution {
	background: rgba(14, 16, 20, 0.75);
	color: var(--tw-faint);
	font-size: 10px;
}

.taxi-widget .leaflet-control-attribution a {
	color: var(--tw-muted);
}

.taxi-widget .leaflet-bar a {
	background: var(--tw-surface-2);
	color: var(--tw-text);
	border-color: var(--tw-border);
}

/* Preisangebot */

.taxi-widget__quote {
	background: var(--tw-surface);
	border: 1px solid var(--tw-accent);
	border-radius: 14px;
	padding: 16px;
}

.taxi-widget__quote-price {
	font-size: 30px;
	font-weight: 900;
	color: var(--tw-accent);
	line-height: 1.1;
}

.taxi-widget__quote-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin-top: 8px;
	font-size: 14px;
	font-weight: 600;
	color: var(--tw-text);
}

.taxi-widget__quote-note {
	margin-top: 8px;
	font-size: 12px;
	color: var(--tw-faint);
}

/* Status & Fahrtinfos */

.taxi-widget__status-badge {
	display: inline-block;
	border: 1px solid var(--tw-accent);
	background: rgba(255, 208, 0, 0.1);
	color: var(--tw-accent);
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 12px;
}

.taxi-widget__status-badge.is-success {
	border-color: var(--tw-success);
	background: rgba(52, 211, 153, 0.1);
	color: var(--tw-success);
}

.taxi-widget__status-badge.is-danger {
	border-color: var(--tw-danger);
	background: rgba(248, 113, 113, 0.1);
	color: var(--tw-danger);
}

.taxi-widget__trip-info {
	background: var(--tw-surface);
	border: 1px solid var(--tw-border);
	border-radius: 12px;
	padding: 14px;
	margin-bottom: 12px;
	font-size: 14px;
	line-height: 1.8;
}

.taxi-widget__price {
	font-size: 28px;
	font-weight: 900;
	color: var(--tw-accent);
	text-align: center;
	margin: 8px 0 20px;
}

.taxi-widget__stars {
	display: flex;
	justify-content: center;
	gap: 8px;
	font-size: 38px;
	margin-bottom: 20px;
	cursor: pointer;
}

.taxi-widget__stars span {
	color: var(--tw-border);
	transition: color 0.15s;
}

.taxi-widget__stars span.is-active {
	color: var(--tw-accent);
}

/* Historie / Einnahmen */

.taxi-widget__history-item {
	background: var(--tw-surface);
	border: 1px solid var(--tw-border);
	border-radius: 12px;
	padding: 12px 14px;
	margin-bottom: 10px;
	font-size: 14px;
}

.taxi-widget__history-item--row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.taxi-widget__history-date {
	font-size: 12px;
	color: var(--tw-faint);
	margin-bottom: 2px;
}

.taxi-widget__history-price {
	margin-top: 4px;
	font-weight: 800;
	color: var(--tw-accent);
}

/* Fahrer: Online-Status */

.taxi-widget__status-row {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--tw-surface);
	border: 1px solid var(--tw-border);
	border-radius: 12px;
	padding: 14px;
	margin-bottom: 12px;
}

.taxi-widget__status-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--tw-faint);
	display: inline-block;
}

.taxi-widget__status-dot.is-online {
	background: var(--tw-success);
	box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2);
}

.taxi-widget__status-row span[data-role="status-text"] {
	flex: 1;
	font-weight: 700;
	font-size: 14px;
}

.taxi-widget__switch {
	position: relative;
	display: inline-block;
	width: 48px;
	height: 28px;
}

.taxi-widget__switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.taxi-widget__switch-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background-color: var(--tw-border);
	border-radius: 999px;
	transition: 0.2s;
}

.taxi-widget__switch-slider::before {
	position: absolute;
	content: "";
	height: 22px;
	width: 22px;
	left: 3px;
	bottom: 3px;
	background-color: #ffffff;
	border-radius: 50%;
	transition: 0.2s;
}

.taxi-widget__switch input:checked + .taxi-widget__switch-slider {
	background-color: var(--tw-accent);
}

.taxi-widget__switch input:checked + .taxi-widget__switch-slider::before {
	transform: translateX(20px);
	background-color: var(--tw-accent-ink);
}

/* Fahrer: eingehender Auftrag */

.taxi-widget__incoming-order {
	background: var(--tw-surface);
	border: 2px solid var(--tw-accent);
	border-radius: 16px;
	padding: 18px;
	margin-top: 16px;
}

.taxi-widget__incoming-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 1px;
	color: var(--tw-accent);
}

.taxi-widget__timer {
	background: var(--tw-accent);
	color: var(--tw-accent-ink);
	border-radius: 999px;
	padding: 3px 12px;
	font-weight: 800;
}

.taxi-widget__distance {
	font-size: 22px;
	font-weight: 800;
	margin: 8px 0 12px;
}

.taxi-widget__note {
	font-size: 12px;
	color: var(--tw-faint);
	margin-top: 16px;
	text-align: center;
}

/* Freie Taxis in der Naehe */

.taxi-widget__nearby {
	align-items: center;
	gap: 10px;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 12px;
}

.taxi-widget__nearby-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--tw-success);
	box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
}

.taxi-widget__nearby.is-empty .taxi-widget__nearby-dot {
	background: var(--tw-faint);
	box-shadow: none;
}

.taxi-widget .taxi-widget__taxi-icon {
	background: var(--tw-accent);
	color: var(--tw-accent-ink);
	border: 2px solid var(--tw-bg);
	border-radius: 6px;
	font-size: 11px;
	font-weight: 900;
	line-height: 18px;
	text-align: center;
}

/* Preisvorschlag / Gegenangebot */

.taxi-widget__offer {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--tw-border);
}

.taxi-widget__link--quiet {
	color: var(--tw-muted);
	font-size: 13px;
	text-decoration: underline;
}

.taxi-widget__stepper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 6px 0;
}

.taxi-widget__step {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	border: 1px solid var(--tw-border);
	background: var(--tw-surface-2);
	color: var(--tw-text);
	font-size: 24px;
	font-weight: 700;
	cursor: pointer;
}

.taxi-widget__step:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.taxi-widget__step-value {
	font-size: 28px;
	font-weight: 900;
	color: var(--tw-accent);
}

.taxi-widget__counter {
	border: 2px solid var(--tw-accent);
	border-radius: 14px;
	padding: 14px;
	margin: 10px 0 12px;
	background: var(--tw-surface);
}

.taxi-widget__offer-price {
	margin-top: 10px;
	font-size: 14px;
	color: var(--tw-muted);
}

.taxi-widget__offer-price strong {
	display: block;
	font-size: 26px;
	font-weight: 900;
	color: var(--tw-accent);
}

/* Betrag eintippen (Preisvorschlag / Gegenangebot) */

.taxi-widget__amount {
	flex: 1;
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 4px;
	margin: 0 10px;
	border-bottom: 2px solid var(--tw-border);
	cursor: text;
}

.taxi-widget__amount:focus-within {
	border-bottom-color: var(--tw-accent);
}

.taxi-widget__amount-input {
	width: 100%;
	max-width: 140px;
	min-width: 0;
	background: none;
	border: 0;
	color: var(--tw-accent);
	font: inherit;
	font-size: 28px;
	font-weight: 900;
	text-align: right;
	padding: 2px 0;
}

.taxi-widget__amount-input:focus {
	outline: none;
}

.taxi-widget__amount span {
	color: var(--tw-accent);
	font-size: 22px;
	font-weight: 800;
}

.taxi-widget .is-error {
	color: var(--tw-danger);
}

/* Zahlart & Stripe-Zahlungsfeld */

.taxi-widget__pay {
	display: flex;
	gap: 8px;
	margin-top: 12px;
}

.taxi-widget__pay-option {
	flex: 1;
	padding: 10px 8px;
	border-radius: 12px;
	border: 1.5px solid var(--tw-border);
	background: none;
	color: var(--tw-muted);
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
}

.taxi-widget__pay-option.is-active {
	border-color: var(--tw-accent);
	background: rgba(255, 208, 0, 0.12);
	color: var(--tw-text);
}

.taxi-widget__payment-element {
	min-height: 120px;
	margin: 8px 0 4px;
}

/* Gedrueckt halten: kein Zoom/keine Textauswahl, sichtbares Feedback */
.taxi-widget__step {
	touch-action: manipulation;
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
}

.taxi-widget__step:active:not(:disabled) {
	background: var(--tw-accent);
	border-color: var(--tw-accent);
	color: var(--tw-accent-ink);
}

/* Feld leeren (×) */
.taxi-widget__clear {
	position: absolute;
	right: 8px;
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 50%;
	background: var(--tw-surface-2);
	color: var(--tw-muted);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	touch-action: manipulation;
}

.taxi-widget__clear:hover,
.taxi-widget__clear:focus-visible {
	color: var(--tw-text);
}

/* Im Abholort-Feld sitzt rechts noch der Standort-Button */
.taxi-widget__clear--with-locate {
	right: 48px;
}

.taxi-widget__address .taxi-widget__input[data-field="dest-address"] {
	padding-right: 44px;
}

.taxi-widget__address .taxi-widget__input[data-field="start-address"] {
	padding-right: 86px;
}

/* Konto loeschen */
.taxi-widget__danger-zone {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--tw-border);
}

/* Lade-Hinweis (verschwindet, sobald das Skript laeuft) */
.taxi-widget__loading {
	font-size: 13px;
	color: var(--tw-muted);
	background: var(--tw-surface);
	border: 1px dashed var(--tw-border);
	border-radius: 10px;
	padding: 10px 12px;
	margin: 0 0 12px;
}

/* Ortung laeuft: Standort-Knopf pulsiert */
.taxi-widget__icon-btn.is-busy {
	animation: taxi-widget-pulse 1s ease-in-out infinite;
	pointer-events: none;
}

@keyframes taxi-widget-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.35; }
}

.taxi-widget [data-role="location-error"]:empty {
	display: none;
}

/* Preisschaetzung ohne Server */
.taxi-widget__quote-offline {
	margin-top: 10px;
	padding: 10px 12px;
	border: 1px dashed var(--tw-accent);
	border-radius: 10px;
	color: var(--tw-muted);
	font-size: 13px;
	line-height: 1.5;
}
