/* NFN Popup Forms — frontend styles */

.nfn-popup-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.nfn-popup-overlay-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.nfn-popup {
    position: relative;
    z-index: 2;
    width: 480px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 28px 28px 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #222;
    color-scheme: light;
}

.nfn-popup__close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #EB264C;
    color: #fff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 3;
}
.nfn-popup__close:hover { background: #c81f3f; }

.nfn-popup__title {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 600;
    padding-right: 30px;
}

.nfn-popup__field {
    margin-bottom: 12px;
}
.nfn-popup__field label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 500;
}
.nfn-popup__field input[type="text"],
.nfn-popup__field input[type="email"],
.nfn-popup__field input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    box-sizing: border-box;
    background: #fff;
    color: #222;
}
.nfn-popup__field input:focus {
    outline: none;
    border-color: #EB264C;
}

/* Override browser autofill background (Chrome/Edge/Brave) which can render
   as dark/yellow while the window has focus. */
.nfn-popup__field input:-webkit-autofill,
.nfn-popup__field input:-webkit-autofill:hover,
.nfn-popup__field input:-webkit-autofill:focus,
.nfn-popup__field input:-webkit-autofill:active {
    -webkit-text-fill-color: #222 !important;
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    box-shadow: 0 0 0 1000px #fff inset !important;
    caret-color: #222 !important;
    transition: background-color 5000s ease-in-out 0s;
}

.nfn-popup__honeypot {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    tab-index: -1;
}

.nfn-popup__submit {
    width: 100%;
    padding: 12px 16px;
    background: #EB264C;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
}
.nfn-popup__submit:hover { background: #c81f3f; }
.nfn-popup__submit:disabled { opacity: 0.6; cursor: not-allowed; }

.nfn-popup__message {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}
.nfn-popup__message--success {
    background: #e6f7ed;
    color: #1a7f3c;
    border: 1px solid #1a7f3c;
    display: block;
}
.nfn-popup__message--error {
    background: #fdecea;
    color: #b32d2e;
    border: 1px solid #b32d2e;
    display: block;
}

.nfn-popup__countdown {
    margin-top: 10px;
    padding: 8px 10px;
    background: #f3f4f6;
    color: #555;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
    display: none;
}

body.nfn-popup-open {
    overflow: hidden !important;
}

@media (max-width: 600px) {
    .nfn-popup {
        padding: 24px 18px 20px;
        font-size: 14px;
    }
    .nfn-popup__title { font-size: 18px; }
    .nfn-popup__field input { font-size: 16px; } /* prevents iOS zoom */
}
