
/* Floating button */
#floating-chat-btn {
    position: fixed;
    right: calc(50% - 28px);
    bottom: 5px; /* IMPORTANT: above your bottom fixed bar */
    width: 56px;
    height: 56px;
    background-color: #0b5c50;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    z-index: 9999;
}

#floating-chat-btn:hover { background-color: #094a41; }

/* Overlay */
#chat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 9998;
    display: none;
}

/* Chat panel (slide-up) */
#chat-panel {
    position: fixed;
    right: calc(50% - 190px);
    bottom: 70px; /* same as button: sits above bottom fixed bar */
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 560px;
    max-height: calc(100vh - 110px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.28);
    overflow: hidden;
    z-index: 9999;

    /* hidden by default */
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: transform 160ms ease, opacity 160ms ease;
}

/* show state */
#chat-panel.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Header */
#chat-panel-header {
    height: 44px;
    background: #0b5c50;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px 0 12px;
    font-size: 14px;
}

#chat-close-btn {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 8px;
}

/* Iframe */
#chat-iframe {
    width: 100%;
    height: calc(100% - 44px);
    border: 0;
    display: block;
}

/* Mobile: full width, docked */
@media (max-width: 576px) {
    #chat-panel {
        right: 0;
        left: 0;
        bottom: 60px; /* still above bottom bar */
        width: auto;
        height: 70vh;
        border-radius: 14px 14px 0 0;
        max-width: 100vw;
    }
    #floating-chat-btn {
        right: calc(50% - 28px);
        bottom: 5px;
    }
}
