/* ═══════════════════════════════════════════════════════════════════
   SCANDAL GERMANY – Customer Support Chatbot v1.0
   ═══════════════════════════════════════════════════════════════════ */

/* Chat Toggle Button */
.chatbot-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(212,175,55,0.4);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
}
.chatbot-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(212,175,55,0.6);
}
.chatbot-toggle svg {
    width: 28px;
    height: 28px;
    fill: #000;
}
.chatbot-toggle .close-icon { display: none; }
.chatbot-toggle.active .chat-icon { display: none; }
.chatbot-toggle.active .close-icon { display: block; }

/* Chat Window */
.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 520px;
    max-height: calc(100vh - 140px);
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    box-shadow: 0 10px 60px rgba(0,0,0,0.7);
    z-index: 999999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.chatbot-window.open {
    display: flex;
    animation: chatSlideUp 0.3s ease;
}
@keyframes chatSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.chatbot-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #111 100%);
    padding: 16px 20px;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    align-items: center;
    gap: 12px;
}
.chatbot-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37, #b8941f);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #000;
    font-size: 14px;
}
.chatbot-header-info h4 {
    margin: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.chatbot-header-info p {
    margin: 2px 0 0;
    color: #888;
    font-size: 11px;
}

/* Messages Area */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.chatbot-messages::-webkit-scrollbar { width: 4px; }
.chatbot-messages::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

/* Message Bubbles */
.chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
}
.chat-msg.bot {
    align-self: flex-start;
    background: #1e1e1e;
    color: #e0e0e0;
    border-bottom-left-radius: 4px;
}
.chat-msg.user {
    align-self: flex-end;
    background: #d4af37;
    color: #000;
    border-bottom-right-radius: 4px;
}
.chat-msg a {
    color: #d4af37;
    text-decoration: underline;
}
.chat-msg.user a {
    color: #333;
}

/* Quick Reply Buttons */
.chat-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.chat-quick-btn {
    background: #1a1a1a;
    border: 1px solid #d4af37;
    color: #d4af37;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.chat-quick-btn:hover {
    background: #d4af37;
    color: #000;
}

/* Input Area */
.chatbot-input {
    padding: 12px 16px;
    border-top: 1px solid #2a2a2a;
    display: flex;
    gap: 8px;
    background: #0d0d0d;
}
.chatbot-input input {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 24px;
    padding: 10px 16px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}
.chatbot-input input:focus {
    border-color: #d4af37;
}
.chatbot-input input::placeholder {
    color: #666;
}
.chatbot-input button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #d4af37;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.chatbot-input button:hover {
    background: #e5c340;
}
.chatbot-input button svg {
    width: 18px;
    height: 18px;
    fill: #000;
}

/* Typing Indicator */
.chat-typing {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    align-self: flex-start;
}
.chat-typing span {
    width: 6px;
    height: 6px;
    background: #555;
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* Status Badge */
.chat-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.chat-status-badge.paid { background: #27ae60; color: #fff; }
.chat-status-badge.shipped { background: #3498db; color: #fff; }
.chat-status-badge.delivered { background: #2ecc71; color: #fff; }
.chat-status-badge.pending { background: #f39c12; color: #000; }
.chat-status-badge.canceled { background: #e74c3c; color: #fff; }
.chat-status-badge.refunded { background: #9b59b6; color: #fff; }
.chat-status-badge.processing { background: #e67e22; color: #fff; }

/* Mobile */
@media (max-width: 768px) {
    .chatbot-window {
        position: fixed;
        bottom: auto;
        top: 5%;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
        height: 65%;
        max-height: 65%;
        border-radius: 16px;
        padding-bottom: 0;
    }
    .chatbot-toggle {
        bottom: 66px;
        right: 20px;
        width: 56px;
        height: 56px;
        z-index: 999999;
    }
    .chatbot-input {
        padding-bottom: 12px;
    }
}
