.bus-marker-wrapper {
    background: transparent !important;
    border: none !important;
}

.bus-marker {
    width: 30px;
    height: 30px;
    background-color: #fff;
    border: 2px solid #119151;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.5s ease-out;
    cursor: pointer;
}

.bus-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
}

.bus-marker i {
    font-size: 16px;
    color: #119151;
}

.bus-marker.moving {
    animation: busMoving 0.5s ease-in-out;
}

@keyframes busMoving {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.route-polyline {
    stroke-width: 4px;
    stroke-opacity: 0.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bus-popup {
    min-width: 200px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.bus-popup-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 14px;
}

.bus-popup-delay {
    font-size: 12px;
    color: #dc3545;
    margin-bottom: 6px;
    font-weight: 500;
}

.bus-popup-info {
    font-size: 12px;
    color: #495057;
    line-height: 1.6;
}

.bus-popup-info div {
    margin-bottom: 3px;
}

.bus-arrivals-container {
    margin-top: 15px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.bus-arrivals-container h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.bus-arrivals-loading {
    text-align: center;
    color: #6c757d;
}

.bus-arrivals-loading i {
    margin-right: 8px;
}

.bus-arrival-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 8px;
    border-bottom: 1px solid #e9ecef;
    background-color: #fff;
    margin-bottom: 6px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.bus-arrival-item:hover {
    background-color: #f1f3f5;
}

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

.bus-arrival-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.bus-arrival-line span:first-child {
    flex-shrink: 0;
}

.bus-arrival-line span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #495057;
}

.bus-arrival-time {
    font-weight: bold;
    color: #119151;
    font-size: 14px;
    flex-shrink: 0;
    margin-left: 10px;
}

.bus-arrival-time.delayed {
    color: #dc3545;
}

@media (max-width: 768px) {
    .bus-marker {
        width: 26px;
        height: 26px;
    }

    .bus-marker i {
        font-size: 14px;
    }

    .bus-popup {
        min-width: 180px;
    }

    .bus-arrivals-container {
        padding: 10px;
    }

    .bus-arrival-item {
        padding: 8px 6px;
        flex-wrap: wrap;
    }

    .bus-arrival-line {
        gap: 8px;
    }

    .bus-arrival-time {
        margin-left: 0;
        margin-top: 5px;
        width: 100%;
        text-align: right;
    }
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.leaflet-popup-content {
    margin: 12px;
}

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

.fa-spinner.fa-spin {
    animation: spin 1s linear infinite;
}

.bus-arrivals-container p[style*="color: #dc3545"] {
    font-size: 13px;
    margin: 0;
    padding: 8px;
    background-color: #fff;
    border-radius: 4px;
    border-left: 3px solid #dc3545;
}

.bus-arrivals-container p[style*="color: #6c757d"] {
    font-size: 13px;
    margin: 0;
    padding: 8px;
    background-color: #fff;
    border-radius: 4px;
    border-left: 3px solid #6c757d;
}

.bus-marker,
.bus-arrival-item,
.route-polyline {
    transition: all 0.3s ease;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(17, 145, 81, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(17, 145, 81, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(17, 145, 81, 0);
    }
}

.bus-marker.new {
    animation: pulse 1.5s;
}
