/* MTA-themed styles */
:root {
    --mta-blue: #0039A6;
    --mta-yellow: #FCCC0A;
    --mta-red: #EE352E;
    --mta-green: #00933C;
    --mta-orange: #FF6319;
    --mta-purple: #B933AD;
    --mta-light-gray: #f5f5f5;
    --mta-dark-gray: #333333;
    --mta-medium-gray: #6c757d;
}

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

body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    color: var(--mta-dark-gray);
    background-color: var(--mta-light-gray);
}

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

/* Header */
header {
    background-color: var(--mta-blue);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    margin-right: 20px;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
}

/* Main content */
main {
    padding: 40px 0;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--mta-blue);
    border-bottom: 2px solid var(--mta-blue);
    padding-bottom: 10px;
}

/* Search section */
.search-section {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.train-selector, .station-selector, .direction-selector {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
}

select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Train buttons */
.train-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.train-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.train-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.train-btn.selected {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Train line colors */
.train-1, .train-2, .train-3 {
    background-color: var(--mta-red);
}

.train-4, .train-5, .train-6 {
    background-color: var(--mta-green);
}

.train-7 {
    background-color: var(--mta-purple);
}

.train-A, .train-C, .train-E {
    background-color: var(--mta-blue);
}

.train-B, .train-D, .train-F, .train-M {
    background-color: var(--mta-orange);
}

.train-N, .train-Q, .train-R, .train-W {
    background-color: var(--mta-yellow);
    color: black;
}

.train-G {
    background-color: #6CBE45;
}

.train-J, .train-Z {
    background-color: #996633;
}

.train-L {
    background-color: #A7A9AC;
}

.train-S {
    background-color: #808183;
}

/* Direction buttons */
.direction-buttons {
    display: flex;
    gap: 15px;
}

.direction-btn {
    flex: 1;
    padding: 12px 20px;
    background-color: white;
    border: 2px solid var(--mta-blue);
    border-radius: 4px;
    color: var(--mta-blue);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.direction-btn:hover:not(:disabled) {
    background-color: var(--mta-blue);
    color: white;
}

.direction-btn.selected {
    background-color: var(--mta-blue);
    color: white;
}

.direction-btn:disabled {
    border-color: #ccc;
    color: #999;
    cursor: not-allowed;
}

/* Results section */
.results-section {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.no-selection {
    text-align: center;
    padding: 30px;
    color: var(--mta-medium-gray);
}

/* Loading spinner */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 57, 166, 0.2);
    border-top-color: var(--mta-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Train times display */
.times-display {
    padding: 20px 0;
}

/* Direction sections */
.train-directions {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
}

.direction-section {
    flex: 1;
    min-width: 300px;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.direction-arrow {
    display: inline-block;
    font-size: 1.2rem;
    margin: 0 5px;
    color: var(--mta-blue);
}

.train-arrival {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.train-arrival:last-child {
    border-bottom: none;
}

.train-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 20px;
}

.arrival-info {
    flex: 1;
}

.arrival-time {
    font-size: 1.2rem;
    font-weight: 700;
}

.arrival-minutes {
    font-size: 2rem;
    font-weight: 700;
    margin-left: auto;
    color: var(--mta-blue);
}

.no-trains {
    text-align: center;
    padding: 30px;
    color: var(--mta-medium-gray);
}

/* Station info */
.station-info {
    text-align: center;
    margin-bottom: 20px;
}

.station-info h3 {
    font-size: 1.8rem;
    color: var(--mta-dark-gray);
    margin-bottom: 5px;
}

/* Footer */
footer {
    background-color: var(--mta-dark-gray);
    color: white;
    padding: 30px 0;
    margin-top: 40px;
}

footer a {
    color: var(--mta-yellow);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    .logo {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .direction-buttons {
        flex-direction: column;
    }
    
    .train-directions {
        flex-direction: column;
    }
    
    .direction-section {
        min-width: 100%;
    }
    
    .train-arrival {
        flex-direction: column;
        text-align: center;
    }
    
    .train-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .arrival-info {
        margin-bottom: 10px;
    }
    
    .arrival-minutes {
        margin-left: 0;
        margin-top: 10px;
    }
} 