
/* =========================================
   GV CHATBOT - ESTILOS AISLADOS
   ========================================= */

#gv-chatbot-widget {
    --gv-green-dark: #33B933;
    --gv-green-light: #8BD13F;
    --gv-blue: #023F99;
    --gv-white: #FFFFFF;
    --gv-black: #000000;

    --gray-100: #F7F9FC;
    --gray-200: #E8EDF3;
    --gray-400: #AAB4C0;
    --gray-600: #657386;
    --gray-800: #263445;

    --shadow: 0 12px 40px rgba(2, 63, 153, 0.18);

    font-family: Arial, Helvetica, sans-serif;
    color: var(--gray-800);
    line-height: normal;
}

/* =========================================
   RESET INTERNO
   ========================================= */

#gv-chatbot-widget *,
#gv-chatbot-widget *::before,
#gv-chatbot-widget *::after {
    box-sizing: border-box;
}

/* =========================================
   BOTÓN FLOTANTE
   ========================================= */

#gv-chatbot-widget .chat-toggle {
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 62px;
    height: 62px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--gv-blue);
    color: var(--gv-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 99998;
    transition: transform .2s, background .2s;
}

#gv-chatbot-widget .chat-toggle:hover {
    transform: scale(1.07);
    background: #0351bd;
}

#gv-chatbot-widget .chat-toggle svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#gv-chatbot-widget .chat-notification {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 13px;
    height: 13px;
    background: var(--gv-green-light);
    border: 2px solid var(--gv-white);
    border-radius: 50%;
}

/* =========================================
   VENTANA
   ========================================= */

#gv-chatbot-widget .chat-window {
    position: fixed;
    right: 25px;
    bottom: 100px;
    width: 380px;
    height: 590px;
    max-height: calc(100vh - 125px);
    padding: 0;
    margin: 0;
    background: var(--gv-white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99999;

    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(.98);
    transition: .25s ease;
}

#gv-chatbot-widget .chat-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* =========================================
   CABECERA
   ========================================= */

#gv-chatbot-widget .chat-header {
    min-height: 76px;
    padding: 14px 18px;
    margin: 0;
    background: var(--gv-blue);
    color: var(--gv-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

#gv-chatbot-widget .chat-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

#gv-chatbot-widget .brand-logo {
    width: 43px;
    height: 43px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--gv-white);
    color: var(--gv-blue);
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

#gv-chatbot-widget .chat-brand h2 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.2;
    color: var(--gv-white);
    margin: 0 0 5px;
    padding: 0;
}

#gv-chatbot-widget .online-status {
    font-size: 11px;
    opacity: .9;
    display: flex;
    align-items: center;
    gap: 5px;
}

#gv-chatbot-widget .online-status span {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--gv-green-light);
}

#gv-chatbot-widget .header-actions {
    display: flex;
    gap: 7px;
}

#gv-chatbot-widget .header-actions button {
    width: 30px;
    height: 30px;
    min-width: 30px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, .13);
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

/* =========================================
   BIENVENIDA
   ========================================= */

#gv-chatbot-widget .chat-welcome {
    padding: 19px 18px 12px;
    margin: 0;
    text-align: center;
    flex-shrink: 0;
}

#gv-chatbot-widget .welcome-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #EAF7E8;
    color: var(--gv-green-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 9px;
}

#gv-chatbot-widget .chat-welcome h3 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 17px;
    line-height: 1.3;
    color: var(--gv-blue);
    margin: 0 0 5px;
    padding: 0;
}

#gv-chatbot-widget .chat-welcome p {
    font-size: 12px;
    line-height: 1.4;
    color: var(--gray-600);
    margin: 0;
    padding: 0;
}

/* =========================================
   MENSAJES
   ========================================= */

#gv-chatbot-widget .chat-messages {
    flex: 1;
    min-height: 0;
    padding: 15px;
    margin: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 13px;
    background: var(--gray-100);
}

