/* Isolated popup styles. The widths are set in WordPress > Settings > NiftyTrader Popup. */
.ntsp-overlay[hidden] { display: none !important; }
.ntsp-overlay,
.ntsp-overlay * { box-sizing: border-box; }

.ntsp-overlay {
    position: fixed !important;
    z-index: 2147483000 !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(5, 15, 33, .73) !important;
}

.ntsp-dialog {
    position: relative !important;
    width: 100% !important;
    max-width: var(--ntsp-desktop-width, 800px) !important;
    max-height: calc(100vh - 32px) !important;
    max-height: min(82dvh, 660px) !important;
    overflow: auto !important;
    overflow-x: hidden !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 16px 55px rgba(0, 0, 0, .24) !important;
    scrollbar-width: thin;
}

.ntsp-link {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-decoration: none !important;
    line-height: 0 !important;
    cursor: pointer !important;
}

.ntsp-image {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.ntsp-close {
    -webkit-appearance: none !important;
    appearance: none !important;
    position: sticky !important;
    float: right !important;
    z-index: 2 !important;
    top: 12px !important;
    right: 12px !important;
    margin: 12px 12px -52px 0 !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #d8dfe9 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, .97) !important;
    color: #0b2345 !important;
    font: inherit !important;
    line-height: 1 !important;
    cursor: pointer !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08) !important;
}

.ntsp-close[hidden] { display: none !important; }
.ntsp-close:hover { background: #f0f5fc !important; }
.ntsp-dialog:focus { outline: none !important; }
.ntsp-close:focus-visible,
.ntsp-link:focus-visible { outline: 2px solid #64748b !important; outline-offset: -2px !important; }

body.ntsp-scroll-locked { overflow: hidden !important; }

@media (max-width: 600px) {
    .ntsp-overlay { padding: 12px !important; }
    .ntsp-dialog {
        max-width: var(--ntsp-mobile-width, 320px) !important;
        max-height: calc(100vh - 24px) !important;
        max-height: 80dvh !important;
        border-radius: 10px !important;
    }
    .ntsp-close {
        top: 8px !important;
        right: 8px !important;
        margin: 8px 8px -48px 0 !important;
    }
}
