/* chat/widget.css */
#chat-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
}
#chat-modal.is-open {
    display: block;
}

.chat-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    backdrop-filter: blur(2px);
}

.chat-modal-window {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 400px;
    height: 600px;
    max-height: calc(100vh - 40px);
    max-width: calc(100vw - 40px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: chat-modal-in .2s ease-out;
}

@keyframes chat-modal-in {
    from { opacity: 0; transform: translateY(20px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-modal-window iframe {
    flex: 1;
    border: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.chat-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
}
.chat-modal-close:hover {
    background: rgba(0, 0, 0, .75);
}

@media (max-width: 576px) {
    .chat-modal-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 20px);
        max-width: none;
        max-height: none;
        bottom: 10px;
        right: 10px;
        left: 10px;
        border-radius: 10px;
    }
}