/* CRM Floating Dialer Styles */

#crm-call-header {
    position: fixed;
    bottom: 130px;
    left: 30px;
    /* Left align on desktop */
    z-index: 10000;
    width: 280px;
    /* Original box width */
    background: rgba(15, 23, 42, 0.9) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 28px !important;
    padding: 30px 24px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    cursor: grab;
    user-select: none;
    transition: all 0.3s ease;
    display: none;
}

#crm-call-header.dragging {
    transition: none !important;
    cursor: grabbing;
}

#crm-call-header.active {
    display: block;
    animation: dialerAppear 0.4s ease-out;
}

@keyframes dialerAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.call-header-content {
    display: flex;
    flex-direction: column;
    /* Vertical box on desktop */
    align-items: center;
    gap: 20px;
    color: white;
    text-align: center;
}

.call-info {
    width: 100%;
}

.call-status {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.call-number {
    font-size: 24px;
    /* Larger font for desktop box */
    font-weight: 300;
    letter-spacing: 1px;
    color: #fff;
    margin-bottom: 4px;
}

.call-state {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.connection-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.status-dot.online {
    background: #22c55e;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.6);
}

.call-timer {
    font-family: 'SF Mono', monospace;
    font-size: 32px;
    /* Large timer for desktop box */
    font-weight: 200;
    color: #38bdf8;
    margin: 10px 0;
    padding: 0;
    border: none;
}

.call-controls-group {
    display: flex;
    width: 100%;
    justify-content: center;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-call-header {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-call-header:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateY(-4px);
}

.btn-hold.active {
    background: #f97316;
    color: white;
}

.btn-mute.active {
    background: #a855f7;
    color: white;
}

.btn-hangup {
    background: #ef4444;
    color: white;
}

.btn-hangup:hover {
    background: #dc2626;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.hidden {
    display: none !important;
}

/* Draggable handle icon at top */
#crm-call-header::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* MOBILE ADJUSTMENTS */
@media (max-width: 768px) {
    #crm-call-header {
        min-width: 320px;
        width: auto;
        padding: 8px 16px !important;
        bottom: 10px;
        right: 10px;
        left: auto !important;
        border-radius: 16px !important;
    }

    .call-header-content {
        flex-direction: row !important;
        justify-content: space-between;
        gap: 15px;
    }

    .call-info {
        width: auto;
    }

    .call-status {
        flex-direction: row !important;
        gap: 10px;
    }

    .call-number {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 0;
    }

    .call-state {
        font-size: 10px;
        letter-spacing: 1px;
    }

    .call-timer {
        font-size: 16px;
        padding: 0 10px;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }

    .call-controls-group {
        width: auto;
        padding-top: 0;
        border-top: none;
        gap: 8px;
    }

    .btn-call-header {
        width: 40px;
        height: 40px;
        font-size: 18px;
        border-radius: 12px;
    }
}