/**
 * Neet Forms Frontend Styles - Material Design 3
 */

/* ============================================
   M3 CSS VARIABLES
   ============================================ */
:root {
    /* Primary */
    --nf-primary: var(--md-primary, #6750A4);
    --nf-on-primary: var(--md-on-primary, #FFFFFF);
    --nf-primary-container: var(--md-primary-container, #EADDFF);
    --nf-on-primary-container: var(--md-on-primary-container, #21005D);
    
    /* Secondary */
    --nf-secondary: var(--md-secondary, #625B71);
    --nf-on-secondary: var(--md-on-secondary, #FFFFFF);
    --nf-secondary-container: var(--md-secondary-container, #E8DEF8);
    
    /* Error */
    --nf-error: var(--md-error, #B3261E);
    --nf-on-error: var(--md-on-error, #FFFFFF);
    --nf-error-container: var(--md-error-container, #F9DEDC);
    --nf-on-error-container: var(--md-on-error-container, #410E0B);
    
    /* Surface */
    --nf-surface: var(--md-surface, #FEF7FF);
    --nf-on-surface: var(--md-on-surface, #1D1B20);
    --nf-on-surface-variant: var(--md-on-surface-variant, #49454F);
    --nf-surface-container: var(--md-surface-container, #F3EDF7);
    --nf-surface-container-high: var(--md-surface-container-high, #ECE6F0);
    
    /* Outline */
    --nf-outline: var(--md-outline, #79747E);
    --nf-outline-variant: var(--md-outline-variant, #CAC4D0);
    
    /* Spacing & Radius */
    --nf-radius-sm: 8px;
    --nf-radius-md: 12px;
    --nf-radius-lg: 16px;
    --nf-spacing: 16px;
    --nf-field-gap: 16px; /* Gap between fields */
    --nf-section-gap: 20px; /* Gap between sections */
}

/* ============================================
   FORM WRAPPER
   ============================================ */
.neet-form-wrapper,
.neet-form-wrapper *,
.neet-form-wrapper *::before,
.neet-form-wrapper *::after {
    box-sizing: border-box;
    margin: 0;
}

.neet-form-wrapper {
    max-width: 100%;
    margin: 0 auto;
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
    color: var(--nf-on-surface);
    line-height: 1.5;
}

.neet-form-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 500;
    color: var(--nf-on-surface);
    letter-spacing: -0.02em;
}

.neet-form-description {
    margin: 0 0 24px;
    color: var(--nf-on-surface-variant);
    font-size: 14px;
    line-height: 1.6;
}

.neet-form {
    padding: 0;
    margin: 0;
}

/* ============================================
   M3 OUTLINED TEXT FIELD WITH FLOATING LABEL
   ============================================ */
.neet-form-field {
    margin-bottom: var(--nf-field-gap, 16px);
    position: relative;
}

/* M3 Field Container */
.neet-m3-field {
    position: relative;
    width: 100%;
    padding-top: 22px; /* room for the label above the container */
}

.neet-m3-field__container {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 48px;
}

/* The actual input */
.neet-m3-field__container input,
.neet-m3-field__container textarea,
.neet-m3-field__container select {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-size: 16px;
    font-family: inherit;
    line-height: 1.5;
    color: var(--nf-on-surface, #1D1B20);
    background: transparent;
    border: none;
    outline: none;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.neet-m3-field__container textarea {
    height: auto;
    min-height: 120px;
    padding: 10px 16px;
    resize: vertical;
}

.neet-m3-field__container select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2349454F'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 24px;
    padding-right: 44px;
    cursor: pointer;
}

/* Label — always pinned to top of field wrapper regardless of DOM order */
.neet-m3-field__label {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--nf-on-surface-variant, #49454F);
    pointer-events: none;
    white-space: nowrap;
    background: transparent;
    transform: none;
    transition: color 0.15s;
    z-index: 2;
    padding: 0;
    line-height: 1.4;
}

/* Focus: highlight label colour */
.neet-m3-field__container input:focus ~ .neet-m3-field__label,
.neet-m3-field__container textarea:focus ~ .neet-m3-field__label,
.neet-m3-field__container select:focus ~ .neet-m3-field__label,
.neet-m3-field--has-value .neet-m3-field__label,
.neet-m3-field__container input:not(:placeholder-shown) ~ .neet-m3-field__label,
.neet-m3-field__container textarea:not(:placeholder-shown) ~ .neet-m3-field__label {
    top: 0;
    transform: none;
    font-size: 13px;
    color: var(--nf-primary, #6750A4);
    background: transparent;
    padding: 0;
}

/* Label placed BEFORE container (via PHP fix) — keep it in flow */
.neet-m3-field > .neet-m3-field__label {
    position: absolute;
    top: 0;
    left: 0;
}

/* Textarea label */
.neet-field-textarea .neet-m3-field__label {
    top: 0;
    transform: none;
}

/* Outline structure - creates the notched border */
.neet-m3-field__outline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    pointer-events: none;
    border-radius: 4px;
}

.neet-m3-field__outline-start {
    width: 12px;
    border: 1px solid var(--nf-outline, #79747E);
    border-right: none;
    border-radius: 4px 0 0 4px;
}

.neet-m3-field__outline-notch {
    display: flex;
    align-items: flex-start;
    border-top: 1px solid var(--nf-outline, #79747E);
    border-bottom: 1px solid var(--nf-outline, #79747E);
    padding: 0 4px;
    max-width: calc(100% - 24px);
}

.neet-m3-field__outline-label {
    font-size: 16px;
    color: transparent;
    white-space: nowrap;
    visibility: hidden;
}

.neet-m3-field__outline-end {
    flex: 1;
    border: 1px solid var(--nf-outline, #79747E);
    border-left: none;
    border-radius: 0 4px 4px 0;
}

/* Focus - primary color border */
.neet-m3-field__container input:focus ~ .neet-m3-field__outline .neet-m3-field__outline-start,
.neet-m3-field__container textarea:focus ~ .neet-m3-field__outline .neet-m3-field__outline-start,
.neet-m3-field__container select:focus ~ .neet-m3-field__outline .neet-m3-field__outline-start {
    border-color: var(--nf-primary, #6750A4);
    border-width: 2px;
}

.neet-m3-field__container input:focus ~ .neet-m3-field__outline .neet-m3-field__outline-notch,
.neet-m3-field__container textarea:focus ~ .neet-m3-field__outline .neet-m3-field__outline-notch,
.neet-m3-field__container select:focus ~ .neet-m3-field__outline .neet-m3-field__outline-notch {
    border-color: var(--nf-primary, #6750A4);
    border-width: 2px;
    border-top: none;
}

.neet-m3-field__container input:focus ~ .neet-m3-field__outline .neet-m3-field__outline-end,
.neet-m3-field__container textarea:focus ~ .neet-m3-field__outline .neet-m3-field__outline-end,
.neet-m3-field__container select:focus ~ .neet-m3-field__outline .neet-m3-field__outline-end {
    border-color: var(--nf-primary, #6750A4);
    border-width: 2px;
}

/* When has value or focused - open notch */
.neet-m3-field--has-value .neet-m3-field__outline-notch,
.neet-m3-field__container input:focus ~ .neet-m3-field__outline .neet-m3-field__outline-notch,
.neet-m3-field__container textarea:focus ~ .neet-m3-field__outline .neet-m3-field__outline-notch,
.neet-m3-field__container select:focus ~ .neet-m3-field__outline .neet-m3-field__outline-notch,
.neet-m3-field__container input:not(:placeholder-shown) ~ .neet-m3-field__outline .neet-m3-field__outline-notch,
.neet-m3-field__container textarea:not(:placeholder-shown) ~ .neet-m3-field__outline .neet-m3-field__outline-notch {
    border-top: none;
}

.neet-m3-field--has-value .neet-m3-field__outline-label,
.neet-m3-field__container input:focus ~ .neet-m3-field__outline .neet-m3-field__outline-label,
.neet-m3-field__container textarea:focus ~ .neet-m3-field__outline .neet-m3-field__outline-label,
.neet-m3-field__container select:focus ~ .neet-m3-field__outline .neet-m3-field__outline-label,
.neet-m3-field__container input:not(:placeholder-shown) ~ .neet-m3-field__outline .neet-m3-field__outline-label,
.neet-m3-field__container textarea:not(:placeholder-shown) ~ .neet-m3-field__outline .neet-m3-field__outline-label {
    font-size: 12px;
    visibility: visible;
}

/* Supporting text */
.neet-m3-field__supporting {
    margin: 4px 16px 0;
    font-size: 12px;
    color: var(--nf-on-surface-variant, #49454F);
    line-height: 1.33;
    letter-spacing: 0.4px;
}

/* Error state */
.neet-field-error .neet-m3-field__outline-start,
.neet-field-error .neet-m3-field__outline-notch,
.neet-field-error .neet-m3-field__outline-end {
    border-color: var(--nf-error, #B3261E) !important;
}

.neet-field-error .neet-m3-field__label {
    color: var(--nf-error, #B3261E) !important;
}

.neet-field-error .neet-m3-field__supporting {
    color: var(--nf-error, #B3261E);
}

/* Hover state */
.neet-m3-field__container:hover .neet-m3-field__outline-start,
.neet-m3-field__container:hover .neet-m3-field__outline-notch,
.neet-m3-field__container:hover .neet-m3-field__outline-end {
    border-color: var(--nf-on-surface, #1D1B20);
}

/* ============================================
   FALLBACK - Standard Field Label (for non-M3 fields)
   ============================================ */
.neet-field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--nf-on-surface-variant);
    letter-spacing: 0.01em;
    line-height: 1.4;
}

.neet-required {
    color: var(--nf-error);
    margin-left: 2px;
}

/* M3 Outlined Text Field Container */
.neet-form-wrapper .neet-field-input {
    position: relative;
}

/* M3 Outlined Text Field - High specificity to override theme */
.neet-form-wrapper .neet-form .neet-field-input input[type="text"],
.neet-form-wrapper .neet-form .neet-field-input input[type="email"],
.neet-form-wrapper .neet-form .neet-field-input input[type="tel"],
.neet-form-wrapper .neet-form .neet-field-input input[type="url"],
.neet-form-wrapper .neet-form .neet-field-input input[type="number"],
.neet-form-wrapper .neet-form .neet-field-input input[type="date"],
.neet-form-wrapper .neet-form .neet-field-input input[type="time"],
.neet-form-wrapper .neet-form .neet-field-input input[type="password"],
.neet-form-wrapper .neet-form .neet-field-input textarea,
.neet-form-wrapper .neet-form .neet-field-input select {
    width: 100%;
    padding: 16px !important;
    font-size: 16px !important;
    font-family: inherit;
    line-height: 1.5 !important;
    color: var(--nf-on-surface) !important;
    background-color: transparent !important;
    border: 1px solid var(--nf-outline) !important;
    border-radius: var(--nf-radius-sm) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    outline: none !important;
    box-shadow: none !important;
    height: auto !important;
    min-height: 56px;
}

/* M3 Filled variant for inputs inside containers */
.neet-form-wrapper .neet-form--filled .neet-field-input input,
.neet-form-wrapper .neet-form--filled .neet-field-input textarea,
.neet-form-wrapper .neet-form--filled .neet-field-input select {
    background-color: var(--nf-surface-container-high) !important;
    border: none !important;
    border-bottom: 1px solid var(--nf-on-surface-variant) !important;
    border-radius: var(--nf-radius-sm) var(--nf-radius-sm) 0 0 !important;
}

/* Placeholder: always hidden at rest — the floating label IS the placeholder.
   Only fades in after the label has floated (on focus or when field has a value).
   Covers all M3 field variants and the simple neet-form-wrapper fields. */
.neet-m3-field input::placeholder,
.neet-m3-field textarea::placeholder,
.neet-m3-field select::placeholder,
.neet-m3-field__container input::placeholder,
.neet-m3-field__container textarea::placeholder,
.neet-form-wrapper .neet-field-input input::placeholder,
.neet-form-wrapper .neet-field-input textarea::placeholder {
    opacity: 0 !important;
    transition: opacity 0.15s;
}
.neet-m3-field input:focus::placeholder,
.neet-m3-field textarea:focus::placeholder,
.neet-m3-field__container input:focus::placeholder,
.neet-m3-field__container textarea:focus::placeholder,
.neet-form-wrapper .neet-field-input input:focus::placeholder,
.neet-form-wrapper .neet-field-input textarea:focus::placeholder {
    opacity: 0.5 !important;
}

/* Focus State - M3 uses 2px indicator */
.neet-form-wrapper .neet-form .neet-field-input input:focus,
.neet-form-wrapper .neet-form .neet-field-input textarea:focus,
.neet-form-wrapper .neet-form .neet-field-input select:focus {
    border-color: var(--nf-primary) !important;
    border-width: 2px !important;
    padding: 15px !important;
    box-shadow: none !important;
    outline: none !important;
}

/* M3 Filled focus */
.neet-form--filled .neet-field-input input:focus,
.neet-form--filled .neet-field-input textarea:focus,
.neet-form--filled .neet-field-input select:focus {
    border-bottom-width: 2px;
    border-bottom-color: var(--nf-primary);
    padding: 16px 16px 15px 16px;
}

/* Hover State */
.neet-field-input input:hover:not(:focus):not(:disabled),
.neet-field-input textarea:hover:not(:focus):not(:disabled),
.neet-field-input select:hover:not(:focus):not(:disabled) {
    border-color: var(--nf-on-surface);
}

/* Error State */
.neet-form-field.neet-field-error .neet-field-input input,
.neet-form-field.neet-field-error .neet-field-input textarea,
.neet-form-field.neet-field-error .neet-field-input select {
    border-color: var(--nf-error);
}

.neet-form-field.neet-field-error .neet-field-input input:focus,
.neet-form-field.neet-field-error .neet-field-input textarea:focus {
    border-color: var(--nf-error);
}

.neet-form-field.neet-field-error .neet-field-label {
    color: var(--nf-error);
}

/* Disabled State */
.neet-field-input input:disabled,
.neet-field-input textarea:disabled,
.neet-field-input select:disabled {
    background-color: rgba(var(--nf-on-surface), 0.04);
    border-color: var(--nf-outline-variant);
    color: var(--nf-on-surface);
    opacity: 0.38;
    cursor: not-allowed;
}

/* Textarea */
.neet-field-input textarea {
    min-height: 120px;
    resize: vertical;
}

/* M3 Select/Dropdown */
.neet-field-input select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2349454F'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 24px;
    padding-right: 44px;
}

.neet-field-input select[multiple] {
    background-image: none;
    padding-right: 16px;
    min-height: 140px;
}

/* Field Description / Supporting Text */
.neet-field-description {
    margin: 4px 16px 0;
    font-size: 12px;
    color: var(--nf-on-surface-variant);
    line-height: 1.33;
    letter-spacing: 0.4px;
}

.neet-form-field.neet-field-error .neet-field-description {
    color: var(--nf-error);
}

/* ============================================
   FIELD SIZE VARIANTS
   ============================================ */
/* Small - for short inputs like postcode, phone extension */
.neet-form-field.neet-field-size-small .neet-field-input,
.neet-form-field.neet-field-size-small .neet-m3-field {
    max-width: 150px;
}

.neet-form-field.neet-field-size-small .neet-m3-field__container input,
.neet-form-field.neet-field-size-small .neet-field-input input {
    max-width: 150px;
}

/* Medium - for medium inputs like city, state */
.neet-form-field.neet-field-size-medium .neet-field-input,
.neet-form-field.neet-field-size-medium .neet-m3-field {
    max-width: 300px;
}

.neet-form-field.neet-field-size-medium .neet-m3-field__container input,
.neet-form-field.neet-field-size-medium .neet-field-input input {
    max-width: 300px;
}

/* Large (default) - full width */
.neet-form-field.neet-field-size-large .neet-field-input,
.neet-form-field.neet-field-size-large .neet-m3-field {
    max-width: 100%;
}

/* Inline field groups */
.neet-field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}

.neet-field-row .neet-form-field {
    flex: 1;
    min-width: 0;
}

.neet-field-row .neet-form-field.neet-field-size-small {
    flex: 0 0 auto;
    max-width: 150px;
}

.neet-field-row .neet-form-field.neet-field-size-medium {
    flex: 0 0 auto;
    max-width: 300px;
}

/* Responsive - stack on mobile */
@media (max-width: 600px) {
    .neet-field-row {
        flex-direction: column;
    }
    
    .neet-field-row .neet-form-field,
    .neet-field-row .neet-form-field.neet-field-size-small,
    .neet-field-row .neet-form-field.neet-field-size-medium {
        max-width: 100%;
        flex: 1 1 100%;
    }
}

/* ============================================
   M3 CHECKBOXES
   ============================================ */
.neet-form-wrapper .neet-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.neet-form-wrapper .neet-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1.5;
    padding: 8px 12px 8px 8px;
    position: relative;
    color: var(--nf-on-surface);
    min-height: 40px;
    border-radius: var(--nf-radius-sm);
    transition: background-color 0.2s ease;
}

.neet-form-wrapper .neet-checkbox-label:hover {
    background-color: rgba(103, 80, 164, 0.08);
}

/* M3 Checkbox - 18x18px container per spec */
.neet-form-wrapper .neet-checkbox-label input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    border: 2px solid var(--nf-outline) !important;
    border-radius: 2px !important;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin: 0 !important;
    padding: 0 !important;
    transition: all 0.15s cubic-bezier(0.2, 0, 0, 1);
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

/* M3 Checkbox - Hover State */
.neet-form-wrapper .neet-checkbox-label:hover input[type="checkbox"] {
    border-color: var(--nf-on-surface) !important;
}

/* M3 Checkbox - Checked State */
.neet-form-wrapper .neet-checkbox-label input[type="checkbox"]:checked {
    background-color: var(--nf-primary) !important;
    border-color: var(--nf-primary) !important;
}

/* M3 Checkmark - properly sized and centered */
.neet-form-wrapper .neet-checkbox-label input[type="checkbox"]:checked::after {
    content: '' !important;
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid var(--nf-on-primary) !important;
    border-width: 0 2px 2px 0 !important;
    transform: rotate(45deg);
    background: transparent !important;
}

/* M3 Checkbox - Focus State */
.neet-form-wrapper .neet-checkbox-label input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--nf-primary) !important;
    outline-offset: 2px;
}

/* M3 Checkbox - Disabled State */
.neet-form-wrapper .neet-checkbox-label input[type="checkbox"]:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.neet-form-wrapper .neet-checkbox-label:has(input:disabled) {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   M3 RADIO BUTTONS
   ============================================ */
.neet-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.neet-radio-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1.5;
    padding: 8px 12px 8px 8px;
    position: relative;
    color: var(--nf-on-surface);
    min-height: 40px;
    border-radius: var(--nf-radius-sm);
    transition: background-color 0.2s ease;
}

.neet-radio-label:hover {
    background-color: rgba(103, 80, 164, 0.08);
}

.neet-radio-label input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    border: 2px solid var(--nf-outline);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    transition: all 0.15s cubic-bezier(0.2, 0, 0, 1);
    background: transparent;
}

.neet-radio-label:hover input[type="radio"] {
    border-color: var(--nf-on-surface);
}

.neet-radio-label input[type="radio"]:checked {
    border-color: var(--nf-primary);
}

/* M3 Radio - Inner dot */
.neet-radio-label input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    background: var(--nf-primary);
    border-radius: 50%;
}

/* M3 Radio - Focus State */
.neet-radio-label input[type="radio"]:focus-visible {
    outline: 2px solid var(--nf-primary);
    outline-offset: 2px;
}

/* ============================================
   M3 DIVIDER
   ============================================ */
.neet-section-divider {
    border: none;
    height: 1px;
    background: var(--nf-outline-variant);
    margin: 16px 0;
}

.neet-field-section .neet-field-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--nf-primary);
    margin-bottom: 12px;
    letter-spacing: 0.01em;
}

/* ============================================
   SECTION CONTAINERS
   ============================================ */
.neet-form-section {
    margin-bottom: var(--nf-section-gap, 20px);
    padding: 12px 0;
}

.neet-form-section.neet-field-hidden {
    display: none;
}

.neet-section-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--nf-primary);
    margin: 0 0 6px 0;
    letter-spacing: 0.01em;
}

.neet-section-description {
    font-size: 14px;
    color: var(--nf-on-surface-variant);
    margin: 0 0 12px 0;
}

.neet-form-section .neet-section-divider {
    margin: 12px 0 16px 0;
}

/* ============================================
   M3 LISTS (for multi-select, etc.)
   ============================================ */
.neet-field-input select[multiple] option {
    padding: 12px 16px;
    border-radius: var(--nf-radius-sm);
    margin: 2px 0;
}

.neet-field-input select[multiple] option:checked {
    background: linear-gradient(0deg, var(--nf-secondary-container), var(--nf-secondary-container));
    color: var(--nf-on-surface);
}

/* ============================================
   ERROR STATES
   ============================================ */
.neet-form-field.has-error .neet-field-input input,
.neet-form-field.has-error .neet-field-input textarea,
.neet-form-field.has-error .neet-field-input select {
    border-color: var(--nf-error);
    caret-color: var(--nf-error);
}

.neet-form-field.has-error .neet-field-input input:focus,
.neet-form-field.has-error .neet-field-input textarea:focus,
.neet-form-field.has-error .neet-field-input select:focus {
    border-color: var(--nf-error);
}

.neet-form-field.has-error .neet-field-label {
    color: var(--nf-error);
}

.neet-field-error {
    margin: 8px 0 0 16px;
    font-size: 12px;
    color: var(--nf-error);
    letter-spacing: 0.03em;
}

/* ============================================
   M3 BUTTON (Submit)
   ============================================ */
.neet-form-footer {
    margin-top: 32px;
}

.neet-form-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 64px;
    height: 40px;
    padding: 0 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--nf-on-primary);
    background-color: var(--nf-primary);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    position: relative;
    overflow: hidden;
}

.neet-form-submit:hover {
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

.neet-form-submit:active {
    box-shadow: none;
}

.neet-form-submit:focus-visible {
    outline: 2px solid var(--nf-primary);
    outline-offset: 2px;
}

.neet-form-submit:disabled {
    background-color: var(--nf-on-surface);
    opacity: 0.12;
    color: var(--nf-on-surface);
    cursor: not-allowed;
}

.neet-form-submit.loading .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: neet-spin 0.8s linear infinite;
}

@keyframes neet-spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   M3 PAGE NAVIGATION
   ============================================ */
.neet-form-page-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
}

.neet-form-prev {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--nf-primary);
    background: transparent;
    border: 1px solid var(--nf-outline);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.neet-form-prev:hover {
    background: rgba(103, 80, 164, 0.08);
}

.neet-form-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--nf-on-primary);
    background: var(--nf-primary);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
}

.neet-form-next:hover {
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

/* ============================================
   M3 PROGRESS INDICATOR
   ============================================ */
.neet-form-progress {
    margin-bottom: 32px;
}

.neet-progress-bar {
    height: 4px;
    background: var(--nf-surface-container-high);
    border-radius: 2px;
    overflow: hidden;
}

.neet-progress-fill {
    height: 100%;
    background: var(--nf-primary);
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.neet-progress-text {
    margin-top: 8px;
    font-size: 12px;
    color: var(--nf-on-surface-variant);
    text-align: center;
    letter-spacing: 0.03em;
}

/* ============================================
   M3 MESSAGES/SNACKBAR STYLE
   ============================================ */
.neet-form-message {
    padding: 16px 24px;
    margin-top: 16px;
    border-radius: var(--nf-radius-sm);
    font-size: 14px;
    line-height: 1.5;
}

.neet-form-message.success {
    color: #1B5E20;
    background: #E8F5E9;
}

.neet-form-message.error {
    color: var(--nf-on-error-container);
    background: var(--nf-error-container);
}

.neet-forms-error {
    padding: 16px 24px;
    background: var(--nf-error-container);
    border-radius: var(--nf-radius-sm);
    color: var(--nf-on-error-container);
    font-size: 14px;
}

/* ============================================
   SPECIAL FIELDS
   ============================================ */

/* Name Field */
.neet-name-field {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.neet-name-field input {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    border: 1px solid var(--nf-outline);
    border-radius: var(--nf-radius-sm);
    box-sizing: border-box;
}

/* Address Field */
.neet-address-field {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.neet-address-row {
    display: grid;
    grid-template-columns: 1fr 1fr 140px;
    gap: 16px;
}

/* Consent Field */
.neet-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
    color: var(--nf-on-surface);
}

.neet-consent-label input[type="checkbox"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--nf-primary);
    cursor: pointer;
}

.neet-consent-label span {
    flex: 1;
}

.neet-consent-label a {
    color: var(--nf-primary);
    text-decoration: none;
}

.neet-consent-label a:hover {
    text-decoration: underline;
}

/* Hide field label for consent (label is in consent text) */
.neet-field-consent .neet-field-label {
    display: none;
}

/* File Input */
.neet-field-input input[type="file"] {
    padding: 12px;
    border-style: dashed;
}

.neet-field-input input[type="file"]::file-selector-button {
    padding: 8px 16px;
    margin-right: 16px;
    background: var(--nf-secondary-container);
    color: var(--nf-on-secondary-container);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

/* Signature Pad */
.neet-signature-pad {
    border: 1px solid var(--nf-outline);
    border-radius: var(--nf-radius-sm);
    background: var(--nf-surface);
    padding: 16px;
    display: inline-block;
}

.neet-signature-pad canvas {
    display: block;
    border: 2px dashed var(--nf-outline-variant);
    border-radius: var(--nf-radius-sm);
    cursor: crosshair;
    touch-action: none;
    background: #fff;
}

.neet-signature-pad canvas:hover {
    border-color: var(--nf-primary);
}

.neet-signature-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.neet-signature-clear {
    padding: 8px 16px;
    font-size: 14px;
    background: transparent;
    color: var(--nf-error, #B3261E);
    border: 1px solid var(--nf-outline);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.neet-signature-clear:hover {
    background: var(--nf-error-container, #F9DEDC);
    border-color: var(--nf-error, #B3261E);
}

/* Hidden fields */
.neet-form-field.neet-field-hidden {
    display: none !important;
}

/* Left/Right Label Layout */
.neet-form-field.neet-label-left {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 16px;
    align-items: start;
}

.neet-form-field.neet-label-right {
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: 16px;
    align-items: start;
}

.neet-label-left .neet-field-label,
.neet-label-right .neet-field-label {
    margin-bottom: 0;
    padding-top: 16px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .neet-form-field.neet-label-left,
    .neet-form-field.neet-label-right {
        display: block;
    }
    
    .neet-label-left .neet-field-label,
    .neet-label-right .neet-field-label {
        padding-top: 0;
        margin-bottom: 8px;
    }
    
    .neet-name-field {
        grid-template-columns: 1fr;
    }
    
    .neet-address-row {
        grid-template-columns: 1fr;
    }
    
    .neet-form-page-nav {
        flex-direction: column;
    }
    
    .neet-form-prev,
    .neet-form-next,
    .neet-form-submit {
        width: 100%;
        justify-content: center;
    }
    
    .neet-form-next {
        margin-left: 0;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .neet-form-wrapper {
        padding: 0;
    }
    
    .neet-form-submit,
    .neet-form-prev,
    .neet-form-next {
        display: none;
    }
}

/* ============================================
   PRODUCT SELECTOR FIELD
   ============================================ */
.nf-field-product-selector {
    margin-bottom: 24px;
}

.nf-field-product-selector > label {
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
    color: var(--nf-on-surface);
}

.nf-product-selector-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nf-layout-cards .nf-product-selector-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.nf-product-item {
    background: var(--nf-surface-container);
    border: 1px solid var(--nf-outline-variant);
    border-radius: var(--nf-radius-md);
    padding: 16px;
    transition: all 0.2s ease;
}

.nf-product-item:hover {
    border-color: var(--nf-outline);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.nf-product-item.selected {
    border-color: var(--nf-primary);
    background: var(--nf-primary-container);
}

.nf-product-item-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.nf-product-item-label input {
    margin-top: 4px;
    accent-color: var(--nf-primary);
}

.nf-product-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.nf-product-name {
    font-weight: 500;
    color: var(--nf-on-surface);
}

.nf-product-price {
    color: var(--nf-primary);
    font-weight: 600;
}

.nf-price-from {
    font-size: 0.9em;
}

.nf-product-description {
    margin-top: 8px;
    padding-left: 32px;
    color: var(--nf-on-surface-variant);
    font-size: 14px;
}

.nf-product-conditions {
    margin: 12px 0 0;
    padding: 0 0 0 32px;
    list-style: none;
    font-size: 13px;
    color: var(--nf-on-surface-variant);
}

.nf-product-conditions li {
    padding: 2px 0;
    padding-left: 20px;
    position: relative;
}

.nf-product-conditions li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--nf-primary);
}

.nf-product-attributes {
    margin-top: 16px;
    padding: 12px;
    margin-left: 32px;
    background: var(--nf-surface);
    border-radius: var(--nf-radius-sm);
    border: 1px solid var(--nf-outline-variant);
}

.nf-product-attribute {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.nf-product-attribute:last-child {
    margin-bottom: 0;
}

.nf-product-attribute label {
    flex: 1;
    font-size: 14px;
}

.nf-product-attribute input,
.nf-product-attribute input[type="number"],
.nf-attr-input {
    width: 70px !important;
    max-width: 70px !important;
    padding: 6px 8px;
    border: 1px solid var(--nf-outline-variant);
    border-radius: var(--nf-radius-sm);
    font-size: 14px;
    text-align: center;
}

.nf-attr-input:focus {
    outline: none;
    border-color: var(--nf-primary);
}

/* Hide number input spinners for cleaner look */
.nf-attr-input[type="number"]::-webkit-outer-spin-button,
.nf-attr-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.nf-attr-input[type="number"] {
    -moz-appearance: textfield;
}

.nf-product-item-total {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--nf-outline-variant);
    display: flex;
    justify-content: space-between;
    font-weight: 500;
}

.nf-item-total-value {
    color: var(--nf-primary);
}

/* Compact layout */
.nf-layout-compact .nf-product-item {
    padding: 12px;
}

.nf-layout-compact .nf-product-description,
.nf-layout-compact .nf-product-conditions {
    display: none;
}

/* ============================================
   PRODUCT CALCULATOR FIELD
   ============================================ */
.nf-field-product-calculator {
    margin-bottom: 24px;
}

.nf-calculator-label {
    display: block;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 500;
    color: var(--nf-on-surface);
}

.nf-calculator-products {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nf-calc-product {
    background: var(--nf-surface-container);
    border: 1px solid var(--nf-outline-variant);
    border-radius: var(--nf-radius-md);
    padding: 16px;
    transition: all 0.2s ease;
}

.nf-calc-product:hover {
    border-color: var(--nf-outline);
}

.nf-calc-product.selected {
    border-color: var(--nf-primary);
    background: var(--nf-primary-container);
}

.nf-calc-product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nf-calc-product-select {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex: 1;
}

.nf-calc-product-select input {
    accent-color: var(--nf-primary);
}

.nf-calc-product-name {
    font-weight: 500;
    color: var(--nf-on-surface);
}

.nf-calc-product-price {
    font-weight: 600;
    color: var(--nf-primary);
}

.nf-calc-product-desc {
    margin-top: 8px;
    padding-left: 28px;
    color: var(--nf-on-surface-variant);
    font-size: 14px;
}

.nf-calc-conditions {
    margin: 12px 0 0;
    padding: 0 0 0 28px;
    list-style: none;
    font-size: 13px;
}

.nf-calc-conditions li {
    padding: 4px 0;
    color: var(--nf-on-surface-variant);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nf-calc-conditions .dashicons {
    color: var(--nf-primary);
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.nf-calc-attributes {
    margin-top: 16px;
    padding: 16px;
    margin-left: 28px;
    background: var(--nf-surface);
    border-radius: var(--nf-radius-sm);
    border: 1px solid var(--nf-outline-variant);
}

.nf-calc-attribute {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.nf-calc-attribute:last-child {
    margin-bottom: 0;
}

.nf-calc-attribute label {
    flex: 1;
    font-weight: 500;
}

.nf-calc-attribute input,
.nf-calc-attribute input[type="number"],
.nf-calc-attr-input {
    width: 70px !important;
    max-width: 70px !important;
    padding: 6px 8px;
    border: 1px solid var(--nf-outline-variant);
    border-radius: var(--nf-radius-sm);
    font-size: 14px;
    text-align: center;
}

.nf-calc-attr-input:focus {
    outline: none;
    border-color: var(--nf-primary);
}

/* Hide number input spinners for cleaner look */
.nf-calc-attr-input[type="number"]::-webkit-outer-spin-button,
.nf-calc-attr-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.nf-calc-attr-input[type="number"] {
    -moz-appearance: textfield;
}

/* Breakdown Section */
.nf-calc-breakdown {
    margin-top: 24px;
    padding: 20px;
    background: var(--nf-surface-container-high);
    border-radius: var(--nf-radius-md);
}

.nf-calc-breakdown h4 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 500;
    color: var(--nf-on-surface);
}

.nf-calc-breakdown-items {
    margin-bottom: 16px;
}

.nf-calc-breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--nf-outline-variant);
    font-size: 14px;
}

.nf-calc-subtotal,
.nf-calc-tax,
.nf-calc-total {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.nf-calc-subtotal,
.nf-calc-tax {
    color: var(--nf-on-surface-variant);
    font-size: 14px;
}

.nf-calc-total {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid var(--nf-outline);
    font-size: 18px;
    font-weight: 600;
    color: var(--nf-on-surface);
}

.nf-calc-total-value {
    color: var(--nf-primary);
}

/* Mini layout */
.nf-calc-layout-mini .nf-calc-product-desc,
.nf-calc-layout-mini .nf-calc-conditions {
    display: none;
}

/* Compact layout */
.nf-calc-layout-compact .nf-calc-product {
    padding: 12px;
}

.nf-calc-layout-compact .nf-calc-conditions {
    display: none;
}

/* No products message */
.nf-no-products {
    padding: 20px;
    text-align: center;
    color: var(--nf-on-surface-variant);
    background: var(--nf-surface-container);
    border-radius: var(--nf-radius-md);
}