#gv-chatbot-widget .message {
    max-width: 86%;
    padding: 11px 13px;
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    border-radius: 12px;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

#gv-chatbot-widget .message.bot {
    align-self: flex-start;
    background: var(--gv-white);
    color: var(--gray-800);
    border: 1px solid var(--gray-200);
    border-top-left-radius: 3px;
}

#gv-chatbot-widget .message.user {
    align-self: flex-end;
    background: var(--gv-blue);
    color: var(--gv-white);
    border-top-right-radius: 3px;
}

/* =========================================
   OPCIONES
   ========================================= */

#gv-chatbot-widget .chat-options {
    flex-shrink: 0;
    padding: 12px 14px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--gv-white);
    max-height: 220px;
    overflow-y: auto;
}

#gv-chatbot-widget .option-button {
    width: 100%;
    padding: 12px 14px;
    margin: 0;
    border: 1px solid var(--gray-200);
    border-radius: 9px;
    background: white;
    color: var(--gv-blue);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: .2s;
}

#gv-chatbot-widget .option-button:hover {
    background: #EFF5FF;
    border-color: var(--gv-blue);
}

#gv-chatbot-widget .option-button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* =========================================
   PIE
   ========================================= */

#gv-chatbot-widget .chat-footer {
    flex-shrink: 0;
    padding: 8px;
    margin: 0;
    background: var(--gv-white);
    text-align: center;
    font-size: 10px;
    line-height: 1.4;
    color: var(--gray-600);
    border-top: 1px solid var(--gray-200);
}

/* =========================================
   TARJETAS DE PROYECTOS
   ========================================= */

#gv-chatbot-widget .project-card {
    width: 100%;
    flex-shrink: 0;
    margin: 0 0 12px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    font-size: 12px;
}

#gv-chatbot-widget .project-card img {
    width: 100%;
    height: 125px;
    object-fit: cover;
    display: block;
}

#gv-chatbot-widget .project-card-content {
    padding: 11px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#gv-chatbot-widget .project-card h4 {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--gv-blue);
    font-size: 14px;
    line-height: 1.3;
    margin: 0 0 8px;
    padding: 0;
}

#gv-chatbot-widget .project-card p {
    color: var(--gray-600);
    line-height: 1.4;
    margin: 0 0 5px;
    padding: 0;
}

#gv-chatbot-widget .project-card button {
    width: 100%;
    margin: 8px 0 0;
    padding: 10px;
    border: none;
    border-radius: 7px;
    background: var(--gv-green-dark);
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    cursor: pointer;
}

/* =========================================
   FORMULARIOS DE CAPTURA
   ========================================= */

#gv-chatbot-widget .capture-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    margin: 0;
    background: var(--gv-white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
}

#gv-chatbot-widget .capture-form label {
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

#gv-chatbot-widget .capture-form input {
    width: 100%;
    height: 42px;
    min-height: 42px;
    padding: 0 12px;
    margin: 0;
    border: 1px solid var(--gray-200);
    border-radius: 7px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    outline: none;
    box-shadow: none;
}

#gv-chatbot-widget .capture-form input:focus {
    border-color: var(--gv-blue);
    box-shadow: 0 0 0 2px rgba(2, 63, 153, .08);
}

#gv-chatbot-widget .capture-form button {
    width: 100%;
    height: 42px;
    margin: 5px 0 0;
    padding: 0 12px;
    border: none;
    border-radius: 7px;
    background: var(--gv-green-dark);
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

#gv-chatbot-widget .capture-form button:hover {
    background: #269d26;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 480px) {

    #gv-chatbot-widget .chat-window {
        width: calc(100% - 20px);
        height: calc(100dvh - 90px);
        max-height: none;
        right: 10px;
        bottom: 80px;
        border-radius: 14px;
    }

    #gv-chatbot-widget .chat-toggle {
        right: 17px;
        bottom: 17px;
    }
}
