/* ==========================================================================
   NEXOPER POPUP MODAL STYLES (Ultra-Responsive 2-Column Layout)
   ========================================================================== */

.nexoper-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nexoper-popup-backdrop.is-active {
    opacity: 1;
    visibility: visible;
}

/* Modal Dialog Box: Responsive Black Box with Capped Height */
.nexoper-popup-dialog {
    position: relative;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    background: #000000;
    border: 1px solid #222222;
    border-radius: 1.4rem;
    padding: 1.6rem 1.6rem 1.75rem;
    box-shadow: none;
    transform: scale(0.92) translateY(16px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;

    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #333333 #000000;
}

.nexoper-popup-dialog::-webkit-scrollbar {
    width: 5px;
}
.nexoper-popup-dialog::-webkit-scrollbar-track {
    background: #000000;
}
.nexoper-popup-dialog::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 4px;
}

.nexoper-popup-backdrop.is-active .nexoper-popup-dialog {
    transform: scale(1) translateY(0);
}

/* Header */
.nexoper-popup-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
}

.nexoper-popup-title-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.nexoper-popup-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 12px;
    background: #111111;
    border: 1px solid #222222;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: none;
}

.nexoper-popup-icon svg {
    width: 20px;
    height: 20px;
}

.nexoper-popup-heading-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.nexoper-popup-title {
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    letter-spacing: -0.015em !important;
    line-height: 1.3 !important;
}

.nexoper-popup-subtitle {
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 0.78rem !important;
    color: #ffffff !important;
    opacity: 0.85;
    line-height: 1.35 !important;
}

.nexoper-popup-close {
    background: #111111 !important;
    border: 1px solid #222222 !important;
    padding: 6px !important;
    border-radius: 9px !important;
    color: #ffffff !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    box-shadow: none !important;
    width: auto !important;
    min-height: auto !important;
    font-size: inherit !important;
    transition: background-color 0.2s ease !important;
}

.nexoper-popup-close:hover {
    color: #ffffff !important;
    background-color: #222222 !important;
    transform: none !important;
    box-shadow: none !important;
}

.nexoper-popup-close svg {
    width: 18px;
    height: 18px;
}

.nexoper-popup-divider {
    height: 1px;
    background: #222222;
    margin: 1.15rem 0 1.25rem;
}

/* Form Body & Grid */
.nexoper-popup-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.nexoper-popup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.nexoper-field-full {
    grid-column: span 2;
}

.nexoper-popup-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.nexoper-popup-field label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #ffffff;
    text-transform: uppercase;
    margin: 0;
}

.nexoper-popup-field label svg {
    width: 12px;
    height: 12px;
    color: #ffffff;
}

.nexoper-input-wrapper {
    position: relative;
    width: 100%;
}

/* Inputs, Select & Textarea */
.nexoper-popup-field input,
.nexoper-popup-field select,
.nexoper-popup-field textarea {
    width: 100%;
    background: #0d0d0d;
    border: 1px solid #222222;
    border-radius: 9px;
    padding: 0.7rem 0.95rem;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9rem;
    color: #ffffff;
    box-sizing: border-box;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}

.nexoper-popup-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 14px;
    padding-right: 2.2rem;
    cursor: pointer;
}

.nexoper-popup-field select option {
    background: #0d0d0d;
    color: #ffffff;
    padding: 8px;
}

.nexoper-popup-field input::placeholder,
.nexoper-popup-field textarea::placeholder {
    color: #888888;
    font-size: 0.88rem;
}

.nexoper-popup-field input:focus,
.nexoper-popup-field select:focus,
.nexoper-popup-field textarea:focus {
    outline: none;
    border-color: #ffffff;
    background: #111111;
    box-shadow: none;
}

.nexoper-popup-field textarea {
    resize: vertical;
    min-height: 70px;
}

/* Alert Message */
.nexoper-popup-alert {
    padding: 0.75rem 1rem;
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 500;
}

.nexoper-popup-alert.is-success {
    background: #111111;
    border: 1px solid #10b981;
    color: #10b981;
}

.nexoper-popup-alert.is-error {
    background: #111111;
    border: 1px solid #ef4444;
    color: #ef4444;
}

