/* Gemini Chatbot Styles */
.gemini-chat-btn {
    position: fixed;
    right: 20px;
    bottom: 110px; /* Posición apilada arriba de WhatsApp */
    z-index: 1000000;
    background-color: #FF5A1F;
    color: white;
    height: 60px;
    width: 215px; /* Fixed width to match WhatsApp */
    padding: 0 25px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    font-family: "Rubik", sans-serif;
    text-transform: uppercase;
    font-size: 20px;
    font-weight: 600;
    min-width: 185px;
}

.gemini-chat-btn:hover {
    transform: scale(1.05);
    background-color: #e54e1a;
}

.gemini-chat-btn img {
    width: 30px;
    height: 30px;
    margin-right: 15px; /* Added margin for same spacing as WhatsApp */
    object-fit: contain;
}

.gemini-chat-container {
    position: fixed;
    right: 20px;
    bottom: 210px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 1000001;
    overflow: hidden;
    font-family: 'Rubik', sans-serif;
}

.gemini-chat-container.active {
    display: flex;
}

.gemini-chat-header {
    background: #FF5A1F;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gemini-chat-header h3 {
    margin: 0;
    font-size: 22px;
    color: white;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.gemini-chat-header .close-btn {
    cursor: pointer;
    font-size: 20px;
}

.gemini-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f7f9fc;
}

.chat-message {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #FF5A1F 0%, #e54e1a 100%);
    color: white;
    border-bottom-right-radius: 3px;
    box-shadow: 0 2px 8px rgba(255, 90, 31, 0.25);
}

.chat-message.ai {
    align-self: flex-start;
    background: #ffffff;
    color: #444;
    border-bottom-left-radius: 3px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #eaeaea;
    padding: 14px 16px;
    max-width: 92%;
    font-size: 13.5px;
    line-height: 1.55;
}

/* Cada nombre de producto en negrita se ve como tarjeta */
.chat-message.ai strong {
    display: inline-block;
    background: #fafbfc;
    border-left: 4px solid #FF5A1F;
    padding: 6px 10px;
    margin: 6px 0 2px 0;
    border-radius: 0 6px 6px 0;
    color: #1a1a2e;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    width: calc(100% - 14px);
}

/* Colores alternos para los bordes de cada producto */
.chat-message.ai strong:nth-of-type(2) {
    border-left-color: #2ecc71;
}
.chat-message.ai strong:nth-of-type(3) {
    border-left-color: #3498db;
}
.chat-message.ai strong:nth-of-type(4) {
    border-left-color: #9b59b6;
}
.chat-message.ai strong:nth-of-type(5) {
    border-left-color: #e67e22;
}
.chat-message.ai strong:nth-of-type(6) {
    border-left-color: #1abc9c;
}



.gemini-chat-input {
    padding: 10px 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.gemini-chat-input input {
    flex: 1;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    font-family: 'Rubik', sans-serif;
    color: #333;
    transition: border-color 0.3s;
}

.gemini-user-input:focus {
    border-color: #FF5A1F;
}

.gemini-chat-input button {
    background: #FF5A1F;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.gemini-chat-input button:hover {
    background: #3367d6;
}


@media only screen and (max-width: 767px) {
    .gemini-chat-container {
        width: calc(100% - 40px);
        height: 60%;
        bottom: 210px;
    }
}

/* Tekki Bubble Message */
.tekki-bubble {
    position: fixed;
    right: 25px;
    bottom: 185px;
    background: #FF5A1F;
    color: white;
    padding: 15px 25px;
    border-radius: 18px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    z-index: 2000005;
    max-width: 280px;
    animation: fadeInBubble 0.8s ease-out;
    display: none;
    font-family: 'Rubik', sans-serif;
    line-height: 1.4;
    border: 2px solid rgba(255,255,255,0.2);
    cursor: default;
}

.tekki-bubble strong {
    font-weight: 800;
    color: #fff;
}

.tekki-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 30px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #FF5A1F;
}

.tekki-bubble .close-bubble {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #333;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

.tekki-bubble .close-bubble:hover {
    background: #000;
    transform: scale(1.1);
}

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