/* Live Chat Styles */

/* Hero Section */
.live-chat-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.live-chat-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.live-chat-hero-content {
    position: relative;
    z-index: 1;
}

.live-chat-hero h4 {
    color: white;
    font-size: 1.8rem;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.live-chat-hero-icon {
    font-size: 2rem;
}

.live-chat-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin: 0;
}

/* Info Card */
.live-chat-info-card {
    background: var(--card-bg, #ffffff);
    border: 2px solid var(--border, #e0e0e0);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.live-chat-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary, #667eea);
    margin-bottom: 15px;
}

.live-chat-info-header svg {
    stroke: var(--primary, #667eea);
}

.live-chat-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: var(--bg-light, #f8f9fa);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.feature-text {
    flex: 1;
}

.feature-text strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-primary, #333);
}

.feature-text p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-dark, #666);
}

/* Live Chat Container */
.live-chat-container {
    background: var(--card-bg, #ffffff);
    border: 2px solid var(--border, #e0e0e0);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

/* Video Area */
.live-chat-video-area {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 0 auto 20px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.live-chat-video-area video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.video-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Messages Area */
.live-chat-messages {
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-light, #f8f9fa);
    border-radius: 12px;
    margin-bottom: 20px;
}

.welcome-message {
    text-align: center;
    padding: 40px 20px;
}

.welcome-message p {
    font-size: 1.1rem;
    color: var(--text-primary, #333);
    margin-bottom: 10px;
}

.welcome-hint {
    font-size: 0.95rem;
    color: var(--text-dark, #666);
}

.chat-message {
    margin-bottom: 15px;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 80%;
    animation: slideInMessage 0.3s ease-out;
}

@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    margin-left: auto;
    margin-right: 0;
}

.chat-message.ai {
    background: white;
    color: var(--text-primary, #333);
    border: 2px solid var(--border, #e0e0e0);
    margin-right: auto;
    margin-left: 0;
}

.chat-message .message-header {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    opacity: 0.8;
}

.chat-message .message-content {
    font-size: 1rem;
    line-height: 1.5;
}

.chat-message .message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 4px;
}

/* Controls */
.live-chat-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 15px 0;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid var(--border, #e0e0e0);
    border-radius: 10px;
    background: white;
    color: var(--text-primary, #333);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.control-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.control-btn svg {
    width: 20px;
    height: 20px;
}

.control-btn.mic-btn.active {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    border-color: #f5576c;
}

.control-btn.mic-btn.active svg {
    stroke: white;
}

.control-btn.camera-btn.active {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    border-color: #00f2fe;
}

.control-btn.camera-btn.active svg {
    stroke: white;
}

.control-btn.start-btn {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: white;
    border-color: #38f9d7;
}

.control-btn.start-btn:not(:disabled):hover {
    background: linear-gradient(135deg, #38f9d7, #43e97b);
}

.control-btn.stop-btn {
    background: linear-gradient(135deg, #fa709a, #fee140);
    color: white;
    border-color: #fee140;
}

.control-btn.stop-btn:not(:disabled):hover {
    background: linear-gradient(135deg, #fee140, #fa709a);
}

/* Status Indicator */
.live-chat-status {
    text-align: center;
    padding: 12px;
    background: var(--bg-light, #f8f9fa);
    border-radius: 8px;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #999;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.status-indicator.connected .status-dot {
    background: #43e97b;
}

.status-indicator.recording .status-dot {
    background: #f5576c;
}

.status-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark, #666);
}

/* Compatibility Warning */
.compatibility-warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.compatibility-warning p {
    margin: 0;
    color: #856404;
}

/* Responsive */
@media (max-width: 768px) {
    .live-chat-hero {
        padding: 20px;
    }

    .live-chat-hero h4 {
        font-size: 1.4rem;
    }

    .live-chat-features {
        grid-template-columns: 1fr;
    }

    .live-chat-controls {
        flex-direction: column;
    }

    .control-btn {
        width: 100%;
        justify-content: center;
    }

    .chat-message {
        max-width: 90%;
    }
}

/* Scrollbar Styling */
.live-chat-messages::-webkit-scrollbar {
    width: 8px;
}

.live-chat-messages::-webkit-scrollbar-track {
    background: var(--bg-light, #f8f9fa);
    border-radius: 10px;
}

.live-chat-messages::-webkit-scrollbar-thumb {
    background: var(--border, #e0e0e0);
    border-radius: 10px;
}

.live-chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--text-dark, #999);
}
