/* Custom styles for Road Trip Planner Pro */

.touch-map {
    touch-action: pan-x pan-y;
    user-select: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

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

/* Smooth transitions */
.transition-all {
    transition: all 0.3s ease;
}

/* Loading animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Custom toggle switch */
.toggle {
    appearance: none;
    width: 3rem;
    height: 1.5rem;
    background: #e2e8f0;
    border-radius: 0.75rem;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.toggle:checked {
    background: #3b82f6;
}

.toggle::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1.25rem;
    height: 1.25rem;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle:checked::before {
    transform: translateX(1.5rem);
}

/* Card hover effects */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Route animation */
@keyframes route-draw {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}

.route-line {
    stroke-dasharray: 10 5;
    animation: route-draw 2s ease-out;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .touch-target {
        min-height: 44px;
        min-width: 44px;
    }
    
    .mobile-padding {
        padding: 1rem;
    }
    
    .mobile-text {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Weather condition indicators */
.weather-dust { color: #f97316; }
.weather-tornado { color: #6b7280; }
.weather-snow { color: #3b82f6; }
.weather-heat { color: #ef4444; }
.weather-storm { color: #8b5cf6; }

/* Pulse animation for loading states */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Custom focus styles for accessibility */
.focus-visible:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Button animations */
.btn-animate {
    position: relative;
    overflow: hidden;
}

.btn-animate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-animate:hover::before {
    left: 100%;
}