/* ==========================================================================
   FLOATING SALES CHATBOT - MAPS FOR SPA
   Theme: Luxury Rose Gold, Champagne & Warm Cream (Synchronized with Website)
   ========================================================================== */

/* Launcher Trigger Button */
.chatbot-launcher {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--rose-gold-gradient, linear-gradient(135deg, #e59d8c 0%, #c87d6b 50%, #aa5f4e 100%));
    color: #ffffff;
    padding: 10px 18px 10px 12px;
    border-radius: 50px;
    box-shadow: 0 10px 25px -3px rgba(200, 125, 107, 0.4), 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: launcherFloat 3s ease-in-out infinite alternate;
}

.chatbot-launcher:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 15px 30px -4px rgba(200, 125, 107, 0.5), 0 6px 16px rgba(0, 0, 0, 0.12);
}

.launcher-avatar-box {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: visible;
}

.launcher-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    background: #eddcd5;
}

.launcher-online-dot {
    position: absolute;
    bottom: 0px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 8px #10b981;
    animation: pulseGlow 2s infinite;
}

.launcher-text-box {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.25;
}

.launcher-title {
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #ffffff;
}

.launcher-subtitle {
    font-size: 0.73rem;
    opacity: 0.92;
    color: #fff4f1;
}

/* Chatbot Floating Window */
.chatbot-container {
    position: fixed;
    bottom: 90px;
    right: 28px;
    width: 390px;
    max-width: calc(100vw - 36px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 20px 45px -10px rgba(160, 100, 85, 0.25), 0 0 0 1px rgba(200, 125, 107, 0.18);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    transform: scale(0.8) translateY(40px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
    transform-origin: bottom right;
}

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

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #2b1f1d 0%, #1f1614 100%);
    color: #ffffff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #c87d6b;
    position: relative;
}

.chat-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient, linear-gradient(135deg, #e4ba61 0%, #c59838 100%));
}

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

.chat-header-avatar {
    position: relative;
    width: 44px;
    height: 44px;
}

.chat-header-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e4ba61;
}

.chat-header-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-header-info h4 .badge-verified {
    color: #e4ba61;
    font-size: 0.8rem;
}

.chat-header-info p {
    font-size: 0.74rem;
    color: #d1c5c0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-header-info .status-live-dot {
    width: 7px;
    height: 7px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px #10b981;
}

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

.chat-control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #f7f1ec;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.chat-control-btn:hover {
    background: rgba(200, 125, 107, 0.35);
    color: #ffffff;
    transform: rotate(90deg);
}

/* Chat Message Area */
.chat-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #fdfbf9;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}

.chat-body::-webkit-scrollbar {
    width: 5px;
}

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

.chat-body::-webkit-scrollbar-thumb {
    background: #eddcd5;
    border-radius: 4px;
}

/* Message Bubbles */
.chat-msg {
    display: flex;
    gap: 10px;
    max-width: 88%;
    animation: messageSlideIn 0.3s ease-out;
}

.chat-msg.bot {
    align-self: flex-start;
}

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

.msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    border: 1.5px solid #c87d6b;
}

.msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.msg-bubble {
    padding: 12px 15px;
    border-radius: 18px;
    font-size: 0.88rem;
    line-height: 1.55;
    word-break: break-word;
    position: relative;
}

.chat-msg.bot .msg-bubble {
    background: #ffffff;
    color: #2b1f1d;
    border: 1px solid rgba(200, 125, 107, 0.18);
    border-top-left-radius: 4px;
    box-shadow: 0 4px 14px rgba(180, 120, 105, 0.07);
}

.chat-msg.user .msg-bubble {
    background: var(--rose-gold-gradient, linear-gradient(135deg, #e59d8c 0%, #c87d6b 100%));
    color: #ffffff;
    border-top-right-radius: 4px;
    box-shadow: 0 4px 14px rgba(200, 125, 107, 0.25);
}

.msg-time {
    display: block;
    font-size: 0.68rem;
    margin-top: 5px;
    opacity: 0.65;
}

.chat-msg.user .msg-time {
    text-align: right;
    color: #fff0ec;
}

/* Callout Box inside Bot message */
.chat-card-cta {
    margin-top: 10px;
    padding: 10px 12px;
    background: #fff8f5;
    border: 1px dashed #c87d6b;
    border-radius: 12px;
    font-size: 0.82rem;
}

.chat-card-cta strong {
    color: #a25847;
    display: block;
    margin-bottom: 4px;
}

.chat-btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    margin-top: 8px;
    padding: 9px 14px;
    background: var(--gold-gradient, linear-gradient(135deg, #e4ba61 0%, #c59838 100%));
    color: #1f1614;
    font-weight: 700;
    font-size: 0.84rem;
    border-radius: 50px;
    text-align: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(197, 152, 56, 0.28);
    transition: all 0.2s ease;
    text-decoration: none;
}

.chat-btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(197, 152, 56, 0.4);
    color: #000000;
}

.chat-btn-secondary {
    background: #eddcd5;
    color: #524744;
    box-shadow: none;
    margin-top: 6px;
}

.chat-btn-secondary:hover {
    background: #e2cbbf;
    color: #221c1a;
}

/* Quick Topic Suggestions Chips */
.chat-suggestions {
    padding: 8px 14px 10px;
    background: #fdfbf9;
    border-top: 1px solid rgba(200, 125, 107, 0.1);
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    scrollbar-width: none;
}

.chat-suggestions::-webkit-scrollbar {
    display: none;
}

.suggestion-chip {
    flex-shrink: 0;
    background: #ffffff;
    color: #6a4c44;
    border: 1px solid rgba(200, 125, 107, 0.25);
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.suggestion-chip:hover {
    background: #fff3ef;
    border-color: #c87d6b;
    color: #a25847;
    transform: translateY(-1px);
}

.suggestion-chip.highlight {
    background: #fff8eb;
    border-color: #c59838;
    color: #8c6310;
}

/* Typing Indicator Animation */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid rgba(200, 125, 107, 0.18);
    border-radius: 18px;
    border-top-left-radius: 4px;
    width: fit-content;
    box-shadow: 0 4px 14px rgba(180, 120, 105, 0.07);
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #c87d6b;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

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

/* Chat Input Bar */
.chat-footer {
    padding: 12px 14px;
    background: #ffffff;
    border-top: 1px solid rgba(200, 125, 107, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-input {
    flex: 1;
    background: #f7f1ec;
    border: 1px solid transparent;
    padding: 10px 14px;
    border-radius: 50px;
    font-size: 0.86rem;
    font-family: inherit;
    color: #221c1a;
    outline: none;
    transition: all 0.2s ease;
}

.chat-input:focus {
    background: #ffffff;
    border-color: #c87d6b;
    box-shadow: 0 0 0 3px rgba(200, 125, 107, 0.12);
}

.chat-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--rose-gold-gradient, linear-gradient(135deg, #e59d8c 0%, #c87d6b 100%));
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.chat-send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(200, 125, 107, 0.35);
}

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

/* Animations */
@keyframes launcherFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-6px); }
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

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

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .chatbot-launcher {
        bottom: 80px; /* Above sticky mobile bar */
        right: 16px;
        padding: 8px 14px 8px 10px;
    }
    
    .chatbot-container {
        bottom: 75px;
        right: 12px;
        left: 12px;
        width: auto;
        height: 520px;
        max-height: calc(100vh - 150px);
        border-radius: 18px;
    }
}
