/* Custom CSS for Committee Management System */

/* Smooth transitions */
* {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Dark mode scrollbar */
.dark ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Fade in animation */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.3s ease-out;
}

/**
 * Custom CSS for NDLP Management System
 * Mobile-First Responsive Design
 */

/* ==========================================================================
   Mobile-First Utilities
   ========================================================================== */

/* Touch-friendly minimum sizes (44x44px minimum for iOS) */
.touch-target {
    min-height: 44px;
    min-width: 44px;
}

/* Responsive table wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    min-width: 100%;
}

@media (max-width: 768px) {
    .table-responsive table {
        min-width: 800px;
        /* Force horizontal scroll on mobile */
    }
}


/* Mobile-specific spacing */
@media (max-width: 768px) {
    .mobile-p-2 {
        padding: 0.5rem !important;
    }

    .mobile-p-4 {
        padding: 1rem !important;
    }

    .mobile-text-sm {
        font-size: 0.875rem !important;
    }

    .mobile-text-xs {
        font-size: 0.75rem !important;
    }
}

/* Mobile header spacing to avoid hamburger button overlap */
@media (max-width: 1024px) {
    .mobile-header-spacing {
        padding-right: 4rem;
        /* 64px = 44px button + 20px spacing */
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

.dark {
    color-scheme: dark;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

/* Smooth transitions */
.transition-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Prevent text selection on buttons */
button,
.btn {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* ==========================================================================
   Form Improvements
   ========================================================================== */

/* Touch-friendly form inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
select,
textarea {
    min-height: 44px;
}

@media (max-width: 768px) {

    input,
    select,
    textarea {
        font-size: 16px;
        /* Prevent iOS zoom on focus */
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: #3b82f6;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-main:focus {
    top: 0;
}


/* Table hover effect */
.table-row-hover:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

.dark .table-row-hover:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

/* Card shadow on hover */
.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.1);
}

.dark .card-hover:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* Button loading state */
.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Focus visible for better accessibility */
*:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

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

    body {
        background: white !important;
    }
}