/* ============================================
   SOLTEK LABS CHATBOT WIDGET STYLES
   ============================================ */

/* --- Chatbot Bubble (Closed State) --- */
.chatbot-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
    z-index: 9998;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    animation: pulse 2s ease-in-out infinite;
}

.chatbot-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.6);
}

.chatbot-bubble i {
    font-size: 28px;
    color: white;
}

.chatbot-bubble.hidden {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
    }

    50% {
        box-shadow: 0 8px 32px rgba(59, 130, 246, 0.7);
    }
}

/* --- Chatbot Window (Open State) --- */
.chatbot-window {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    height: 600px;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: scale(0) translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    pointer-events: none;
}

.chatbot-window.active {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

/* --- Header --- */
.chatbot-header {
    padding: 20px;
    background: var(--gradient-primary);
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.chatbot-title {
    display: flex;
    flex-direction: column;
}

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

.chatbot-title span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

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

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

.chatbot-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* --- Messages Area --- */
.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    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);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

/* --- Message Bubbles --- */
.message {
    display: flex;
    gap: 8px;
    animation: fadeIn 0.3s ease-out;
}

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

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

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

.message.user .message-avatar {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-light);
}

.message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.message.bot .message-content {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gray-light);
    border-radius: 12px 12px 12px 4px;
}

.message.user .message-content {
    background: var(--gradient-primary);
    color: white;
    border-radius: 12px 12px 4px 12px;
}

.message-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

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

.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;
    }
}

/* --- Quick Reply Buttons --- */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.quick-reply-btn {
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 20px;
    color: var(--primary-light);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-reply-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-2px);
}

/* --- Input Area --- */
.chatbot-input {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
    align-items: center;
}

.chatbot-input input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 12px 20px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

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

.chatbot-input input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
}

.chatbot-send-btn {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 16px;
    transition: all 0.2s;
}

.chatbot-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.chatbot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: scale(1);
}

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

    .chatbot-header {
        border-radius: 0;
    }

    .chatbot-bubble {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }

    .chatbot-bubble i {
        font-size: 24px;
    }
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* --- Utility Classes --- */
.chatbot-hidden {
    display: none !important;
}