/* ═══════════════════════════════════════════════════════
   CALL ENQUIRY SYSTEM STYLES
   ═══════════════════════════════════════════════════════ */

/* ── Call Modal Overlay ── */
.call-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.call-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 36px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.call-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.call-modal-close:hover {
    color: #333;
}

.call-modal-title {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.call-modal-subtitle {
    margin: 0 0 24px;
    color: #666;
    font-size: 14px;
}

/* ── Form Styles ── */
.call-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.call-form-group {
    margin-bottom: 16px;
}

.call-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #444;
}

.call-form-group input,
.call-form-group select,
.call-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fafafa;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.call-form-group input:focus,
.call-form-group select:focus {
    outline: none;
    border-color: #4a7c59;
    background: #fff;
}

.call-time-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.call-time-inputs input {
    flex: 1;
}

.call-time-separator {
    color: #888;
    font-size: 13px;
    flex-shrink: 0;
}

.call-submit-btn {
    width: 100%;
    padding: 12px;
    background: #4a7c59;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
}

.call-submit-btn:hover {
    background: #3d6a4a;
}

.call-submit-btn:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* ── Confirmation View ── */
.call-modal-confirmation {
    text-align: center;
    padding: 20px 0;
}

.call-confirm-icon {
    margin-bottom: 16px;
}

.call-confirm-title {
    font-size: 22px;
    margin: 0 0 12px;
    color: #1a1a1a;
}

.call-confirm-text {
    color: #555;
    margin: 0 0 8px;
    font-size: 15px;
}

.call-confirm-note {
    color: #888;
    font-size: 13px;
    margin: 0 0 24px;
    line-height: 1.5;
}

/* ── Incoming Call Popup ── */
.incoming-call-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.incoming-call-popup {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    text-align: center;
    max-width: 340px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.incoming-call-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #4a7c59;
    margin: 0 auto 20px;
    animation: ring-pulse 1.5s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.incoming-call-ring::after {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E") no-repeat center / contain;
}

@keyframes ring-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(74, 124, 89, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(74, 124, 89, 0); }
}

.incoming-call-popup h3 {
    margin: 0 0 4px;
    font-size: 20px;
    color: #1a1a1a;
}

.incoming-call-popup p {
    margin: 0 0 24px;
    color: #666;
    font-size: 14px;
}

.incoming-call-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.call-accept-btn,
.call-reject-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    transition: transform 0.15s, box-shadow 0.15s;
}

.call-accept-btn {
    background: #28a745;
}

.call-accept-btn:hover {
    background: #218838;
    transform: scale(1.02);
}

.call-reject-btn {
    background: #dc3545;
}

.call-reject-btn:hover {
    background: #c82333;
    transform: scale(1.02);
}

/* ── In-Call Bar ── */
.in-call-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a2e;
    color: #fff;
    padding: 12px 24px;
    z-index: 10002;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.in-call-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.in-call-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #28a745;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.in-call-label {
    font-size: 14px;
    font-weight: 500;
}

.in-call-timer {
    font-size: 14px;
    font-family: monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
}

.in-call-controls {
    display: flex;
    gap: 10px;
}

.in-call-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: #fff;
    transition: background 0.2s;
}

.in-call-btn.mute-btn {
    background: rgba(255, 255, 255, 0.15);
}

.in-call-btn.mute-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.in-call-btn.mute-btn.muted {
    background: #e67e22;
}

.in-call-btn.end-call-btn {
    background: #dc3545;
}

.in-call-btn.end-call-btn:hover {
    background: #c82333;
}

/* ── Online Indicator Dots (Admin Dashboard) ── */
.online-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    vertical-align: middle;
}

.online-dot.online {
    background: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.online-dot.offline {
    background: #ccc;
}

/* ── Call Status Select (Admin) ── */
.call-status-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    background: #fff;
    cursor: pointer;
}

.call-status-select.status-new { border-color: #007bff; color: #007bff; }
.call-status-select.status-scheduled { border-color: #17a2b8; color: #17a2b8; }
.call-status-select.status-completed { border-color: #28a745; color: #28a745; }
.call-status-select.status-missed { border-color: #dc3545; color: #dc3545; }
.call-status-select.status-cancelled { border-color: #6c757d; color: #6c757d; }

/* ── Calls Stats Row ── */
.calls-stats-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.calls-stats-row .stat-card {
    flex: 1;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.calls-stats-row .stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.calls-stats-row .stat-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Admin Call Button ── */
.call-btn {
    padding: 4px 12px;
    font-size: 12px;
}

.call-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .call-modal {
        padding: 24px 20px;
        margin: 10px;
    }

    .call-form-row {
        grid-template-columns: 1fr;
    }

    .incoming-call-actions {
        flex-direction: column;
    }

    .in-call-bar {
        flex-direction: column;
        gap: 8px;
        padding: 10px 16px;
    }

    .calls-stats-row {
        flex-direction: column;
    }
}
