/* AgentKit Custom Styles */

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
    40%, 43% { transform: translate3d(0,-10px,0); }
    70% { transform: translate3d(0,-5px,0); }
    90% { transform: translate3d(0,-2px,0); }
}

/* Custom animation classes */
.animate-fadeIn {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slideIn {
    animation: slideIn 0.3s ease-out forwards;
}

.animate-bounce-custom {
    animation: bounce 2s infinite;
}

/* Agent status indicators */
.agent-status-idle {
    position: relative;
}

.agent-status-idle::before {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    border: 2px solid white;
}

.agent-status-busy::before {
    background: #F59E0B;
    animation: pulse 2s infinite;
}

.agent-status-offline::before {
    background: #EF4444;
}

/* Card hover effects */
.agent-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.agent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.agent-card:hover::before {
    opacity: 1;
}

/* Workflow button effects */
.workflow-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.workflow-btn:hover {
    transform: scale(1.05);
}

.workflow-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.workflow-btn:active::after {
    width: 300px;
    height: 300px;
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Status indicators */
.status-online {
    color: #10B981;
}

.status-busy {
    color: #F59E0B;
}

.status-offline {
    color: #EF4444;
}

/* Activity feed styles */
.activity-item {
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.activity-item:hover {
    border-left-color: #3B82F6;
    background-color: #F8FAFC;
}

/* Safety status styles */
.safety-indicator {
    position: relative;
}

.safety-indicator.active::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 6px;
    background: #10B981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Gradient backgrounds for different agent types */
.social-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.sales-gradient {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.roi-gradient {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Chart container styles */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .agent-card {
        margin-bottom: 1rem;
    }
    
    .workflow-btn {
        padding: 1rem;
        font-size: 0.875rem;
    }
    
    .chart-container {
        height: 250px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .agent-card {
        background: #1F2937;
        border-color: #374151;
        color: #F9FAFB;
    }
    
    .activity-item {
        background: #111827;
        border-color: #374151;
    }
    
    .activity-item:hover {
        background: #1F2937;
        border-left-color: #60A5FA;
    }
}

/* Performance optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Accessibility improvements */
.focus-ring:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

button:focus-visible {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Notification styles */
.notification-enter {
    transform: translateX(100%);
    opacity: 0;
}

.notification-enter-active {
    transform: translateX(0);
    opacity: 1;
    transition: all 0.3s ease-out;
}

.notification-exit {
    transform: translateX(0);
    opacity: 1;
}

.notification-exit-active {
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease-in;
}

/* Progress bars */
.progress-bar {
    width: 100%;
    height: 4px;
    background: #E5E7EB;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3B82F6, #1D4ED8);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Metric cards */
.metric-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.metric-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Agent avatar styles */
.agent-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    position: relative;
}

.agent-avatar.social {
    background: linear-gradient(135deg, #8B5CF6, #A855F7);
}

.agent-avatar.sales {
    background: linear-gradient(135deg, #10B981, #059669);
}

.agent-avatar.roi {
    background: linear-gradient(135deg, #F59E0B, #D97706);
}

/* Workflow visualization */
.workflow-node {
    position: relative;
    display: inline-block;
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    margin: 0.25rem;
    transition: all 0.2s ease;
}

.workflow-node.active {
    border-color: #3B82F6;
    background: #EFF6FF;
    transform: scale(1.05);
}

.workflow-node::after {
    content: '→';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
}

.workflow-node:last-child::after {
    display: none;
}

/* Responsive grid improvements */
@media (min-width: 1024px) {
    .dashboard-grid {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 2rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .agent-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}