/* Neopolis Forms - front-end styles.
   Everything is scoped under .npf-wrap and driven by CSS variables, so a theme
   can restyle it with e.g.  .npf-wrap { --npf-accent: #c9a24a; }            */

.npf-wrap {
    --npf-accent: #e5b83c;
    --npf-accent-hover: #d4a935;
    --npf-on-accent: #0a0a0a;
    --npf-card-bg: #0f0f0f;
    --npf-field-bg: #0a0a0a;
    --npf-border: #333;
    --npf-text: #fff;
    --npf-muted: #8a8a8a;
    --npf-ok: #6fdb8f;
    --npf-err: #f28b98;
    font-family: inherit;
    box-sizing: border-box;
    text-align: left;
}
.npf-wrap *,
.npf-wrap *::before,
.npf-wrap *::after {
    box-sizing: border-box;
}

/* ---- Variants ---- */
.npf-variant-card {
    max-width: 480px;
    background: var(--npf-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 28px;
    color: #d4d4d4;
}
.npf-variant-flush {
    color: #d4d4d4;
}

.npf-wrap .npf-title {
    font-family: 'Playfair Display', serif;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0 0 18px;
    line-height: 1.25;
}

/* ---- Fields ---- */
.npf-wrap .npf-form {
    margin: 0;
    padding: 0;
    position: relative;
}
.npf-wrap .npf-field {
    margin: 0 0 14px;
    position: relative;
}
.npf-wrap .npf-form .npf-input {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    background: var(--npf-field-bg);
    border: 1px solid var(--npf-border);
    color: var(--npf-text);
    padding: 14px;
    font-family: inherit;
    font-size: 16px; /* 16px stops iOS zooming into the field */
    line-height: 1.3;
    border-radius: 0;
    box-shadow: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    height: auto;
}
.npf-wrap .npf-form .npf-input::placeholder {
    color: #666;
    opacity: 1;
}
.npf-wrap .npf-form .npf-input:focus {
    border-color: var(--npf-accent);
}
.npf-wrap .npf-form .npf-input:focus-visible {
    outline: 2px solid var(--npf-accent);
    outline-offset: 1px;
}
.npf-wrap .npf-form .npf-input[aria-invalid="true"] {
    border-color: var(--npf-err);
}
.npf-variant-card .npf-form .npf-input {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 12px 14px;
}
.npf-variant-card .npf-form .npf-input:focus {
    border-color: var(--npf-accent);
}

.npf-wrap .npf-error {
    display: block;
    margin-top: 5px;
    color: var(--npf-err);
    font-size: 0.8rem;
    line-height: 1.4;
}
.npf-wrap .npf-error:empty {
    display: none;
}

/* ---- Security check ---- */
.npf-wrap .npf-captcha-label {
    display: block;
    margin: 0 0 8px;
    color: var(--npf-muted);
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}
.npf-wrap .npf-question {
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
}
.npf-wrap .npf-refresh {
    display: inline-block;
    margin: 8px 0 0;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    color: var(--npf-muted);
    font: inherit;
    font-size: 0.78rem;
    text-decoration: underline;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
}
.npf-wrap .npf-refresh:hover,
.npf-wrap .npf-refresh:focus-visible {
    color: var(--npf-accent);
}

/* ---- Honeypot (hidden from people, present for bots) ---- */
.npf-wrap .npf-hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
}

/* ---- Submit ---- */
.npf-wrap .npf-form .npf-submit {
    display: block;
    width: 100%;
    margin: 4px 0 0;
    background: var(--npf-accent);
    color: var(--npf-on-accent);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 16px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.npf-variant-card .npf-form .npf-submit {
    border-radius: 6px;
    padding: 13px 20px;
    font-size: 0.95rem;
    text-transform: none;
    letter-spacing: 0;
}
.npf-wrap .npf-form .npf-submit:hover {
    background: var(--npf-accent-hover);
}
.npf-wrap .npf-form .npf-submit:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
.npf-wrap .npf-form .npf-submit:disabled {
    opacity: 0.7;
    cursor: default;
}
.npf-wrap .npf-form .npf-submit.is-sent,
.npf-wrap .npf-form .npf-submit.is-sent:disabled {
    background: #28a745;
    color: #fff;
    opacity: 1;
}
/* Until the script has attached, the button looks inactive (it is: the form
   refuses to submit natively rather than reloading the page and losing data). */
.npf-wrap .npf-form:not(.npf-ready) .npf-submit {
    opacity: 0.7;
}

/* ---- Message box ---- */
.npf-wrap .npf-message {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
}
.npf-wrap .npf-message[hidden] {
    display: none !important;
}
.npf-wrap .npf-message.is-success {
    background: rgba(40, 167, 69, 0.12);
    border: 1px solid rgba(40, 167, 69, 0.35);
    color: var(--npf-ok);
}
.npf-wrap .npf-message.is-error {
    background: rgba(220, 53, 69, 0.12);
    border: 1px solid rgba(220, 53, 69, 0.35);
    color: var(--npf-err);
}
.npf-wrap .npf-message.is-info {
    background: rgba(229, 184, 60, 0.1);
    border: 1px solid rgba(229, 184, 60, 0.3);
    color: var(--npf-accent);
}

.npf-wrap .npf-noscript {
    margin: 12px 0 0;
    color: var(--npf-err);
    font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
    .npf-wrap .npf-form .npf-submit {
        transition: none;
    }
}
