/* Core variables */
:root {
    --font-primary: system-ui, -apple-system, sans-serif;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Colors */
    --color-primary: #3B82F6;
    --color-primary-dark: #2563EB;
    --color-primary-light: #60A5FA;
    --color-secondary: #764BA2;
    --color-text: #1F2937;
    --color-text-light: #6B7280;
    --color-background: #F3F4F6;
    --color-surface: #FFFFFF;
    --color-border: #E5E7EB;

    /* Elevation */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-full: 9999px;
}

/* Reset and base styles */
body {
    font-family: var(--font-primary);
    background-color: var(--color-background);
    margin: 0;
    min-height: 100vh;
}

/* Layout */
.transit-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

.transit-grid {
    display: grid;
    gap: var(--spacing-lg);
}

/* Navigation */
.transit-nav {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    padding: var(--spacing-md) 0;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.transit-nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transit-nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.transit-nav-back {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: white;
    text-decoration: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: background-color 0.2s;
}

.transit-nav-back:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Cards and Surfaces */
.transit-card {
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-lg);
    border: 1px solid var(--color-border);
}

/* Route Header */
.route-header {
    margin-bottom: var(--spacing-xl);
}

.route-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}

.route-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-light);
}

.route-type-badge {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--color-primary-light);
    color: var(--color-primary-dark);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Map */
.transit-map {
    height: 500px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--color-border);
}

/* Stops List */
.stops-container {
    max-height: 600px;
    overflow-y: auto;
}

.stop-item {
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.stop-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.stop-number {
    background-color: var(--color-primary);
    color: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.stop-details {
    flex-grow: 1;
}

.stop-name {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
}

.stop-coordinates {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* Custom Scrollbar */
.stops-container {
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) var(--color-border);
}

.stops-container::-webkit-scrollbar {
    width: 6px;
}

.stops-container::-webkit-scrollbar-track {
    background: var(--color-border);
    border-radius: var(--radius-full);
}

.stops-container::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
    border-radius: var(--radius-full);
}

/* Grid Layout */
.transit-layout-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-lg);
}

/* Footer */
.transit-footer {
    background-color: var(--color-surface);
    padding: var(--spacing-lg) 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
}

.transit-footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
}

.transit-footer-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.transit-footer-link:hover {
    text-decoration: underline;
}



/* Responsive Design */
@media (max-width: 1024px) {
    .transit-layout-main {
        grid-template-columns: 1fr;
    }

    .transit-map {
        height: 400px;
    }
}

@media (max-width: 640px) {
    .transit-container {
        width: 95%;
        padding: var(--spacing-sm);
    }

    .route-title {
        font-size: 1.5rem;
    }

    .stop-item {
        padding: var(--spacing-sm);
    }
}