
.sl3plus-tripresults-3-arr{
    color:#ffffff!important;
}

.sl3plus-plugin {
    margin: 2rem 0;
}

.sl3-search-form {
    background: #2A5EBF;
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.sl3-search-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sl3-search-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0;
    border: 1px solid #ced4da;
    border-radius: 0.75rem;
    overflow: visible;
    background: #fff;
}

.sl3-search-segment {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 4.5rem;
}

.sl3-search-segment + .sl3-search-segment {
    border-left: 1px solid #ced4da;
}

.sl3-search-segment-input {
    flex: 1 1 16rem;
}

.sl3-search-segment-origin,
.sl3-search-segment-destination {
    min-width: 14rem;
}

.sl3-search-segment-date,
.sl3-search-segment-time {
    flex: 0 1 10rem;
    min-width: 9rem;
}

.sl3-search-segment-submit {
    flex: 0 0 auto;
    padding: 0.625rem;
    min-width: 11rem;
}

.sl3-search-grid .form-control,
.sl3-search-grid .btn {
    min-height: 2.75rem;
}

.sl3-search-segment .form-control {
    height: 100%;
    min-height: 4.5rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0 1.125rem;
}

.sl3-search-segment .form-control:focus {
    box-shadow: none;
}

.sl3-search-segment-submit .btn {
  /*  width: 100%;*/
    height: 100%;
}

.sl3-search-segment-swap {
    flex: 0 0 4.75rem;
    justify-content: center;
    padding: 0;
}

.sl3-swap-button {
    min-width: 2.75rem;
    min-height: 2.75rem;
    border-radius: 999px;
}

.sl3-search-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.sl3-search-toolbar-side {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.sl3-advanced-options {
    padding-top: 0.5rem;
}

.sl3-autocomplete-dropdown {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-top: 0.25rem;
}

.sl3-autocomplete-dropdown .list-group-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem 1rem;
    color: #212529;
    border: none;
    border-bottom: 1px solid #dee2e6;
}

.sl3-autocomplete-icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
}

.sl3-autocomplete-dropdown .list-group-item:hover,
.sl3-autocomplete-dropdown .list-group-item.active {
    /* Bootstrap sets white text for .active, unreadable on the light background. */
    color: #212529;
    background-color: #e9ecef;
}

.sl3-autocomplete-dropdown .list-group-item:last-child {
    border-bottom: none;
}

.sl3-search-segment .sl3-autocomplete-dropdown {
    left: 0;
    right: 0;
    top: 100%;
}

.sl3-results-list {
    margin-top: 2rem;
}

/* "Earlier/later connections": part of the list, styled like a flat trip card. */
.sl3-shift {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #17479e;
    text-decoration: none;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 1rem;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sl3-shift-later {
    margin-top: 1rem;
    margin-bottom: 0;
}

#main .sl3-shift:hover,
#main .sl3-shift:focus-visible {
    color: #17479e;
    text-decoration: none;
    background-color: #e8eef8;
    border-color: #17479e;
}

.sl3-shift i {
    font-size: 0.85em;
}

/*
 * Result card (Trip/Result.html), same pattern as the eezy.nrw price calculator on zws-online.de:
 * alternating grey/white cards, the whole summary toggles the details, caret on the right.
 */
.sl3-trip-item {
    overflow: hidden;
    margin-bottom: 1rem;
    background-color: #fff;
    border: 1px solid rgba(23, 71, 158, 0.15);
    border-radius: 8px;
}

.sl3-trip-item:nth-child(odd) {
    background-color: #f5f5f5;
}

.sl3-trip-toggle {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr);
    gap: 0.75rem 1.5rem;
    align-items: center;
    width: 100%;
    padding: 20px;
    color: #1f2328;
    font-size: 17px;
    text-align: left;
    background: none;
    border: 0;
    cursor: pointer;
}

.sl3-trip-toggle:focus-visible {
    outline: 3px solid #17479e;
    outline-offset: -3px;
}

/* Left: "08:56 → 09:29", duration and realtime status below (layout before the redesign). */
.sl3-trip-summary {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 14px;
}

