/* Wiener Linien Corporate Design */
/* Farben basierend auf dem offiziellen Wiener Linien Design */

:root {
    --wl-red: #E3000B;
    --wl-dark-red: #C40009;
    --wl-black: #1A1A1A;
    --wl-gray: #666666;
    --wl-light-gray: #F5F5F5;
    --wl-border: #E0E0E0;
    --wl-white: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--wl-white);
    min-height: 100vh;
    color: var(--wl-black);
    line-height: 1.6;
}

/* Header im Wiener Linien Stil */
header {
    background: var(--wl-red);
    color: var(--wl-white);
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 30px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.wl-logo {
    width: 50px;
    height: 50px;
    background: var(--wl-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    color: var(--wl-red);
}

header h1 {
    font-size: 1.8em;
    font-weight: 600;
    margin: 0;
}

header p {
    font-size: 1em;
    opacity: 0.95;
    font-weight: 300;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Search Section */
.search-section {
    background: var(--wl-white);
    border: 1px solid var(--wl-border);
    border-radius: 4px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.search-section h2 {
    color: var(--wl-black);
    font-size: 1.5em;
    margin-bottom: 20px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--wl-black);
    font-size: 0.95em;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--wl-border);
    border-radius: 4px;
    font-size: 1em;
    transition: all 0.2s;
    background: var(--wl-white);
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--wl-red);
    box-shadow: 0 0 0 3px rgba(227, 0, 11, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--wl-gray);
    font-size: 0.85em;
}

/* Checkbox */
.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--wl-red);
}

/* Button im Wiener Linien Stil */
.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: var(--wl-red);
    color: var(--wl-white);
    border: none;
    border-radius: 4px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background: var(--wl-dark-red);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* Suggestions Dropdown */
.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--wl-white);
    border: 1px solid var(--wl-border);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.suggestions.show {
    display: block;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--wl-light-gray);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: var(--wl-light-gray);
}

.suggestion-item strong {
    color: var(--wl-red);
    font-weight: 600;
}

.suggestion-item small {
    color: var(--wl-gray);
}

/* Loading */
.loading {
    background: var(--wl-white);
    padding: 40px;
    border-radius: 4px;
    border: 1px solid var(--wl-border);
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--wl-light-gray);
    border-top: 4px solid var(--wl-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error */
.error {
    background: #FFF3F3;
    border: 1px solid #FFCCCC;
    border-left: 4px solid var(--wl-red);
    color: #CC0000;
    padding: 16px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    white-space: pre-wrap;
    font-family: inherit;
    line-height: 1.6;
}

/* Results */
.results {
    display: grid;
    gap: 20px;
}

/* Station Info Card */
.station-info {
    background: var(--wl-white);
    border: 1px solid var(--wl-border);
    border-radius: 4px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.station-info h2 {
    color: var(--wl-black);
    margin-bottom: 5px;
    font-size: 1.6em;
    font-weight: 600;
}

.station-info .location {
    color: var(--wl-gray);
    margin-bottom: 20px;
    font-size: 0.95em;
}

/* Line Group */
.line-group {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--wl-light-gray);
    border-radius: 4px;
    border-left: 4px solid var(--wl-red);
}

.line-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--wl-border);
}

/* Line Badge - Wiener Linien Style */
.line-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 50px;
    padding: 0 15px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1.3em;
    color: var(--wl-white);
    margin-right: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.line-badge.ptTram { background: var(--wl-red); }
.line-badge.ptBus { background: #009CDD; }
.line-badge.ptBusNight { background: #1E2832; }
.line-badge.ptMetro { background: #0063A6; }
.line-badge.default { background: var(--wl-gray); }

.line-info {
    flex: 1;
}

.line-info .towards {
    font-weight: 600;
    color: var(--wl-black);
    font-size: 1.1em;
}

.line-info .features {
    margin-top: 5px;
    display: flex;
    gap: 10px;
}

/* Feature Badges */
.feature-badge {
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 0.75em;
    font-weight: 600;
    background: #E0E0E0;
    color: var(--wl-gray);
    text-transform: uppercase;
}

.feature-badge.barrier-free {
    background: #4CAF50;
    color: var(--wl-white);
}

.feature-badge.realtime {
    background: #2196F3;
    color: var(--wl-white);
}

/* Departures */
.departures {
    display: grid;
    gap: 10px;
}

.departure-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--wl-white);
    border-radius: 4px;
    border-left: 4px solid var(--wl-red);
    transition: transform 0.2s;
}

.departure-item:hover {
    transform: translateX(3px);
}

.departure-item.soon {
    border-left-color: #FF9800;
    background: #FFF9F0;
}

.departure-item.now {
    border-left-color: #F44336;
    background: #FFF0F0;
}

.departure-time {
    display: flex;
    flex-direction: column;
}

.departure-time .planned {
    font-size: 0.9em;
    color: var(--wl-gray);
}

.departure-time .real {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--wl-black);
}

.countdown {
    font-size: 2em;
    font-weight: bold;
    color: var(--wl-red);
    min-width: 80px;
    text-align: right;
}

.countdown.soon {
    color: #FF9800;
}

.countdown.now {
    color: #F44336;
}

/* Disruptions */
.disruptions {
    margin-top: 30px;
    padding: 20px;
    background: #FFF9E6;
    border: 1px solid #FFE082;
    border-left: 4px solid #FFC107;
    border-radius: 4px;
}

.disruptions h3 {
    color: #856404;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
    font-weight: 600;
}

.disruption-item {
    background: var(--wl-white);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    border-left: 3px solid #FFC107;
}

.disruption-item:last-child {
    margin-bottom: 0;
}

.disruption-item .title {
    font-weight: 600;
    color: var(--wl-black);
    margin-bottom: 5px;
}

.disruption-item .description {
    color: var(--wl-gray);
    font-size: 0.95em;
}

/* Zurück-Button */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--wl-white);
    border: 2px solid var(--wl-red);
    border-radius: 4px;
    color: var(--wl-red);
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
}

.back-button:hover {
    background: var(--wl-red);
    color: var(--wl-white);
}

.back-button:active {
    transform: translateY(1px);
}

/* Footer */
footer.fair-use-notice {
    background: var(--wl-light-gray);
    border: 1px solid var(--wl-border);
    border-radius: 4px;
    padding: 15px 20px;
    margin-top: 40px;
    text-align: center;
    color: var(--wl-gray);
    font-size: 0.85em;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        padding: 15px 20px;
    }

    header h1 {
        font-size: 1.4em;
    }

    .search-section {
        padding: 20px;
    }

    .departure-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 15px;
    }

    .countdown {
        font-size: 1.8em;
        text-align: center;
        min-width: auto;
    }

    .line-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .line-badge {
        margin-right: 0;
    }

    footer.fair-use-notice {
        font-size: 0.75em;
        padding: 12px 15px;
    }
}

/* Print Styles */
@media print {
    header {
        position: static;
        box-shadow: none;
    }

    .search-section,
    footer.fair-use-notice {
        display: none;
    }

    .departure-item {
        break-inside: avoid;
    }
}
