/* ============================================
   RUBI BLUE - ESTILOS ISOLADOS
   ============================================ */

#rubiBtn {
    position: fixed;
    bottom: 100px;
    left: 28px;
    width: auto;
    min-width: 160px;
    height: 60px;
    background: linear-gradient(135deg, #1B3A5C, #0A2B3E);
    border-radius: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    transition: all 0.3s;
    border: none;
    padding: 0 18px 0 6px;
    z-index: 9999;
}

#rubiBtn:hover {
    transform: scale(1.05) translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

#rubiBtn .rubiAvatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #D4B896, #C4A87C);
    display: flex;
    align-items: center;
    justify-content: center;
}

#rubiBtn .rubiAvatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#rubiBtn .rubiName {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #FDF8F0;
    font-family: 'DM Sans', sans-serif;
}

#rubiBtn .rubiStatus {
    display: block;
    font-size: 0.6rem;
    color: #63B3ED;
    font-family: 'DM Sans', sans-serif;
}

#rubiModal {
    display: none;
    position: fixed;
    bottom: 100px;
    left: 30px;
    width: 360px;
    max-width: calc(100vw - 60px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    overflow: hidden;
    font-family: 'DM Sans', sans-serif;
    z-index: 10000;
}

#rubiModal.show {
    display: block;
}

.rubiModalHeader {
    padding: 14px 18px;
    background: linear-gradient(135deg, #1B3A5C, #0A2B3E);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rubiModalHeader h3 {
    font-size: 1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'DM Sans', sans-serif;
}

.rubiModalHeader h3 img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.rubiModalClose {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
}

.rubiModalBody {
    height: 380px;
    overflow-y: auto;
    padding: 15px;
    background: #FDF9F2;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rubiMessage {
    padding: 8px 12px;
    border-radius: 16px;
    max-width: 85%;
    font-size: 0.85rem;
    line-height: 1.4;
}

.rubiMessage.user {
    background: #1B3A5C;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 3px;
}

.rubiMessage.bot {
    background: #F0E4D0;
    color: #4A5568;
    align-self: flex-start;
    border-bottom-left-radius: 3px;
}

.rubiTyping {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    background: #F0E4D0;
    border-radius: 16px;
    width: fit-content;
}

.rubiTyping span {
    width: 7px;
    height: 7px;
    background: #D4B896;
    border-radius: 50%;
    animation: rubiPulse 1.4s infinite;
}

@keyframes rubiPulse {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

.rubiModalFooter {
    padding: 12px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
    background: white;
}

.rubiModalFooter input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 30px;
    outline: none;
    font-size: 0.85rem;
}

.rubiModalFooter button {
    background: #1B3A5C;
    color: white;
    border: none;
    padding: 0 18px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    #rubiBtn {
        bottom: 85px;
        left: 15px;
        min-width: 130px;
        height: 50px;
        padding: 0 12px 0 5px;
    }
    #rubiBtn .rubiAvatar {
        width: 42px;
        height: 42px;
    }
    #rubiBtn .rubiName {
        font-size: 0.75rem;
    }
    #rubiModal {
        width: calc(100vw - 30px);
        left: 15px;
        bottom: 85px;
    }
}