#iframe-container {
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 9999;
    width: auto;
    height: auto;
}

iframe#chatbot-iframe {
    width: 120px;
    height: 120px;
    border: none;
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 9999;
    border-radius: 10px;
    display: none;
    transform-origin: bottom right;
    -webkit-text-size-adjust: none;
}

@supports (-webkit-touch-callout: none) {
    iframe#chatbot-iframe {
        height: -webkit-fill-available;
    }
}

/* iPhone Pro Max specific styles */
@media screen and (device-width: 430px) and (device-height: 932px),
screen and (device-width: 393px) and (device-height: 852px),
screen and (max-width: 430px) and (min-height: 852px) {
    iframe#chatbot-iframe.expanded {
        width: 100% !important;
        max-width: 430px !important;
        height: 100% !important;
        max-height: 100% !important;
        position: fixed;
        top: 0 !important;
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        margin: auto !important;
        border-radius: 0 !important;
        padding-top: constant(safe-area-inset-top) !important;
        padding-top: env(safe-area-inset-top) !important;
        padding-bottom: constant(safe-area-inset-bottom) !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
    }

    #iframe-container.expanded {
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
}

/* General mobile styles */
@media screen and (max-width: 768px) {
    body.no-scroll {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    iframe#chatbot-iframe.expanded {
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        max-height: none !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        border-radius: 0 !important;
    }
}