/* Variables */
:root {
    --wa-green: #25D366;
    --wa-dark: #128C7E;
    --wa-header: #075E54;
    --bg-chat: #E5DDD5;
    --guide-bg: #e3f2fd;
    --guide-border: #90caf9;
    --guide-text: #0d47a1;
}

/* Botón Flotante */
.vm-whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: var(--wa-green);
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 99999;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.vm-whatsapp-float:hover { transform: scale(1.1); }
.vm-whatsapp-float img { width: 70%; height: auto; object-fit: contain; }

/* Ventana de Chat */
.vm-chat-window {
    position: fixed;
    bottom: 95px;
    right: 30px;
    width: 350px;
    max-height: 85vh;
    max-width: 90vw;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    z-index: 99998;
    overflow: hidden;
    display: none;
    flex-direction: column;
    animation: vmSlideIn 0.3s ease-out;
    border: 1px solid #ddd;
    font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
}

@keyframes vmSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cabecera */
.vm-chat-header {
    background-color: var(--wa-header);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.vm-back-btn { display: none; cursor: pointer; font-size: 20px; margin-right: 5px; }
.vm-chat-header h4 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.2; }
.vm-chat-header p { margin: 0; font-size: 12px; opacity: 0.8; line-height: 1.2;}
.vm-close-btn { margin-left: auto; cursor: pointer; font-size: 20px; opacity: 0.7; }

/* Cuerpo */
.vm-chat-body {
    background-color: var(--bg-chat);
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}
.vm-chat-body::-webkit-scrollbar { width: 5px; }
.vm-chat-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 3px; }

/* Vistas y Componentes */
.vm-view { display: none; animation: vmFadeIn 0.3s; }
.vm-view.active { display: block; }
@keyframes vmFadeIn { from { opacity: 0; } to { opacity: 1; } }

.vm-msg-bubble {
    background: white; padding: 10px 15px; border-radius: 0 15px 15px 15px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1); margin-bottom: 10px; font-size: 13px;
    line-height: 1.4; color: #333; position: relative;
}
.vm-msg-bubble::before {
    content: ''; position: absolute; left: -8px; top: 0; width: 0; height: 0;
    border-top: 10px solid white; border-left: 10px solid transparent;
}

/* Menú */
.vm-menu-options { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }
.vm-menu-btn {
    background-color: white; border: none; padding: 15px; border-radius: 10px;
    text-align: left; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s; display: flex; align-items: center; gap: 15px;
}
.vm-menu-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.15); }
.vm-menu-icon {
    background-color: var(--guide-bg); width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.vm-menu-text strong { display: block; color: #333; font-size: 14px; margin-bottom: 2px; }
.vm-menu-text span { display: block; color: #666; font-size: 12px; }

/* Tarjeta Guía */
.vm-video-guide-card {
    background-color: var(--guide-bg); border: 1px solid var(--guide-border);
    border-radius: 8px; padding: 12px; margin-bottom: 15px; display: flex;
    align-items: center; gap: 12px; cursor: pointer; transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.vm-video-guide-card:hover { background-color: #bbdefb; transform: translateY(-2px); }
.vm-guide-icon { font-size: 24px; animation: vmPulse 2s infinite; }
@keyframes vmPulse { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }
.vm-guide-text { flex: 1; }
.vm-guide-text strong { display: block; font-size: 13px; color: var(--guide-text); margin-bottom: 2px; }
.vm-guide-text span { display: block; font-size: 11px; color: #444; line-height: 1.2; }
.vm-guide-arrow { font-size: 18px; color: var(--guide-text); font-weight: bold; }

/* Formulario */
.vm-form-group { margin-bottom: 10px; }
.vm-form-label { display: block; font-size: 11px; color: #666; margin-bottom: 3px; font-weight: bold; text-transform: uppercase; }
.vm-input, .vm-select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 5px; box-sizing: border-box; font-size: 13px; outline: none; }
.vm-input:focus, .vm-select:focus { border-color: var(--wa-dark); }
.vm-btn-submit { background-color: var(--wa-dark); color: white; border: none; padding: 12px; width: 100%; border-radius: 25px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 5px; transition: background 0.3s; }
.vm-btn-submit:hover { background-color: #0d6e63; }

/* Modal */
.vm-modal-overlay { display: none; position: fixed; z-index: 100000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); align-items: center; justify-content: center; animation: vmFadeIn 0.3s; }
.vm-modal-content { background-color: #fefefe; margin: auto; padding: 25px; border-radius: 15px; width: 85%; max-width: 380px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); position: relative; max-height: 90vh; overflow-y: auto;}
.vm-modal-close { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; position: absolute; right: 15px; top: 10px; }
.vm-modal-content h3 { margin-top: 0; color: var(--wa-dark); font-size: 18px;}
.vm-modal-content ul { padding-left: 20px; line-height: 1.5; font-size: 14px; color: #555; }
.vm-modal-btn-ok { width: 100%; padding: 12px; background: var(--wa-dark); color:white; border:none; border-radius: 25px; cursor: pointer; font-weight: bold; margin-top: 15px; }

@media (max-width: 480px) {
    .vm-chat-window { right: 5%; width: 90%; bottom: 85px; max-height: 80vh; }
    .vm-whatsapp-float { bottom: 20px; right: 20px; }
}