/* Chatbot CSS - Menzo Technologies Corp */
:root {
    --cb-primary: #ff5956;
    --cb-primary-hover: #e04b48;
    --cb-dark: #1a253c;
    --cb-light: #f7fafc;
    --cb-grey: #766068;
    --cb-border: #eae0d9;
    --cb-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    --cb-glass: rgba(255, 255, 255, 0.95);
}

/* Launcher Bubble */
#chatbot-launcher {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--cb-primary) 0%, #e03c39 100%);
    border-radius: 50%;
    box-shadow: 0 5px 25px rgba(255, 89, 86, 0.4);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#chatbot-launcher:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 30px rgba(255, 89, 86, 0.6);
}

#chatbot-launcher i {
    color: white;
    font-size: 24px;
    transition: all 0.3s ease;
}

#chatbot-launcher.active i {
    transform: rotate(90deg);
}

#chatbot-launcher .cb-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #22c55e;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid white;
}

/* Chat Window */
#chatbot-window {
    position: fixed;
    bottom: 105px;
    right: 30px;
    width: 380px;
    height: 520px;
    background: var(--cb-glass);
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--cb-shadow);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

/* Chat Header */
.cb-header {
    background: linear-gradient(135deg, var(--cb-dark) 0%, #111827 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cb-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cb-avatar {
    width: 36px;
    height: 36px;
    background: var(--cb-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}

.cb-title-container {
    display: flex;
    flex-direction: column;
}

.cb-title {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.cb-status {
    font-size: 11px;
    color: #4ade80;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cb-status::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
}

.cb-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px;
}

.cb-close:hover {
    color: white;
}

/* Messages Area */
.cb-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: rgba(248, 249, 250, 0.4);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cb-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    animation: cb-fade-in 0.25s ease forwards;
}

@keyframes cb-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cb-message.bot {
    align-self: flex-start;
    background-color: white;
    color: var(--cb-dark);
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
}

.cb-message.user {
    align-self: flex-end;
    background-color: var(--cb-primary);
    color: white;
    border-bottom-right-radius: 2px;
    box-shadow: 0 2px 5px rgba(255, 89, 86, 0.2);
}

/* Quick Options (Chips) */
.cb-options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    align-self: flex-start;
}

.cb-option-btn {
    background-color: white;
    border: 1px solid var(--cb-primary);
    color: var(--cb-primary);
    padding: 6px 12px;
    border-radius: 16px;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cb-option-btn:hover {
    background-color: var(--cb-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 89, 86, 0.2);
}

/* Typing Indicator */
.cb-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    border-bottom-left-radius: 2px;
    align-self: flex-start;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.cb-typing span {
    width: 6px;
    height: 6px;
    background-color: var(--cb-grey);
    border-radius: 50%;
    animation: cb-bounce 1.4s infinite ease-in-out both;
}

.cb-typing span:nth-child(1) { animation-delay: -0.32s; }
.cb-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes cb-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

/* Input Area */
.cb-input-area {
    padding: 14px 20px;
    background: white;
    border-top: 1px solid var(--cb-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.cb-input-area input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 14px;
    color: var(--cb-dark);
    padding: 8px 0;
}

.cb-input-area input::placeholder {
    color: #a0aec0;
}

.cb-send-btn {
    background: transparent;
    border: none;
    color: var(--cb-primary);
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cb-send-btn:hover {
    color: var(--cb-primary-hover);
    transform: scale(1.1) translateX(2px);
}

.cb-send-btn:disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

/* Responsive constraints */
@media (max-width: 480px) {
    #chatbot-window {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    #chatbot-launcher {
        bottom: 15px;
        right: 15px;
    }
}
