/* Chat System Styles */

.chat-hero {
    background: linear-gradient(135deg, #28861A, #FFA500);
    color: white;
    text-align: center;
    padding: 80px 20px 60px;
}

.chat-hero h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.chat-hero p {
    font-size: 1.3rem;
    opacity: 0.95;
}

.chat-section {
    padding: 60px 20px;
    background: #f8f9fa;
    min-height: 70vh;
}

.chat-card {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.chat-card-header {
    background: linear-gradient(135deg, #28861A, #2a9d1c);
    color: white;
    padding: 30px;
    text-align: center;
}

.chat-card-header h2 {
    margin-bottom: 10px;
    font-size: 2rem;
}

.chat-card-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Form Styles */
.chat-form {
    padding: 40px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #28861A;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #28861A, #FFA500);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(40, 134, 26, 0.3);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Chat Box Header */
.chat-header-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-avatar {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.chat-header-info h3 {
    margin: 0;
    font-size: 1.3rem;
}

.chat-status {
    font-size: 0.9rem;
    opacity: 0.9;
}

.chat-status.online::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    margin-right: 5px;
}

.btn-close-chat {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    transition: background 0.3s;
}

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

/* Chat Messages */
.chat-messages {
    height: 450px;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f5;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.system-message {
    text-align: center;
    margin: 20px 0;
}

.system-message p {
    display: inline-block;
    background: rgba(0,0,0,0.05);
    padding: 10px 20px;
    border-radius: 20px;
    color: #666;
    font-size: 0.9rem;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
}

.user-message {
    justify-content: flex-end;
}

.admin-message {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 12px 18px;
    border-radius: 18px;
    position: relative;
}

.user-message .message-content {
    background: linear-gradient(135deg, #28861A, #2a9d1c);
    color: white;
    border-bottom-right-radius: 4px;
}

.admin-message .message-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.message-content p {
    margin: 0 0 5px 0;
    line-height: 1.5;
    word-wrap: break-word;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    display: block;
    margin-top: 5px;
}

/* Chat Input */
.chat-input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

#chat-message-form {
    display: flex;
    gap: 10px;
}

#message-input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

#message-input:focus {
    outline: none;
    border-color: #28861A;
}

.btn-send {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #28861A, #FFA500);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-send:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(40, 134, 26, 0.3);
}

.btn-send svg {
    width: 20px;
    height: 20px;
}

/* Typing Indicator */
.typing-indicator {
    padding: 10px 0 0;
    display: flex;
    gap: 4px;
}

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

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

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

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .chat-hero h1 {
        font-size: 2rem;
    }
    
    .chat-hero p {
        font-size: 1.1rem;
    }
    
    .chat-form {
        padding: 30px 20px;
    }
    
    .chat-messages {
        height: 350px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .chat-card-header {
        padding: 20px;
    }
    
    .chat-card-header h2 {
        font-size: 1.5rem;
    }
}

