/* Custom styles that complement Tailwind CSS */

/* Gradient background cho body */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Main content area */
.main-content {
    min-height: calc(100vh - 120px);
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px 0;
}

/* Custom animations */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* Custom gradient background class */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Glass effect */
.glass-effect {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Custom button hover effects */
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Custom table hover effects */
.table tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.1);
    transform: scale(1.01);
    transition: all 0.3s ease;
}

/* Custom file upload area */
#file-status {
    border: 2px dashed #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

#file-status.success {
    border-color: #22c55e;
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

/* Custom modal styles */
.modal-content {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Toast notification styles */
.toast {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 1rem;
    margin-bottom: 0.5rem;
    min-width: 300px;
    max-width: 400px;
    border-left: 4px solid;
    animation: slideInRight 0.3s ease-out;
    transition: all 0.3s ease;
}

.toast.success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
}

.toast.error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fef2f2 100%);
}

.toast.warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.toast.info {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
}

.toast-close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: #374151;
}

.toast-message {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.4;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.fade-out {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* Dark mode toast styles */
.dark .toast {
    background: #1f2937;
    color: #f9fafb;
}

.dark .toast.success {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
}

.dark .toast.error {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
}

.dark .toast.warning {
    background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
}

.dark .toast.info {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}

.dark .toast-title {
    color: #f9fafb;
}

.dark .toast-message {
    color: #d1d5db;
}

.dark .toast-close {
    color: #9ca3af;
}

.dark .toast-close:hover {
    color: #f9fafb;
}

/* Action Dock styles */
#action-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 50;
    display: block !important;
}

.dark #action-dock {
    background: #1f2937;
    border-top-color: #374151;
}

#action-dock .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
}

#action-dock .flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#action-dock .space-x-3 > * + * {
    margin-left: 0.75rem;
}

/* Ensure dock is always visible */
#action-dock {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-content {
        padding: 10px 0;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* Floating Action Button Styles */
#floating-action-btn {
    animation: slideInUp 0.3s ease-out;
    z-index: 9999 !important;
}

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

#floating-action-btn.hidden {
    animation: slideOutDown 0.3s ease-in;
    display: none !important;
}

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

#selected-count-badge {
    animation: pulse 2s infinite;
}

/* Floating button hover effects */
#floating-transfer-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

#floating-notify-btn:hover:not(:disabled),
#floating-export-btn:hover:not(:disabled) {
    transform: translateY(-1px) scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Disabled state styling */
#floating-transfer-btn:disabled,
#floating-notify-btn:disabled,
#floating-export-btn:disabled {
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}
