/* Iframe Container Styles */
.iframe-container {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: auto;
    height: 100%;
    background-color: transparent;
    z-index: 9999;
    justify-content: flex-end;
    align-items: center;
    padding: 0;
    pointer-events: none; /* Allow clicks to pass through container */
}

.iframe-wrapper {
    position: relative;
    background-color: #fff;
    border-radius: 0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    width: 375px;
    height: 667px;
    max-height: 100vh;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    align-items: center;
    pointer-events: auto; /* Enable clicks on the drawer itself */
}

.iframe-container.active .iframe-wrapper {
    transform: translateX(0);
}

/* Toggle Iframe Button - Always Visible on Right Side */
.toggle-iframe-btn {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid #333;
    color: #333;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.toggle-iframe-btn:hover {
    background-color: #333;
    color: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.toggle-iframe-btn.active {
    right: 395px; /* Position when iframe is open (375px drawer + 20px margin) */
}

#myIframe1 {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    display: block;
    overflow: auto;
}

/* Hide mobile close button on desktop */
.close-iframe-btn-mobile {
    display: none;
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Iframe container full screen on mobile */
    .iframe-container {
        padding: 0;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5); /* Show overlay on mobile */
        pointer-events: auto; /* Enable overlay on mobile */
    }

    .iframe-wrapper {
        width: 100%;
        height: 100%;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
        transform: none !important; /* Override drawer animation on mobile */
        pointer-events: auto; /* Enable clicks on mobile */
    }

    /* Hide toggle button on mobile - use full screen overlay instead */
    .toggle-iframe-btn {
        display: none;
    }

    /* Mobile close button */
    .close-iframe-btn-mobile {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.9);
        border: 2px solid #333;
        color: #333;
        font-size: 24px;
        font-weight: bold;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10000;
        transition: all 0.3s ease;
        line-height: 1;
        padding: 0;
    }

    .close-iframe-btn-mobile:hover {
        background-color: #333;
        color: #fff;
        transform: scale(1.1);
    }
}

