/* ===================================
   CHATBOT WIDGET STYLES
   Disruptive & Modern Design
   =================================== */

/* Chatbot Button - Hexagonal Shape */
.chatbot-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #5e08d5 100%);
    border: none;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    animation: pulse 2s ease-in-out infinite, float 3s ease-in-out infinite;
}

.chatbot-button:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 12px 48px rgba(102, 126, 234, 0.6);
}

.chatbot-button:active {
    transform: scale(0.95) rotate(10deg);
}

.chatbot-icon {
    width: 32px;
    height: 32px;
    color: white;
}

.chatbot-icon-img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #496fec 0%, #9d33bd 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 30px;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.4);
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
    }

    50% {
        box-shadow: 0 8px 32px rgba(102, 126, 234, 0.8), 0 0 0 10px rgba(102, 126, 234, 0.1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Chatbot Window */
.chatbot-window {
    position: fixed;
    bottom: 120px;
    right: 30px;
    width: 400px;
    height: 600px;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    z-index: 9998;
    overflow: hidden;
    animation: slideIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.chatbot-window.active {
    display: flex;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.chatbot-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.chatbot-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-close svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* Messages Container */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.chatbot-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Message Bubbles */
.message {
    display: flex;
    gap: 10px;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.message-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.message-content {
    max-width: 70%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 12px 16px;
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.message-content p {
    margin: 0;
    color: white;
    font-size: 14px;
    line-height: 1.5;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: fit-content;
    margin-left: 42px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: typing 1.4s ease-in-out 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.6;
    }

    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Input Container */
.chatbot-input-container {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    background: rgba(15, 15, 30, 0.8);
}

.chatbot-form {
    display: flex;
    gap: 8px;
}

.chatbot-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.chatbot-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chatbot-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.chatbot-send {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chatbot-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.chatbot-send:active {
    transform: scale(0.95);
}

.chatbot-send svg {
    width: 20px;
    height: 20px;
    color: white;
}

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .chatbot-window {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .chatbot-button {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
    }

    .chatbot-icon {
        width: 28px;
        height: 28px;
    }
}