/* Nord Cotizador v2.0 */

#nord-chat-bubble {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 62px;
    height: 62px;
    background: #1a7a3c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 18px rgba(0,0,0,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
#nord-chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 22px rgba(0,0,0,0.35);
}

#nord-chat-window {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 390px;
    max-height: calc(100vh - 130px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    display: none;
    flex-direction: column;
    z-index: 9998;
    font-family: Arial, sans-serif;
    font-size: 14px;
    overflow: hidden;
}
#nord-chat-window.open { display: flex; }

/* Header */
#nord-chat-header {
    background: #1a7a3c;
    color: white;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 15px;
    flex-shrink: 0;
}
#nord-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.85;
}
#nord-chat-close:hover { opacity: 1; }

/* Mensajes */
#nord-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 14px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 80px;
    max-height: 220px;
}
.nord-msg {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 12px;
    line-height: 1.55;
    word-wrap: break-word;
    font-size: 13.5px;
}
.nord-msg.bot {
    background: #f0f7f2;
    border: 1px solid #c8e6c9;
    align-self: flex-start;
    border-bottom-left-radius: 3px;
}
.nord-msg.user {
    background: #1a7a3c;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 3px;
}

/* Opciones (botones de respuesta rápida) */
#nord-chat-opciones {
    padding: 8px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
    max-height: 160px;
    overflow-y: auto;
}
.nord-opcion {
    background: #fff;
    border: 1.5px solid #1a7a3c;
    color: #1a7a3c;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.nord-opcion:hover {
    background: #1a7a3c;
    color: white;
}

/* Input numérico */
#nord-chat-input-area {
    display: flex;
    padding: 10px 12px;
    border-top: 1px solid #eee;
    gap: 8px;
    flex-shrink: 0;
}
#nord-chat-input {
    flex: 1;
    padding: 9px 12px;
    border: 1.5px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}
#nord-chat-input:focus { border-color: #1a7a3c; }
#nord-chat-send {
    background: #1a7a3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}
#nord-chat-send:hover { background: #145f2e; }

/* Formulario de envío */
#nord-chat-envio {
    padding: 12px 14px;
    border-top: 2px solid #e8f5e9;
    background: #f9fdf9;
    flex-shrink: 0;
}
#nord-chat-envio p {
    margin: 0 0 8px;
    font-weight: bold;
    color: #333;
    font-size: 13px;
}
#nord-chat-envio input {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 7px;
    border: 1.5px solid #ddd;
    border-radius: 7px;
    font-size: 13px;
    box-sizing: border-box;
}
#nord-chat-envio input:focus {
    border-color: #1a7a3c;
    outline: none;
}
#nord-botones-envio {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}
#nord-btn-mail, #nord-btn-wa {
    flex: 1;
    padding: 9px 6px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: opacity 0.2s;
}
#nord-btn-mail {
    background: #1a7a3c;
    color: white;
}
#nord-btn-wa {
    background: #25d366;
    color: white;
}
#nord-btn-mail:hover, #nord-btn-wa:hover { opacity: 0.88; }
#nord-btn-mail:disabled { opacity: 0.6; cursor: default; }

#nord-envio-resultado {
    font-size: 13px;
    text-align: center;
    font-weight: bold;
    min-height: 18px;
}

/* Responsive */
.nord-opcion-cancelar {
    border-color: #c0392b !important;
    color: #c0392b !important;
    background: #fff !important;
    opacity: 0.85;
}
.nord-opcion-cancelar:hover {
    background: #c0392b !important;
    color: white !important;
    opacity: 1;
}

@media (max-width: 430px) {
    #nord-chat-window {
        width: calc(100vw - 16px);
        right: 8px;
        bottom: 88px;
        max-height: 85vh;
    }
}
