/* ========================================
   BEAUTY ASSISTANT CHATBOT
   Floating chat interface with premium aesthetics
========================================= */

/* Floating Bot Trigger */
.beauty-bot-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--color-rose-gold), var(--color-blush-light));
    border-radius: 50%;
    box-shadow: 0 8px 30px rgba(183, 110, 121, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid var(--color-white);
    animation: botPulse 3s ease-in-out infinite;
}

.beauty-bot-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(183, 110, 121, 0.6);
    animation: none;
}

.beauty-bot-trigger i {
    font-size: 28px;
    color: var(--color-white);
}

@keyframes botPulse {
    0%, 100% {
        box-shadow: 0 8px 30px rgba(183, 110, 121, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 8px 30px rgba(183, 110, 121, 0.6), 0 0 0 10px rgba(183, 110, 121, 0.1);
        transform: scale(1.02);
    }
}

/* Chat Panel */
.beauty-chat-panel {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 60px);
    height: 550px;
    max-height: calc(100vh - 140px);
    background: var(--color-white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 998;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.beauty-chat-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, var(--color-rose-gold), var(--color-rose-gold-light));
    padding: 20px;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--color-white);
}

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

.chat-avatar {
    width: 45px;
    height: 45px;
    background: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--color-rose-gold);
}

.chat-header-text h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.chat-header-text p {
    font-size: 12px;
    opacity: 0.9;
}

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

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

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--color-cream);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--color-rose-gold-light);
    border-radius: 3px;
}

.chat-message {
    display: flex;
    gap: 10px;
    animation: messageSlide 0.3s ease;
}

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

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

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--color-rose-gold-light);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.chat-message.user .message-avatar {
    background: var(--color-charcoal);
}

.message-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    background: var(--color-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    line-height: 1.5;
    font-size: 14px;
}

.chat-message.user .message-bubble {
    background: linear-gradient(135deg, var(--color-rose-gold), var(--color-rose-gold-light));
    color: var(--color-white);
}

/* Quick Actions */
.chat-quick-actions {
    padding: 15px 20px;
    border-top: 1px solid var(--color-cream-dark);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: var(--color-white);
}

.quick-action-btn {
    padding: 8px 14px;
    background: var(--color-cream);
    border: 1px solid var(--color-cream-dark);
    border-radius: 20px;
    font-size: 13px;
    color: var(--color-charcoal);
    cursor: pointer;
    transition: all 0.2s;
}

.quick-action-btn:hover {
    background: var(--color-rose-gold-light);
    color: var(--color-white);
    border-color: var(--color-rose-gold-light);
}

/* Chat Input */
.chat-input-area {
    padding: 15px 20px;
    background: var(--color-white);
    border-radius: 0 0 20px 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--color-cream-dark);
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: var(--color-rose-gold-light);
}

.chat-send-btn {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--color-rose-gold), var(--color-rose-gold-light));
    border: none;
    border-radius: 50%;
    color: var(--color-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(183, 110, 121, 0.4);
}

.chat-send-btn i {
    font-size: 16px;
}

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

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--color-rose-gold-light);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

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

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

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

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .beauty-bot-trigger {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        z-index: 1001 !important;
    }
    
    .beauty-chat-panel {
        bottom: 95px;
        right: 20px;
        left: 20px;
        width: auto;
        max-width: none;
    }
}
