.sec-chatbot-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 150px;
    height: 206px;
    border: none;
    cursor: pointer;
    z-index: 99999;
    background-image: url('../images/bot-animado.gif');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    filter: drop-shadow(0 6px 16px rgba(0,0,0,0.25));
    transition: transform 0.3s ease;
    animation: sec-chatbot-float 3s ease-in-out infinite;
}

.sec-chatbot-fab:hover {
    transform: scale(1.08);
}

@keyframes sec-chatbot-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.sec-chatbot-widget {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.sec-chatbot-header {
    background: #1a5276;
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sec-chatbot-title {
    font-weight: 600;
    font-size: 15px;
}

.sec-chatbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.sec-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8f9fa;
}

.sec-chatbot-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    box-sizing: border-box;
}

.sec-chatbot-msg.user {
    align-self: flex-end;
    background: #1a5276;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.sec-chatbot-msg.bot {
    align-self: flex-start;
    background: #fff;
    color: #333;
    border: 1px solid #dee2e6;
    border-bottom-left-radius: 4px;
}

.sec-chatbot-msg.bot .sec-chatbot-disclaimer {
    margin-top: 10px;
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    font-size: 12px;
    color: #856404;
}

.sec-chatbot-msg.bot .sec-chatbot-sources {
    margin-top: 8px;
    font-size: 11px;
    color: #6c757d;
    border-top: 1px solid #eee;
    padding-top: 6px;
}

.sec-chatbot-msg.bot {
    position: relative;
}

.sec-chatbot-msg.user {
    position: relative;
}

.sec-chatbot-user-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    vertical-align: top;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    margin-right: 6px;
}

.sec-chatbot-user-content {
    display: inline;
    vertical-align: top;
}

.sec-chatbot-bot-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1a5276;
    color: #fff;
    font-size: 14px;
    margin-right: 8px;
    flex-shrink: 0;
    vertical-align: top;
}

.sec-chatbot-bot-content {
    display: inline;
    vertical-align: top;
}

.sec-chatbot-bot-content img {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    display: block;
    margin-top: 8px;
}

.sec-chatbot-bot-content img.sec-chatbot-welcome-img {
    max-width: 100%;
    width: auto;
}

.sec-chatbot-widget.open ~ .sec-chatbot-fab,
.sec-chatbot-widget[style*="display: block"] ~ .sec-chatbot-fab {
    display: none;
}

.sec-chatbot-bot-content a {
    color: #1a73e8;
    text-decoration: none;
}

.sec-chatbot-bot-content a:hover {
    text-decoration: underline;
}

.sec-chatbot-pdf-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.sec-chatbot-pdf-title {
    flex: 0 0 100%;
    font-size: 11px;
    color: #495057;
    margin-bottom: 2px;
}

.sec-chatbot-bot-content a.sec-chatbot-pdf {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 6px;
    background: #0a4b78;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

.sec-chatbot-bot-content a.sec-chatbot-pdf::before {
    content: 'PDF';
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .4px;
    padding: 2px 4px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .2);
}

.sec-chatbot-bot-content a.sec-chatbot-pdf:hover {
    background: #083a5d;
    color: #fff;
    text-decoration: none;
}

.sec-chatbot-img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 8px;
    display: block;
}

.sec-chatbot-input-area {
    display: flex;
    padding: 12px;
    background: #fff;
    border-top: 1px solid #dee2e6;
    gap: 8px;
}

#sec-chatbot-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

#sec-chatbot-input:focus {
    border-color: #1a5276;
    box-shadow: 0 0 0 2px rgba(26,82,118,0.15);
}

.sec-chatbot-send-btn {
    background: #1a5276;
    color: #fff;
    border: none;
    border-radius: 8px;
    width: 42px;
    height: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.sec-chatbot-send-btn:hover {
    background: #154360;
}

.sec-chatbot-send-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.sec-chatbot-footer {
    padding: 8px 12px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    text-align: center;
}

.sec-chatbot-footer small {
    color: #6c757d;
    font-size: 11px;
}

.sec-chatbot-footer a {
    color: #0a4b78;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sec-chatbot-footer a:hover {
    color: #2271b1;
}

.sec-chatbot-typing {
    display: inline-flex;
    gap: 4px;
    padding: 4px 0;
}

.sec-chatbot-typing span {
    width: 8px;
    height: 8px;
    background: #6c757d;
    border-radius: 50%;
    animation: sec-chatbot-bounce 1.4s infinite ease-in-out;
}

.sec-chatbot-typing span:nth-child(2) { animation-delay: 0.2s; }
.sec-chatbot-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes sec-chatbot-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.sec-chatbot-info-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.sec-chatbot-info-card {
    overflow: hidden;
    border: 1px solid #d7e5ef;
    border-radius: 10px;
    background: #fff;
}

.sec-chatbot-info-image,
.sec-chatbot-msg.bot .sec-chatbot-info-cards .sec-chatbot-info-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 140px;
    margin: 0;
    border-radius: 0;
    object-fit: cover;
}

.sec-chatbot-info-body {
    padding: 10px 11px 11px;
}

.sec-chatbot-info-title {
    font-weight: 700;
    font-size: 13px;
    color: #0a4b78;
}

.sec-chatbot-info-caption {
    margin-top: 3px;
    font-size: 11px;
    color: #60778b;
    line-height: 1.4;
}

.sec-chatbot-info-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.sec-chatbot-bot-content .sec-chatbot-info-actions a.sec-chatbot-info-link,
.sec-chatbot-bot-content .sec-chatbot-info-actions a.sec-chatbot-info-map {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
}

.sec-chatbot-bot-content a.sec-chatbot-info-link {
    background: #1a5276;
    color: #fff;
}

.sec-chatbot-bot-content a.sec-chatbot-info-link:hover {
    background: #0a4b78;
    color: #fff;
    text-decoration: none;
}

.sec-chatbot-bot-content a.sec-chatbot-info-map {
    border: 1px solid #b9d3e6;
    background: #eef5fa;
    color: #1a5276;
}

.sec-chatbot-bot-content a.sec-chatbot-info-map:hover {
    background: #dcecf7;
    color: #0a4b78;
    text-decoration: none;
}

.sec-chatbot-bot-content a.sec-chatbot-info-map:hover {
    color: #0a4b78;
    text-decoration: underline;
}

@media (max-width: 480px) {
    .sec-chatbot-widget {
        right: 12px;
        left: 12px;
        width: auto;
        bottom: 88px;
    }
    .sec-chatbot-msg.bot.sec-chatbot-welcome-msg {
        max-width: 96%;
    }
    .sec-chatbot-fab {
        right: 16px;
        bottom: 16px;
    }
}
