/**
 * Custom CSS for One Visa Portal
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}


/* Dark theme scrollbars for dashboard */
.dark ::-webkit-scrollbar {
    height: 10px;
    width: 10px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 8px;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}

/* Light theme scrollbars for public interface */
::-webkit-scrollbar {
    height: 10px;
    width: 10px;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

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

/* Drag and drop styles */
.drag-over {
    border-color: #2563eb !important;
    background-color: rgba(37, 99, 235, 0.05) !important;
}

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

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

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

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

/* Custom button styles */
.btn-primary {
    @apply inline-flex items-center gap-2 rounded-xl bg-accent-blue px-4 py-2 font-medium text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500/40 disabled:opacity-50 disabled:cursor-not-allowed transition-colors;
}

.btn-secondary {
    @apply inline-flex items-center gap-2 rounded-xl border border-slate-300 px-4 py-2 font-medium text-slate-700 hover:bg-slate-50 focus:outline-none focus:ring-2 focus:ring-slate-500/40 transition-colors;
}

.dark .btn-secondary {
    @apply border-card-border text-slate-300 hover:bg-navy-700;
}

/* Form input styles */
.form-input {
    @apply w-full px-4 py-3 border border-slate-300 rounded-xl focus:outline-none focus:ring-2 focus:ring-accent-blue/40 focus:border-accent-blue transition-colors;
}

.dark .form-input {
    @apply bg-navy-800 border-card-border text-slate-100 placeholder-slate-400;
}

/* Card styles */
.card {
    @apply bg-white border border-slate-200 rounded-2xl shadow-soft;
}

.dark .card {
    @apply bg-card border-card-border;
}

/* Status pills */
.status-active {
    @apply inline-flex items-center rounded-full bg-green-500/10 text-green-400 px-2.5 py-0.5 text-xs border border-green-500/20;
}

.status-inactive {
    @apply inline-flex items-center rounded-full bg-red-500/10 text-red-400 px-2.5 py-0.5 text-xs border border-red-500/20;
}

.status-pending {
    @apply inline-flex items-center rounded-full bg-yellow-500/10 text-yellow-400 px-2.5 py-0.5 text-xs border border-yellow-500/20;
}

/* Table styles */
.table-container {
    @apply bg-white border border-slate-200 rounded-2xl overflow-hidden;
}

.dark .table-container {
    @apply bg-card border-card-border;
}

.table-header {
    @apply bg-slate-50 px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider;
}

.dark .table-header {
    @apply bg-navy-800/60 text-slate-400;
}

.table-row {
    @apply px-6 py-4 whitespace-nowrap text-sm text-slate-900 hover:bg-slate-50;
}

.dark .table-row {
    @apply text-slate-100 hover:bg-navy-800/50;
}

/* Modal styles */
.modal-overlay {
    @apply fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50;
}

.modal-content {
    @apply bg-white rounded-2xl shadow-xl max-w-md w-full mx-4;
}

.dark .modal-content {
    @apply bg-card border border-card-border;
}

/* Navigation styles */
.nav-link {
    @apply flex items-center space-x-3 px-3 py-2 rounded-xl text-slate-300 hover:bg-navy-700 hover:text-slate-100 transition-colors;
}

.nav-link.active {
    @apply bg-accent-blue text-white;
}

/* Progress bar styles */
.progress-bar {
    @apply bg-slate-200 rounded-full h-2;
}

.dark .progress-bar {
    @apply bg-slate-700;
}

.progress-fill {
    @apply h-2 rounded-full transition-all duration-300;
}

/* File upload styles */
.upload-zone {
    @apply border-2 border-dashed border-slate-300 hover:border-accent-blue/60 bg-white rounded-2xl p-8 text-center transition-colors cursor-pointer;
}

.upload-zone.drag-over {
    @apply border-accent-blue bg-accent-blue/5;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none;
    }
    
    .mobile-full {
        width: 100%;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-before: always;
    }
}

/* Accessibility improvements */
.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;
}

/* Focus styles for better accessibility */
.focus-visible:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border-width: 2px;
    }
    
    .btn-primary {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
