/* HB Import Chat Widget - Iframe Based */
:root {
    --hb-orange: #ff9800;
}

.hb-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
}

/* Floating Bubble */
.hb-chat-widget .chat-bubble {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ff5900;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hb-chat-widget .chat-bubble:hover {
    transform: scale(1.1);
}

/* Chat Badge */
.hb-chat-widget .chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: #ff3b30;
    color: white;
    font-size: 12px;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 2px solid white;
    z-index: 2;
}

/* Chat Window Wrapper (Desktop) */
.hb-chat-widget .chat-window-wrapper {
    position: absolute;
    bottom: 66px;
    right: 0;
    width: 368px;
    /* Reduzido de 420px */
    height: 572px;
    /* Reduzido de 650px */
    background: white;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;

    /* Animation base state */
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.95);
    transform-origin: bottom right;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.hb-chat-widget .chat-window-wrapper.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Close Button */
.hb-chat-widget .chat-close-btn {
    display: flex;
    position: absolute;
    top: 21px;
    right: 12px;
    width: 32px;
    /* Slightly smaller for desktop/default */
    height: 32px;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    z-index: 100001;
    backdrop-filter: blur(5px);
    transition: background 0.2s;
}

.hb-chat-widget .chat-close-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

/* Iframe */
.hb-chat-widget .chat-iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hb-chat-widget .chat-window-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100% !important;
        height: 100% !important;
        border-radius: 0;
        border: none;
        z-index: 100000;

        /* Mobile specific animation: Slide from bottom */
        transform: translateY(100%);
        transform-origin: center;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s linear;
    }

    .hb-chat-widget .chat-window-wrapper.active {
        display: flex;
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .hb-chat-widget .chat-close-btn {
        top: 17px;
        width: 40px;
        /* Larger for mobile touch */
        height: 40px;
        font-size: 20px;
    }

    .hb-chat-widget .chat-bubble {
        bottom: 0px;
        right: -7px;
    }
}