/* Morby Sales Bot v2.0 - Styles */
/* Brand Colors: #000000 (black), #FBF80A (yellow), #FFFFFF (white) */
/* Font: Outfit */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap');

/* Reset */
#morby-bot-container * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ================================
   FLOATING WIDGET CONTAINER
   ================================ */
#morby-bot-container.morby-floating {
    position: fixed;
    bottom: 24px;
    z-index: 999999;
}

#morby-bot-container.morby-floating[data-position="right"] {
    right: 24px;
}

#morby-bot-container.morby-floating[data-position="left"] {
    left: 24px;
}

/* Embedded Container */
#morby-bot-container.morby-embedded {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

#morby-bot-container.morby-embedded .morby-chat-window {
    position: relative;
    display: flex !important;
    height: 550px;
}

/* ================================
   TOGGLE BUTTON (Floating Ball)
   ================================ */
.morby-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #000000;
    border: 3px solid #FBF80A;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(251, 248, 10, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.morby-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(251, 248, 10, 0.5);
}

.morby-toggle-btn.morby-hidden {
    display: none;
}

.morby-toggle-icon {
    font-size: 28px;
    transition: all 0.3s ease;
}

/* Notification Badge */
.morby-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: #ff4757;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    animation: badgePulse 2s infinite;
}

.morby-notification-badge.morby-hidden {
    display: none;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ================================
   CHAT WINDOW
   ================================ */
.morby-chat-window {
    display: none;
    position: fixed;
    bottom: 24px;
    width: 380px;
    height: 520px;
    background: #000000;
    border-radius: 20px;
    border: 2px solid #FBF80A;
    overflow: hidden;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000000;
    animation: slideUp 0.3s ease;
}

#morby-bot-container.morby-floating[data-position="right"] .morby-chat-window {
    right: 24px;
}

#morby-bot-container.morby-floating[data-position="left"] .morby-chat-window {
    left: 24px;
}

.morby-chat-window.morby-open {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ================================
   CHAT HEADER
   ================================ */
.morby-chat-header {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #333;
}

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

.morby-logo-ball {
    width: 36px;
    height: 36px;
    background: #FBF80A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.morby-header-text h3 {
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 700;
    font-style: italic;
    letter-spacing: 2px;
    margin: 0;
}

.morby-header-text span {
    color: #FBF80A;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Header Buttons (Minimize & Close) */
.morby-header-buttons {
    display: flex;
    gap: 8px;
}

.morby-minimize-btn,
.morby-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #444;
    background: transparent;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
}

.morby-minimize-btn:hover {
    background: #FBF80A;
    color: #000;
    border-color: #FBF80A;
}

.morby-close-btn:hover {
    background: #ff4757;
    color: #fff;
    border-color: #ff4757;
}

/* ================================
   MESSAGES CONTAINER
   ================================ */
.morby-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #0a0a0a;
}

.morby-messages::-webkit-scrollbar {
    width: 6px;
}

.morby-messages::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.morby-messages::-webkit-scrollbar-thumb {
    background: #FBF80A;
    border-radius: 3px;
}

/* ================================
   MESSAGES
   ================================ */
.morby-message {
    max-width: 88%;
    animation: messageSlide 0.3s ease;
}

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

.morby-message.morby-bot {
    align-self: flex-start;
}

.morby-message.morby-user {
    align-self: flex-end;
}

.morby-message-content {
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.6;
}

.morby-bot .morby-message-content {
    background: #1a1a1a;
    color: #FFFFFF;
    border-bottom-left-radius: 4px;
    border: 1px solid #333;
}

.morby-user .morby-message-content {
    background: #FBF80A;
    color: #000000;
    border-bottom-right-radius: 4px;
    font-weight: 500;
}

.morby-message-content a {
    color: #FBF80A;
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}

.morby-message-content a:hover {
    text-decoration: underline;
}

.morby-user .morby-message-content a {
    color: #000;
    text-decoration: underline;
}

/* ================================
   QUICK ACTION BUTTONS
   ================================ */
.morby-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.morby-quick-btn {
    background: transparent;
    border: 1px solid #FBF80A;
    color: #FFFFFF; /* WHITE TEXT */
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.morby-quick-btn:hover {
    background: #FBF80A;
    color: #000000;
    transform: scale(1.05);
}

/* ================================
   TYPING INDICATOR
   ================================ */
.morby-typing {
    display: flex;
    gap: 5px;
    padding: 14px 18px;
    background: #1a1a1a;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    width: fit-content;
    border: 1px solid #333;
}

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

.morby-typing-dot:nth-child(1) { animation-delay: 0s; }
.morby-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.morby-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
}

/* ================================
   INPUT AREA
   ================================ */
.morby-input-area {
    padding: 16px;
    background: #0a0a0a;
    border-top: 1px solid #333;
    display: flex;
    gap: 10px;
    align-items: center;
}

.morby-input {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 25px;
    padding: 12px 20px;
    color: #FFFFFF;
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.morby-input:focus {
    border-color: #FBF80A;
    box-shadow: 0 0 0 2px rgba(251, 248, 10, 0.2);
}

.morby-input::placeholder {
    color: #666;
}

.morby-send-btn {
    width: 46px;
    height: 46px;
    background: #FBF80A;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #000;
    flex-shrink: 0;
}

.morby-send-btn:hover {
    transform: scale(1.1);
    background: #e6e000;
    box-shadow: 0 4px 15px rgba(251, 248, 10, 0.4);
}

.morby-send-btn:disabled {
    background: #333;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.morby-send-btn:disabled svg {
    color: #666;
}

/* ================================
   MOBILE RESPONSIVE
   ================================ */
@media (max-width: 480px) {
    .morby-chat-window {
        width: calc(100vw - 32px);
        height: calc(100vh - 100px);
        max-height: 600px;
        left: 16px !important;
        right: 16px !important;
        bottom: 16px;
    }
    
    .morby-toggle-btn {
        width: 54px;
        height: 54px;
    }
    
    .morby-toggle-icon {
        font-size: 24px;
    }
    
    #morby-bot-container.morby-floating {
        bottom: 16px;
    }
    
    #morby-bot-container.morby-floating[data-position="right"] {
        right: 16px;
    }
    
    #morby-bot-container.morby-floating[data-position="left"] {
        left: 16px;
    }
}
