/* =============== CHATBOT STYLES =============== */

:root {
    /* HIMNI.bio Dark Theme Colors */
    --primary-color: #16da64;
    --secondary-color: #17f2ef;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --error-color: #e17055;
    
    /* HIMNI Brand Colors */
    --himni-green: #16DA64;
    --himni-cyan: #17F2EF;
    --himni-blue: #0269F5;
    
    /* Dark Theme Background Colors */
    --bg-dark: #0f172a;
    --bg-secondary-dark: #1e293b;
    --bg-tertiary-dark: #334155;
    --card-bg: #1e293b;
    --card-bg-hover: #334155;
    
    /* Text Colors */
    --text-light: #f1f5f9;
    --text-secondary-light: #cbd5e1;
    --text-muted: #94a3b8;
    --title-color: #ffffff;
    
    /* Border and Shadow */
    --border-dark: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    
    /* Border Radius */
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
}

/* =============== CHATBOT CONTAINER =============== */

.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    height: 600px;
    background: var(--bg-secondary-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    z-index: 10000;
    transform: translateY(100vh);
    opacity: 0;
    transition: var(--transition);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-light);
}

.chatbot-container.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.chatbot-container.minimized {
    height: 60px;
    overflow: hidden;
}

/* =============== FLOAT BUTTON =============== */

.chat-float-btn {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 60px !important;
    height: 60px !important;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    font-size: 24px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.3) !important;
    transition: var(--transition) !important;
    z-index: 9999 !important;
    border: none !important;
    outline: none !important;
    opacity: 1 !important;
    transform: scale(1) !important;
    pointer-events: auto !important;
}

.chat-float-btn:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 25px rgba(0, 102, 204, 0.4) !important;
}

.chat-float-btn.hidden {
    transform: scale(0) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.notification-badge {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    background: var(--error-color) !important;
    color: white !important;
    border-radius: 50% !important;
    width: 20px !important;
    height: 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    animation: pulse 2s infinite !important;
}

/* =============== CHATBOT HEADER =============== */

.chatbot-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-dark);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    min-height: 60px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    overflow: hidden;
}

.chatbot-avatar img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.chatbot-info {
    flex: 1;
}

.chatbot-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
}

.status {
    font-size: 12px;
    color: var(--text-secondary-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status.online::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
}

.chatbot-actions {
    display: flex;
    gap: 8px;
}

.btn-minimize,
.btn-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary-light);
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-minimize:hover,
.btn-close:hover {
    background: var(--bg-tertiary-dark);
    color: var(--text-light);
}

/* =============== MESSAGES AREA =============== */

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--bg-secondary-dark);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.chatbot-messages::-webkit-scrollbar-track {
    background: var(--bg-tertiary-dark);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary-light);
}

.message {
    display: flex;
    gap: 12px;
    max-width: 100%;
    animation: messageSlide 0.3s ease-out;
}

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

.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

.message-avatar img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.user-message .message-avatar {
    background: var(--bg-tertiary-dark);
    color: var(--text-light);
}

.message-content {
    flex: 1;
    max-width: calc(100% - 44px);
}

.message-content p {
    margin: 0;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    line-height: 1.5;
    word-wrap: break-word;
}

.bot-message .message-content p {
    background: var(--bg-tertiary-dark);
    color: var(--text-light);
    border-bottom-left-radius: 4px;
}

.user-message .message-content p {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
    color: var(--text-muted);
}

.user-message .message-time {
    color: rgba(255, 255, 255, 0.8);
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.quick-btn {
    padding: 8px 12px;
    background: var(--bg-dark);
    color: var(--text-light);
    border: 1px solid var(--border-dark);
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.quick-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* =============== TYPING INDICATOR =============== */

.typing-indicator {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 0 20px 20px;
    background: var(--bg-secondary-dark);
}

.typing-dots {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--bg-tertiary-dark);
    border-radius: var(--radius-lg);
    border-bottom-left-radius: 4px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--text-secondary-light);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* =============== INPUT AREA =============== */

.chatbot-input {
    padding: 16px 20px;
    background: var(--bg-dark);
    border-top: 1px solid var(--border-dark);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.input-container {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.input-container input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-secondary-dark);
    border: 1px solid var(--border-dark);
    border-radius: 20px;
    color: var(--text-light);
    font-size: 14px;
    resize: none;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

.input-container input::placeholder {
    color: var(--text-secondary-light);
}

.input-container input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

.send-btn {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.send-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.input-footer {
    text-align: center;
    margin-top: 8px;
}

.input-footer small {
    color: var(--text-secondary-light);
    font-size: 10px;
}

/* =============== MESSAGE TYPES =============== */

.message.system-message .message-content {
    background: var(--warning-color);
    color: white;
    font-style: italic;
}

.message.error-message .message-content {
    background: var(--error-color);
    color: white;
}

.message.success-message .message-content {
    background: var(--success-color);
    color: white;
}

/* =============== PRODUCT CARDS =============== */

.message-content .product-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 12px;
}

.message-content .product-card h4 {
    margin: 0 0 8px 0;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
}

.message-content .product-card p {
    margin: 0 0 12px 0;
    color: var(--text-secondary-light);
    font-size: 12px;
    line-height: 1.4;
}

.message-content .product-card ul {
    margin: 0 0 12px 0;
    padding-left: 16px;
    color: var(--text-secondary-light);
    font-size: 12px;
}

.message-content .product-card .btn {
    width: 100%;
    padding: 8px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.message-content .product-card .btn:hover {
    background: var(--secondary-color);
}

/* =============== CONTACT INFO =============== */

.message-content .contact-info {
    background: var(--bg-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 12px;
}

.message-content .contact-info h4 {
    margin: 0 0 12px 0;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
}

.message-content .contact-info .contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--text-secondary-light);
    font-size: 12px;
}

.message-content .contact-info .contact-item i {
    color: var(--primary-color);
    width: 16px;
}

/* =============== RESPONSIVE =============== */

@media (max-width: 480px) {
    .chatbot-container {
        width: calc(100vw - 20px);
        height: calc(100vh - 40px);
        bottom: 10px;
        right: 10px;
        left: 10px;
        border-radius: var(--radius);
    }
    
    .chat-float-btn {
        bottom: 15px !important;
        right: 15px !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
    }
    
    .notification-badge {
        width: 18px !important;
        height: 18px !important;
        font-size: 10px !important;
    }
}

/* =============== ACCESSIBILITY =============== */
@media (prefers-reduced-motion: reduce) {
    .chatbot-container,
    .chat-float-btn,
    .message,
    .quick-btn,
    .send-btn {
        transition: none;
        animation: none;
    }
    
    .typing-dots span {
        animation: none;
    }
    
    .notification-badge {
        animation: none;
    }
} 
