/* CocoBot Widget Styles - Colores Oficiales de Marca Corazón de Coco */
#cocobot-widget {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 9999;
    font-family: 'Outfit', sans-serif;
}

/* Toggler Button */
#cocobot-toggler {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #e8c4b0 0%, #2E4057 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(46, 64, 87, 0.35);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 32px;
    border: 3px solid #fff;
}

#cocobot-toggler:hover {
    transform: scale(1.15) rotate(5deg);
}

/* Chat Window */
#cocobot-window {
    position: absolute;
    bottom: 85px;
    left: 0;
    width: 360px;
    height: 520px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(46, 64, 87, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #fde7eb;
}

#cocobot-window.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header */
#cocobot-header {
    background: linear-gradient(to right, #e8c4b0, #fde7eb);
    color: #2E4057;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Dancing Script', cursive;
    border-bottom: 2px solid rgba(255,255,255,0.7);
}

#cocobot-header .title {
    font-size: 26px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2E4057;
}

#cocobot-close {
    cursor: pointer;
    font-size: 24px;
    background: none;
    border: none;
    color: #2E4057;
    transition: transform 0.2s;
}
#cocobot-close:hover {
    transform: scale(1.2);
}

/* Chat Body */
#cocobot-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #fcf9f5;
}

/* Messages */
.cocobot-msg {
    max-width: 82%;
    padding: 10px 15px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.45;
}

.cocobot-msg.bot {
    align-self: flex-start;
    background-color: #ffffff;
    color: #2E4057;
    border-bottom-left-radius: 2px;
    border: 1px solid #fde7eb;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.cocobot-msg.user {
    align-self: flex-end;
    background-color: #2E4057;
    color: #ffffff;
    border-bottom-right-radius: 2px;
}

/* WhatsApp Button in chat */
.cocobot-wa-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background-color: #25D366;
    color: white !important;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

/* Typing Indicator */
.cocobot-typing {
    display: none;
    align-self: flex-start;
    background-color: #ffffff;
    padding: 10px 15px;
    border-radius: 16px;
    border-bottom-left-radius: 2px;
    border: 1px solid #fde7eb;
}
.cocobot-typing .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #e8c4b0;
    border-radius: 50%;
    margin: 0 2px;
    animation: typing 1.4s infinite ease-in-out both;
}
.cocobot-typing .dot:nth-child(1) { animation-delay: -0.32s; }
.cocobot-typing .dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Input Area */
#cocobot-input-area {
    padding: 14px 16px;
    border-top: 1px solid #fde7eb;
    display: flex;
    gap: 10px;
    background: #fff;
}

#cocobot-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e8c4b0;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    color: #2E4057;
}

#cocobot-send {
    background-color: #2E4057;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}

#cocobot-send:hover {
    background-color: #e8c4b0;
    color: #2E4057;
}

/* Mobile responsive */
@media (max-width: 576px) {
    #cocobot-widget {
        left: 12px;
        bottom: 74px;
    }
    #cocobot-toggler {
        width: 50px;
        height: 50px;
        font-size: 20px;
        box-shadow: 0 4px 14px rgba(46, 64, 87, 0.3);
    }
    #cocobot-window {
        width: calc(100vw - 24px);
        left: 0;
        bottom: 60px;
        height: 65vh;
    }
}