/* Submit Button */
.nexoper-popup-submit {
    position: relative;
    margin-top: 0.2rem;
    width: 100% !important;
    height: 46px !important;
    border: none !important;
    border-radius: 9px !important;
    background: #00d2ff !important;
    color: #000000 !important;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 0.96rem !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.55rem;
    cursor: pointer !important;
    padding: 0 1rem !important;
    box-shadow: none !important;
    transition: none !important;
    min-height: auto !important;
}

.nexoper-popup-submit:hover,
.nexoper-popup-submit:focus,
.nexoper-popup-submit:active {
    transform: none !important;
    box-shadow: none !important;
    background: #00bde6 !important;
    color: #000000 !important;
    border: none !important;
}

.nexoper-popup-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.nexoper-popup-btn-icon {
    width: 17px;
    height: 17px;
    transition: none !important;
}

.nexoper-popup-submit:hover .nexoper-popup-btn-icon {
    transform: none !important;
}

/* Trust Badges Footer */
.nexoper-popup-footer-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.3rem;
    font-size: 0.74rem;
    color: #ffffff;
    font-weight: 500;
}

.nexoper-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.nexoper-trust-item svg {
    width: 12px;
    height: 12px;
    color: #ffffff;
}

.nexoper-trust-dot {
    color: #ffffff;
}

/* Explicit Cursor Rules for Modal Form */
.nexoper-popup-backdrop,
.nexoper-popup-dialog {
    cursor: default !important;
}

.nexoper-popup-field input,
.nexoper-popup-field select,
.nexoper-popup-field textarea {
    cursor: text !important;
}

.nexoper-popup-submit,
.nexoper-popup-close,
.nexoper-popup-field label {
    cursor: pointer !important;
}

/* ── Mobile Responsiveness: 540px ── */
@media (max-width: 540px) {
    .nexoper-popup-backdrop {
        padding: 0.75rem 1rem;
    }

    .nexoper-popup-dialog {
        padding: 1.25rem 1.15rem 1.35rem;
        max-height: 94vh;
        border-radius: 1.1rem;
    }

    .nexoper-popup-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .nexoper-field-full {
        grid-column: span 1;
    }

    .nexoper-popup-title {
        font-size: 1.05rem !important;
    }

    .nexoper-popup-icon {
        width: 36px;
        height: 36px;
    }

    .nexoper-popup-icon svg {
        width: 18px;
        height: 18px;
    }
}

/* ── 480px: Close button absolutely positioned — title group full width ── */
@media (max-width: 480px) {

    /* Header becomes relative so close btn can be placed absolutely */
    .nexoper-popup-header {
        position: relative;
        padding-right: 2.6rem; /* gap for absolute close button */
        align-items: flex-start;
        gap: 0;
    }

    /* Close btn: top-right corner, no flex competition */
    .nexoper-popup-close {
        position: absolute !important;
        top: 0;
        right: 0;
        padding: 6px !important;
    }

    /* Title group takes full remaining width */
    .nexoper-popup-title-group {
        width: 100%;
        align-items: flex-start; /* icon stays at top, not centered with tall text */
        gap: 0.65rem;
    }

    /* Icon stays pinned to top */
    .nexoper-popup-icon {
        flex-shrink: 0;
        margin-top: 2px;
    }

    .nexoper-popup-heading-wrap {
        min-width: 0;
    }

    .nexoper-popup-title {
        font-size: 1rem !important;
        line-height: 1.3 !important;
        white-space: normal;
    }

    .nexoper-popup-subtitle {
        font-size: 0.76rem !important;
        line-height: 1.35 !important;
    }
}

/* ── 430px: Tighten spacing ── */
@media (max-width: 430px) {
    .nexoper-popup-backdrop {
        padding: 0.5rem 0.85rem;
    }

    .nexoper-popup-dialog {
        padding: 1.1rem 1rem 1.2rem;
        max-height: 96vh;
        border-radius: 1rem;
    }

    .nexoper-popup-title {
        font-size: 0.95rem !important;
    }

    .nexoper-popup-subtitle {
        font-size: 0.73rem !important;
    }

    .nexoper-popup-icon {
        width: 34px;
        height: 34px;
        border-radius: 9px;
    }

    .nexoper-popup-icon svg {
        width: 17px;
        height: 17px;
    }

    .nexoper-popup-field input,
    .nexoper-popup-field select,
    .nexoper-popup-field textarea {
        font-size: 0.85rem;
        padding: 0.62rem 0.85rem;
    }

    .nexoper-popup-field label {
        font-size: 0.67rem;
    }

    .nexoper-popup-submit {
        height: 44px !important;
        font-size: 0.92rem !important;
    }
}

