/* TravelersGo Custom Styles */

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

html {
    scroll-behavior: smooth;
}

/* Dark mode transitions */
.dark {
    color-scheme: dark;
}

body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Safety score badge */
.safety-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.safety-badge.safe {
    background-color: #d1fae5;
    color: #059669;
}

.safety-badge.caution {
    background-color: #fef3c7;
    color: #d97706;
}

.safety-badge.risk {
    background-color: #fed7aa;
    color: #ea580c;
}

.safety-badge.danger {
    background-color: #fee2e2;
    color: #dc2626;
}

.dark .safety-badge.safe {
    background-color: rgba(16, 185, 129, 0.2);
}

.dark .safety-badge.caution {
    background-color: rgba(245, 158, 11, 0.2);
}

.dark .safety-badge.risk {
    background-color: rgba(249, 115, 22, 0.2);
}

.dark .safety-badge.danger {
    background-color: rgba(239, 68, 68, 0.2);
}

/* 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 -5px rgba(0, 0, 0, 0.1);
}

/* Gradient backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
}

.gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
}

.gradient-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Slide up animation */
.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* Map styles */
.map-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: #f8fafc;
    border-radius: 1rem;
    overflow: hidden;
}

.dark .map-container {
    background: #1e293b;
}

/* Progress bar */
.progress-bar {
    height: 0.5rem;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.dark .progress-bar {
    background: #374151;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s ease;
}

/* Input focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    ring: 2px;
    ring-color: rgba(59, 130, 246, 0.5);
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
}

.dark .btn-secondary {
    background-color: #374151;
    color: #f3f4f6;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

.dark .btn-secondary:hover {
    background-color: #4b5563;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    animation: slideUp 0.3s ease-out;
}

.dark .toast {
    background: #374151;
    color: white;
}

/* Responsive utilities */
@media (max-width: 640px) {
    .hide-mobile {
        display: none;
    }
}

@media (min-width: 641px) {
    .show-mobile {
        display: none;
    }
}

/* Print styles */
@media print {
    nav,
    footer,
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
