/* Ranisa Boutique Chatbot Styles */

.ranisa-chatbot {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    font-family: 'Poppins', sans-serif;
}

/* Toggle Button */
.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4a574, #f5d5ba);
    border: none;
    box-shadow: 0 4px 20px rgba(212, 165, 116, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #fff;
    font-size: 24px;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(212, 165, 116, 0.6);
}

.chatbot-toggle.hidden {
    transform: scale(0);
    opacity: 0;
}

/* Chatbot Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 550px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: scale(0);
    transform-origin: bottom left;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.chatbot-window.active {
    transform: scale(1);
    opacity: 1;
}

/* Header */
.chatbot-header {
    background: linear-gradient(135deg, #d4a574, #f5d5ba);
    color: #fff;
    padding: 1.25rem 1.5rem;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.chatbot-title {
    flex: 1;
}

.chatbot-title h6 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.chatbot-status {
    font-size: 0.75rem;
    opacity: 0.9;
}

.chatbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: transform 0.2s;
}

.chatbot-close:hover {
    transform: rotate(90deg);
}

/* Messages Container */
.chatbot-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: #f8f9fa;
    scroll-behavior: smooth;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #d4a574;
    border-radius: 3px;
}

/* Messages */
.message {
    display: flex;
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-content {
    max-width: 80%;
    padding: 0.875rem 1.125rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.bot-message .message-content {
    background: #fff;
    color: #333;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.bot-message .message-content p:last-child {
    margin-bottom: 0;
}

.bot-message .message-content ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.bot-message .message-content ul li {
    margin: 0.25rem 0;
}

.user-message {
    justify-content: flex-end;
}

.user-message .message-content {
    background: linear-gradient(135deg, #d4a574, #f5d5ba);
    color: #fff;
}

/* Typing Indicator */
.typing-indicator .message-content {
    padding: 1rem 1.25rem;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.7;
    }

    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Quick Replies */
.chatbot-quick-replies {
    padding: 0.75rem 1.5rem;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    flex-wrap: nowrap;
}

.chatbot-quick-replies::-webkit-scrollbar {
    height: 4px;
}

.chatbot-quick-replies::-webkit-scrollbar-thumb {
    background: #d4a574;
    border-radius: 2px;
}

.quick-reply {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 0.8rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-reply:hover {
    background: linear-gradient(135deg, #d4a574, #f5d5ba);
    color: #fff;
    border-color: #d4a574;
}

/* Input Area */
.chatbot-input {
    display: flex;
    padding: 1rem 1.5rem;
    background: #fff;
    border-radius: 0 0 20px 20px;
    border-top: 1px solid #e0e0e0;
    gap: 0.75rem;
}

.chatbot-input input {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    padding: 0.625rem 1.125rem;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

.chatbot-input input:focus {
    border-color: #d4a574;
}

.chatbot-input button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4a574, #f5d5ba);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chatbot-input button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(212, 165, 116, 0.4);
}

.chatbot-input button:active {
    transform: scale(0.95);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ranisa-chatbot {
        bottom: 15px;
        left: 15px;
    }

    .chatbot-toggle {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }

    .chatbot-window {
        width: calc(100vw - 30px);
        height: calc(100vh - 150px);
        bottom: 75px;
    }

    .chatbot-header {
        padding: 1rem 1.25rem;
    }

    .chatbot-messages {
        padding: 1rem;
    }

    .message-content {
        max-width: 85%;
        font-size: 0.85rem;
    }

    .chatbot-input {
        padding: 0.875rem 1rem;
    }
}

/* Small screens */
@media (max-width: 480px) {
    .chatbot-window {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        left: 0;
        border-radius: 0;
        max-width: none;
    }

    .chatbot-header {
        border-radius: 0;
    }

    .chatbot-input {
        border-radius: 0;
    }
}