/* Support Desk Mobile-First CSS */

/* Mobile-first responsive design for Support Desk */
.support-desk-container {
    padding: 15px;
    max-width: 100%;
    overflow-x: hidden;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.dashboard-header h1 {
    font-size: 1.5rem;
    margin: 0;
    flex: 1;
    min-width: 200px;
}

/* Real-time status indicator */
.realtime-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.875em;
    font-weight: 500;
    white-space: nowrap;
}

.realtime-status.connected {
    background-color: #e8f5e8;
    color: #2e7d2e;
    border: 1px solid #4caf50;
}

.realtime-status.disconnected {
    background-color: #ffeaea;
    color: #d32f2f;
    border: 1px solid #f44336;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Support statistics cards - mobile responsive */
.support-stats {
    display: grid;
    gap: 15px;
    margin-bottom: 25px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.stat-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.stat-card h3 {
    font-size: 0.9rem;
    margin: 0 0 10px 0;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin: 0 0 5px 0;
    color: #333;
}

.stat-card small {
    color: #888;
    font-size: 0.8rem;
}

/* Support content layout */
.support-content {
    display: grid;
    gap: 25px;
    grid-template-columns: 1fr;
}

/* Agents section */
.agents-section {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.25rem;
}

/* Agents grid - responsive */
.agents-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.agent-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.agent-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.agent-card.active {
    border-left: 4px solid #4caf50;
}

.agent-card.inactive {
    border-left: 4px solid #f44336;
    opacity: 0.8;
}

.agent-info h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1.1rem;
}

.agent-info p {
    margin: 4px 0;
    color: #666;
    font-size: 0.9rem;
}

.agent-status {
    margin: 10px 0;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-active {
    background-color: #e8f5e8;
    color: #2e7d2e;
}

.status-inactive {
    background-color: #ffeaea;
    color: #d32f2f;
}

.agent-expertise {
    margin-top: 10px;
}

.expertise-tag {
    display: inline-block;
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    margin-right: 8px;
    margin-bottom: 4px;
}

/* Performance section */
.performance-section {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-top: 25px;
}

.performers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.performer-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.performer-card h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-weight: 600;
}

.performance-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.performance-stats .stat {
    display: flex;
    flex-direction: column;
    font-size: 0.9em;
}

.performance-stats .label {
    color: #666;
    font-size: 0.8em;
    margin-bottom: 2px;
}

.performance-stats .value {
    font-weight: 600;
    color: #333;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state p {
    margin: 0;
    font-size: 1.1rem;
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner p {
    margin: 10px 0 0 0;
    color: #666;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

/* Mobile breakpoints */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .dashboard-header h1 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .realtime-status {
        justify-content: center;
    }
    
    .support-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .agents-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .section-header h2 {
        text-align: center;
        margin-bottom: 10px;
    }
    
    .performers-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .support-desk-container {
        padding: 10px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .agent-card,
    .performer-card {
        padding: 12px;
    }
    
    .agents-section,
    .performance-section {
        padding: 15px;
    }
}

/* Print styles */
@media print {
    .realtime-status,
    .btn {
        display: none;
    }
    
    .support-desk-container {
        padding: 0;
    }
    
    .agent-card,
    .performer-card,
    .stat-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
