/* Custom Colors */
:root {
    --burgundy-50: #fdf2f4;
    --burgundy-100: #fce7ea;
    --burgundy-200: #f9d0d5;
    --burgundy-300: #f4a9b3;
    --burgundy-400: #ed7686;
    --burgundy-500: #e14d62;
    --burgundy-600: #cd2b43;
    --burgundy-700: #ad2037;
    --burgundy-800: #912033;
    --burgundy-900: #7a1d2e;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Apply Animations */
.stats-card {
    animation: scaleIn 0.3s ease-out;
}

.table-row {
    animation: fadeIn 0.2s ease-out;
}

/* Custom Styles */
.bg-burgundy-800 {
    background-color: var(--burgundy-800);
}

.text-burgundy-600 {
    color: var(--burgundy-600);
}

.hover\:text-burgundy-900:hover {
    color: var(--burgundy-900);
}

.bg-burgundy-100 {
    background-color: var(--burgundy-100);
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Table Styles */
.table-hover tr:hover {
    background-color: rgba(145, 32, 51, 0.05);
}

/* Status Badge Animations */
.status-badge {
    transition: all 0.2s ease;
}

.status-badge:hover {
    transform: scale(1.05);
}

/* Smooth Transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

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

.loading::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Transport Page Styles */
.upload-area-enter {
    opacity: 0;
    transform: translateY(10px);
}

.upload-area-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 300ms, transform 300ms;
}

@keyframes pulse-border {
    0% {
        border-color: #E5E7EB;
    }
    50% {
        border-color: #722F37;
    }
    100% {
        border-color: #E5E7EB;
    }
}

.drag-active {
    animation: pulse-border 1.5s infinite;
}

@keyframes slide-up {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-message {
    animation: slide-up 0.3s ease-out;
}

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

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

/* Hover Effects */
.hover-scale {
    transition: transform 0.2s ease-in-out;
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* Error Message Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-shake {
    animation: shake 0.5s ease-in-out;
}

/* Custom Scrollbar */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #722F37 #F3F4F6;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #F3F4F6;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #722F37;
    border-radius: 3px;
}

/* Burgundy Theme Colors */
.bg-burgundy-50 { background-color: #FDF2F3; }
.bg-burgundy-100 { background-color: #FAE5E7; }
.bg-burgundy-200 { background-color: #F5CCD0; }
.bg-burgundy-300 { background-color: #EFB3B9; }
.bg-burgundy-400 { background-color: #E99AA2; }
.bg-burgundy-500 { background-color: #E3818B; }
.bg-burgundy-600 { background-color: #722F37; }
.bg-burgundy-700 { background-color: #5B262C; }
.bg-burgundy-800 { background-color: #441C21; }
.bg-burgundy-900 { background-color: #2D1316; }

/* Prose Burgundy Theme */
.prose-burgundy a {
    color: #722F37;
}

.prose-burgundy a:hover {
    color: #8B3844;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0; /* top:0; right:0; bottom:0; left:0; */
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10050; /* above global overlay and any headers */
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.loading-spinner-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-width: 280px;
}

@keyframes file-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes export-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

@keyframes progress-glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.export-animation {
    animation: file-pulse 2.2s ease-in-out infinite;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.export-arrow-container {
    position: relative;
}

.export-animation .export-arrow {
    animation: export-bounce 1.6s ease-in-out infinite;
    transform-origin: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.export-animation::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(205, 43, 67, 0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: progress-glow 2.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes loading-dots {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    80%, 100% { opacity: 0; }
}

.loading-dots span {
    animation: loading-dots 1.4s infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

.loading-progress {
    color: var(--burgundy-700);
    font-weight: 500;
    text-align: center;
}

/* Accessible Progress Bar */
.progress-bar {
    width: 100%;
    max-width: 320px;
    height: 10px;
    background: #f3f4f6;
    border-radius: 9999px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.progress-bar__fill {
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, #cd2b43, #e14d62);
    border-radius: 9999px;
    animation: progress-indeterminate 1.2s ease-in-out infinite;
}

@keyframes progress-indeterminate {
    0% { transform: translateX(-120%); }
    50% { transform: translateX(20%); }
    100% { transform: translateX(120%); }
}

/* Screen-reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reduce motion preferences */
@media (prefers-reduced-motion: reduce) {
    .export-animation,
    .export-animation .export-arrow,
    .loading-dots span,
    .progress-bar__fill,
    .loading-spinner {
        animation: none !important;
        transition: none !important;
    }
}