/* CRM Call Header Bar Styles */

#crm-call-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 12px 20px;
    display: none; /* Hidden by default, shown when initialized */
}

#crm-call-header.active {
    display: block;
}

.call-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
    color: white;
}

.call-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.call-status {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.call-number {
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.call-state {
    font-size: 12px;
    opacity: 0.9;
    white-space: nowrap;
}

.call-timer {
    font-size: 20px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 60px;
    text-align: center;
}

.call-controls-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-call-header {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    background: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-call-header:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn-call-header:active {
    transform: scale(0.95);
}

.btn-hold {
    background: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-hold.active {
    background: #ff9800;
    color: white;
}

.btn-mute {
    background: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-mute.active {
    background: #f44336;
    color: white;
}

.btn-hangup {
    background: #dc3545;
    color: white;
}

.btn-hangup:hover {
    background: #c82333;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: 0.9;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff5252;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: #4caf50;
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Hide controls when not in call */
.call-controls-group.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .call-header-content {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .call-info {
        flex: 1 1 100%;
        order: 1;
    }
    
    .call-timer {
        order: 2;
    }
    
    .call-controls-group {
        order: 3;
        flex: 1 1 100%;
        justify-content: center;
    }
    
    .call-number {
        font-size: 16px;
    }
    
    .call-timer {
        font-size: 18px;
    }
}

/* Add padding to body when header is active */
body.has-call-header {
    padding-top: 70px;
}
