/* ═══════════════════════════════════════════════
   SHIPROCKET CHECKOUT — Professional Overlay CSS
   ═══════════════════════════════════════════════ */

/* Loading overlay */
.shiprocket-loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
    animation: srFadeIn 0.3s ease forwards;
}
.shiprocket-loading-spinner {
    width: 48px; height: 48px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: srSpin 0.8s linear infinite;
}
.shiprocket-loading-text {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
@keyframes srSpin { to { transform: rotate(360deg); } }
@keyframes srFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ═══ FORCE CENTER the Shiprocket iframe ═══ */

/* Target ALL Shiprocket iframes — CENTER them */
iframe[src*="shiprocket"],
iframe[src*="checkout-ui"],
iframe[src*="fastrr"] {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 100000 !important;
    border: none !important;
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Mobile: Centered, nearly fullscreen */
@media (max-width: 768px) {
    iframe[src*="shiprocket"],
    iframe[src*="checkout-ui"],
    iframe[src*="fastrr"] {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
}

/* Desktop: Centered modal */
@media (min-width: 769px) {
    iframe[src*="shiprocket"],
    iframe[src*="checkout-ui"],
    iframe[src*="fastrr"] {
        width: min(460px, 92vw) !important;
        height: 94vh !important;
        border-radius: 16px !important;
        box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
    }
}

/* Lock body scroll when checkout is open */
body.sr-checkout-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
}
