/* WM Form4Events PRO – individual registration fields. */
.wm-event-form .wm-form4events-custom-field-row {
    min-width: 0;
}

.wm-event-form .wm-form4events-custom-field-row select {
    width: 100%;
    min-height: var(--wm-f4e-field-height, 44px);
    margin: 0;
    padding: var(--wm-f4e-field-padding, 10px 12px);
    border: 1px solid var(--wm-f4e-border, #d8dde6);
    border-radius: var(--wm-f4e-field-radius, 8px);
    background: #fff;
    color: var(--wm-f4e-text, #1f2937);
    font-size: 15px;
    line-height: 1.4;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.wm-event-form .wm-form4events-custom-field-row select:focus {
    border-color: var(--wm-f4e-primary, #3152ff);
    box-shadow: 0 0 0 3px rgba(49, 82, 255, .12);
}

.wm-event-form .wm-form4events-custom-field-row fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.wm-event-form .wm-form4events-custom-field-row legend {
    display: block;
    width: 100%;
    margin: 0 0 8px;
    padding: 0;
    color: var(--wm-f4e-text, #1f2937);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.wm-event-form .wm-form4events-custom-options {
    display: grid;
    gap: 12px;
    margin-top: 2px;
}

.wm-event-form .wm-form4events-custom-options.is-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 28px;
}

.wm-event-form .wm-form4events-custom-options.is-inline label {
    flex: 0 0 auto;
    width: auto;
}

.wm-event-form .wm-form4events-custom-options label,
.wm-event-form .wm-form4events-custom-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: 2px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--wm-f4e-text, #1f2937);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    transition: color .18s ease;
}

.wm-event-form .wm-form4events-custom-options label:hover,
.wm-event-form .wm-form4events-custom-checkbox:hover,
.wm-event-form .wm-form4events-custom-options label:focus-within,
.wm-event-form .wm-form4events-custom-checkbox:focus-within,
.wm-event-form .wm-form4events-custom-options label:has(input:checked),
.wm-event-form .wm-form4events-custom-checkbox:has(input:checked) {
    color: var(--wm-f4e-primary, #3152ff);
    background: transparent;
}

.wm-event-form .wm-form4events-custom-options input,
.wm-event-form .wm-form4events-custom-checkbox input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--wm-f4e-primary, #3152ff);
}

.wm-event-form .wm-form4events-custom-checkbox.is-inline,
.wm-event-form .wm-form4events-custom-checkbox.is-stacked {
    display: inline-flex;
    width: fit-content;
}

.wm-event-form .wm-form4events-custom-field-help {
    display: block;
    margin-top: 6px;
    color: var(--wm-f4e-muted, #687386);
    font-size: 12px;
    font-weight: 400 !important;
    line-height: 1.45;
}

/* Helper text belongs to the field label, not below the input/options. */
.wm-event-form .wm-form4events-custom-field-row > label:not(.wm-form4events-custom-checkbox) + .wm-form4events-custom-field-help,
.wm-event-form .wm-form4events-custom-field-row legend + .wm-form4events-custom-field-help {
    margin-top: -3px;
    margin-bottom: 8px;
}

.wm-event-form .wm-form4events-custom-field-help + .wm-form4events-custom-options {
    margin-top: 0;
}

/* The wait-list modal does not always use the public form wrapper. */
.wm-form4events-waitlist-modal .wm-form4events-custom-field-row,
.wm-form4events-waiting-modal .wm-form4events-custom-field-row {
    margin-top: 14px;
}

.wm-form4events-waitlist-modal .wm-form4events-custom-field-row input[type="text"],
.wm-form4events-waitlist-modal .wm-form4events-custom-field-row textarea,
.wm-form4events-waitlist-modal .wm-form4events-custom-field-row select,
.wm-form4events-waiting-modal .wm-form4events-custom-field-row input[type="text"],
.wm-form4events-waiting-modal .wm-form4events-custom-field-row textarea,
.wm-form4events-waiting-modal .wm-form4events-custom-field-row select {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 700px) {
    .wm-event-form .wm-form4events-custom-options.is-inline {
        display: grid;
    }

    .wm-event-form .wm-form4events-custom-options.is-inline label,
    .wm-event-form .wm-form4events-custom-checkbox.is-inline {
        width: 100%;
    }
}


/* Allow long helper texts to wrap safely in forms and wait-list modals. */
.wm-event-form .wm-form4events-custom-field-help,
.wm-form4events-waitlist-modal .wm-form4events-custom-field-help,
.wm-form4events-waiting-modal .wm-form4events-custom-field-help {
    max-width: 100%;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
}
