:root {
–primary-color: #0073aa;
–primary-hover: #005f8c;
–secondary-color: #FF5722;
–secondary-hover: #E64A19;
–bg-overlay: rgba(0, 0, 0, 0.4);
–modal-bg: #ffffff;
–text-color: #333;
–error-color: #d32f2f;
–border-radius: 16px;
–header-height: 70px;
–shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

* {
box-sizing: border-box;
}

/* Modal Overlay */
#myPreChatModal {
display: none;
/* FIXED: Hidden by default */
position: fixed;
z-index: 10100 !important;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: var(–bg-overlay);
justify-content: center;
align-items: center;
backdrop-filter: blur(4px);
opacity: 0;
transition: opacity 0.3s ease;
}

#myPreChatModal.active {
display: flex;
opacity: 1;
align-items: flex-end;
justify-content: flex-end;

}

/* Container designed to mimic the chat widget */
#myPreChatModal .modal-content {
background-color: var(–modal-bg);
border-radius: var(–border-radius);
box-shadow: var(–shadow);
padding: 0;
width: 90%;
max-width: 420px;
height: 600px;
max-height: 85vh;
position: relative;
display: flex;
flex-direction: column;
overflow: hidden;
transform: translateY(30px) scale(0.95);
transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#myPreChatModal.active .modal-content {
transform: translateY(0) scale(1);
}

#myPreChatModal h3{
color: #ebeaea;
}

/* Chat-like Header */
.modal-header {
background-color: var(–primary-color);
color: white;
padding: 0 20px;
height: var(–header-height);
display: flex;
justify-content: space-between;
align-items: center;
flex-shrink: 0;
}

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

.bot-avatar {
width: 40px;
height: 40px;
background: rgba(255, 255, 255, 0.2);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
font-size: 1.2rem;
}

.header-text h3 {
margin: 0;
color: #ebeaea;
font-size: 1rem;
font-weight: 600;
}

.header-text span {
font-size: 0.75rem;
opacity: 0.8;
}

.close-button {
background: none;
border: none;
color: white;
font-size: 1.4rem;
cursor: pointer;
padding: 8px;
border-radius: 50%;
display: flex;
transition: background 0.2s;
}

.close-button:hover {
background: rgba(255, 255, 255, 0.1);
}

/* Multi-step Container */
.modal-body {
flex-grow: 1;
position: relative;
padding: 0;
overflow: hidden;
background-color: #fff;
}

/* Step 1: Form */
#pre-chat-form-content {
padding: 30px 25px;
height: 100%;
display: flex;
flex-direction: column;
gap: 24px;
animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}

to {
opacity: 1;
transform: translateY(0);
}
}

.form-intro {
color: #555;
font-size: 0.95rem;
line-height: 1.6;
margin: 0;
}

.form-group {
display: flex;
flex-direction: column;
gap: 8px;
}

.form-group label {
font-weight: 600;
font-size: 0.8rem;
color: #777;
text-transform: uppercase;
letter-spacing: 0.05em;
}

.form-group input {
padding: 14px;
border: 1.5px solid #eee;
border-radius: 10px;
font-size: 1rem;
transition: all 0.2s;
background-color: #fdfdfd;
}

.form-group input:focus {
outline: none;
border-color: var(–primary-color);
background-color: #fff;
box-shadow: 0 4px 10px rgba(0, 115, 170, 0.08);
}

#modalIniciarChatBtn {
background-color: var(–primary-color);
color: white;
padding: 16px;
border: none;
border-radius: 12px;
cursor: pointer;
font-size: 1rem;
font-weight: 700;
transition: all 0.3s;
margin-top: auto;
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
box-shadow: 0 4px 12px rgba(0, 115, 170, 0.2);
}

#modalIniciarChatBtn:hover {
background-color: var(–primary-hover);
transform: translateY(-2px);
box-shadow: 0 6px 15px rgba(0, 115, 170, 0.3);
}

#modalIniciarChatBtn:disabled {
background-color: #ccc;
cursor: not-allowed;
transform: none;
box-shadow: none;
}

#modal-form-error-message {
color: var(–error-color);
font-size: 0.85rem;
font-weight: 600;
text-align: center;
margin-top: -10px;
}

/* Step 2: Chat */
#n8n-chat-actual-container {
height: 100%;
width: 100%;
display: none;
background: #fff;
}

/* Floating Trigger */
#openMyPreChatModalBtn {
position: fixed;
bottom: 30px;
right: 30px;
z-index: 9999;
width: 65px;
height: 65px;
border-radius: 50%;
background: linear-gradient(135deg, var(–secondary-color), var(–secondary-hover));
color: white;
box-shadow: 0 8px 25px rgba(255, 87, 34, 0.4);
border: none;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
font-size: 28px;
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#openMyPreChatModalBtn:hover {
transform: scale(1.1) rotate(5deg);
box-shadow: 0 12px 30px rgba(255, 87, 34, 0.5);
}

/* n8n-chat overrides to integration better in our container */
#n8n-chat-actual-container .chat-window-wrapper.n8n-chat {
display: flex !important;
visibility: visible !important;
opacity: 1 !important;
position: static !important;
height: 100% !important;
width: 100% !important;
max-width: 100% !important;
min-width: 100% !important;
box-shadow: none !important;
border-radius: 0 !important;
inset: 0 !important;
margin: 0 !important;
}

#n8n-chat-actual-container .chat-window {
padding: 0 !important;
width: 100% !important;
max-width: 100% !important;
height: 100% !important;
}

#n8n-chat-actual-container .chat-body {
margin: 0 !important;
padding-right: 0 !important;
width: 100% !important;
}

#n8n-chat-actual-container .chat-window-toggle {
display: none !important;
}

#n8n-chat-actual-container .chat-header {
display: none !important;
}

#n8n-chat-actual-container .n8n-chat-app {
height: 100% !important;
width: 100% !important;
display: flex !important;
}

#n8n-chat-actual-container .n8n-chat-widget {
padding: 0 !important;
margin: 0 !important;
width: 100% !important;
}

/* Ensure the message list has some internal padding so text doesn’t touch the scrollbar,
but the scrollbar itself stays at the edge of .chat-body */
#n8n-chat-actual-container .chat-messages-list {
padding-right: 12px !important;
padding-left: 12px !important;
}

BottyCam

En línea
ahora

¡Hola! Para que podamos ayudarte mejor, indícanos quién eres y de qué farmacia
nos contactas.

Nombre Completo

Tu Farmacia

Correo Electrónico

Por favor completa todos los campos requeridos.

Iniciar Chat