/* Elegant Print AI Chatbot Styles */
:root {
    --primary-color: #d4af37;
    /* Elegant Gold */
    --secondary-color: #1a1a1a;
    /* Dark Charcoal */
    --bg-glass: rgba(255, 255, 255, 0.85);
    --bot-msg-bg: #f0f0f0;
    --user-msg-bg: #0566ff;
    --text-color: #333;
    --border-radius: 20px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

#elegantprint-chatbot-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Launcher */
#elegantprint-chatbot-launcher {
    width: 70px;
    height: 70px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

#elegantprint-chatbot-launcher:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

#elegantprint-chatbot-launcher img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Use cover to fill the round shape since logo is white bg */
    border-radius: 50%;
}

/* Close icon for launcher when chat is open */
#elegantprint-chatbot-launcher.active img {
    display: none;
}

#elegantprint-chatbot-launcher.active::before {
    content: '×';
    font-size: 40px;
    color: var(--text-color);
    line-height: 1;
}

.chatbot-hint {
    position: absolute;
    right: 85px;
    background: #ffffff;
    padding: 12px 20px;
    border-radius: 15px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

#elegantprint-chatbot-launcher:hover .chatbot-hint {
    opacity: 1;
    transform: translateX(0);
}

/* Container */
#elegantprint-chatbot-container {
    position: absolute;
    bottom: 90px;
    right: 0;
    width: 380px;
    height: 650px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.2);
    transform-origin: bottom right;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

#elegantprint-chatbot-container.hidden {
    opacity: 0;
    transform: scale(0.7) translateY(40px);
    pointer-events: none;
}

/* Header */
.chatbot-header {
    background: var(--secondary-color);
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.header-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    padding: 2px;
}

.header-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff !important;
}

.header-info span {
    font-size: 12px;
    opacity: 0.8;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    margin-right: 4px;
}

#chatbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

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

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.bot-message {
    align-self: flex-start;
    background: var(--bot-msg-bg);
    color: var(--text-color);
    border-bottom-left-radius: 5px;
}

.user-message {
    align-self: flex-end;
    background: var(--user-msg-bg);
    color: #fff;
    border-bottom-right-radius: 5px;
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.quick-reply {
    background: #fff;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-reply:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px;
    background: var(--bot-msg-bg);
    border-radius: 15px;
    width: fit-content;
}

.dot {
    width: 6px;
    height: 6px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {

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

    30% {
        transform: translateY(-4px);
    }
}

/* Input Area */
.chatbot-input-area {
    padding: 15px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 10px;
    align-items: center;
}

#chatbot-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

#chatbot-input:focus {
    border-color: var(--primary-color);
}

#chatbot-send {
    background: var(--primary-color);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#chatbot-send:hover {
    transform: scale(1.1);
}

.chatbot-footer {
    padding: 5px 10px;
    text-align: center;
    font-size: 10px;
    color: #999;
    background: rgba(0, 0, 0, 0.02);
}

/* Animations */
.transition-in {
    animation: slideUp 0.4s ease forwards;
}

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

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

/* Mobile Responsive */
@media (max-width: 480px) {
    #elegantprint-chatbot-wrapper {
        bottom: 15px;
        right: 15px;
    }

    #elegantprint-chatbot-launcher {
        width: 60px;
        height: 60px;
    }

    #elegantprint-chatbot-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        bottom: 0;
    }

    #elegantprint-chatbot-container.hidden {
        transform: translateY(100%);
        opacity: 0;
    }

    .chatbot-header {
        padding: 15px;
        border-radius: 0;
    }

    #chatbot-messages {
        padding: 15px;
    }

    .message {
        max-width: 90%;
    }

    .chatbot-hint {
        display: none;
        /* Hide hint on mobile to save space */
    }
}