/* Custom animations and enterprise enhancements */

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

.animate-modal-in {
    animation: modal-in 0.2s ease-out forwards;
}

@keyframes slide-in-right {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Smooth transitions for all interactive elements */
button, input, select {
    transition: all 0.2s ease;
}

/* Custom scrollbar for enterprise feel */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Video container styles */
#camera-preview {
    transform: scaleX(-1); /* Mirror effect for front camera */
}

#self-view {
    transform: scaleX(-1);
}

/* Microphone meter animation */
.mic-active .bg-gray-300 {
    background-color: #10b981;
    animation: mic-pulse 0.5s ease-in-out infinite alternate;
}

@keyframes mic-pulse {
    from { height: 12px; }
    to { height: 20px; }
}

/* Pulse animation for recording indicator */
.recording-pulse {
    animation: recording 2s ease-in-out infinite;
}

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

/* Network status indicators */
.network-good { color: #10b981; }
.network-fair { color: #f59e0b; }
.network-poor { color: #ef4444; }

/* Sidebar tab transitions */
.sidebar-tab {
    position: relative;
    transition: all 0.2s ease;
}

.sidebar-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #2563eb;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.sidebar-tab.active::after {
    transform: scaleX(1);
}

/* Card hover effects */
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Loading spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Checklist animation */
.checklist-item {
    transition: all 0.3s ease;
}

.checklist-item:hover {
    transform: translateX(4px);
}

/* Tooltip positioning */
[data-tooltip] {
    position: relative;
}

/* Drawer shadow */
.messaging-drawer-open {
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    aside.w-96 {
        position: fixed;
        right: 0;
        top: 64px;
        bottom: 80px;
        z-index: 30;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    
    aside.w-96.active {
        transform: translateX(0);
    }
}

/* Focus states for accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Disabled states */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Selection color */
::selection {
    background: #dbeafe;
    color: #1e40af;
}