.registration {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
}

.np-order-card {
    display: grid;
    gap: 14px;
    padding: 22px;
    background: #fff;
    border: 1px solid #e4e7eb;
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(18, 38, 63, 0.08);
}

.np-order-summary {
    display: grid;
    gap: 3px;
    padding: 16px;
    background: #f5f7f9;
    border-left: 4px solid var(--clr-primary);
    border-radius: 10px;
}

.np-order-summary strong {
    font-size: 22px;
}

.np-order-summary span {
    font-size: 18px;
    font-weight: 600;
}

.np-order-summary small {
    color: #4b5563;
}

/* =========================================================
   ORDER FORM
   ========================================================= */

.np-order-form {
    display: grid;
    width: 100%;
    gap: 14px;
}

.np-order-form *,
.np-order-form *::before,
.np-order-form *::after {
    box-sizing: border-box;
}

.np-order-form .form-group {
    position: relative;
    width: 100%;
    margin: 0 0 14px;
}

.np-order-form .np-form-row,
.np-order-form .np-form-row--two {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 0;
}

.np-order-form .np-form-row > .form-group {
    width: 100%;
    margin-bottom: 14px;
}

.np-order-form .wpcf7-form-control-wrap {
    position: relative;
    display: block;
    width: 100%;
}

/* =========================================================
   INPUTS
   ========================================================= */

.np-order-form input[type="text"],
.np-order-form input[type="email"],
.np-order-form input[type="tel"],
.np-order-form input[type="number"],
.np-order-form select,
.np-order-form textarea {
    display: block;
    width: 100%;
    min-height: 54px;
    padding: 16px 14px 8px;
    border: 1px solid #b8bec6;
    border-radius: 7px;
    background: #fff;
    color: #252525;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.35;
    appearance: none;
    box-sizing: border-box;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease;
}

.np-order-form textarea {
    min-height: 110px;
    resize: vertical;
}

.np-order-form input:focus,
.np-order-form select:focus,
.np-order-form textarea:focus {
    border-color: #54a934;
    outline: 0;
/*     box-shadow: 0 0 0 1px #54a934; */
}

/* =========================================================
   FLOATING LABELS
   ========================================================= */

.np-order-form .np-label-container {
    position: relative;
    display: block;
    width: 100%;
}

/*
 * The placeholder provides the label text,
 * but must remain hidden beneath the generated label.
 */
.np-order-form .np-label-container input::placeholder,
.np-order-form .np-label-container textarea::placeholder {
    color: transparent !important;
    opacity: 0 !important;
}

/*
 * Initial state:
 * the label is centered inside the empty field.
 */
.np-order-form .np-label-container > label {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 3;
    max-width: calc(100% - 28px);
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: #5f6670;
    background: transparent;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    transform: translateY(-50%);
    transform-origin: left center;
    transition:
        top 0.16s ease,
        left 0.16s ease,
        padding 0.16s ease,
        color 0.16s ease,
        font-size 0.16s ease,
        background-color 0.16s ease;
}

.np-order-form .np-label-container > label sup {
    margin-left: 1px;
    color: #c40062;
    font-size: 0.72em;
}

/*
 * The label floats only:
 * 1. when the field receives focus,
 * 2. when the field contains an actual value.
 */
.np-order-form .np-label-container:focus-within > label,
.np-order-form .np-label-container.has-value > label {
    top: 0;
    left: 10px;
    padding: 0 5px;
    color: #54a934;
    background: #fff;
    font-size: 11px;
    line-height: 1.2;
    transform: translateY(-50%);
}

/*
 * The label returns to the center when an empty field loses focus.
 */
.np-order-form .np-label-container:not(.has-value):not(:focus-within) > label {
    top: 50%;
    left: 14px;
    padding: 0;
    color: #5f6670;
    background: transparent;
    font-size: 16px;
    line-height: 1;
    transform: translateY(-50%);
}

/* =========================================================
   DYNAMIC COUNTY SELECT
   ========================================================= */

.np-order-form .np-select-wrap {
    position: relative;
}

.np-order-form .np-select-wrap select {
    padding-right: 40px;
    cursor: pointer;
}

.np-order-form .np-select-wrap .np-label-container > label {
    display: block;
}

