﻿* {
    font-family: "Poppins", Arial, sans-serif;
}

.chatbot-container {
    position: fixed;
    bottom: 35px;
    right: 20px;
    z-index: 9998;
    font-family: "Poppins", Arial, sans-serif;
}

.chatbot-button {
    position: relative;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #022079, #0048b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(2, 32, 121, 0.3);
    transition: all 0.3s ease;
}

    .chatbot-button:hover {
        transform: scale(1.1);
        box-shadow: 0 12px 35px rgba(2, 32, 121, 0.4);
    }

    .chatbot-button.active {
        transform: scale(0.9);
    }

    .chatbot-button i {
        color: white;
        font-size: 28px;
        animation: bounce 2s infinite;
    }

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3447;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    animation: pulse 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.4s ease;
}

    .chatbot-window.active {
        display: flex;
    }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-header {
    background: linear-gradient(135deg, #022079, #0048b3);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.chatbot-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.chatbot-status {
    font-size: 12px;
    opacity: 0.9;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .chatbot-close:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: rotate(90deg);
    }

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

    .chatbot-messages::-webkit-scrollbar {
        width: 6px;
    }

    .chatbot-messages::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
    }

.chatbot-message {
    display: flex;
    gap: 10px;
    animation: fadeInMessage 0.3s ease;
}

@keyframes fadeInMessage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #022079, #0048b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.message-content {
    max-width: 70%;
    background: white;
    padding: 12px 16px;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-message .message-content {
    background: linear-gradient(135deg, #022079, #0048b3);
    color: white;
}

.message-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.message-time {
    font-size: 11px;
    opacity: 0.6;
    margin-top: 5px;
    display: block;
}

.typing-dots {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

    .typing-dots span {
        width: 8px;
        height: 8px;
        background: #022079;
        border-radius: 50%;
        animation: typingDot 1.4s infinite;
    }

        .typing-dots span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing-dots span:nth-child(3) {
            animation-delay: 0.4s;
        }

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-10px);
    }
}

.chatbot-quick-replies {
    padding: 10px 20px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    background: white;
    border-top: 1px solid #e5e7eb;
}

    .chatbot-quick-replies::-webkit-scrollbar {
        height: 4px;
    }

.quick-reply {
    padding: 8px 14px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .quick-reply:hover {
        background: #022079;
        color: white;
        border-color: #022079;
    }

    .quick-reply i {
        font-size: 12px;
    }

.chatbot-input-container {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
}

.chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 14px;
    font-family: "Poppins", Arial, sans-serif;
    transition: all 0.3s ease;
}

    .chatbot-input:focus {
        outline: none;
        border-color: #022079;
    }

.chatbot-send {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #022079, #0048b3);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .chatbot-send:hover {
        transform: scale(1.1);
        box-shadow: 0 5px 15px rgba(2, 32, 121, 0.3);
    }

.dark-mode .chatbot-button {
    background: linear-gradient(135deg, #faff04, #ffcc00);
}

    .dark-mode .chatbot-button i {
        color: #022079;
    }

.dark-mode .chatbot-window {
    background: #1a1a2e;
}

.dark-mode .chatbot-header {
    background: linear-gradient(135deg, #faff04, #ffcc00);
    color: #022079;
}

.dark-mode .chatbot-avatar {
    background: rgba(2, 32, 121, 0.2);
}

.dark-mode .chatbot-messages {
    background: #16213e;
}

.dark-mode .message-content {
    background: #1a1a2e;
    color: #e0e0e0;
}

.dark-mode .user-message .message-content {
    background: linear-gradient(135deg, #faff04, #ffcc00);
    color: #022079;
}

.dark-mode .message-avatar {
    background: linear-gradient(135deg, #faff04, #ffcc00);
    color: #022079;
}

.dark-mode .typing-dots {
    background: #1a1a2e;
}

    .dark-mode .typing-dots span {
        background: #faff04;
    }

.dark-mode .chatbot-quick-replies {
    background: #1a1a2e;
    border-top-color: #2a2a3e;
}

.dark-mode .quick-reply {
    background: rgba(250, 255, 4, 0.1);
    border-color: rgba(250, 255, 4, 0.2);
    color: #e0e0e0;
}

    .dark-mode .quick-reply:hover {
        background: #faff04;
        color: #022079;
    }

.dark-mode .chatbot-input-container {
    background: #1a1a2e;
    border-top-color: #2a2a3e;
}

.dark-mode .chatbot-input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(250, 255, 4, 0.2);
    color: #e0e0e0;
}

    .dark-mode .chatbot-input:focus {
        border-color: #faff04;
    }

.dark-mode .chatbot-send {
    background: linear-gradient(135deg, #faff04, #ffcc00);
    color: #022079;
}

@media (max-width: 500px) {
    .chatbot-window {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        max-width: 400px;
        bottom: auto;
        right: auto;
    }

    .chatbot-header {
        padding: 15px;
    }

    .chatbot-messages {
        padding: 15px;
    }

    .chatbot-input-container {
        padding: 12px 15px;
    }

    .chatbot-input {
        padding: 10px 14px;
        font-size: 13px;
    }

    .chatbot-send {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        min-width: 40px;
        min-height: 40px;
    }

        .chatbot-send i {
            font-size: 16px;
        }
}

@media (max-width: 380px) {
    .chatbot-input {
        padding: 8px 12px;
        font-size: 12px;
    }

    .chatbot-send {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }

        .chatbot-send i {
            font-size: 14px;
        }
}

@media (max-height: 670px) {
    .chatbot-window {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        max-width: 400px;
        bottom: auto;
        right: auto;
    }

    .chatbot-header {
        padding: 15px;
    }

    .chatbot-messages {
        padding: 15px;
    }
}
