/* Nyata AI: taxi cards in the chat (v2)
   Bristol taxi palette: amber on warm paper, ink text, and a real
   number-plate yellow for the one thing passengers look for at the kerb. */

.tx-card {
    --tx-ink: #1F2937;
    --tx-muted: #5B6472;
    --tx-paper: #FFFBEB;
    --tx-line: #EEDDB0;
    --tx-amber: #F59E0B;
    --tx-amber-deep: #B45309;
    --tx-plate: #F7D117;
    --tx-go: #047857;
    --tx-stop: #B91C1C;
    background: var(--tx-paper);
    color: var(--tx-ink);
    border: 1px solid var(--tx-line);
    border-radius: 16px;
    padding: 16px;
    margin: 8px 0;
    max-width: 440px;
    font-size: 15px;
    line-height: 1.45;
    text-align: left;
}
.tx-card * { box-sizing: border-box; }
.tx-card p { margin: 6px 0; }
.tx-card [hidden] { display: none !important; }

/* Plain chat replies */
.tx-bubble { display: flex; gap: 10px; align-items: flex-start; }
.tx-bubble p { margin: 0; }
.tx-bubble-icon { font-size: 20px; line-height: 1.2; }

/* Header */
.tx-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.tx-icon { font-size: 26px; line-height: 1; }
.tx-title { font-size: 17px; font-weight: 700; line-height: 1.25; }
.tx-sub { font-size: 13px; color: var(--tx-muted); }
.tx-busy { animation: tx-bob 1.4s ease-in-out infinite; }
@keyframes tx-bob { 50% { transform: translateY(-3px); } }

/* Route */
.tx-route { list-style: none; margin: 0 0 12px; padding: 0 0 0 4px; position: relative; }
.tx-route li { position: relative; padding: 4px 0 4px 22px; }
.tx-route li + li::before {
    content: ''; position: absolute; left: 4px; top: -8px; height: 16px;
    border-left: 2px dotted var(--tx-amber-deep);
}
.tx-dot { position: absolute; left: 0; top: 10px; width: 10px; height: 10px; }
.tx-dot-from { border-radius: 50%; background: var(--tx-go); }
.tx-dot-to { background: var(--tx-ink); }
.tx-route-label { font-size: 12px; color: var(--tx-muted); margin-right: 4px; }

/* Form blocks */
.tx-block { margin: 12px 0; }
.tx-label { font-size: 13px; font-weight: 600; color: var(--tx-muted); margin-bottom: 6px; }
.tx-input {
    width: 100%; font: inherit; font-size: 16px; /* 16px stops iOS zooming */
    color: var(--tx-ink); background: #fff;
    border: 1px solid #D9C99A; border-radius: 10px; padding: 10px 12px;
}
.tx-input:focus { outline: 2px solid var(--tx-amber); outline-offset: 1px; border-color: var(--tx-amber); }
.tx-pair { display: flex; gap: 8px; margin-top: 8px; }
.tx-pair .tx-input { flex: 1; min-width: 0; }
.tx-fields .tx-input + .tx-input { margin-top: 8px; }
.tx-check { display: flex; gap: 8px; align-items: center; font-weight: 600; cursor: pointer; }
.tx-check input { width: 18px; height: 18px; accent-color: var(--tx-amber-deep); }

