/* Custom CSS for Event Management System */

/* Line clamp utilities */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables for Government Theme */
:root {
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-200: #bae6fd;
    --primary-300: #7dd3fc;
    --primary-400: #38bdf8;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --primary-800: #075985;
    --primary-900: #0c4a6e;
    
    --government-50: #f8fafc;
    --government-100: #f1f5f9;
    --government-200: #e2e8f0;
    --government-300: #cbd5e1;
    --government-400: #94a3b8;
    --government-500: #64748b;
    --government-600: #475569;
    --government-700: #334155;
    --government-800: #1e293b;
    --government-900: #0f172a;
    
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base Styles */
* {
    font-family: var(--font-family);
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--government-800);
}

/* Government Gradient Backgrounds */
.gradient-government {
    background: linear-gradient(135deg, var(--government-900) 0%, var(--government-800) 50%, var(--government-700) 100%);
}

.gradient-primary {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 50%, var(--primary-800) 100%);
}

.gradient-hero {
    background: linear-gradient(135deg, var(--government-900) 0%, var(--government-800) 25%, var(--primary-900) 75%, var(--primary-800) 100%);
}

/* Government Shadows */
.shadow-government {
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -1px rgba(15, 23, 42, 0.06);
}

.shadow-government-lg {
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
}

.shadow-government-xl {
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
}

/* Line clamp utilities */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

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

.custom-scrollbar::-webkit-scrollbar-track {
    background: var(--government-100);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--government-300);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--government-400);
}

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

::-webkit-scrollbar-track {
    background: var(--government-100);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--government-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--government-400);
}

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

