/**
 * Ela Chat Widget Wrapper
 * Styles for toggle button and iframe container on main page
 */

#elaWidget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Toggle Button */
#elaWidget .ela-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 0;
    margin: 0;
}

#elaWidget .ela-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(181, 148, 114, 0.3);
}

#elaWidget .ela-toggle svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

/* Icon States */
#elaWidget .ela-icon-close {
    display: none;
}

#elaWidget.open .ela-icon-open {
    display: none;
}

#elaWidget.open .ela-icon-close {
    display: block;
}

/* Frame Container */
#elaWidget .ela-frame-wrap {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 620px;
    height: 620px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.25s ease;
}

#elaWidget.open .ela-frame-wrap {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Iframe */
#elaWidget iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #1a1a1a;
}

/* === Mobile: Fullscreen Chat === */
@media (max-width: 640px) {
    #elaWidget {
        bottom: 16px;
        right: 16px;
    }

    #elaWidget .ela-toggle {
        width: 52px;
        height: 52px;
    }

    /* Hide toggle when chat is open on mobile */
    #elaWidget.open .ela-toggle {
        opacity: 0;
        pointer-events: none;
    }

    /* Fullscreen frame */
    #elaWidget .ela-frame-wrap {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        border: none;
    }
}
