/* Solar Wizard — Popup Overlay */
#sw-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 0;
}
#sw-popup-overlay.sw-popup-open {
    display: flex;
}
#sw-popup-inner {
    position: relative;
    width: 100%;
    height: auto;
    max-width: 900px;
    max-height: 94dvh;
    background: transparent;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 12px;
}
#sw-popup-body {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
#sw-popup-body .sw-wrap {
    min-height: 100%;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
}
/* Close button */
#sw-popup-close {
    position: fixed;
    top: 14px;
    right: 16px;
    z-index: 1000000;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,.45);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    transition: background .15s;
}
#sw-popup-close:hover {
    background: rgba(0,0,0,.7);
}
/* Loading spinner shown while AJAX loads */
#sw-popup-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
}
#sw-popup-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,.2);
    border-top-color: #FF8C00;
    border-radius: 50%;
    animation: sw-spin .7s linear infinite;
}
@keyframes sw-spin {
    to { transform: rotate(360deg); }
}

/* Fullscreen on mobile */
@media (max-width: 800px) {
    #sw-popup-inner {
        max-width: 100%;
        max-height: 100dvh;
        border-radius: 0;
    }
    #sw-popup-close {
        top: 8px;
        right: 8px;
    }
}
/* Prevent body scroll when open */
body.sw-popup-active {
    overflow: hidden;
}
.sw-popup-trigger.sw-hidden { display:none !important; }
