/**
 * Elementor Inline Form with Acceptance Options
 * Acceptance field positioning and styling only — does not affect
 * the width or layout of any other form field.
 */

/* Defensive reset: guarantees every field OTHER than acceptance keeps
   its own configured width (%), no matter what other CSS/cache tries
   to impose a flex-grow or flex-basis override on it. */
.elementor-form-inline-with-acceptance-yes .elementor-field-group:not(.elementor-field-type-acceptance):not(.elementor-field-type-submit) {
    flex-grow: 0 !important;
    flex-shrink: 1 !important;
    flex-basis: auto !important;
}

/* Push the acceptance field to the end of the form, after every other
   field, without touching anyone else's width/order. */
.elementor-form-inline-with-acceptance-yes .elementor-field-type-acceptance {
    flex: 1 0 100% !important;
    order: 99 !important;
}

/* The checkbox and the label are SIBLINGS in Elementor's markup, not
   nested. The flex row has to live on the wrapper that holds both,
   not on the label itself. */
.elementor-field-type-acceptance .elementor-field-subgroup,
.elementor-field-type-acceptance .elementor-field-option {
    display: flex !important;
    align-items: flex-start !important;
}

/* Label stays a normal block so its text content (including the link)
   wraps like regular text instead of being split into flex items. */
.elementor-field-type-acceptance label {
    cursor: pointer;
    display: block !important;
    flex: 1 1 auto;
    user-select: none;
    line-height: 1.4 !important;
    text-align: left !important;
    white-space: normal !important;
    word-break: break-word !important;
}

/* Keep the link inline so it flows naturally with the surrounding text */
.elementor-field-type-acceptance label a {
    display: inline !important;
    text-decoration: underline !important;
    padding: 0 2px !important;
}

/* Custom checkbox appearance */
.elementor-field-type-acceptance input[type="checkbox"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    outline: none;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    flex: 0 0 18px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-right: 10px !important;
    margin-top: 3px !important;
    position: relative;
    cursor: pointer;
    box-sizing: border-box !important;
    transition: all 0.2s ease-in-out;
}

.elementor-field-type-acceptance input[type="checkbox"]:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.elementor-field-type-acceptance input[type="checkbox"]::after {
    content: "" !important;
    display: block !important;
    width: 25% !important;
    height: 50% !important;
    border: solid #fff !important;
    border-width: 0 2px 2px 0 !important;
    transform: rotate(45deg) scale(0) !important;
    transition: transform 0.15s ease-in-out !important;
    margin-bottom: 2px !important;
    box-sizing: border-box !important;
}

.elementor-field-type-acceptance input[type="checkbox"]:checked::after {
    transform: rotate(45deg) scale(1) !important;
}

/* Hide checkbox while keeping the label interactive */
.elementor-form-hide-checkbox-yes .elementor-field-type-acceptance input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
    margin: 0 !important;
}