/**
 * Contact Form Width Overrides
 * High-priority CSS to ensure 100% width expansion for all form elements
 * This file provides maximum compatibility overrides
 */

/* Ultra-high specificity width enforcement */
body .contact-form-spacing,
body .contact-form-spacing *,
body .contact-form-spacing form,
body .contact-form-spacing .form-field,
body .contact-form-spacing .wpcf7-form-control-wrap,
body .contact-form-spacing .elementor-field-group,
body .contact-form-spacing .forminator-field,
body .contact-form-spacing .wpforms-field {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Form elements - highest priority */
body .contact-form-spacing input[type="text"],
body .contact-form-spacing input[type="email"],
body .contact-form-spacing input[type="tel"],
body .contact-form-spacing input[type="url"],
body .contact-form-spacing select,
body .contact-form-spacing textarea,
body .contact-form-spacing button,
body .contact-form-spacing input[type="submit"] {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* Form headings and titles */
body .contact-form-spacing h1,
body .contact-form-spacing h2,
body .contact-form-spacing h3,
body .contact-form-spacing h4,
body .contact-form-spacing h5,
body .contact-form-spacing h6,
body .contact-form-spacing .form-title,
body .contact-form-spacing [class*="heading"],
body .contact-form-spacing [class*="title"] {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* Dynamic content elements */
body .package-conditional-content,
body .package-conditional-content *,
body .package-conditional-content .package-title,
body .package-conditional-content .package-subtitle,
body .package-conditional-content .package-urgency,
body .package-conditional-content .package-footer {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* Button overrides with ultra-high specificity */
body .contact-form-spacing button,
body .contact-form-spacing button[type="submit"],
body .contact-form-spacing input[type="submit"],
body .contact-form-spacing .wpcf7-submit,
body .contact-form-spacing .elementor-button,
body .contact-form-spacing .proceed-payment-btn,
body .contact-form-spacing [class*="btn"],
body .contact-form-spacing [class*="button"] {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
    text-align: center !important;
}

/* Override any theme button styles */
body .contact-form-spacing .btn,
body .contact-form-spacing .button,
body .contact-form-spacing .wp-block-button,
body .contact-form-spacing .wp-element-button {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Contact Form 7 specific overrides */
body .wpcf7 .contact-form-spacing .wpcf7-form-control,
body .wpcf7 .contact-form-spacing .wpcf7-text,
body .wpcf7 .contact-form-spacing .wpcf7-email,
body .wpcf7 .contact-form-spacing .wpcf7-tel,
body .wpcf7 .contact-form-spacing .wpcf7-textarea,
body .wpcf7 .contact-form-spacing .wpcf7-select,
body .wpcf7 .contact-form-spacing .wpcf7-submit {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Elementor Forms specific overrides */
body .elementor-form .contact-form-spacing .elementor-field,
body .elementor-form .contact-form-spacing .elementor-field-textual,
body .elementor-form .contact-form-spacing .elementor-select-wrapper,
body .elementor-form .contact-form-spacing .elementor-button {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Forminator specific overrides */
body .forminator-custom-form .contact-form-spacing .forminator-field,
body .forminator-custom-form .contact-form-spacing .forminator-input,
body .forminator-custom-form .contact-form-spacing .forminator-textarea,
body .forminator-custom-form .contact-form-spacing .forminator-select {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* WPForms specific overrides */
body .wpforms-form .contact-form-spacing .wpforms-field,
body .wpforms-form .contact-form-spacing .wpforms-field-text,
body .wpforms-form .contact-form-spacing .wpforms-field-email,
body .wpforms-form .contact-form-spacing .wpforms-field-textarea,
body .wpforms-form .contact-form-spacing .wpforms-field-select {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Labels and form control wrappers */
body .contact-form-spacing label,
body .contact-form-spacing .form-label,
body .contact-form-spacing .field-label,
body .contact-form-spacing .wpcf7-form-control-wrap,
body .contact-form-spacing .elementor-field-label {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* Mobile-first approach - ensure everything stays 100% width */
@media (min-width: 1px) {
    body .contact-form-spacing,
    body .contact-form-spacing *:not(br):not(span):not(i):not(svg):not(path) {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
}

/* Remove any theme-specific constraints */
body .contact-form-spacing .row,
body .contact-form-spacing .col,
body .contact-form-spacing [class*="col-"],
body .contact-form-spacing .grid,
body .contact-form-spacing .flex,
body .contact-form-spacing .container {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
    flex-basis: auto !important;
}

/* Override any inline styles */
body .contact-form-spacing [style*="width"],
body .contact-form-spacing [style*="max-width"],
body .contact-form-spacing [style*="min-width"] {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}