html, body {
    height: 100%;
    margin: 0;
    overflow-x: hidden; /* Prevent horizontal overflow */
}

.pagewrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.content {
    flex: 1;
    overflow-y: auto;
    background-color: #f9f9f9;
}

#outerDiv {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box; /* Ensure padding and borders don't affect width/height */
    overflow-y: hidden; /* Prevent vertical overflow */
    margin-bottom: 2px;
    margin-top: 2px;
}

#monerisCheckout {
    width: 100%; /* Make the iframe responsive to parent width */
    max-width: 600px; /* Maximum width for the iframe */
    height: auto; /* Allow height to adjust based on content */
    max-height: 400px; /* Ensure the height doesn't exceed the available space in the container */
    box-sizing: border-box; /* Ensure padding/borders don't affect layout */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    #monerisCheckout {
        max-width: 100%; /* Allow the iframe to take the full width on smaller screens */
        max-height: 80vh; /* Adjust the maximum height to 80% of the viewport height */
    }
}

@media (max-width: 480px) {
    #monerisCheckout {
        max-height: 70vh; /* Further reduce height on very small screens */
    }
}

/* MAIN OVERLAY — now fixed + fully responsive */
.mco-ovl {
    position: fixed;              /* FIX: Always covers viewport */
    inset: 0;
    background: rgba(255, 255, 255, .98);
    z-index: 2147483647;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100vw;                 /* FIX: Ensures full viewport width */
    height: 100vh;                /* FIX: Ensures full viewport height */
    pointer-events: auto;
    padding: 20px;                /* Prevents content cutoff on small screens */
    box-sizing: border-box;
}

.mco-wrap {
    max-width: 420px;
    width: 100%;                    /* FIX: Prevents overflow on small screens */
    text-align: center;
}

.mco-spin {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: conic-gradient(#22c55e 0 25%, #e5e7eb 0 100%);
    -webkit-mask: radial-gradient(farthest-side, transparent 60%, #000 61%);
    mask: radial-gradient(farthest-side, transparent 60%, #000 61%);
    animation: mco-rot 1s linear infinite;
    margin: 4px auto 8px;
}

.mco-status {
    font: 600 13px ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial;
    color: #4b5563;
    margin-top: 8px;
    line-height: 1.35;
}

/* Processing Overlay Styles */
.mco-processing-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    z-index: 2147483647;
    padding: 20px;
    box-sizing: border-box;
}

.mco-processing-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #28a745;
    border-radius: 50%;
    animation: mco-rot 1s linear infinite;
    margin: auto;
}

/* Mobile-specific improvements */
@media (max-width: 480px) {
    .mco-status {
        font-size: 12px;
    }
    .mco-spin {
        width: 36px;
        height: 36px;
    }
}

/* End of the Moneris Checkout Lock Overlay Styles */
