* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Arial', sans-serif;
    background: #f1f1f1;
    min-height: 100vh;
    padding: 0;
    color: #212121;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header {
    background: #4285f4;
    color: white;
    padding: 20px 30px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.16);
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-weight: 400;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.95;
    font-weight: 300;
}

.search-container {
    padding: 20px 24px;
    background-color: white;
    border-bottom: 1px solid #e0e0e0;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 2px;
    padding: 0 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    margin-bottom: 16px;
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.search-box:focus-within {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    border-color: #4285f4;
}

.search-box i {
    font-size: 1.2rem;
    color: #757575;
    margin-right: 12px;
}

.search-box input {
    flex: 1;
    border: none;
    padding: 16px 8px;
    font-size: 1rem;
    outline: none;
    background: transparent;
    color: #212121;
}

.search-box button {
    background: none;
    border: none;
    cursor: pointer;
    color: #757575;
    font-size: 1.2rem;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box button:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.search-box button:active {
    background-color: rgba(0, 0, 0, 0.1);
}

.filters {
    display: flex;
    gap: 12px;
}

.filters select {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    font-size: 0.95rem;
    background-color: white;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.filters select:hover {
    border-color: #bdbdbd;
}

.filters select:focus {
    border-color: #4285f4;
    box-shadow: 0 2px 4px rgba(66, 133, 244, 0.2);
}

.stats {
    padding: 16px 24px;
    background-color: white;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #757575;
}

.lines-container {
    padding: 24px;
    min-height: 500px;
    background-color: #fafafa;
}

.loading {
    text-align: center;
    padding: 50px;
    color: #757575;
    font-size: 1.2rem;
}

.loading i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #4285f4;
}

.lines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.line-card {
    background: white;
    border-radius: 2px;
    padding: 20px;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1), 0 1px 5px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.line-card:hover {
    box-shadow: 0 8px 17px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.19);
}

.line-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.line-number {
    font-size: 2rem;
    font-weight: 500;
    color: #4285f4;
    background-color: #e8f0fe;
    padding: 8px 16px;
    border-radius: 2px;
}

.line-type {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 2px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.line-type.express {
    background-color: #fce4ec;
    color: #c2185b;
}

.line-type.conventional {
    background-color: #e8f5e9;
    color: #388e3c;
}

.line-type.brt {
    background-color: #e3f2fd;
    color: #1976d2;
}

.line-name {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: #212121;
}

.line-details {
    color: #757575;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.line-details div {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.line-details i {
    color: #4285f4;
    width: 20px;
}

.view-stops-btn {
    background: #4285f4;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.14);
}

.view-stops-btn:hover {
    background: #3367d6;
    box-shadow: 0 4px 5px rgba(0, 0, 0, 0.2);
}

.view-stops-btn:active {
    background: #2a56c6;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.14);
}

.no-results {
    text-align: center;
    padding: 50px;
    color: #757575;
    font-size: 1.2rem;
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #bdbdbd;
}

.line-detail-panel {
    padding: 24px;
    background-color: #fafafa;
    border-top: 1px solid #e0e0e0;
    margin-top: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.panel-header h2 {
    color: #212121;
    font-size: 1.75rem;
    font-weight: 400;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #757575;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.close-btn:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.close-btn:active {
    background-color: rgba(0, 0, 0, 0.1);
}

.direction-selector {
    margin-bottom: 24px;
    padding: 20px;
    background: white;
    border-radius: 2px;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1), 0 1px 5px rgba(0, 0, 0, 0.12);
}

.direction-selector h3 {
    margin-bottom: 16px;
    color: #212121;
    font-weight: 400;
    font-size: 1.1rem;
}

.direction-buttons {
    display: flex;
    gap: 12px;
}

.direction-btn {
    flex: 1;
    padding: 14px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #757575;
}

.direction-btn.active {
    border-color: #4285f4;
    background-color: #4285f4;
    color: white;
    box-shadow: 0 2px 4px rgba(66, 133, 244, 0.4);
}

.direction-btn:hover:not(.active) {
    background-color: #fafafa;
    border-color: #bdbdbd;
}

.map-container {
    margin-bottom: 24px;
}

.map-container h3 {
    margin-bottom: 16px;
    color: #212121;
    font-weight: 400;
    font-size: 1.1rem;
}

#map {
    height: 500px;
    width: 100%;
    border-radius: 2px;
    margin-bottom: 16px;
    border: none;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1), 0 1px 5px rgba(0, 0, 0, 0.12);
    /* Remova display: none daqui */
}

.map-controls {
    display: flex;
    gap: 10px;
}

.map-btn {
    padding: 10px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #757575;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.map-btn:hover {
    background-color: #fafafa;
    border-color: #4285f4;
    color: #4285f4;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.map-btn:active {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.stops-container h3 {
    margin-bottom: 16px;
    color: #212121;
    font-weight: 400;
    font-size: 1.1rem;
}

.stops-list {
    max-height: 400px;
    overflow-y: auto;
    background: white;
    border-radius: 2px;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1), 0 1px 5px rgba(0, 0, 0, 0.12);
}

.stop-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stop-item:hover {
    background-color: #fafafa;
}

.stop-item:last-child {
    border-bottom: none;
}

.stop-sequence {
    width: 40px;
    height: 40px;
    background: #4285f4;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    margin-right: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.14);
}

.stop-info {
    flex: 1;
}

.stop-name {
    font-weight: 500;
    color: #212121;
    margin-bottom: 4px;
    font-size: 1rem;
}

.stop-desc {
    font-size: 0.9rem;
    color: #757575;
    margin-bottom: 4px;
}

.stop-time {
    font-size: 0.85rem;
    color: #0f9d58;
    display: flex;
    align-items: center;
    gap: 5px;
}

.view-on-map-btn {
    background: none;
    border: none;
    color: #4285f4;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-on-map-btn:hover {
    background-color: rgba(66, 133, 244, 0.08);
}

.view-on-map-btn:active {
    background-color: rgba(66, 133, 244, 0.15);
}

.no-stops, .error-message {
    text-align: center;
    padding: 40px;
    color: #757575;
}

.no-stops i, .error-message i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #bdbdbd;
}

footer {
    background-color: white;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    color: #757575;
    font-size: 0.9rem;
}

footer .info {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #9e9e9e;
}

footer .info i {
    margin-right: 5px;
}

.user-location-marker {
    background: transparent;
    border: none;
}

/* Adicione estas classes para controle do mapa */
.map-hidden {
    display: none !important;
}

.map-visible {
    display: block !important;
}

/* Estilo para o ícone de carregamento do mapa */
.map-loading {
    text-align: center;
    padding: 20px;
    color: #757575;
    font-size: 1rem;
}

.map-loading i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #4285f4;
}

.small-text {
    font-size: 0.85rem;
    color: #9e9e9e;
    margin-top: 5px;
}

.zone-tag, .station-tag, .accessible-tag {
    display: inline-block;
    padding: 2px 8px;
    margin-right: 5px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
}

.zone-tag {
    background-color: #e8f0fe;
    color: #4285f4;
}

.station-tag {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.accessible-tag {
    background-color: #e8f5e9;
    color: #388e3c;
}

@media (max-width: 768px) {
    .lines-grid {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 8px;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .search-box input {
        font-size: 1rem;
        padding: 14px 8px;
    }
    
    .direction-buttons {
        flex-direction: column;
    }
    
    #map {
        height: 300px;
    }
    
    .map-controls {
        flex-direction: column;
    }
    
    .stop-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stop-sequence {
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    .view-on-map-btn {
        align-self: flex-end;
        margin-top: 10px;
    }
}