.transition-smooth {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card hover effects */
.card-hover {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.card-hover-government {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-government:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
}

/* 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: spin 1s ease-in-out infinite;
}

/* Government Button Styles */
.btn-government {
    background: linear-gradient(135deg, var(--government-700) 0%, var(--government-800) 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.1);
}

.btn-government:hover {
    background: linear-gradient(135deg, var(--government-800) 0%, var(--government-900) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(2, 132, 199, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(2, 132, 199, 0.1);
}

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

/* Float animation */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-10px); 
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Pulse animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

/* Status badges */
.status-upcoming {
    background-color: var(--primary-100);
    color: var(--primary-800);
}

.status-ongoing {
    background-color: #d1fae5;
    color: #065f46;
}

.status-ended {
    background-color: var(--government-100);
    color: var(--government-800);
}

.status-cancelled {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Event type badges */
.type-online {
    background-color: #e0e7ff;
    color: #3730a3;
}

.type-offline {
    background-color: #fed7aa;
    color: #9a3412;
}

.type-hybrid {
    background-color: var(--primary-100);
    color: var(--primary-800);
}

/* Form enhancements */
.form-input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--government-300);
    border-radius: 0.75rem;
    background-color: white;
    font-size: 0.875rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus {
    outline: none;
    ring: 2px;
    ring-color: var(--primary-500);
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-input.error {
    border-color: #dc2626;
    ring-color: #dc2626;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--government-700);
    margin-bottom: 0.5rem;
}

.form-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

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

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

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

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

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

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

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 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: spin 1s ease-in-out infinite;
}

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

/* Status badges */
.status-upcoming {
    @apply bg-blue-100 text-blue-800;
}

.status-ongoing {
    @apply bg-green-100 text-green-800;
}

.status-ended {
    @apply bg-gray-100 text-gray-800;
}

.status-cancelled {
    @apply bg-red-100 text-red-800;
}

/* Event type badges */
.type-online {
    @apply bg-purple-100 text-purple-800;
}

.type-offline {
    @apply bg-orange-100 text-orange-800;
}

.type-hybrid {
    @apply bg-blue-100 text-blue-800;
}

/* Form enhancements */
.form-input {
    @apply block w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent;
}

.form-input:focus {
    @apply ring-2 ring-blue-500 border-transparent;
}

.form-input.error {
    @apply border-red-500 focus:ring-red-500;
}

.form-label {
    @apply block text-sm font-medium text-gray-700 mb-2;
}

.form-error {
    @apply text-red-600 text-sm mt-1;
}

/* Alert styles */
.alert {
    @apply px-4 py-3 rounded-lg border;
}

.alert-success {
    @apply bg-green-50 border-green-200 text-green-800;
}

.alert-error {
    @apply bg-red-50 border-red-200 text-red-800;
}

.alert-warning {
    @apply bg-yellow-50 border-yellow-200 text-yellow-800;
}

.alert-info {
    @apply bg-blue-50 border-blue-200 text-blue-800;
}

/* Table styles */
.table-responsive {
    @apply overflow-x-auto;
}

.table {
    @apply min-w-full divide-y divide-gray-200;
}

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

.table td {
    @apply px-6 py-4 whitespace-nowrap text-sm text-gray-900;
}

.table tbody tr:nth-child(even) {
    @apply bg-gray-50;
}

.table tbody tr:hover {
    @apply bg-gray-100;
}

/* Breadcrumb */
.breadcrumb {
    @apply flex items-center space-x-2 text-sm;
}

.breadcrumb-item {
    @apply text-gray-500;
}

.breadcrumb-item.active {
    @apply text-gray-900 font-medium;
}

.breadcrumb-separator {
    @apply text-gray-400;
}

/* Pagination */
.pagination {
    @apply flex items-center justify-between;
}

.pagination-info {
    @apply text-sm text-gray-700;
}

.pagination-links {
    @apply flex space-x-1;
}

.pagination-link {
    @apply px-3 py-2 text-sm border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50;
}

.pagination-link.active {
    @apply bg-blue-600 text-white border-blue-600;
}

.pagination-link:disabled {
    @apply opacity-50 cursor-not-allowed;
}

/* Modal overlay */
.modal-overlay {
    @apply fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full z-50;
}

.modal-content {
    @apply relative top-20 mx-auto p-5 border w-96 shadow-lg rounded-md bg-white;
}

/* Dropdown animations */
.dropdown-enter {
    opacity: 0;
    transform: scale(0.95);
}

.dropdown-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: opacity 100ms ease-out, transform 100ms ease-out;
}

.dropdown-exit {
    opacity: 1;
    transform: scale(1);
}

.dropdown-exit-active {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 75ms ease-in, transform 75ms ease-in;
}

/* Toast notifications */
.toast {
    @apply fixed top-4 right-4 max-w-sm w-full bg-white shadow-lg rounded-lg pointer-events-auto ring-1 ring-black ring-opacity-5 overflow-hidden z-50;
}

.toast-enter {
    transform: translateX(100%);
}

.toast-enter-active {
    transform: translateX(0%);
    transition: transform 300ms ease-out;
}

.toast-exit {
    transform: translateX(0%);
}

.toast-exit-active {
    transform: translateX(100%);
    transition: transform 300ms ease-in;
}

/* Loading states */
.skeleton {
    @apply animate-pulse bg-gray-200 rounded;
}

.skeleton-text {
    @apply h-4 bg-gray-200 rounded;
}

.skeleton-avatar {
    @apply w-10 h-10 bg-gray-200 rounded-full;
}

.skeleton-button {
    @apply h-10 bg-gray-200 rounded-lg;
}

/* Image placeholders */
.image-placeholder {
    @apply bg-gray-200 flex items-center justify-center;
}

.image-placeholder svg {
    @apply text-gray-400;
}

/* Responsive utilities */
@media (max-width: 640px) {
    .container-mobile {
        @apply px-4;
    }
    
    .text-mobile-sm {
        @apply text-sm;
    }
    
    .text-mobile-base {
        @apply text-base;
    }
    
    .text-mobile-lg {
        @apply text-lg;
    }
}

/* Custom focus styles */
.focus-ring {
    @apply focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2;
}

.focus-ring-inset {
    @apply focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-inset;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    table, pre, blockquote {
        page-break-inside: avoid;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        @apply bg-gray-900 text-white;
    }
    
    .dark-mode .bg-white {
        @apply bg-gray-800;
    }
    
    .dark-mode .text-gray-900 {
        @apply text-gray-100;
    }
    
    .dark-mode .text-gray-600 {
        @apply text-gray-300;
    }
    
    .dark-mode .border-gray-200 {
        @apply border-gray-700;
    }
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    .high-contrast {
        border: 2px solid;
    }
    
    .high-contrast:focus {
        outline: 3px solid;
        outline-offset: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-pulse {
        animation: none;
    }
}