/* Wyszukiwarka stron głównych rynków zagranicznych i strona rozkładu A→B
   (market-search-ui.js, market-timetable-ui.js). Wygląd jak .live-search na /pl/. */

.market-search { max-width: 560px; text-align: left; margin: 0 auto 1.75rem; }
@media (min-width: 992px) { .market-search { margin-left: 0; } }
.market-search-label { font-weight: 700; display: block; margin-bottom: 8px; color: #fff; font-size: 1.05rem; }
.market-search-row { display: flex; gap: 8px; }
.market-search-row input { min-height: 52px; font-size: 1rem; border-radius: 10px; }
.market-search-row .btn,
.tt-submit {
    min-height: 52px; white-space: nowrap; border-radius: 10px; font-weight: 600;
    /* #00873f: biały tekst 4,6:1 (WCAG AA); #00bf63 miał 2,4:1 (test 12.11). */
    background-color: #00873f !important; border-color: #00873f !important; color: #fff !important;
}
.market-search-row .btn:hover, .tt-submit:hover { background-color: #00733a !important; border-color: #00733a !important; }
.market-search-hint { font-size: .85rem; color: rgba(255, 255, 255, .75); margin-top: 6px; }
.market-search-hint a { color: #6be3a4; font-weight: 600; text-decoration: none; }
.market-search-results {
    background: #fff; color: #212529; border-radius: 10px; padding: 12px 16px; margin-top: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .25); max-height: 60vh; overflow-y: auto;
}
.market-search-results a, .tt-form ~ * a { color: #00873f; font-weight: 600; }

.ms-head { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #555; margin: 8px 0 4px; }
.ms-head:first-child { margin-top: 0; }
.ms-list { list-style: none; padding: 0; margin: 0 0 6px; }
.ms-list > li { padding: 6px 0; border-bottom: 1px solid #eef1ee; }
.ms-list > li:last-child { border-bottom: 0; }
.ms-route { margin: 0 0 8px; font-size: 1.02rem; }
.ms-train-route { font-size: .88rem; color: #444; }
.ms-loading, .ms-error { margin: 6px 0 0; font-size: .9rem; }
.ms-error { color: #c0392b; }
.ms-stops-btn {
    border: 0; background: #eef5f0; color: #06301a; font-weight: 600; font-size: .82rem;
    border-radius: 999px; padding: .2rem .8rem; margin-top: 4px;
}
.ms-stops { margin-top: 6px; }
.ms-stop-list { padding-left: 1.2rem; margin: 0; font-size: .88rem; }
.ms-stop-list li { margin-bottom: 2px; }
.ms-stop-time { font-variant-numeric: tabular-nums; font-weight: 600; display: inline-block; min-width: 3.2rem; }
.ms-stop-cancelled { text-decoration: line-through; color: #888; }

.tt-form {
    display: grid; gap: .75rem; align-items: end;
    grid-template-columns: 1fr; background: #fff; border-radius: 1rem; padding: 1rem 1.1rem;
    box-shadow: 0 4px 24px rgba(80, 149, 50, .08);
}
/* Od tabletu: Origen ⇄ Destino w rzędzie, data i przycisk pod spodem; w jednym rzędzie od 1200 px. */
@media (min-width: 768px) {
    .tt-form { grid-template-columns: 1fr auto 1fr; }
    .tt-date { grid-column: 1; }
    .tt-submit { grid-column: 3; }
}
@media (min-width: 1200px) {
    .tt-form { grid-template-columns: 1fr auto 1fr 10rem auto; }
    .tt-date, .tt-submit { grid-column: auto; }
}
#tt-results .jf-table td:nth-child(-n+3) { white-space: nowrap; }
.tt-field { position: relative; }
.tt-field .form-label { font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.tt-field input { min-height: 48px; }
.tt-swap {
    border: 1px solid #cfe3d6; background: #fff; color: #06301a; border-radius: 999px;
    width: 44px; height: 44px; justify-self: center; margin-bottom: 2px;
}
.tt-suggest {
    position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: 4px 0;
    list-style: none; background: #fff; border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
    max-height: 18rem; overflow-y: auto;
}
.tt-suggest li { padding: 8px 12px; cursor: pointer; }
.tt-suggest li:hover, .tt-suggest li.is-active { background: #e2f0e7; }
.tt-suggest li.is-active { box-shadow: inset 3px 0 0 #00733a; }
.tt-date input { min-height: 48px; }

/* Jasne hero (/de/): ciemne litery zamiast białych. */
.market-search--light .market-search-label { color: #1a1a1a; }
.market-search--light .market-search-hint { color: #555; }
.market-search--light .market-search-hint a { color: #00873f; }
.market-search--light .market-search-row input { border: 1px solid #cfd8d3; }
