
/**
 * Live Chat Styles
 */

.cfaq-live-chat-container {
    max-width: 900px;
    margin: 40px auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
}

/* Header */
.cfaq-live-chat-header {
    background: linear-gradient(135deg, #6ee7b7 0%, #10b981 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cfaq-live-chat-title h2 {
    margin: 0 0 5px 0;
    font-size: 22px;
    font-weight: 600;
}

.cfaq-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    opacity: 0.9;
}

.cfaq-status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.cfaq-end-chat-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cfaq-end-chat-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Body */
.cfaq-live-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background: #f7f8fa;
}

.cfaq-chat-welcome {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
}

.cfaq-chat-welcome h3 {
    margin: 0 0 10px 0;
    color: #111827;
    font-size: 20px;
}

.cfaq-chat-welcome p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

.cfaq-user-question {
    background: white;
    border-left: 4px solid #10b981;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: left;
}

.cfaq-user-question strong {
    display: block;
    color: #10b981;
    margin-bottom: 8px;
    font-size: 14px;
}

.cfaq-user-question p {
    margin: 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
}

/* Chat Messages */
.cfaq-message {
    display: flex;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cfaq-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.cfaq-message-content {
    max-width: 70%;
    margin: 0 12px;
}

.cfaq-message-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.cfaq-message-time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 5px;
}

/* User Messages */
.cfaq-message-user {
    justify-content: flex-end;
}

.cfaq-message-user .cfaq-message-avatar {
    background: linear-gradient(135deg, #6ee7b7 0%, #10b981 100%);
    color: white;
    order: 2;
}

.cfaq-message-user .cfaq-message-content {
    order: 1;
}

.cfaq-message-user .cfaq-message-bubble {
    background: linear-gradient(135deg, #6ee7b7 0%, #10b981 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.cfaq-message-user .cfaq-message-time {
    text-align: right;
}

/* Agent Messages */
.cfaq-message-agent .cfaq-message-avatar {
    background: #10b981;
    color: white;
}

.cfaq-message-agent .cfaq-message-bubble {
    background: white;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}

/* Footer */
.cfaq-live-chat-footer {
    padding: 20px 30px;
    background: white;
    border-top: 1px solid #e5e7eb;
}

.cfaq-typing-indicator {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
    padding: 10px;
}

.cfaq-typing-indicator span {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.cfaq-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.cfaq-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

.cfaq-message-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.cfaq-message-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    transition: border-color 0.2s ease;
}

.cfaq-message-input:focus {
    outline: none;
    border-color: #10b981;
}

.cfaq-send-btn {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6ee7b7 0%, #10b981 100%);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cfaq-send-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.cfaq-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Error Message */
.cfaq-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cfaq-live-chat-container {
        margin: 0;
        height: 100vh;
        border-radius: 0;
    }
    
    .cfaq-live-chat-header {
        padding: 15px 20px;
    }
    
    .cfaq-live-chat-title h2 {
        font-size: 18px;
    }
    
    .cfaq-live-chat-body {
        padding: 20px;
    }
    
    .cfaq-message-content {
        max-width: 80%;
    }
    
    .cfaq-live-chat-footer {
        padding: 15px 20px;
    }
}
