/* ==========================================
   PALETA DE COLORES
   60% Blanco #FFFFFF
   30% Naranja #FE5000
   10% Crema suave #F4EDE4
   Texto: Gris carbón #1E1E1E
   ========================================== */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #FFFFFF;
    color: #1E1E1E;
    height: 100vh; /* Fallback */
    height: 100dvh; /* Mobile viewport fix */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-bottom: 20px; /* Global bottom padding */
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    flex: 1; /* Use flex instead of fixed height */
    min-height: 0; /* Allow shrinking */
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
}

/* Header */
.header {
    margin-bottom: 10px; /* Reduced from 30px */
    animation: fadeInUp 0.5s ease-out;
    flex-shrink: 0;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #F4EDE4;
    border: none;
    border-radius: 20px;
    color: #1E1E1E;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.nav-btn:hover {
    background-color: #FE5000;
    color: white;
    transform: translateY(-2px);
}

.header-logo {
    height: 70px; /* Increased from 60px */
    width: auto;
    flex-shrink: 0;
}

.header h1 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 2.2rem; /* Increased from 2rem */
    font-weight: 700;
    color: #FE5000;
    margin-bottom: 8px; /* Increased from 5px */
}

.header p {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    color: #1E1E1E;
    opacity: 0.7;
}

/* Main Grid */
.main-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    flex: 1;
    min-height: 0; /* Important for nested flex/grid scrolling */
    height: 100%; /* Ensure it takes full height */
    overflow: hidden; /* Prevent overflow */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header-logo {
        height: 60px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        margin-left: -15px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .header h1 {
        font-size: 1.75rem;
    }
    
    .header p {
        font-size: 0.9rem;
    }
    
    .header-logo {
        height: 50px;
    }
    
    .main-grid {
        gap: 15px;
    }
    
    .search-box {
        padding: 20px;
    }
    
    .search-box h2 {
        font-size: 1.25rem;
    }
    
    .input-wrapper label {
        font-size: 0.85rem;
    }
    
    .search-btn, .swap-btn-minimal {
        font-size: 0.9rem;
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .container {
        max-width: 100%;
        padding: 10px;
    }
    
    .header {
        margin-left: -10px;
        margin-bottom: 20px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .header p {
        font-size: 0.85rem;
    }
    
    .header-logo {
        height: 40px;
    }
    
    .main-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .search-box {
        padding: 15px;
    }
    
    .search-box h2 {
        font-size: 1rem;
    }
    
    .input-wrapper {
        margin-bottom: 12px;
    }
    
    .input-wrapper label {
        font-size: 0.8rem;
    }
    
    input, .search-btn, .swap-btn-minimal {
        font-size: 0.875rem;
        padding: 8px 12px;
    }
    
    #map {
        min-height: 300px;
    }
    
    .result {
        font-size: 0.9rem;
    }
    
    .route-details {
        font-size: 0.85rem;
        display: flex;
    }
}

/* Left Panel */
.left-panel {
    animation: fadeInUp 0.6s ease-out;
    height: 100%;
    /* overflow-y: auto; Removed to prevent scrollbar */
    display: flex;
    flex-direction: column;
}

.accessibility-label {
    color: #666666;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Custom Scrollbar for Left Panel - Removed */

.search-box {
    background-color: #F4EDE4;
    border-radius: 12px;
    padding: 20px; /* Increased from 15px */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.search-box h2 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.35rem; /* Increased from 1.2rem */
    margin-bottom: 15px; /* Increased from 10px */
    color: #FE5000;
    font-weight: 600;
}

/* Input Wrapper */
.input-wrapper {
    margin-bottom: 12px; /* Increased from 10px */
    position: relative;
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.input-wrapper label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1E1E1E;
}

.input-wrapper input {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    width: 100%;
    padding: 10px 14px; /* Increased from 8px 12px */
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    background-color: #FFFFFF;
    color: #1E1E1E;
    font-size: 0.95rem; /* Increased from 0.9rem */
    transition: all 0.3s;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #FE5000;
    background-color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(254, 80, 0, 0.1);
}

.input-wrapper input::placeholder {
    color: #999999;
}

/* Botón de intercambio minimalista */
.swap-btn-minimal {
    background: none;
    border: none;
    color: #666666;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border-radius: 4px;
}

.swap-btn-minimal:hover {
    color: #FE5000;
    background-color: rgba(254, 80, 0, 0);
    transform: rotate(180deg);
}

.swap-btn-minimal svg {
    width: 18px;
    height: 18px;
}

/* Suggestions */
.suggestions {
    position: absolute;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background-color: #FFFFFF;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    margin-top: 5px;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.suggestions.active {
    display: block;
}

.suggestion-item {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #F0F0F0;
    transition: background 0.2s;
    color: #1E1E1E;
}

.suggestion-item:hover {
    background-color: #F4EDE4;
}

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

/* Search Button */
.search-btn {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #FE5000, #D94300);
    border: none;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(254, 80, 0, 0.3);
    margin-top: 10px;
    margin-bottom: 10px;
}

.search-btn.secondary-btn {
    border: none;
    border-radius: 8px;
    background: #535353;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-size: 1rem;
    font-weight: 700;
    margin-top: 10px;
    cursor: pointer;
}

.search-btn.secondary-btn:hover {
    background: #1a1a1a;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.search-btn:hover {
    background: linear-gradient(135deg, #D94300, #B83800);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(254, 80, 0, 0.4);
}

/* Action Buttons Container */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.action-buttons .search-btn {
    margin: 0;
    flex: 1;
    padding: 12px 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
}

/* Ensure secondary button has same height/style alignment */
.search-btn.secondary-btn {
    margin-top: 0; /* Override existing margin */
}

/* Animation for buttons */
@keyframes fadeInButton {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.fade-in-btn {
    animation: fadeInButton 0.8s ease-out forwards;
}

/* Loading */
.loading {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-align: center;
    padding: 20px;
    color: #1E1E1E;
}

.loader {
    border: 4px solid #E0E0E0;
    border-top: 4px solid #FE5000;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

.hidden {
    display: none !important;
}

/* Result */
.result {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: #FE5000;
}

/* Route Details 
.route-details {
    margin-top: 10px; Reduced from 20px 
    flex: 1;
    overflow: hidden;  Prevent overflow 
    display: flex;
    flex-direction: column;
}*/

.route-summary {
    background-color: #F4EDE4;
    border-radius: 12px;
    padding: 15px; /* Increased from 10px */
    margin-bottom: 0; /* Reduced from 15px */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    flex: 1; /* Make it fill the remaining space */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.route-summary h3 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.2rem; /* Increased from 1.1rem */
    margin-bottom: 12px; /* Increased from 8px */
    color: #FE5000;
    font-weight: 600;
    text-align: center;
}

.route-summary .stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px; /* Increased from 8px */
}

.route-summary .stat-box {
    background-color: #FFFFFF;
    padding: 10px; /* Increased from 8px */
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.route-summary .stat-label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8rem;
    color: #1E1E1E;
    opacity: 0.7;
    margin-bottom: 5px;
}

.route-summary .stat-value {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #FE5000;
}

.route-step {
    background-color: #F4EDE4;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    margin-bottom: 10px;
    border-left: 4px solid;
}

.route-step h4 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #FE5000;
    font-weight: 600;
}

.route-step p {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9rem;
    color: #1E1E1E;
    margin-bottom: 5px;
}

.transfer-step {
    background-color: #F4EDE4;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border-left: 4px solid #FE5000;
}

.transfer-step h4 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    color: #FE5000;
    margin-bottom: 5px;
    font-weight: 600;
}

/* Right Panel - Map */
.right-panel {
    animation: fadeInUp 0.7s ease-out;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#map {
    position: relative;
    margin-bottom: 0;
    width: 100%;
    height: 100%;
    flex: 1;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-height: 0; /* Prevent flex overflow */
}

/* Toast */
.toast {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #FE5000;
    color: #FFFFFF;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(254, 80, 0, 0.5);
    z-index: 9999;
    font-weight: 600;
    animation: slideIn 0.3s ease;
}

.toast.show {
    display: block;
    animation: slideIn 0.3s ease;
}

.toast.hide {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F0F0F0;
}

::-webkit-scrollbar-thumb {
    background: #FE5000;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #D94300;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #FE5000;
}

.title-with-icon {
    display: flex;
    align-items: center;
    gap: 8px; /* espacio entre texto y estrella */
    font-size: 20px;
    font-weight: bold;
}

.title-with-icon svg {
    color: #FE5000; /* color dorado para la estrella */
}

.modal h2 {
    color: #FE5000;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.modal h3 {
    color: #1E1E1E;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.modal-body p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #444;
}

.modal-body ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.modal-body li {
    margin-bottom: 5px;
    color: #444;
}

.credits {
    margin-top: 30px;
    text-align: center;
    font-style: italic;
    color: #888;
}

/* Favorites List */
.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.favorite-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #eee;
    cursor: pointer;
    transition: all 0.2s;
}

.favorite-item:hover {
    background-color: #fff;
    border-color: #FE5000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.fav-route-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fav-route-title {
    font-weight: 600;
    color: #1E1E1E;
}

.fav-route-details {
    font-size: 0.85rem;
    color: #666;
}

.delete-fav-btn {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s;
}

.delete-fav-btn:hover {
    color: #ff4444;
    background-color: #ffecec;
}

.empty-msg {
    text-align: center;
    color: #888;
    padding: 20px;
}

/* Save Favorite Button */
.save-fav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 10px 15px;
    background-color: #fff;
    border: 2px solid #FE5000;
    color: #FE5000;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    transition: all 0.2s;
}

