/* Chat Section Specific Styles */
.chat-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
}

.chat-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 700px;
    max-width: 1200px;
    margin: 0 auto;
}

.chat-sidebar {
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    color: white;
}

.chat-user {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.user-info h4 {
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.user-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.chat-features {
    margin-bottom: 30px;
}

.chat-features h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.chat-features ul {
    list-style: none;
}

.chat-features li {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.chat-features i {
    margin-right: 10px;
    font-size: 1.1rem;
    color: #FFC107;
}

.chat-history {
    flex: 1;
    overflow-y: auto;
}

.chat-history h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.history-item {
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.chat-main {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.chat-header h3 {
    margin: 0;
    color: #2E7D32;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

.chat-header h3::before {
    content: '\f4ad';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 10px;
    color: #FFC107;
}

.chat-status {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #4CAF50;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background: #fafafa;
}

.message {
    display: flex;
    margin-bottom: 25px;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: linear-gradient(135deg, #FFC107 0%, #FF9800 100%);
    color: white;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
    color: white;
}

.message-content {
    flex: 1;
}

.message-content p {
    padding: 15px 20px;
    border-radius: 15px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 80%;
}

.bot-message .message-content p {
    background: white;
    color: #333;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.user-message .message-content p {
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
    color: white;
    border-bottom-right-radius: 5px;
    margin-left: auto;
}

.message-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: 15px;
}

.message-option {
    padding: 8px 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
}

.message-option:hover {
    background: #2E7D32;
    color: white;
    border-color: #2E7D32;
    transform: translateY(-2px);
}

.chat-input {
    display: flex;
    align-items: center;
    padding: 20px 30px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.input-controls {
    display: flex;
    margin-right: 15px;
}

.input-btn {
    width: 45px;
    height: 45px;
    border: none;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    font-size: 1.1rem;
}

.input-btn:hover {
    background: #e9ecef;
    color: #2E7D32;
}

.input-btn.active {
    background: #2E7D32;
    color: white;
}

#message-input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#message-input:focus {
    outline: none;
    border-color: #2E7D32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.send-btn {
    width: 50px;
    height: 50px;
    border: none;
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.3);
}

.send-btn:active {
    transform: scale(0.95);
}

.typing-indicator .message-content p {
    background: white;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.typing-dots {
    display: flex;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Chat Features */
.feature-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 8px;
    background: rgba(255, 193, 7, 0.2);
    color: #FF9800;
}

.voice-message {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: rgba(46, 125, 50, 0.1);
    border-radius: 10px;
    margin-top: 10px;
}

.voice-message i {
    margin-right: 10px;
    color: #2E7D32;
}

.voice-message audio {
    flex: 1;
}

.image-message {
    margin-top: 10px;
    border-radius: 10px;
    overflow: hidden;
    max-width: 300px;
}

.image-message img {
    width: 100%;
    height: auto;
    display: block;
}

/* Responsive Design */
@media (max-width: 992px) {
    .chat-container {
        height: 600px;
    }
    
    .chat-sidebar {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .chat-container {
        grid-template-columns: 1fr;
        height: auto;
        max-height: 80vh;
    }
    
    .chat-sidebar {
        display: none;
    }
    
    .chat-header {
        padding: 15px 20px;
    }
    
    .chat-messages {
        padding: 20px;
    }
    
    .chat-input {
        padding: 15px 20px;
    }
    
    .message-content p {
        max-width: 90%;
    }
}

@media (max-width: 576px) {
    .chat-container {
        border-radius: 0;
        height: 100vh;
        max-height: none;
    }
    
    .message-avatar {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .message-content p {
        font-size: 0.9rem;
        padding: 12px 15px;
    }
    
    .input-btn {
        width: 40px;
        height: 40px;
    }
    
    .send-btn {
        width: 45px;
        height: 45px;
    }
    
    #message-input {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}