/* =====================================================================
   Langstreckenplaner – Seitenspezifisches CSS
   ===================================================================== */

.lsp-page {
    max-width: 860px;
}

/* ── Kopfbereich ───────────────────────────────────────────────────── */
/* ── Karte / Inhaltsbereich ─────────────────────────────────────────── */
.lsp-card {
    background: #fff;
    border: 1px solid #dde3e8;
    border-radius: 8px;
    padding: 0.9rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.lsp-card h2 {
    margin: 0 0 0.9rem;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.lsp-card--summary {
    background: #f8fbf8;
    border-color: #c3dcc8;
}

/* ── 2-Spalten-Grid im Formular ─────────────────────────────────────── */
.lsp-grid2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 1.5rem;
}

/* ── Formularfelder ─────────────────────────────────────────────────── */
/* .lsp-field / .lsp-input → .bp-field / .bp-input (tailwind.input.css) */

/* ── Zeilengruppe (Input + Button) ──────────────────────────────────── */
.lsp-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ── Radio-Gruppen ──────────────────────────────────────────────────── */
.lsp-radios {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.lsp-radios--wrap { flex-wrap: wrap; gap: 0.5rem 0.9rem; }

.lsp-radio {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.93rem;
    cursor: pointer;
    color: #333;
}

.lsp-radio input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #2c7a3b;
    cursor: pointer;
}

/* ── Geocoding-Hinweis ──────────────────────────────────────────────── */
.lsp-geocode-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #666;
    min-height: 1.1em;
}

.lsp-geocode-hint.ok    { color: #2c7a3b; }
.lsp-geocode-hint.error { color: #c0392b; }

/* ── Buttons → .bp-btn (tailwind.input.css) ─────────────────────────── */

.lsp-field--submit {
    margin-top: 1rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

/* ── Fehlermeldung ───────────────────────────────────────────────────── */
.lsp-error {
    background: #fdf1f1;
    border: 1px solid #f5c6c6;
    border-radius: 6px;
    color: #c0392b;
    padding: 0.75rem 1rem;
    margin-bottom: 1.2rem;
    font-size: 0.92rem;
}

/* ── Zusammenfassungs-Leiste (Step 2) ──────────────────────────────── */
.lsp-summary-bar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    background: #f8fbf8;
    border: 1px solid #c3dcc8;
    border-radius: 8px;
    padding: 0.65rem 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.lsp-summary-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #333;
}

.lsp-summary-sep {
    color: #2c7a3b;
    font-weight: 700;
    padding: 0 0.1rem;
}

.lsp-summary-chip {
    background: #e4f0e6;
    color: #2c7a3b;
    border-radius: 4px;
    padding: 0.1rem 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ── Zusammenfassung dl (alt – nicht mehr verwendet) ────────────────── */
.lsp-dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.25rem 0.75rem;
    margin: 0 0 1.2rem;
    font-size: 0.92rem;
}

.lsp-dl dt { color: #666; font-weight: 600; white-space: nowrap; }
.lsp-dl dd { color: #222; margin: 0; }

/* ── Loading-Spinner ─────────────────────────────────────────────────── */
.lsp-loading {
    text-align: center;
    padding: 2.5rem 1rem;
}

.lsp-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-bottom: 1rem;
}

.lsp-spinner > div {
    width: 10px;
    height: 40px;
    background: #2c7a3b;
    border-radius: 3px;
    animation: lsp-bounce 1.2s infinite ease-in-out;
}
.lsp-spinner > div:nth-child(1) { animation-delay: -1.1s; }
.lsp-spinner > div:nth-child(2) { animation-delay: -1.0s; }
.lsp-spinner > div:nth-child(3) { animation-delay: -0.9s; }
.lsp-spinner > div:nth-child(4) { animation-delay: -0.8s; }
.lsp-spinner > div:nth-child(5) { animation-delay: -0.7s; }

@keyframes lsp-bounce {
    0%, 40%, 100% { transform: scaleY(0.4); opacity: .4; }
    20%           { transform: scaleY(1.0); opacity: 1; }
}

.lsp-wait-msg {
    color: #555;
    font-size: 0.95rem;
    margin: 0;
}

/* ── Ergebnistabelle (injiziert von routedata.php) ──────────────────── */
.rd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

.rd-table th,
.rd-table td {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid #e8edf0;
    vertical-align: middle;
}

.rd-table thead th {
    background: #f0f4f0;
    font-weight: 700;
    color: #333;
    text-align: center;
    white-space: nowrap;
}

.rd-table thead th:nth-child(2),
.rd-table thead th:nth-child(3) { text-align: left; }

.rd-table tbody tr:hover       { background: #f7faf7; }
.rd-table tbody tr.rd-row--active {
    background: #e8f5ea;
    outline: 2px solid #4caf50;
    outline-offset: -1px;
}

.rd-pin {
    width: 40px;
    text-align: center;
    vertical-align: middle;
}
.rd-pin a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}
.rd-pin--gr a { background: #4caf50; }
.rd-pin--or a { background: #ff9800; }
.rd-pin--re a { background: #f44336; }

.rd-station { padding-left: 0.2rem; font-size: 0.85rem; }

.rd-ort     { font-size: 0.82rem; color: #444; white-space: nowrap; vertical-align: middle; }

.rd-nr      { color: #888; font-size: 0.8rem; margin-right: 0.15rem; }
.rd-addr    { color: #777; line-height: 1.4; }

.rd-center  { text-align: center; white-space: nowrap; }
.rd-small   { font-size: 0.82rem; }

.rd-price   { font-size: 0.97rem; }
.rd-price--gr { color: #2c7a3b; }
.rd-price--or { color: #b35c00; }
.rd-price--re { color: #c0392b; }

.rd-sup9 {
    font-size: 0.65em;
    vertical-align: super;
    color: inherit;
}

.rd-hinweis {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.55;
    background: #f8f9fa;
    border-left: 3px solid #aac4ae;
    padding: 0.7rem 0.9rem;
    border-radius: 0 5px 5px 0;
    margin-top: 0.75rem;
}

/* Leaflet-Popup Styling */
.leaflet-popup-content {
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0.5rem 0.7rem;
}

/* ── Responsive (mobile-first) ──────────────────────────────────────── */
/* Mobile default: Ort (3), akt. Preis (5), Ankunft (6) ausgeblendet */
.rd-ort,
.rd-table th:nth-child(3),
.rd-table td:nth-child(3),
.rd-table th:nth-child(5),
.rd-table td:nth-child(5),
.rd-table th:nth-child(6),
.rd-table td:nth-child(6) { display: none; }

@media (min-width: 481px) {
    /* akt. Preis wieder einblenden */
    .rd-table th:nth-child(5),
    .rd-table td:nth-child(5) { display: table-cell; }
}

@media (min-width: 640px) {
    .lsp-card { padding: 1.2rem 1.4rem 1rem; }
    .lsp-grid2 { grid-template-columns: 1fr 1fr; }
    .lsp-radios { flex-wrap: nowrap; gap: 0.8rem; }
    .lsp-summary-bar { flex-direction: row; align-items: center; }
    /* Ort und Ankunft wieder einblenden */
    .rd-ort,
    .rd-table th:nth-child(3),
    .rd-table td:nth-child(3),
    .rd-table th:nth-child(6),
    .rd-table td:nth-child(6) { display: table-cell; }
}