.save-fav-btn:hover {
    background-color: #FE5000;
    color: white;
}

.save-fav-btn svg {
    width: 18px;
    height: 18px;
}

/* ==========================================
   DARK MODE
   ========================================== */
body.dark-mode {
    background-color: #121212;
    color: #E0E0E0;
}

body.dark-mode .header h1 {
    color: #FE5000; /* Keep orange */
}

body.dark-mode .header p {
    color: #B0B0B0;
}

body.dark-mode .nav-btn {
    background-color: #2C2C2C;
    color: #E0E0E0;
}

body.dark-mode .nav-btn:hover {
    background-color: #FE5000;
    color: #FFFFFF;
}

body.dark-mode .search-box,
body.dark-mode .modal-content {
    background-color: #1E1E1E;
    color: #E0E0E0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

body.dark-mode .input-wrapper input {
    background-color: #2C2C2C;
    border-color: #444;
    color: #ccc;
}

body.dark-mode .input-header label {
    color: #ccc;
}

body.dark-mode .accessibility-label {
    color: #ccc;
}

body.dark-mode .input-wrapper input:focus {
    border-color: #FE5000;
    box-shadow: 0 0 0 3px rgba(254, 80, 0, 0.2);
}

body.dark-mode .suggestions {
    background-color: #2C2C2C;
    border-color: #444;
}

body.dark-mode .suggestion-item {
    border-bottom-color: #444;
    color: #E0E0E0;
}

body.dark-mode .suggestion-item:hover {
    background-color: #3E3E3E;
}

body.dark-mode .swap-btn-minimal {
    color: #FE5000;
}

body.dark-mode .swap-btn-minimal:hover {
    color: #FFFFFF;
}

body.dark-mode .route-summary {
    background-color: #2C2C2C;
}

body.dark-mode .stat-box {
    background-color: #363636;
}

body.dark-mode .stat-label {
    color: #AAA;
}

body.dark-mode .stat-value {
    color: #FFF;
}

body.dark-mode .route-step {
    background-color: #2C2C2C;
    border-left-width: 4px; /* Ensure border color comes from inline style */
}

body.dark-mode .transfer-step {
    background-color: #252525;
    border-left-color: #FE5000;
}

body.dark-mode .modal h3,
body.dark-mode .modal-body p,
body.dark-mode .modal-body li {
    color: #E0E0E0;
}

body.dark-mode .favorite-item {
    background-color: #2C2C2C;
    border-color: #444;
}

body.dark-mode .favorite-item:hover {
    background-color: #363636;
    border-color: #FE5000;
}

body.dark-mode .fav-route-title {
    color: #FFF;
}

body.dark-mode .fav-route-details {
    color: #AAA;
}

body.dark-mode .save-fav-btn {
    background-color: #1E1E1E;
    border-color: #FE5000;
    color: #FE5000;
}

body.dark-mode .save-fav-btn:hover {
    background-color: #FE5000;
    color: #FFF;
}

/* Dark Mode Map Filter */
body.dark-mode .leaflet-layer,
body.dark-mode .leaflet-control-zoom-in,
body.dark-mode .leaflet-control-zoom-out,
body.dark-mode .leaflet-control-attribution {
    filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

/* Fix map markers and popups from being inverted */
body.dark-mode .leaflet-marker-icon,
body.dark-mode .leaflet-marker-shadow,
body.dark-mode .leaflet-popup,
body.dark-mode .leaflet-tooltip {
    filter: none; /* Prevent double inversion if they were inside a filtered container, but usually they are separate panes */
}

/* Actually, Leaflet panes are siblings. We need to target the tile pane specifically */
body.dark-mode .leaflet-tile-pane {
    filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

/* Invert controls back so they look normal-ish or just style them */
body.dark-mode .leaflet-control-container .leaflet-control {
    filter: none;
}

body.dark-mode .leaflet-popup-content-wrapper,
body.dark-mode .leaflet-popup-tip {
    background-color: #2C2C2C;
    color: #E0E0E0;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #FE5000;
}

input:focus + .slider {
    box-shadow: 0 0 1px #FE5000;
}

input:checked + .slider:before {
    transform: translateX(18px);
}

/* Dark mode support for switch */
body.dark-mode .slider {
    background-color: #444;
}

body.dark-mode input:checked + .slider {
    background-color: #FE5000;
}

/* Selected suggestion style */
.suggestion-item.selected {
    background-color: #f0f0f0;
    border-left: 3px solid #FE5000;
}

body.dark-mode .suggestion-item.selected {
    background-color: #3E3E3E;
}

.arrow-down {
  display: inline;
  vertical-align: middle;
  width: 16px;
  height: 16px;
  margin-right: 6px;
}

.icon-transfer {
  display: inline;
  vertical-align: middle;
  width: 16px;
  height: 16px;
  margin-right: 6px;
}

.title-with-info-icon {
  display: flex;
  align-items: center;
  gap: 6px;
}

.title-with-info-icon svg {
  width: 20px;
  height: 20px;
  position: relative;
  color: #FE5000;
  top: -10px;
}
.title-with-star-icon {
  display: flex;
  align-items: center;
  gap: 6px;
}

.route-details {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  z-index: 1000;
  
  /* estado inicial para animación */
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeInLegend 0.6s ease-in forwards;
}

/* Animación */
@keyframes fadeInLegend {
  from {
    opacity: 0;
    transform: translateY(-20px); /* empieza un poco más arriba */
  }
  to {
    opacity: 1;
    transform: translateY(0);     /* vuelve a su posición normal */
  }
}


.route-details h4 {
  margin: 0 0 6px;
  font-size: 0.9rem;
  color: #333;
}

.route-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.route-details li {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.legend-color {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  border-radius: 3px;
}