/*
 * An empty select keeps its label centered.
 */
.np-order-form
.np-select-wrap
.np-label-container:not(.has-value):not(:focus-within) > label {
    top: 50%;
    left: 14px;
    padding: 0;
    color: #5f6670;
    background: transparent;
    font-size: 16px;
    transform: translateY(-50%);
}

/* =========================================================
   VALIDATION
   ========================================================= */

.np-order-form .form-control.is-invalid,
.np-order-form .form-control.wpcf7-not-valid {
    border-color: #b42318 !important;
/*     box-shadow: 0 0 0 1px #b42318 !important; */
}

.np-order-form .form-control.is-valid {
    border-color: #54a934;
}

.np-order-form .np-label-container.has-error > label,
.np-order-form .np-label-container:has(.wpcf7-not-valid) > label,
.np-order-form .np-label-container:has(.is-invalid) > label {
    color: #b42318;
}

.np-order-form .wpcf7-not-valid-tip,
.np-order-form .invalid-feedback,
.np-order-form div.is-invalid {
    display: block;
    width: 100%;
    margin: 5px 2px 0;
    color: #b42318;
    font-size: 13px;
    line-height: 1.35;
}

/* =========================================================
   GENDER
   ========================================================= */

.np-order-form .np-gender-group {
    margin-bottom: 16px;
}

.np-order-form .np-gender-fieldset {
 //   display: flex;
   // flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
}

.np-order-form .np-gender-options,
.np-order-form .np-gender-control {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
    gap: 20px;
}

.np-order-form .form-check-inline,
.np-order-form .np-gender-control label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-weight: 400;
    cursor: pointer;
}

.np-order-form .form-check-inline span,
.np-order-form .np-gender-control label {
    font-size: 16px;
}

.np-order-form input[type="radio"],
.np-order-form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: 0 0 auto;
}

/*
 * The gender validation message always appears below the radio buttons.
 */
.np-order-form .np-gender-group > .is-invalid,
.np-order-form .np-gender-fieldset > .is-invalid,
.np-order-form .np-gender-fieldset .wpcf7-not-valid-tip {
    order: 20;
    display: block;
    flex: 0 0 100%;
    width: 100%;
    margin: 7px 0 0;
    text-align: left;
}

/* =========================================================
   PROGRESSIVE STEP
   ========================================================= */

.np-order-form .np-form-step--details[hidden] {
    display: none !important;
}

