/* Elvie Sales Support Bot Style */

:root {
    --bot-gold: #c5a059;
    --bot-obsidian: #0a0a0a;
    --bot-obsidian-alt: #111111;
    --bot-glass: rgba(255, 255, 255, 0.05);
    --bot-border: rgba(197, 160, 89, 0.2);
    --bot-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    --bot-font: 'Outfit', sans-serif;
}

#elvie-bot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    font-family: var(--bot-font);
}

/* Bot Trigger Bubble */
#bot-trigger {
    width: 75px;
    height: 75px;
    background: var(--bot-obsidian);
    border: 1px solid var(--bot-gold);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6), 0 0 10px rgba(197, 160, 89, 0.2);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: visible;
    position: relative;
    padding: 15px;
    animation: botFloat 4s ease-in-out infinite;
}

#bot-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.4);
}

#bot-trigger img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

.trigger-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid var(--bot-gold);
    border-radius: 50%;
    opacity: 0.3;
    animation: ringPulse 2s ease-out infinite;
}

@keyframes ringPulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.3); opacity: 0; }
}

@keyframes botFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Floating Message Bubble */
#bot-floating-message {
    position: absolute;
    bottom: 85px;
    right: 0;
    background: var(--bot-obsidian-alt);
    border: 1px solid var(--bot-gold);
    color: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    border-bottom-right-radius: 2px;
    font-size: 0.85rem;
    white-space: nowrap;
    box-shadow: var(--bot-shadow);
    transition: all 0.4s ease;
    cursor: pointer;
    z-index: 10001;
    animation: msgFloat 4s ease-in-out infinite;
}

#bot-floating-message p {
    margin: 0;
    padding-right: 15px;
    font-weight: 300;
}

#bot-floating-close {
    position: absolute;
    top: 5px;
    right: 8px;
    font-size: 0.7rem;
    color: #555;
    cursor: pointer;
}

#bot-floating-close:hover {
    color: var(--bot-gold);
}

@keyframes msgFloat {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-8px) translateX(-5px); }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Chat Window */
#bot-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 380px;
    height: 550px;
    background: var(--bot-obsidian);
    border: 1px solid var(--bot-border);
    border-radius: 20px;
    box-shadow: var(--bot-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: bottom right;
}

#bot-window.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

/* Bot Header */
#bot-header {
    background: var(--bot-obsidian-alt);
    padding: 20px;
    border-bottom: 1px solid var(--bot-border);
    display: flex;
    align-items: center;
    gap: 15px;
}

#bot-header-info h3 {
    margin: 0;
    color: var(--bot-gold);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#bot-header-info p {
    margin: 0;
    color: #888;
    font-size: 0.75rem;
    font-weight: 300;
}

#bot-close {
    margin-left: auto;
    cursor: pointer;
    color: #555;
    transition: color 0.3s;
}

#bot-close:hover {
    color: var(--bot-gold);
}

/* Bot Messages Area */
#bot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: radial-gradient(circle at top right, rgba(197, 160, 89, 0.05), transparent);
}

/* Individual Message */
.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    animation: messageIn 0.3s ease-out;
}

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

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

.message.bot {
    background: var(--bot-obsidian-alt);
    color: #eee;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.message.user {
    background: var(--bot-gold);
    color: #000;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    font-weight: 500;
}

/* Bot Input Area */
#bot-input-area {
    padding: 20px;
    border-top: 1px solid var(--bot-border);
    display: flex;
    gap: 10px;
    background: var(--bot-obsidian-alt);
}

#bot-input-field {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 10px 20px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

#bot-input-field:focus {
    border-color: var(--bot-gold);
}

#bot-send {
    background: var(--bot-gold);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    transition: transform 0.3s;
}

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

/* Quick Options */
.bot-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.bot-option {
    background: transparent;
    border: 1px solid var(--bot-gold);
    color: var(--bot-gold);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
}

.bot-option:hover {
    background: var(--bot-gold);
    color: #000;
}

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

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #555;
    border-radius: 50%;
    animation: typing 1s infinite alternate;
}

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

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

@keyframes typing {
    from {
        opacity: 0.3;
        transform: translateY(0);
    }

    to {
        opacity: 1;
        transform: translateY(-5px);
    }
}

/* Responsive adjustment */
@media (max-width: 480px) {
    #bot-window {
        width: 90vw;
        height: 70vh;
        bottom: 80px;
        right: -10px;
    }

    #elvie-bot-container {
        bottom: 80px;
        right: 20px;
    }
}