:root {
    --primary-color: 210 11% 98%; /* Light gray-blue */
    --secondary-color: 220 13% 18%; /* Dark blue-gray */
    --accent-color: 200 100% 50%; /* Bright blue */
    --success-color: 120 100% 25%; /* Green */
    --warning-color: 45 100% 50%; /* Yellow */
    --danger-color: 0 100% 50%; /* Red */
    --info-color: 195 100% 50%; /* Cyan */
}

/* Custom map styling */
.map-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--bs-border-radius);
    overflow: hidden;
}

/* Map info windows custom styling */
.map-info-window {
    max-width: 300px;
}

.map-info-window .info-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--bs-dark);
}

.map-info-window .info-rating {
    color: var(--bs-warning);
    margin-bottom: 0.5rem;
}

.map-info-window .info-address {
    color: var(--bs-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.map-info-window .info-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Place card styling */
.place-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.place-card:hover {
    border-left-color: var(--bs-info);
    background-color: var(--bs-light);
}

.place-card.selected {
    border-left-color: var(--bs-primary);
    background-color: var(--bs-primary-bg-subtle);
}

.place-rating {
    color: var(--bs-warning);
}

.place-type {
    background-color: var(--bs-secondary-bg-subtle);
    color: var(--bs-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--bs-border-radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

/* Route styling */
.route-step {
    padding: 0.75rem;
    border-bottom: 1px solid var(--bs-border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.route-step:hover {
    background-color: var(--bs-light);
}

.route-step:last-child {
    border-bottom: none;
}

.route-step-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bs-primary);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.route-step-content {
    flex-grow: 1;
}

.route-step-instruction {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.route-step-distance {
    color: var(--bs-secondary);
    font-size: 0.875rem;
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Error states */
.error-state {
    text-align: center;
    padding: 2rem;
    color: var(--bs-danger);
}

.error-state .error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--bs-secondary);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .map-container {
        height: 300px;
    }
    
    .place-card {
        margin-bottom: 0.5rem;
    }
    
    .route-step {
        padding: 0.5rem;
    }
    
    .route-step-icon {
        width: 20px;
        height: 20px;
        font-size: 0.65rem;
    }
}

/* Custom scrollbar for directions panel */
.directions-panel::-webkit-scrollbar {
    width: 6px;
}

.directions-panel::-webkit-scrollbar-track {
    background: var(--bs-light);
    border-radius: 3px;
}

.directions-panel::-webkit-scrollbar-thumb {
    background: var(--bs-secondary);
    border-radius: 3px;
}

.directions-panel::-webkit-scrollbar-thumb:hover {
    background: var(--bs-dark);
}

/* Map controls positioning */
.map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.map-control-btn {
    background: white;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    padding: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: all 0.2s ease;
}

.map-control-btn:hover {
    background-color: var(--bs-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Search autocomplete styling */
.pac-container {
    border-radius: var(--bs-border-radius);
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pac-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--bs-border-color);
    cursor: pointer;
}

.pac-item:hover {
    background-color: var(--bs-light);
}

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

/* Travel mode buttons */
.travel-mode-buttons .btn-check:checked + .btn {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

/* Quick filters */
.quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.quick-filter-btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--bs-border-radius-pill);
}

/* Status indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--bs-border-radius-pill);
}

.status-indicator.online {
    background-color: var(--bs-success-bg-subtle);
    color: var(--bs-success);
}

.status-indicator.offline {
    background-color: var(--bs-danger-bg-subtle);
    color: var(--bs-danger);
}

.status-indicator.loading {
    background-color: var(--bs-warning-bg-subtle);
    color: var(--bs-warning);
}

/* Animation for markers dropping */
@keyframes markerDrop {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.marker-animation {
    animation: markerDrop 0.5s ease-out;
}
