/* ========== BIZWETU AI CHATBOT STYLES ========== */

:root {
    --raena-primary: #0D9484;
    --raena-primary-light: #14B8A6;
    --raena-bg: #111827;
    --raena-bg-dark: #0a0f1a;
    --raena-text: #f8fafc;
    --raena-text-muted: #94a3b8;
    --raena-border: rgba(255, 255, 255, 0.08);
}

/* Chatbot Container */
.raena-chatbot {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.raena-position-bottom-right {
    bottom: 24px;
    right: 24px;
}

.raena-position-bottom-left {
    bottom: 24px;
    left: 24px;
}

/* Chat Button */
.raena-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid var(--raena-primary-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 25px rgba(13, 148, 132, 0.5);
    transition: all 0.3s ease;
    overflow: hidden;
    padding: 0;
    background: white;
    animation: raena-glow 2s ease-in-out infinite;
}

.raena-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.raena-button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 35px rgba(13, 148, 132, 0.6);
}

@keyframes raena-glow {
    0%, 100% { box-shadow: 0 4px 25px rgba(13, 148, 132, 0.5); }
    50% { box-shadow: 0 4px 35px rgba(13, 148, 132, 0.7); }
}

/* Chat Window */
.raena-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 420px;
    max-height: 650px;
    background: linear-gradient(180deg, var(--raena-bg) 0%, var(--raena-bg-dark) 100%);
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.6);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(13, 148, 132, 0.3);
}

.raena-position-bottom-left .raena-window {
    right: auto;
    left: 0;
}

.raena-chatbot.open .raena-window {
    display: flex;
    animation: raena-fade-in-up 0.3s ease;
}

@keyframes raena-fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.raena-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--raena-primary), var(--raena-primary-light));
    display: flex;
    align-items: center;
    gap: 14px;
}

.raena-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,0.3);
    background: white;
}

.raena-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.raena-info {
    flex: 1;
}

.raena-name {
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
}

.raena-status {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    gap: 6px;
}

.raena-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 10px #4ade80;
    animation: raena-pulse 2s infinite;
}

@keyframes raena-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Messages */
.raena-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.raena-message {
    display: flex;
    gap: 10px;
    max-width: 90%;
    animation: raena-message-in 0.3s ease;
}

@keyframes raena-message-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.raena-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.raena-message-content {
    background: rgba(255,255,255,0.08);
    padding: 12px 16px;
    border-radius: 18px;
    color: var(--raena-text);
    font-size: 0.95rem;
    line-height: 1.5;
    border: 1px solid rgba(255,255,255,0.05);
}

.raena-message.user .raena-message-content {
    background: linear-gradient(135deg, var(--raena-primary), var(--raena-primary-light));
    color: white;
    border: none;
}

.raena-message-content a {
    color: var(--raena-primary-light);
    text-decoration: underline;
}

.raena-message-content strong {
    color: var(--raena-primary-light);
}

.raena-time {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    margin-top: 4px;
    text-align: right;
}

/* Typing Indicator */
.raena-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.08);
    border-radius: 18px;
    width: fit-content;
}

.raena-typing span {
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    animation: raena-typing 1.4s infinite;
}

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

@keyframes raena-typing {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(-5px); opacity: 1; }
}

/* Quick Replies */
.raena-quick-replies {
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid var(--raena-border);
    max-height: 100px;
    overflow-y: auto;
}

.raena-quick-reply {
    background: rgba(13, 148, 132, 0.15);
    border: 1px solid rgba(13, 148, 132, 0.4);
    color: var(--raena-primary-light);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.raena-quick-reply:hover {
    background: rgba(13, 148, 132, 0.3);
    transform: translateY(-2px);
}

/* Input Area */
.raena-input-area {
    padding: 16px 20px;
    border-top: 1px solid var(--raena-border);
}

.raena-input-container {
    display: flex;
    gap: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 25px;
    padding: 5px;
    border: 1px solid var(--raena-border);
}

.raena-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 16px;
    color: var(--raena-text);
    font-size: 0.95rem;
    outline: none;
    font-family: inherit;
}

.raena-input::placeholder {
    color: rgba(255,255,255,0.4);
}

.raena-send-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--raena-primary), var(--raena-primary-light));
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.raena-send-btn:hover {
    transform: scale(1.1);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .raena-window {
        width: calc(100vw - 30px);
        position: fixed;
        bottom: 100px;
        right: 15px;
        left: 15px;
    }
    
    .raena-position-bottom-left .raena-window,
    .raena-position-bottom-right .raena-window {
        right: 15px;
        left: 15px;
    }
    
    .raena-button {
        width: 60px;
        height: 60px;
    }
}

/* Hide on mobile if disabled */
.raena-hide-mobile {
    display: none !important;
}

@media (min-width: 481px) {
    .raena-hide-mobile {
        display: flex !important;
    }
}
