/* ========================================
   CHATBOT PAS - ESTILOS PROFESIONALES
   ======================================== */

.pas-chatbot-wrap {
    --pas-chat-color: #1a5276;
    --pas-chat-bg: #f8f9fa;
    --pas-chat-radius: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 480px;
    margin: 20px auto;
}

/* CONTENEDOR PRINCIPAL */
.pas-chatbot-container {
    background: #fff;
    border-radius: var(--pas-chat-radius);
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    overflow: hidden;
    border: 1px solid #e8ecf0;
}

/* HEADER */
.pas-chatbot-header {
    display: flex;
    align-items: center;
    padding: 16px 18px;
    color: #fff;
    gap: 12px;
}
.pas-chatbot-header-icon {
    font-size: 28px;
    line-height: 1;
}
.pas-chatbot-header-text {
    flex: 1;
    min-width: 0;
}
.pas-chatbot-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.pas-chatbot-subtitle {
    font-size: 11px;
    opacity: 0.85;
    margin-top: 2px;
}
.pas-chatbot-toggle {
    background: rgba(255,255,255,0.20);
    border: none;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.pas-chatbot-toggle:hover {
    background: rgba(255,255,255,0.35);
}

/* BODY (SCROLLABLE) */
.pas-chatbot-body {
    height: 400px;
    overflow-y: auto;
    background: var(--pas-chat-bg);
    padding: 16px;
    scroll-behavior: smooth;
}
.pas-chatbot-body::-webkit-scrollbar {
    width: 6px;
}
.pas-chatbot-body::-webkit-scrollbar-track {
    background: transparent;
}
.pas-chatbot-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* MENSAJES */
.pas-chatbot-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pas-chatbot-msg {
    display: flex;
    gap: 10px;
    animation: pasChatFadeIn 0.3s ease;
}
@keyframes pasChatFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.pas-chatbot-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e8ecf0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.pas-chatbot-msg-user .pas-chatbot-msg-avatar {
    background: var(--pas-chat-color);
    order: 1;
}
.pas-chatbot-msg-bot .pas-chatbot-msg-avatar {
    background: #e8ecf0;
}
.pas-chatbot-msg-user {
    flex-direction: row-reverse;
}
.pas-chatbot-msg-content {
    max-width: 85%;
}
.pas-chatbot-msg-text {
    background: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #2c3e50;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.pas-chatbot-msg-text p {
    margin: 0 0 6px;
}
.pas-chatbot-msg-text p:last-child {
    margin-bottom: 0;
}
.pas-chatbot-msg-text ul {
    margin: 6px 0;
    padding-left: 20px;
}
.pas-chatbot-msg-text li {
    margin-bottom: 4px;
}
.pas-chatbot-msg-text strong {
    color: var(--pas-chat-color);
}
.pas-chatbot-msg-user .pas-chatbot-msg-text {
    background: var(--pas-chat-color);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.pas-chatbot-msg-user .pas-chatbot-msg-text strong {
    color: #fff;
}
.pas-chatbot-msg-bot .pas-chatbot-msg-text {
    border-bottom-left-radius: 4px;
}

/* LINK */
.pas-chatbot-link {
    text-decoration: none;
    font-weight: 600;
}
.pas-chatbot-link:hover {
    text-decoration: underline;
}

/* BOTONES RÁPIDOS (preguntas sugeridas) */
.pas-chatbot-quick-questions {
    margin: 4px 0 8px 42px;
}
.pas-chatbot-quick-label {
    font-size: 12px;
    color: #717d7e;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pas-chatbot-quick-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pas-chatbot-quick-btn {
    background: #fff;
    border: 1.5px solid var(--pas-chat-color);
    color: var(--pas-chat-color);
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.3;
    white-space: normal;
    text-align: left;
    max-width: 100%;
}
.pas-chatbot-quick-btn:hover {
    background: var(--pas-chat-color);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.pas-chatbot-quick-btn:active {
    transform: translateY(0);
}

/* SUGERENCIAS (post-respuesta) */
.pas-chatbot-sugerencias {
    margin-top: 4px;
}

/* FOOTER INPUT */
.pas-chatbot-footer {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid #e8ecf0;
    gap: 8px;
}
.pas-chatbot-input {
    flex: 1;
    border: 1.5px solid #d5dbdb;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: var(--pas-chat-bg);
}
.pas-chatbot-input:focus {
    border-color: var(--pas-chat-color);
    box-shadow: 0 0 0 3px rgba(26,82,118,0.10);
}
.pas-chatbot-input::placeholder {
    color: #aaa;
}
.pas-chatbot-send-btn {
    background: var(--pas-chat-color);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.pas-chatbot-send-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}
.pas-chatbot-send-btn:active {
    transform: scale(0.95);
}

/* LOADING DOTS */
.pas-chatbot-dots {
    display: inline-flex;
    gap: 2px;
    align-items: center;
}
.pas-chatbot-dots span {
    animation: pasChatDot 1.4s infinite;
    font-size: 24px;
    line-height: 1;
    color: #999;
}
.pas-chatbot-dots span:nth-child(2) {
    animation-delay: 0.2s;
}
.pas-chatbot-dots span:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes pasChatDot {
    0%, 80%, 100% { opacity: 0; }
    40% { opacity: 1; }
}

/* RESPONSIVE */
@media screen and (max-width: 600px) {
    .pas-chatbot-wrap {
        margin: 10px auto;
        max-width: 100%;
    }
    .pas-chatbot-body {
        height: 320px;
        padding: 12px;
    }
    .pas-chatbot-quick-btn {
        font-size: 11px;
        padding: 6px 12px;
    }
}