.np-order-form .np-form-step--details {
    opacity: 0;
    transform: translateY(-8px);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.np-order-form .np-form-step--details.is-open {
    opacity: 1;
    transform: none;
}

.np-order-form [data-form-next].is-complete,
.np-order-form [data-form-next][hidden] {
    display: none !important;
}

/* =========================================================
   AGREEMENT
   ========================================================= */

.np-order-form .agreement-agree {
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
}

.np-order-form .agreement-agree .wpcf7-list-item {
    margin: 0;
}

.np-order-form .agreement-agree label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.np-order-form .agreement-agree input {
    margin-top: 2px;
}

.np-order-form .legal-more {
    display: block;
    color: #555;
    font-size: 11px;
    line-height: 1.5;
    text-align: left;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.np-order-form .btn-order {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    padding: 12px 18px;
    border: 0;
    border-radius: 6px;
    background: var(--clr-primary);
    color: #fff !important;
    font-family: inherit;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    cursor: pointer;
    transition:
        background-color 0.18s ease,
        transform 0.18s ease,
        opacity 0.18s ease;
}

.np-order-form .btn-order:hover {
    background: #005493;
}

.np-order-form .btn-order:active {
    transform: translateY(1px);
}

.np-order-form .btn-order .small,
.np-order-form .checkoutBtn__description {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
}

.np-order-form .btn-order.is-submitting,
.np-order-form .btn-order:disabled {
    opacity: 0.72;
    cursor: wait;
    pointer-events: none;
}

.np-order-form.is-submitting {
    cursor: progress;
}

/* =========================================================
   CONTACT FORM 7
   ========================================================= */

.registration .wpcf7-spinner {
    display: block;
    margin: 10px auto;
}

.registration .wpcf7-response-output {
    margin: 12px 0 0 !important;
    padding: 10px 12px !important;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.4;
}

/* =========================================================
   CONFIRMATION PAGE
   ========================================================= */

.np-confirmation-page {
    display: grid;
    min-height: 65vh;
    padding: 50px 18px;
    place-items: center;
}

.np-confirmation-card {
    width: min(680px, 100%);
    padding: 38px;
    background: #fff;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.12);
}

.np-confirmation-icon {
    display: inline-grid;
    width: 64px;
    height: 64px;
    background: #248a3d;
    border-radius: 50%;
    color: #fff;
    font-size: 38px;
    place-items: center;
}

.np-confirmation-summary {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 24px 0;
    padding: 16px;
    background: #f5f7f9;
    border-radius: 10px;
}

.np-back-link {
    display: inline-block;
    padding: 12px 20px;
    background: var(--clr-primary);
    border-radius: 8px;
    color: #fff !important;
    text-decoration: none;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 575px) {
    .registration {
        max-width: 100%;
    }

    .np-order-card {
        padding: 16px;
    }

    .np-order-form .np-form-row,
    .np-order-form .np-form-row--two {
        grid-template-columns: minmax(0, 1fr);
    }

    .np-order-form .np-form-row > .form-group {
        margin-bottom: 14px;
    }

    .np-order-form .np-gender-options,
    .np-order-form .np-gender-control {
        gap: 18px;
    }

    .np-order-form .btn-order {
        min-height: 52px;
        font-size: 20px;
    }

    .np-order-form input[type="text"],
    .np-order-form input[type="email"],
    .np-order-form input[type="tel"],
    .np-order-form input[type="number"],
    .np-order-form select,
    .np-order-form textarea {
        font-size: 16px;
    }

    .np-confirmation-card {
        padding: 26px 18px;
    }

    .np-confirmation-summary {
        flex-direction: column;
        gap: 5px;
    }
}
/* Build 26: complete and visible form validation. */
.np-order-form .np-field-validation,
.np-order-form .np-gender-validation,
.np-order-form span.wpcf7-not-valid-tip,
.registration div.wpcf7-validation-errors,
.registration div.wpcf7-acceptance-missing,
.registration .wpcf7-response-output {
    display: none !important;
}
.np-order-form .np-field-validation,
.np-order-form .np-gender-validation {
    width: 100%;
    margin: 6px 2px 0;
    color: #b42318;
    font-size: 13px;
    line-height: 1.35;
    text-align: left;
}
.np-order-form .np-gender-validation { order: 20; flex: 0 0 100%; }
.np-order-form .form-control.is-invalid,
.np-order-form .form-control.wpcf7-not-valid { border-color: #b42318 !important; }
.np-order-form .np-label-container.has-error > label { color: #b42318 !important; }

/* FIX: keep gender options on one row */
.np-order-form .np-gender-fieldset {
    display: block !important;
    width: 100%;
    margin: 0 0 16px;
    padding: 0;
    border: 0;
}

.np-order-form .np-gender-fieldset .wpcf7-form-control-wrap {
    display: block !important;
    width: 100%;
}

.np-order-form .np-gender-fieldset .wpcf7-radio,
.np-order-form .np-gender-fieldset .np-gender-control {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 14px 28px;
    width: 100%;
}

.np-order-form .np-gender-fieldset .wpcf7-list-item {
    display: inline-flex !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.np-order-form .np-gender-fieldset .wpcf7-list-item label {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
}

.np-order-form .np-gender-fieldset input[type="radio"] {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin: 0;
    flex: 0 0 20px;
}

.np-order-form .np-gender-fieldset .wpcf7-list-item-label {
    display: inline-block;
    font-size: 16px;
    line-height: 1.3;
}

/* Always show the error below both radio buttons */
.np-order-form .np-gender-fieldset .wpcf7-not-valid-tip,
.np-order-form .np-gender-fieldset .np-gender-validation,
.np-order-form .np-gender-fieldset > .is-invalid {
    display: block !important;
    width: 100% !important;
    margin: 8px 0 0 !important;
    color: #b42318;
    font-size: 13px;
    line-height: 1.35;
    text-align: left;
}

/* When the message is inside a CF7 flex container */
.np-order-form .np-gender-fieldset .wpcf7-radio .wpcf7-not-valid-tip {
    flex: 0 0 100%;
    order: 100;
}

.np-order-form .np-gender-fieldset .wpcf7-not-valid-tip {
    display: none !important;
}
/* Build 28: original validation restored, UI kept separate. */
.np-order-form .np-gender-fieldset .wpcf7-not-valid-tip {
    display: none !important;
}
.np-order-form .np-gender-fieldset .gender-error,
.np-order-form .np-gender-fieldset .invalid-feedback {
    display: block !important;
    width: 100%;
    margin: 8px 0 0 !important;
    color: #b42318;
    font-size: 13px;
    line-height: 1.35;
    text-align: left;
}
.np-order-form .wpcf7-form-control-wrap > .invalid-feedback,
.np-order-form .wpcf7-form-control-wrap > div.is-invalid {
    position: static !important;
    display: block !important;
    width: 100%;
    margin: 6px 2px 0 !important;
    padding: 0;
    color: #b42318;
    background: transparent;
    border: 0;
    font-size: 13px;
    line-height: 1.35;
    transform: none !important;
}
.np-order-form .agreement-agree .invalid-feedback,
.np-order-form .agreement-agree div.is-invalid {
    display: block !important;
    width: 100%;
    margin: 7px 0 0 !important;
    color: #b42318;
    font-size: 13px;
    line-height: 1.35;
}

/* Flat form presentation: no blue/card frame around the order form. */
.np-order-card,
.registration .wpcf7,
.registration .wpcf7-form,
.registration .wpcf7-response-output {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}
.np-order-card { padding-left: 0; padding-right: 0; }

/* CF7/jQuery validation: one message per field and no empty response frame. */
.wpcf7 form .wpcf7-response-output:empty,
.wpcf7 form:not(.sent):not(.failed):not(.invalid):not(.spam) .wpcf7-response-output { display:none!important; }
.wpcf7 form .wpcf7-response-output { border:0!important; padding:0!important; margin:12px 0!important; }
.wpcf7-form-control-wrap > .wpcf7-not-valid-tip { display:none!important; }
.invalid-feedback[data-np-error-for] { display:block; margin-top:6px; }
.invalid-feedback[data-np-error-for] ~ .invalid-feedback[data-np-error-for] { display:none!important; }

/* One validation message per field. Native CF7 field tips are replaced by the Hungarian validator UI. */
.np-order-form .wpcf7-not-valid-tip { display: none !important; }
.np-order-form .np-field-error { display: block; margin-top: 6px; }
.np-order-form .np-field-error + .np-field-error { display: none !important; }

/* CF7 native validation UI is intentionally disabled.
 * The order form uses the single Hungarian jQuery Validate layer; PHP/CF7
 * validation remains the final server-side authority. */
.wpcf7-not-valid-tip,
.screen-reader-response,
.wpcf7 form .wpcf7-response-output,
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output {
    display: none !important;
}


/* Maakond */
.np-select-wrap {
    position: relative;
}

.np-select-wrap::before {
    content: attr(data-placeholder);
    position: absolute;
    top: -7px;
    left: 14px;
    z-index: 2;
    padding: 0 4px;
    /* color: #1E2882; */
    background: #fff;
    font-size: 12px;
    line-height: 1;
    pointer-events: none;
}

.np-select-wrap select.form-control {
    height: 54px;
    border: 1px solid #ced4da;
    box-shadow: none;
    outline: none;
}

.np-select-wrap select.form-control:focus {
    border-color: #ced4da;
    box-shadow: none;
    outline: none;
}

.np-select-wrap .np-label-container label {
    display: none !important;
}

/* .np-select-wrap select.wpcf7-not-valid {
    border-color: #ff7a00;
} */

.wpcf7-form .btn-order {
    width: 100%;
    max-width: 900px;
    min-height: 72px;
    font-size: 1.2rem !important;
}

.wpcf7-form .btn-order .fs-5 {
    font-size: .9rem !important;
    font-weight: 400;
}

/* Disabled fields controlled by address scripts */
.wpcf7-form input:disabled,
.wpcf7-form select:disabled {
    color: #969696;
    background-color: #e9e9e9;
    border-color: #e9e9e9;
}