/* Reset and Base Styles */
#rekfilm-chat-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /*font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;*/
}

/* Chat Container */
#rekfilm-chat-container.rekfilm-chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

#rekfilm-chat-container .rekfilm-chat-window {
    background: #333;
    width: 850px;
    height: 650px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Chat Header */
#rekfilm-chat-container .rekfilm-chat-header {
    padding: 15px 20px;
    background: #333;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

#rekfilm-chat-container .rekfilm-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

#rekfilm-chat-container .rekfilm-ai-badge {
    background: #E68A4D;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 12px;
}

#rekfilm-chat-container .rekfilm-close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Chat Body */
#rekfilm-chat-container .rekfilm-chat-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

#rekfilm-chat-container .rekfilm-chat-messages {
    flex: 1;
    background: #444;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
	scrollbar-width: thin;
    scrollbar-color: #555555 #444;
}

#rekfilm-chat-container .rekfilm-message {
    display: flex;
    gap: 12px;
    max-width: 80%;
}

#rekfilm-chat-container .rekfilm-message.ai {
    align-self: flex-start;
}

#rekfilm-chat-container .rekfilm-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

#rekfilm-chat-container .rekfilm-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #E68A4D;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    flex-shrink: 0;
}

#rekfilm-chat-container .rekfilm-message.user .rekfilm-avatar {
    background: rgba(255,255,255,0.1);
}

#rekfilm-chat-container .rekfilm-bubble {
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
}

#rekfilm-chat-container .rekfilm-message.ai .rekfilm-bubble {
    background: white;
    color: #333;
    border-top-left-radius: 0;
}

#rekfilm-chat-container .rekfilm-message.user .rekfilm-bubble {
    background: #555;
    color: white;
    border-top-right-radius: 0;
}

/* Markdown Styling in Bubbles */
#rekfilm-chat-container .rekfilm-bubble h1, 
#rekfilm-chat-container .rekfilm-bubble h2, 
#rekfilm-chat-container .rekfilm-bubble h3 {
    margin: 10px 0 5px 0;
    font-size: 1.1em;
    color: inherit;
}
#rekfilm-chat-container .rekfilm-bubble p {
    margin-bottom: 8px;
}
#rekfilm-chat-container .rekfilm-bubble p:last-child {
    margin-bottom: 0;
}
#rekfilm-chat-container .rekfilm-bubble ul, 
#rekfilm-chat-container .rekfilm-bubble ol {
    margin: 0 0 10px 20px;
}
#rekfilm-chat-container .rekfilm-bubble li {
    margin-bottom: 4px;
}
#rekfilm-chat-container .rekfilm-bubble a {
    color: #E68A4D;
    text-align: right;
}
#rekfilm-chat-container .rekfilm-message.user .rekfilm-bubble a {
    color: #fff;
}

/* Product CTA in bubble */
#rekfilm-chat-container .rekfilm-product-cta {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #E68A4D;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

#rekfilm-chat-container .rekfilm-product-cta:hover {
    border-bottom-color: #E68A4D;
}

#rekfilm-chat-container .rekfilm-product-cta::after {
    content: ' →';
}

/* Sidebar */
#rekfilm-chat-container .rekfilm-chat-sidebar {
    width: 300px;
    background: #fbfaf7;
    padding: 20px;
    overflow-y: auto;
    border-left: 1px solid rgba(255,255,255,0.1);
	scrollbar-width: thin;
    scrollbar-color: #555555 #fbfaf7;
}

#rekfilm-chat-container .rekfilm-chat-sidebar h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

/* Chat Input */
#rekfilm-chat-container .rekfilm-chat-input {
    padding: 20px;
    background: #444;
    border-top: 1px solid rgba(255,255,255,0.1);
}

#rekfilm-chat-container .rekfilm-input-wrapper {
    position: relative;
}

#rekfilm-chat-container .rekfilm-chat-input input {
    width: 100%;
    background: white;
    border: none;
    padding: 15px 50px 15px 20px;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

#rekfilm-chat-container #rekfilm-send-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #E68A4D;
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Trigger Button */
body .rekfilm-chat-trigger {
    position: fixed;
    bottom: 15px;
    right: 100px;
    width: 60px;
    height: 60px;
    background: #E68A4D;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(230, 138, 77, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    z-index: 100000;
}

.rekfilm-chat-trigger:hover {
    transform: scale(1.1);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 900px) {
    #rekfilm-chat-container .rekfilm-chat-window {
        width: 95vw;
        height: 80vh;
    }
    #rekfilm-chat-container .rekfilm-chat-sidebar {
        display: none;
    }
}
