/* ===== Chatbot Specific Styles ===== */

/* Login Panel */
.chatbot-section {
    padding: 60px 0 100px;
    min-height: calc(100vh - 400px);
}

.chatbot-login {
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.login-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.login-icon svg {
    width: 48px;
    height: 48px;
    color: white;
}

.login-card h2 {
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.login-card > p {
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.6;
}

.login-form {
    text-align: left;
    margin-bottom: 32px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 8px;
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.2);
}

.login-form small {
    display: block;
    color: var(--text-light);
    font-size: 0.8rem;
    margin-top: 8px;
}

.login-form .btn {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
}

.login-info {
    text-align: left;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.login-info p {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 12px;
}

.login-info ul {
    list-style: none;
    padding: 0;
}

.login-info li {
    color: var(--text-light);
    padding: 8px 0;
    font-size: 0.95rem;
}

/* Chat Container */
.chatbot-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 70vh;
    min-height: 500px;
    max-height: 700px;
}

/* Chat Header */
.chat-header {
    background: var(--gradient);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.chat-avatar svg {
    width: 32px;
    height: 32px;
    color: white;
}

.chat-header h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.chat-status {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-greeting {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
}

.btn-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: var(--radius);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--bg);
}

.message {
    display: flex;
    gap: 12px;
    max-width: 85%;
    animation: fadeIn 0.3s ease;
}

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

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.bot {
    align-self: flex-start;
}

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

.message.bot .message-avatar {
    background: var(--gradient);
    color: white;
}

.message.user .message-avatar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--primary);
}

.message-avatar svg {
    width: 20px;
    height: 20px;
}

.message-content {
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    line-height: 1.6;
}

.message.bot .message-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
}

.message.user .message-content {
    background: var(--gradient);
    color: white;
}

.message-content p {
    margin-bottom: 12px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul, .message-content ol {
    margin: 12px 0;
    padding-left: 20px;
}

.message-content li {
    margin-bottom: 6px;
}

.message-content strong {
    color: var(--primary);
}

.message.user .message-content strong {
    color: var(--accent);
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 6px;
    text-align: right;
}

.message.user .message-time {
    color: rgba(255, 255, 255, 0.7);
}

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

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    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); opacity: 0.4; }
    30% { transform: translateY(-8px); opacity: 1; }
}

/* Chat Input */
.chat-input-container {
    padding: 16px 24px 24px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}

.chat-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-form textarea {
    flex: 1;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    min-height: 48px;
    max-height: 120px;
    transition: var(--transition);
}

.chat-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.2);
}

.send-btn {
    width: 48px;
    height: 48px;
    background: var(--gradient);
    border: none;
    border-radius: var(--radius);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

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

.chat-disclaimer {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 12px;
    line-height: 1.5;
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.welcome-message h4 {
    color: var(--text-dark);
    margin-bottom: 12px;
}

.welcome-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
}

.suggestion-btn {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.suggestion-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Error message */
.error-message {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: #ff3b30;
    padding: 12px 16px;
    border-radius: var(--radius);
    text-align: center;
    margin: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .chatbot-section {
        padding: 40px 0 60px;
    }
    
    .login-card {
        padding: 32px 24px;
        margin: 0 16px;
    }
    
    .chatbot-container {
        height: calc(100vh - 280px);
        min-height: 400px;
        border-radius: var(--radius);
    }
    
    .chat-header {
        padding: 12px 16px;
    }
    
    .user-greeting {
        display: none;
    }
    
    .chat-messages {
        padding: 16px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .chat-input-container {
        padding: 12px 16px 16px;
    }
}
