#fsa-toggle{
    position:fixed;
    bottom:20px;
    right:20px;

    width:60px;
    height:60px;

    padding:0;
    overflow:hidden;

    border:none;
    border-radius:50%;

    background:#2271b1;

    display:flex;
    align-items:center;
    justify-content:center;

    cursor:pointer;

    z-index:999999;

    box-shadow:0 5px 20px rgba(0,0,0,.20);
}

#fsa-chat-box{
    position:fixed;
    bottom:90px;
    right:20px;

    width:380px;
    height:600px;

    background:#fff;
    border:1px solid #ddd;
    border-radius:15px;

    display:none;
    flex-direction:column;

    z-index:999998;
    overflow:hidden;

    box-shadow:0 0 20px rgba(0,0,0,.15);
}

.fsa-header{
    padding:15px;
    border-bottom:1px solid #eee;
}

.fsa-header-info{
    display:flex;
    flex-direction:column;
}

.fsa-header-info span{
    font-size:13px;
    color:#666;
}

#fsa-chat-messages{
    font-size:12px;
    flex:1;
    overflow-y:auto;
    padding:18px;
    display:flex;
    flex-direction:column;
    gap:12px;
    background:#f8fafc;

}

.fsa-assistant-message{

    align-self:flex-start;

    max-width:90%;

    padding:15px;

    border-radius:18px 18px 18px 1px;

    background:#ffffff;

    border:1px solid #e5e7eb;

    box-shadow:
    0 4px 12px rgba(0,0,0,.05);

}

.fsa-user-message{

    align-self:flex-end;

    max-width:85%;

    width:auto;

    padding:12px 15px;

    border-radius:18px 18px 5px 18px;

    background:#2271b1;

    color:#fff;

    font-size:14px;

}

.fsa-loading{
    background:#fff3cd;
    padding:10px;
    border-radius:10px;
    margin-bottom:10px;
}

.fsa-faq-accordion{
    border-top:1px solid #e5e5e5;
    border-bottom:1px solid #e5e5e5;
      border-top:1px solid #e5e5e5;
    flex-shrink:0;
}

.fsa-faq-toggle{

    width:100%;

    border:none;

    padding:14px 18px;

    display:flex;

    justify-content:space-between;

    align-items:center;

    cursor:pointer;

    background:#2271b1;

    color:#ffffff;

    font-size:14px;

    font-weight:600;

    transition:.3s ease;

}

.fsa-faq-title{
    color:#f9f9f9;
}

.fsa-faq-toggle:hover{

    background:#185a8c;

}

.fsa-faq-arrow{
    color:#191d20;
    transition:.3s ease;
}

.fsa-faq-open .fsa-faq-arrow{
    transform:rotate(180deg);
}

.fsa-suggested-questions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;

    max-height:0;

    overflow:hidden;

    padding:0 15px;

    transition:
        max-height .35s ease,
        padding .35s ease;
}

.fsa-faq-open .fsa-suggested-questions{

     max-height:220px;

    overflow-y:auto;

    padding:10px 15px 15px;

}

.fsa-question-btn{

    width:auto;

    margin:0;

    padding:10px 14px;

    border:none;

    border-radius:25px;

    background:#f3f6fa;

    color:#333;

    font-size:12px;

    cursor:pointer;

    transition:.25s ease;

    white-space:nowrap;

}
.fsa-question-btn:hover{

    background:#dfe8f3;

}

.fsa-chat-input{
    flex-shrink:0;
    padding:15px;
    border-top:1px solid #eee;
    background:#ffffff;
}

#fsa-search{
    width:100%;
    padding:10px;
    margin-bottom:10px;
    box-sizing:border-box;
}

#fsa-send{
    background:#2271b1 !important;
    color:#fff !important;
    border:none !important;
    cursor:pointer;
}

#fsa-send:hover{
    background:#1a5c91 !important;
}

.fsa-avatar{
    width:100%;
    height:100%;
    object-fit:cover;
    border-radius:50%;
    display:block;
}

#fsa-faq-response{
    margin-top:12px;
}

#fsa-faq-response .fsa-assistant-message{
    margin-bottom:0;
    max-height:180px;
    overflow-y:auto;
}

/* ==========================
   HEADER PREMIUM
========================== */

.fsa-header{

    display:flex;
    align-items:center;
    gap:12px;

    padding:16px;

    background:
    linear-gradient(
        135deg,
        #2271b1,
        #0b4f87
    );

    color:#fff;

}

.fsa-header-avatar{

    flex-shrink:0;

}

.fsa-header-avatar img{

    width:48px;
    height:48px;

    border-radius:50%;

    object-fit:cover;

    border:2px solid rgba(255,255,255,.4);

}