.sl3-trip-time {
    display: inline-flex;
    gap: 0.6rem;
    align-items: center;
    font-size: 27px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.sl3-trip-time strong {
    font-weight: 700;
}

.sl3-trip-time i {
    font-size: 0.85em;
}

.sl3-trip-duration,
.sl3-trip-planned {
    color: #6c757d;
}

/* Middle: line badges and number of changes. */
.sl3-trip-lines {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: center;
    text-align: center;
}

.sl3-trip-lines .sl3-journey-sequence {
    justify-content: center;
}

.sl3-trip-changes {
    color: #6c757d;
    font-size: 15px;
}

/* Right: caret only. */
.sl3-trip-caret {
    justify-self: end;
    color: #17479e;
    font-size: 24px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.sl3-trip-toggle[aria-expanded="true"] .sl3-trip-caret,
details[open] > summary .sl3-leg-line-caret {
    transform: rotate(180deg);
}

/* Details: legs with origin/destination rows, the line as an expandable row, zebra stop list. */
.sl3-trip-details {
    padding: 0 20px 20px;
    font-size: 17px;
}

.sl3-leg-item + .sl3-leg-item,
.sl3-walk + .sl3-leg-item {
    margin-top: 0.75rem;
}

.sl3-leg-stop {
    display: flex;
    gap: 0.25rem 1rem;
    align-items: baseline;
    justify-content: space-between;
    padding: 0.6rem 0;
    font-size: 20px;
}

.sl3-leg-stop-name {
    font-weight: 700;
}

.sl3-leg-platform,
.sl3-intermediate-platform {
    margin-left: 0.35rem;
    color: #6c757d;
    font-size: 14px;
    font-weight: 400;
}

.sl3-leg-stop-time {
    text-align: right;
    white-space: nowrap;
}

.sl3-leg-stop-planned {
    display: block;
    font-size: 14px;
}

.sl3-leg-line {
    background-color: #fff;
    border: 1px solid rgba(23, 71, 158, 0.15);
    border-radius: 8px;
}

.sl3-leg-line-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.9rem;
    align-items: center;
    padding: 0.6rem 1rem;
    font-size: 17px;
    list-style: none;
}

summary.sl3-leg-line-summary {
    cursor: pointer;
}

summary.sl3-leg-line-summary::-webkit-details-marker {
    display: none;
}

summary.sl3-leg-line-summary:focus-visible {
    outline: 3px solid #17479e;
    outline-offset: 2px;
    border-radius: 8px;
}

.sl3-leg-direction {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
}

.sl3-leg-direction i {
    color: #17479e;
}

.sl3-leg-duration,
.sl3-leg-line-count {
    color: #6c757d;
    font-size: 15px;
}

.sl3-leg-line-caret {
    margin-left: auto;
    color: #17479e;
    line-height: 1;
    transition: transform 0.2s ease;
}

.sl3-intermediate-list {
    padding: 0 !important;
    margin: 0;
    list-style: none;
    border-top: 1px solid rgba(23, 71, 158, 0.15);
}

/* The global list styles in #main add bullets and spacing to every <li>. */
#main .sl3-intermediate-list .sl3-intermediate-stop {
    display: grid;
    grid-template-columns: 5.5rem 1fr 5.5rem;
    gap: 1rem;
    align-items: baseline;
    padding: 0.45rem 1rem;
    margin: 0;
    font-size: 14px;
}

#main .sl3-intermediate-list .sl3-intermediate-stop::before {
    content: none;
}

.sl3-intermediate-stop:nth-child(odd) {
    background-color: #ebebeb;
}

.sl3-intermediate-time:last-child {
    text-align: right;
}

.sl3-walk {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.6rem 0;
    color: #6c757d;
    font-size: 14px;
    border-bottom: 1px solid rgba(23, 71, 158, 0.1);
}

.sl3-mode-badge {
    margin-right: 0.25rem;
}

.sl3-journey-summary {
    line-height: 1.45;
}

.sl3-journey-sequence {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
}

.sl3-journey-step {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.sl3-journey-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
}

/* Pictogram of the transport mode (Font Awesome) inside the coloured circle. */
.sl3-journey-icon i {
    font-size: 0.9rem;
    line-height: 1;
}

.sl3-journey-step-rail .sl3-journey-icon {
    background: #0d6efd;
}

.sl3-journey-step-bus .sl3-journey-icon {
    background: #198754;
}

.sl3-journey-step-tram .sl3-journey-icon,
.sl3-journey-step-subway .sl3-journey-icon {
    background: #6f42c1;
}

.sl3-journey-step-footpath .sl3-journey-icon {
    background: #6c757d;
}

.sl3-journey-step-generic .sl3-journey-icon {
    background: #495057;
}

.sl3-journey-label {
    font-size: 0.92rem;
}

/* Narrow price list so the price stays next to the ticket name (full width only on small screens). */
.sl3-fare-options {
    max-width: 420px;
    font-size: 15px;
}

.sl3-fare-option-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.sl3-fare-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.sl3-fare-actions a {
    font-weight: 600;
    text-decoration: none;
}

.sl3-fare-actions a:hover {
    text-decoration: underline;
}

.sl3-trip-fares {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid rgba(23, 71, 158, 0.15);
}

.sl3-trip-fares-headline {
    margin-bottom: 0.5rem;
    font-size: 18px;
    font-weight: 700;
}

.sl3-fare-price {
    font-weight: 700;
    white-space: nowrap;
}

.occupancy-icon {
    font-size: 1.25rem;
    margin-left: 0.5rem;
}

@media (max-width: 575.98px) {
    .sl3-trip-toggle {
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 16px;
    }

    .sl3-trip-lines {
        grid-column: 1 / -1;
        grid-row: 2;
        align-items: flex-start;
        text-align: left;
    }

    .sl3-trip-lines .sl3-journey-sequence {
        justify-content: flex-start;
    }

    .sl3-trip-caret {
        grid-column: 2;
        grid-row: 1;
    }

    .sl3-trip-time {
        font-size: 24px;
    }

    .sl3-trip-details {
        padding: 0 16px 16px;
    }

    .sl3-leg-stop {
        font-size: 17px;
    }

    #main .sl3-intermediate-list .sl3-intermediate-stop {
        grid-template-columns: 3.75rem 1fr 3.75rem;
        gap: 0.5rem;
        padding: 0.45rem 0.75rem;
    }
}

@media (max-width: 991.98px) {
    .sl3-search-bar {
        flex-direction: column;
        border-radius: 0.75rem;
    }

    .sl3-search-segment + .sl3-search-segment {
        border-left: 0;
        border-top: 1px solid #ced4da;
    }

    .sl3-search-segment,
    .sl3-search-segment-input,
    .sl3-search-segment-origin,
    .sl3-search-segment-destination,
    .sl3-search-segment-date,
    .sl3-search-segment-time,
    .sl3-search-segment-submit,
    .sl3-search-segment-swap {
        flex: 1 1 auto;
        min-width: 100%;
    }

    .sl3-search-segment-swap {
        justify-content: flex-start;
        padding: 0.625rem 1rem;
        min-height: auto;
    }

    .sl3-search-segment .form-control {
        min-height: 3.5rem;
    }

    .sl3-search-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .sl3-search-toolbar-side-end .btn {
        width: 100%;
    }
}