/* ── 360px: Bottom-sheet style ── */
@media (max-width: 360px) {
    .nexoper-popup-backdrop {
        padding: 0.3rem 0.75rem;
        align-items: flex-end;
    }

    .nexoper-popup-dialog {
        padding: 1rem 0.875rem 1.1rem;
        max-height: 97vh;
        border-radius: 1rem 1rem 0.5rem 0.5rem;
        width: 100%;
    }

    .nexoper-popup-header {
        padding-right: 2.4rem;
    }

    .nexoper-popup-title {
        font-size: 0.9rem !important;
    }

    .nexoper-popup-subtitle {
        font-size: 0.7rem !important;
    }

    .nexoper-popup-icon {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }

    .nexoper-popup-icon svg {
        width: 15px;
        height: 15px;
    }

    .nexoper-popup-close {
        padding: 5px !important;
    }

    .nexoper-popup-close svg {
        width: 15px;
        height: 15px;
    }

    .nexoper-popup-divider {
        margin: 0.8rem 0 0.85rem;
    }

    .nexoper-popup-form {
        gap: 0.8rem;
    }

    .nexoper-popup-grid {
        gap: 0.6rem;
    }

    .nexoper-popup-field label {
        font-size: 0.63rem;
        letter-spacing: 0.035em;
    }

    .nexoper-popup-field label svg {
        width: 10px;
        height: 10px;
    }

    .nexoper-popup-field input,
    .nexoper-popup-field select,
    .nexoper-popup-field textarea {
        font-size: 0.8rem;
        padding: 0.58rem 0.75rem;
        border-radius: 8px;
    }

    .nexoper-popup-field select {
        background-position: right 0.6rem center;
        padding-right: 1.75rem;
    }

    .nexoper-popup-field input::placeholder,
    .nexoper-popup-field textarea::placeholder {
        font-size: 0.78rem;
    }

    .nexoper-popup-submit {
        height: 41px !important;
        font-size: 0.87rem !important;
        border-radius: 8px !important;
    }

    .nexoper-popup-footer-trust {
        font-size: 0.66rem;
        gap: 0.35rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nexoper-trust-item svg {
        width: 10px;
        height: 10px;
    }
}

/* ── 320px: Absolute minimum ── */
@media (max-width: 320px) {
    .nexoper-popup-backdrop {
        padding: 0 0.6rem;
        align-items: flex-end;
    }

    .nexoper-popup-dialog {
        padding: 0.85rem 0.75rem 1rem;
        max-height: 98vh;
        border-radius: 0.875rem 0.875rem 0 0;
        width: 100%;
        max-width: 100%;
    }

    .nexoper-popup-header {
        padding-right: 2.2rem;
    }

    .nexoper-popup-title {
        font-size: 0.85rem !important;
    }

    .nexoper-popup-subtitle {
        font-size: 0.67rem !important;
    }

    .nexoper-popup-icon {
        width: 26px;
        height: 26px;
        border-radius: 7px;
    }

    .nexoper-popup-icon svg {
        width: 13px;
        height: 13px;
    }

    .nexoper-popup-close svg {
        width: 14px;
        height: 14px;
    }

    .nexoper-popup-field input,
    .nexoper-popup-field select,
    .nexoper-popup-field textarea {
        font-size: 0.78rem;
        padding: 0.52rem 0.68rem;
    }

    .nexoper-popup-field label {
        font-size: 0.6rem;
    }

    .nexoper-popup-submit {
        height: 39px !important;
        font-size: 0.84rem !important;
    }

    .nexoper-popup-footer-trust {
        font-size: 0.6rem;
        gap: 0.25rem;
    }
}