/* Segmented choice */
.tx-seg { display: flex; background: #F5E7BE; border-radius: 10px; padding: 3px; gap: 3px; }
.tx-seg-btn {
    flex: 1; font: inherit; font-weight: 600; font-size: 14px; color: var(--tx-ink);
    background: transparent; border: 0; border-radius: 8px; padding: 9px 6px; cursor: pointer;
}
.tx-seg-btn[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 2px rgba(31, 41, 55, .18); }

/* Steppers */
.tx-counts { display: flex; gap: 16px; }
.tx-stepper { flex: 1; }
.tx-stepper-ctl { display: flex; align-items: center; gap: 4px; }
.tx-stepper-ctl button {
    width: 40px; height: 40px; border-radius: 10px; border: 1px solid #D9C99A;
    background: #fff; color: var(--tx-ink); font-size: 20px; line-height: 1; cursor: pointer;
}
.tx-stepper-ctl output { min-width: 32px; text-align: center; font-weight: 700; font-size: 17px; }

/* Prices */
.tx-options { display: grid; gap: 8px; margin: 12px 0 8px; }
.tx-option {
    display: flex; align-items: center; gap: 10px; cursor: pointer;
    background: #fff; border: 1px solid #E8D9AA; border-radius: 12px; padding: 12px;
}
.tx-option:has(input:checked) { border-color: var(--tx-ink); box-shadow: inset 0 0 0 1px var(--tx-ink); }
.tx-option input { width: 18px; height: 18px; accent-color: var(--tx-ink); flex-shrink: 0; }
.tx-option-text { flex: 1; min-width: 0; }
.tx-option-name { display: block; font-weight: 700; }
.tx-option-meta { display: block; font-size: 13px; color: var(--tx-muted); }
.tx-option-fare { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tx-note { font-size: 14px; }
.tx-meta, .tx-facts { font-size: 13px; color: var(--tx-muted); }

/* Money lines */
.tx-fee, .tx-fare {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    border-top: 1px solid var(--tx-line); padding-top: 10px; margin-top: 12px;
}
.tx-fee strong, .tx-fare strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.tx-fare-big strong { font-size: 30px; }

/* Buttons */
.tx-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font: inherit; font-weight: 700; font-size: 15px; text-decoration: none;
    border-radius: 12px; padding: 12px 16px; min-height: 46px; cursor: pointer; border: 0;
}
.tx-btn:disabled { opacity: .55; cursor: default; }
.tx-btn-primary { width: 100%; background: var(--tx-amber); color: var(--tx-ink); }
.tx-btn-primary:hover:not(:disabled) { background: #E8920A; }
.tx-btn-secondary { background: #fff; color: var(--tx-ink); border: 1px solid #D9C99A; }
.tx-btn-link { background: none; padding: 8px 0; min-height: 0; color: var(--tx-stop); text-decoration: underline; text-underline-offset: 3px; }
.tx-wide { width: 100%; margin-top: 10px; }
.tx-card :focus-visible { outline: 2px solid var(--tx-amber-deep); outline-offset: 2px; }

.tx-pay { display: grid; gap: 10px; margin-top: 12px; }
.tx-wallet { min-height: 48px; }
.tx-cardel { background: #fff; border: 1px solid #D9C99A; border-radius: 10px; padding: 13px 12px; margin-bottom: 10px; }
.tx-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tx-actions .tx-btn { flex: 1 1 140px; }
.tx-cancel { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--tx-line); }

/* Text tones */
.tx-small { font-size: 13px; color: var(--tx-muted); }
.tx-muted { color: var(--tx-muted); }
.tx-error { color: var(--tx-stop); font-size: 14px; }
.tx-error:empty { display: none; }

/* Address search */
.tx-ask-q { font-weight: 700; font-size: 16px; margin: 0 0 10px; }
.tx-ask .tx-btn { width: 100%; margin-bottom: 8px; }
.tx-ask-done { margin: 0; font-weight: 600; }
.tx-search { position: relative; }
.tx-suggest { margin-top: 6px; background: #fff; border: 1px solid #E8D9AA; border-radius: 10px; overflow: hidden; }
.tx-suggest-item { display: block; width: 100%; text-align: left; font: inherit; background: none; border: 0; border-bottom: 1px solid #F3EBD3; padding: 10px 12px; cursor: pointer; color: var(--tx-ink); }
.tx-suggest-item:last-child { border-bottom: 0; }
.tx-suggest-item:hover, .tx-suggest-item:focus { background: #FFF4D6; }
.tx-suggest p { margin: 0; padding: 10px 12px; font-size: 13px; }

/* Driver */
.tx-driver { background: #fff; border: 1px solid #E8D9AA; border-radius: 12px; padding: 12px; margin: 12px 0; }
.tx-driver-top { display: flex; align-items: center; gap: 10px; }
.tx-driver-who { flex: 1; min-width: 0; }
.tx-driver-name { font-weight: 700; }
.tx-avatar {
    width: 40px; height: 40px; border-radius: 50%; background: var(--tx-ink); color: var(--tx-amber);
    display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0;
}
.tx-car { margin-top: 8px; font-weight: 600; }
.tx-licence { font-size: 13px; margin-top: 4px; }

/* The number plate: what passengers look for at the kerb */
.tx-plate {
    background: var(--tx-plate); color: #111; border: 2px solid #111; border-radius: 5px;
    padding: 3px 8px; font-weight: 800; font-size: 17px; letter-spacing: .06em;
    white-space: nowrap; font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
}

/* Verification code */
.tx-code { background: var(--tx-ink); color: #fff; border-radius: 14px; padding: 14px 16px; margin: 12px 0; text-align: center; }
.tx-code span { display: block; font-size: 13px; color: #CBD5E1; }
.tx-code strong { display: block; font-size: 38px; line-height: 1.15; letter-spacing: .32em; padding-left: .32em; color: var(--tx-amber); font-variant-numeric: tabular-nums; }
.tx-code p { margin: 4px 0 0; font-size: 13px; color: #CBD5E1; }
.tx-eta { font-weight: 700; margin: 4px 0; }
.tx-eta:empty { display: none; }

/* Waiting meter */
.tx-wait { background: #fff; border: 1px solid #E8D9AA; border-radius: 12px; padding: 12px; }
.tx-wait-row { display: flex; justify-content: space-between; align-items: baseline; }
.tx-wait-row strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.tx-wait-bar { height: 6px; background: #F5E7BE; border-radius: 3px; margin-top: 8px; overflow: hidden; }
.tx-wait-bar i { display: block; height: 100%; background: var(--tx-go); }
.tx-wait-charging { border-color: var(--tx-amber-deep); }
.tx-wait-charging strong { color: var(--tx-amber-deep); }

/* Map */
.tx-map { height: 210px; border-radius: 12px; overflow: hidden; margin-top: 12px; border: 1px solid #E8D9AA; }
.tx-pin { display: block; width: 18px; height: 18px; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.tx-pin-from { border-radius: 50%; background: #047857; }
.tx-pin-to { background: #1F2937; }
.tx-pin-wrap, .tx-car-wrap { background: none; border: 0; }
.tx-car-rot { transition: transform .8s ease; transform-origin: 50% 50%; }

/* Receipt and rating */
.tx-receipt { margin: 8px 0 12px; }
.tx-receipt-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--tx-line); }
.tx-receipt-row dt, .tx-receipt-row dd { margin: 0; }
.tx-receipt-row dd { font-variant-numeric: tabular-nums; }
.tx-receipt-total { font-weight: 800; font-size: 17px; }
.tx-rate p { font-weight: 700; margin-bottom: 4px; }
.tx-stars { display: flex; gap: 4px; }
.tx-star { font-size: 30px; line-height: 1; color: #D9C99A; background: none; border: 0; padding: 4px; cursor: pointer; }
.tx-star:hover, .tx-star-on { color: var(--tx-amber); }

@media (max-width: 380px) {
    .tx-card { padding: 14px; }
    .tx-counts { flex-direction: column; gap: 10px; }
    .tx-code strong { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
    .tx-busy { animation: none; }
    .tx-car-rot { transition: none; }
}