/* chatwoot-fullscreen.css */

/* Темный фон */
.cw-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    z-index: 40; /* Понизили z-index */
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.cw-fullscreen-overlay.active {
    opacity: 1;
}

/* Кнопка закрытия (фиксированная поверх всего) */
.cw-fullscreen-close {
    position: fixed;
    top: 35px;
    right: 40px;
    border: none;
    cursor: pointer;
    z-index: 42; /* Понизили z-index */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    opacity: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.cw-fullscreen-close.active {
    opacity: 1;
}

/* 
   САМАЯ ГЛАВНАЯ МАГИЯ: 
   Когда на body висит класс .cw-is-fullscreen, мы берем ОРИГИНАЛЬНОЕ 
   окно переписки и делаем его фиксированным поверх всего экрана!
*/
body.cw-is-fullscreen ul.conversation-panel {
    position: fixed !important;
    
    /* Твои отступы */
    top: 20px !important;
    right: 20px !important;
    width: calc(100vw - 240px) !important;
    height: calc(100vh - 40px) !important;
    
    z-index: 41 !important; /* Понизили z-index */
    border-radius: 10px !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4) !important;
    margin: 0 !important;
    max-height: none !important;
    transition: all 0.2s ease-in-out;
}