.fsa-default-avatar{

    width:48px;
    height:48px;

    border-radius:50%;

    background:#ffffff;

    color:#2271b1;

    display:flex;
    align-items:center;
    justify-content:center;

    font-weight:700;

}

.fsa-header-info{

    display:flex;
    flex-direction:column;

}

.fsa-header-info strong{

    color:#fff;
    font-size:15px;

}

.fsa-header-info span{

    color:rgba(255,255,255,.85);
    font-size:12px;

}

.fsa-typing-avatar,
.fsa-answer-avatar{

    width:20px;
    height:20px;

    border-radius:50%;

    background:
    linear-gradient(
        135deg,
        #2271b1,
        #0b4f87
    );

    color:#ffffff;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:14px;
    font-weight:700;

    flex-shrink:0;

    box-shadow:
    0 4px 12px rgba(34,113,177,.35);

}

.fsa-typing-bubble{

    background:#eef4fa;

    padding:12px 18px;

    border-radius:20px;

    display:flex;
    align-items:center;

    gap:6px;

    min-height:44px;

}
.fsa-typing-bubble span{

    width:10px;
    height:10px;

    border-radius:50%;

    background:#2271b1;

    display:block;

    animation:fsaTyping 1.4s infinite;

}

@keyframes fsaTyping{

    0%{
        transform:translateY(0);
        opacity:.4;
    }

    50%{
        transform:translateY(-6px);
        opacity:1;
    }

    100%{
        transform:translateY(0);
        opacity:.4;
    }

}

.fsa-answer-show{
    font-size:12px;
    padding:10px;

    animation:fsaFadeAnswer .45s ease;

}

@keyframes fsaFadeAnswer{

    from{

        opacity:0;
        transform:translateY(15px);

    }

    to{

        opacity:1;
        transform:translateY(0);

    }

}

/* ==========================
   PULSO DEL BOTÓN CHAT
========================== */

#fsa-toggle{

    animation:fsaPulse 2.5s infinite;

    transition:
        transform .25s ease,
        box-shadow .25s ease;

}

#fsa-toggle:hover{

    animation:none;

    transform:scale(1.08);

}

#fsa-toggle:active{

    transform:scale(.92);

}

@keyframes fsaPulse{

    0%{

        transform:scale(1);

        box-shadow:
        0 0 0 0 rgba(34,113,177,.45),
        0 5px 20px rgba(0,0,0,.20);

    }

    70%{

        transform:scale(1.05);

        box-shadow:
        0 0 0 14px rgba(34,113,177,0),
        0 5px 20px rgba(0,0,0,.20);

    }

    100%{

        transform:scale(1);

        box-shadow:
        0 0 0 0 rgba(34,113,177,0),
        0 5px 20px rgba(0,0,0,.20);

    }

}
/* 
#fsa-chat-box{

    animation:fsaChatOpen .25s ease;

} */

/* @keyframes fsaChatOpen{

    from{

        opacity:0;
        transform:translateY(20px) scale(.95);

    }

    to{

        opacity:1;
        transform:translateY(0) scale(1);

    }

} */

.fsa-chat-show{

    animation:fsaChatFade .25s ease;

}

@keyframes fsaChatFade{

    from{

        opacity:0;

    }

    to{

        opacity:1;

    }

}

/* ==========================
   TABLET
========================== */

@media (max-width:1024px){

    #fsa-chat-box{

       width:360px;
        height:75vh;

    }

}

/* ==========================
   MÓVIL
========================== */

@media (max-width:728px){

      #fsa-chat-box{

        width:100vw;

        height:85vh;

        left:50%;

        right:auto;

        transform:translateX(-50%);

        bottom:80px;

        max-width:420px;

    }

    .fsa-header{

        padding:14px;

    }

    .fsa-header-avatar img,
    .fsa-default-avatar{

        width:42px;
        height:42px;

    }

    .fsa-question-btn{

        font-size:12px;

        max-width:100%;

        white-space:normal;

    }

}

/* ==========================
   MÓVIL PEQUEÑO
========================== */

@media (max-width:480px){

    #fsa-chat-box{

        width:100vw;
        height:100vh;

        right:0;
        bottom:0;

        border-radius:0;

    }

    #fsa-toggle{

        bottom:15px;
        right:15px;

    }

}


.fsa-chat-footer{

    padding:10px;
    text-align:center;
    font-size:11px;
    color:#888;
    border-top:1px solid #e5e5e5;
    background:#fafafa;

}

.fsa-chat-footer strong{

    color:#2271b1;
    font-weight:600;

}