/* Font loading fallback for CSP - Load before other styles */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    src: local('Inter'), local('Inter-Regular'), system-ui, -apple-system, sans-serif;
}

/**
 * Gravity Forms Professional Styling for Hope Mission Donations
 * Version: 1.2.0
 *
 * This CSS targets Gravity Forms fields and styles them professionally
 * with iOS-style switches, gradient buttons, and dynamic accent colors.
 */

/* ========================================
   CSS VARIABLES & WRAPPER
   ======================================== */

.hm-donation-form-wrapper {
    --hm-accent-color: #F36F28;
    --hm-accent-hover: #d95e1f;
    --hm-accent-light: rgba(243, 111, 40, 0.1);
    --hm-text-dark: #2c3e50;
    --hm-text-light: #7f8c8d;
    --hm-border-color: #e0e0e0;
    --hm-bg-light: #f8f9fa;
    --hm-success-color: #27ae60;
    --hm-error-color: #e74c3c;
    --hm-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --hm-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --hm-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --hm-radius-sm: 6px;
    --hm-radius-md: 10px;
    --hm-radius-lg: 16px;
    --hm-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    max-width: 800px;
    margin: 0 auto;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hm-donation-form-container {
    background: white;
    padding: 50px;
    border-radius: var(--hm-radius-lg);
    box-shadow: var(--hm-shadow-lg);
    margin-top: 40px;
}

/* ========================================
   FORM 3 SPECIFIC - COMPACT SPACING
   ======================================== */

/* Reduce vertical spacing for form 3 to fit on one page */
#gform_wrapper_3 .gfield,
#gform_wrapper_3 .gform_fields .gfield {
    margin-bottom: 15px !important;
}

#gform_wrapper_3 .gfield_label {
    margin-bottom: 8px !important;
}

#gform_wrapper_3 .gform_fields {
    grid-row-gap: 15px !important;
    row-gap: 15px !important;
}

#gform_wrapper_3 .gform_footer {
    margin-top: 20px !important;
    padding-top: 15px !important;
}

/* Reduce padding in field containers */
#gform_wrapper_3 .ginput_container {
    margin-top: 0 !important;
}

/* Compact the impact calculator spacing */
#gform_wrapper_3 .hm-impact-calculator {
    margin-top: 8px !important;
    margin-bottom: 8px !important;
    padding: 10px 15px !important;
}


/* ========================================
   GRAVITY FORMS GENERAL STYLING
   ======================================== */

.hm-donation-form-wrapper .gform_wrapper {
    margin: 0 !important;
    max-width: 100% !important;
}

.hm-donation-form-wrapper .gform_body {
    width: 100% !important;
}

.hm-donation-form-wrapper .gform_fields {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    row-gap: 10px !important;
}

.hm-donation-form-wrapper .gfield {
    margin-bottom: 10px !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Force hidden fields to stay hidden (fix for conditional logic) */
.hm-donation-form-wrapper .gfield[style*="display: none"],
.hm-donation-form-wrapper .gfield[style*="display:none"] {
    display: none !important;
}

.hm-donation-form-wrapper .gfield_label {
    font-weight: 600 !important;
    color: var(--hm-text-dark) !important;
    font-size: 14px !important;
    margin-bottom: 8px !important;
    display: block !important;
}

.hm-donation-form-wrapper .gfield_required {
    color: var(--hm-error-color) !important;
    margin-left: 3px !important;
}

/* ========================================
   TEXT INPUTS & TEXTAREAS
   ======================================== */

.hm-donation-form-wrapper input[type="text"],
.hm-donation-form-wrapper input[type="email"],
.hm-donation-form-wrapper input[type="tel"],
.hm-donation-form-wrapper input[type="number"],
.hm-donation-form-wrapper input[type="url"],
.hm-donation-form-wrapper select,
.hm-donation-form-wrapper textarea {
    width: 100% !important;
    padding: 14px 18px !important;
    font-size: 15px !important;
    border: 2px solid var(--hm-border-color) !important;
    border-radius: var(--hm-radius-md) !important;
    transition: var(--hm-transition) !important;
    font-family: inherit !important;
    background: white !important;
    color: var(--hm-text-dark) !important;
}

/* Apply padding only to inputs and textareas, not select elements */
.hm-donation-form-wrapper input[type="text"],
.hm-donation-form-wrapper input[type="email"],
.hm-donation-form-wrapper input[type="tel"],
.hm-donation-form-wrapper input[type="number"],
.hm-donation-form-wrapper input[type="url"],
.hm-donation-form-wrapper select {
    height: 60px !important;
    padding: 0 18px !important;
    line-height: 60px !important;
}

.hm-donation-form-wrapper textarea {
    padding: 14px 18px !important;
}

/* Ensure select options are visible */
.hm-donation-form-wrapper select option {
    color: #333 !important;
    background: white !important;
}


.hm-donation-form-wrapper input[type="text"]:focus,
.hm-donation-form-wrapper input[type="email"]:focus,
.hm-donation-form-wrapper input[type="tel"]:focus,
.hm-donation-form-wrapper input[type="number"]:focus,
.hm-donation-form-wrapper input[type="url"]:focus,
.hm-donation-form-wrapper select:focus,
.hm-donation-form-wrapper textarea:focus {
    outline: none !important;
    border-color: var(--hm-accent-color) !important;
    box-shadow: 0 0 0 3px var(--hm-accent-light) !important;
}

/* ========================================
   FIELD 6 & 15: GIVE ONCE / MONTHLY TOGGLE
   iOS-Style Switch
   ======================================== */

/* Make the container hold the radio buttons side by side */
/* Make the container hold the radio buttons side by side */
.hm-donation-form-wrapper [id^="field_"][id$="_6"] .gfield_radio,
.hm-donation-form-wrapper [id^="field_"][id$="_15"] .gfield_radio,
.hm-donation-form-wrapper #field_2_12 .gfield_radio,
.hm-donation-form-wrapper #field_11_12 .gfield_radio,
.hm-donation-form-wrapper #field_3_12 .gfield_radio {
    display: flex !important;
    flex-direction: row !important;
    position: relative !important;
    background: #e8e8e8 !important;
    border-radius: 50px !important;
    padding: 5px !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1) !important;
    width: 100% !important;
    max-width: 400px !important;
    margin: 0 auto !important;
}

/* Ensure the list displays as flex (targeting both ul and div) */
.hm-donation-form-wrapper [id^="field_"][id$="_6"] .gfield_radio,
.hm-donation-form-wrapper [id^="field_"][id$="_15"] .gfield_radio,
.hm-donation-form-wrapper #field_2_12 .gfield_radio,
.hm-donation-form-wrapper #field_11_12 .gfield_radio,
.hm-donation-form-wrapper #field_3_12 .gfield_radio {
    display: flex !important;
    flex-direction: row !important;
    list-style: none !important;
}

.hm-donation-form-wrapper [id^="field_"][id$="_6"] .gchoice,
.hm-donation-form-wrapper [id^="field_"][id$="_15"] .gchoice,
.hm-donation-form-wrapper #field_2_12 .gchoice,
.hm-donation-form-wrapper #field_11_12 .gchoice,
.hm-donation-form-wrapper #field_3_12 .gchoice {
    flex: 1 !important;
    margin: 0 !important;
    position: relative !important;
}

.hm-donation-form-wrapper [id^="field_"][id$="_6"] input[type="radio"],
.hm-donation-form-wrapper [id^="field_"][id$="_15"] input[type="radio"],
.hm-donation-form-wrapper #field_2_12 input[type="radio"],
.hm-donation-form-wrapper #field_11_12 input[type="radio"],
.hm-donation-form-wrapper #field_3_12 input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    /* pointer-events: none !important; */
}

.hm-donation-form-wrapper [id^="field_"][id$="_6"] label,
.hm-donation-form-wrapper [id^="field_"][id$="_15"] label,
.hm-donation-form-wrapper #field_2_12 label,
.hm-donation-form-wrapper #field_11_12 label,
.hm-donation-form-wrapper #field_3_12 label {
    display: block !important;
    padding: 14px 24px !important;
    text-align: center !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    cursor: pointer !important;
    transition: var(--hm-transition) !important;
    position: relative !important;
    z-index: 2 !important;
    color: var(--hm-text-light) !important;
    border-radius: 50px !important;
    margin: 0 !important;
    width: 100% !important;
}

.hm-donation-form-wrapper [id^="field_"][id$="_6"] input[type="radio"]:checked+label,
.hm-donation-form-wrapper [id^="field_"][id$="_15"] input[type="radio"]:checked+label,
.hm-donation-form-wrapper [id^="field_"][id$="_6"] .gchoice:has(input[type="radio"]:checked) label,
.hm-donation-form-wrapper [id^="field_"][id$="_15"] .gchoice:has(input[type="radio"]:checked) label,
.hm-donation-form-wrapper #field_2_12 .gchoice:has(input[type="radio"]:checked) label,
.hm-donation-form-wrapper #field_11_12 .gchoice:has(input[type="radio"]:checked) label,
.hm-donation-form-wrapper #field_3_12 .gchoice:has(input[type="radio"]:checked) label {
    color: white !important;
}


/* Sliding background for toggle */
.hm-donation-form-wrapper [id^="field_"][id$="_6"] .gfield_radio::before,
.hm-donation-form-wrapper [id^="field_"][id$="_15"] .gfield_radio::before,
.hm-donation-form-wrapper #field_2_12 .gfield_radio::before,
.hm-donation-form-wrapper #field_11_12 .gfield_radio::before,
.hm-donation-form-wrapper #field_3_12 .gfield_radio::before {
    content: '' !important;
    position: absolute !important;
    top: 5px !important;
    left: 5px !important;
    width: calc(50% - 5px) !important;
    height: calc(100% - 10px) !important;
    background: linear-gradient(135deg, var(--hm-accent-color), var(--hm-accent-hover)) !important;
    border-radius: 50px !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    z-index: 1 !important;
}

/* Move slider when second option is checked */
/* Move slider when second option is checked */
.hm-donation-form-wrapper [id^="field_"][id$="_6"] .gfield_radio:has(.gchoice:last-child input:checked)::before,
.hm-donation-form-wrapper [id^="field_"][id$="_15"] .gfield_radio:has(.gchoice:last-child input:checked)::before,
.hm-donation-form-wrapper #field_2_12 .gfield_radio:has(.gchoice:last-child input:checked)::before,
.hm-donation-form-wrapper #field_11_12 .gfield_radio:has(.gchoice:last-child input:checked)::before,
.hm-donation-form-wrapper #field_3_12 .gfield_radio:has(.gchoice:last-child input:checked)::before {
    transform: translateX(100%) !important;
}

/* ========================================
   FIELD 12 SPECIFIC OVERRIDES (LONGER TEXT)
   ======================================== */
.hm-donation-form-wrapper #field_2_12 .gfield_radio,
.hm-donation-form-wrapper #field_11_12 .gfield_radio,
.hm-donation-form-wrapper #field_3_12 .gfield_radio {
    max-width: 550px !important;
    /* Wider container for longer text */
}

/* Ensure labels have transparent background so only the sliding pill is visible */
.hm-donation-form-wrapper #field_2_12 label,
.hm-donation-form-wrapper #field_11_12 label,
.hm-donation-form-wrapper #field_3_12 label {
    width: auto !important;
    min-width: 200px !important;
    white-space: nowrap !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Remove hover effects that might add borders/backgrounds */
.hm-donation-form-wrapper #field_2_12 label:hover,
.hm-donation-form-wrapper #field_11_12 label:hover,
.hm-donation-form-wrapper #field_3_12 label:hover {
    background: transparent !important;
    border: none !important;
}

/* Ensure selected state text is white but background remains transparent (handled by slider) */
.hm-donation-form-wrapper #field_2_12 input:checked+label,
.hm-donation-form-wrapper #field_11_12 input:checked+label,
.hm-donation-form-wrapper #field_3_12 input:checked+label,
.hm-donation-form-wrapper #field_2_12 .gchoice:has(input:checked) label,
.hm-donation-form-wrapper #field_11_12 .gchoice:has(input:checked) label,
.hm-donation-form-wrapper #field_3_12 .gchoice:has(input:checked) label {
    background: transparent !important;
    color: white !important;
    box-shadow: none !important;
    border: none !important;
}


/* ========================================
   FIELD 9_22: DEDICATION TOGGLE (CHECKBOX VARIANT)
   ======================================== */

.hm-donation-form-wrapper #field_9_22 .gfield_checkbox,
.hm-donation-form-wrapper #field_14_22 .gfield_checkbox {
    display: flex !important;
    flex-direction: row !important;
    position: relative !important;
    background: #e8e8e8 !important;
    border-radius: 50px !important;
    padding: 5px !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1) !important;
    width: 350px !important;
    max-width: 500px !important;
    margin: 0 auto !important;
}

.hm-donation-form-wrapper #field_9_22 .gchoice,
.hm-donation-form-wrapper #field_14_22 .gchoice {
    flex: 1 !important;
    margin: 0 !important;
    position: relative !important;
}

.hm-donation-form-wrapper #field_9_22 input[type="checkbox"],
.hm-donation-form-wrapper #field_14_22 input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important;
}

.hm-donation-form-wrapper #field_9_22 label,
.hm-donation-form-wrapper #field_14_22 label {
    display: block !important;
    padding: 14px 24px !important;
    text-align: center !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    cursor: pointer !important;
    transition: var(--hm-transition) !important;
    position: relative !important;
    z-index: 2 !important;
    color: var(--hm-text-light) !important;
    border-radius: 50px !important;
    margin: 0 !important;
}

.hm-donation-form-wrapper #field_9_22 .gchoice:has(input[type="checkbox"]:checked) label,
.hm-donation-form-wrapper #field_14_22 .gchoice:has(input[type="checkbox"]:checked) label {
    color: white !important;
}

/* Sliding background for checkbox toggle */
.hm-donation-form-wrapper #field_9_22 .gfield_checkbox::before,
.hm-donation-form-wrapper #field_14_22 .gfield_checkbox::before {
    content: '' !important;
    position: absolute !important;
    top: 5px !important;
    left: 5px !important;
    width: calc(50% - 5px) !important;
    height: calc(100% - 10px) !important;
    background: linear-gradient(135deg, var(--hm-accent-color), var(--hm-accent-hover)) !important;
    border-radius: 50px !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    z-index: 1 !important;
}

/* Move slider when second option is checked */
.hm-donation-form-wrapper #field_9_22 .gchoice:last-child input[type="checkbox"]:checked~.gfield_checkbox::before,
.hm-donation-form-wrapper #field_14_22 .gchoice:last-child input[type="checkbox"]:checked~.gfield_checkbox::before,
.hm-donation-form-wrapper #field_9_22:has(.gchoice:last-child input[type="checkbox"]:checked) .gfield_checkbox::before,
.hm-donation-form-wrapper #field_14_22:has(.gchoice:last-child input[type="checkbox"]:checked) .gfield_checkbox::before {
    transform: translateX(calc(100%)) !important;
}

/* Alternative selector for when radio is checked (Gravity Forms puts input after label) */
.hm-donation-form-wrapper [id^="field_"][id$="_6"]:has(.gchoice:last-child input[type="radio"]:checked) .gfield_radio::before,
.hm-donation-form-wrapper [id^="field_"][id$="_15"]:has(.gchoice:last-child input[type="radio"]:checked) .gfield_radio::before {
    transform: translateX(calc(100%)) !important;
}


/* ========================================
   FIELD 3 & 8: PRESET AMOUNT BUTTONS
   Professional Gradient Buttons
   ======================================== */

.hm-donation-form-wrapper [id^="field_"][id$="_3"] .gfield_radio,
.hm-donation-form-wrapper [id^="field_"][id$="_8"] .gfield_radio {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 15px !important;
    margin-bottom: 25px !important;
}

.hm-donation-form-wrapper [id^="field_"][id$="_12"] .gfield_radio {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    margin-bottom: 25px !important;
}

.hm-donation-form-wrapper [id^="field_"][id$="_3"] .gchoice,
.hm-donation-form-wrapper [id^="field_"][id$="_8"] .gchoice,
.hm-donation-form-wrapper [id^="field_"][id$="_12"] .gchoice {
    margin: 0 !important;
}

.hm-donation-form-wrapper [id^="field_"][id$="_3"] input[type="radio"],
.hm-donation-form-wrapper [id^="field_"][id$="_8"] input[type="radio"],
.hm-donation-form-wrapper [id^="field_"][id$="_12"] input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    /* pointer-events: none !important; - Removed to allow GF conditional logic events */
}

.hm-donation-form-wrapper [id^="field_"][id$="_3"] label,
.hm-donation-form-wrapper [id^="field_"][id$="_8"] label,
.hm-donation-form-wrapper [id^="field_"][id$="_12"] label {
    display: block !important;
    padding: 18px 20px !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--hm-text-dark) !important;
    background: white !important;
    border: 3px solid var(--hm-border-color) !important;
    border-radius: var(--hm-radius-md) !important;
    cursor: pointer !important;
    transition: var(--hm-transition) !important;
    box-shadow: var(--hm-shadow-sm) !important;
    text-align: center !important;
    margin: 0 !important;
}

.hm-donation-form-wrapper [id^="field_"][id$="_3"] label:hover,
.hm-donation-form-wrapper [id^="field_"][id$="_8"] label:hover,
.hm-donation-form-wrapper [id^="field_"][id$="_12"] label:hover {
    transform: translateY(-3px) !important;
    box-shadow: var(--hm-shadow-md) !important;
    border-color: var(--hm-accent-color) !important;
}

.hm-donation-form-wrapper [id^="field_"][id$="_3"] input[type="radio"]:checked+label,
.hm-donation-form-wrapper [id^="field_"][id$="_8"] input[type="radio"]:checked+label,
.hm-donation-form-wrapper [id^="field_"][id$="_12"] input[type="radio"]:checked+label,
.hm-donation-form-wrapper [id^="field_"][id$="_3"] .gchoice:has(input[type="radio"]:checked) label,
.hm-donation-form-wrapper [id^="field_"][id$="_8"] .gchoice:has(input[type="radio"]:checked) label,
.hm-donation-form-wrapper [id^="field_"][id$="_12"] .gchoice:has(input[type="radio"]:checked) label {
    background: linear-gradient(135deg, var(--hm-accent-color), var(--hm-accent-hover)) !important;
    border-color: var(--hm-accent-color) !important;
    color: white !important;
    box-shadow: var(--hm-shadow-md) !important;
}

/* Separator handled by JS */

/* Reset Field 9 Margin */
.hm-donation-form-wrapper [id^="field_"][id$="_9"] {
    position: relative !important;
    margin-top: 10px !important;
    /* Standard spacing */
}

/* ========================================
   FIELD 9: CUSTOM AMOUNT INPUT
   With Dollar Sign
   ======================================== */

.hm-donation-form-wrapper [id^="field_"][id$="_9"] .ginput_container {
    position: relative !important;
}

/* Dollar sign restored and duplicates hidden */
.hm-donation-form-wrapper [id^="field_"][id$="_9"] .ginput_container::before {
    content: '$' !important;
    position: absolute !important;
    left: 18px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--hm-text-dark) !important;
    z-index: 2 !important;
}

/* Hide any default Gravity Forms currency symbol spans */
.hm-donation-form-wrapper [id^="field_"][id$="_9"] .ginput_container span {
    display: none !important;
}

.hm-donation-form-wrapper [id^="field_"][id$="_9"] input {
    padding-left: 45px !important;
    text-align: left !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    max-width: 300px !important;
    height: 60px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* ========================================
   IMPACT CALCULATOR STYLING
   (Assuming this is added via custom HTML or field description)
   ======================================== */

.hm-donation-form-wrapper .hm-impact-calculator,
.hm-donation-form-wrapper .gfield_description.impact-calculator {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 15px !important;
    padding: 12px 20px !important;
    background: var(--hm-accent-light) !important;
    border-left: 5px solid var(--hm-accent-color) !important;
    border-radius: var(--hm-radius-md) !important;
    margin: 10px auto !important;
    width: 100% !important;
    max-width: 800px !important;
    /* Allow it to be wide but not infinite if in a weird container */
    box-sizing: border-box !important;
    text-align: center !important;
}

/* Form 2 Specific Impact Calculator Centering */
html body #gform_wrapper_2 .gform_body .gform_fields .hm-impact-wrapper,
html body #gform_wrapper_11 .gform_body .gform_fields .hm-impact-wrapper {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    float: none !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    text-indent: 0 !important;
    padding-inline-start: 0 !important;
    clear: both !important;
}

/* Form 9 Specific Impact Calculator Centering */
.hm-donation-form-wrapper .hm-impact-calculator-9,
html body #gform_wrapper_9 .hm-impact-calculator-9,
html body #gform_wrapper_14 .hm-impact-calculator-9 {
    width: 400px !important;
    max-width: 100% !important;
    margin: 0 30% 15px 30% !important;
    clear: both !important;
}

/* Wrapper for Form 9 Impact Calculator (centering container) */
.hm-donation-form-wrapper .hm-impact-wrapper-9,
html body #gform_wrapper_9 .hm-impact-wrapper-9,
html body #gform_wrapper_14 .hm-impact-wrapper-9 {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    list-style: none !important;
    margin: 15px 0 !important;
    clear: both !important;
}

html body #gform_wrapper_2 .hm-impact-calculator,
html body #gform_wrapper_11 .hm-impact-calculator {
    margin: 10px auto !important;
    /* Centered with auto margin */
    width: 90% !important;
    max-width: 400px !important;
    /* Explicit max width as requested */
    min-width: 300px !important;
    /* Prevent squashing */
    display: flex !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}



.hm-donation-form-wrapper .hm-impact-icon {
    font-size: 32px !important;
    flex-shrink: 0 !important;
}

.hm-donation-form-wrapper .hm-impact-text {
    font-size: 16px !important;
    color: var(--hm-text-dark) !important;
    line-height: 1.5 !important;
}

.hm-donation-form-wrapper .hm-meal-count {
    color: var(--hm-accent-color) !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    display: inline-block !important;
    min-width: 60px !important;
    text-align: center !important;
}

/* ========================================
   FIELD 5: TOTAL DONATION DISPLAY
   Stylized Bar
   ======================================== */

.hm-donation-form-wrapper [id^="field_"][id$="_5"] {
    position: sticky !important;
    bottom: 20px !important;
    z-index: 10 !important;
    width: 66% !important;
    min-width: 250px !important;
    margin: 20px auto !important;
    background: linear-gradient(135deg, var(--hm-accent-color), var(--hm-accent-hover)) !important;
    border-radius: var(--hm-radius-md) !important;
    box-shadow: var(--hm-shadow-lg) !important;
    padding: 10px 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.hm-donation-form-wrapper [id^="field_"][id$="_5"] .ginput_container {
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    width: auto !important;
}

.hm-donation-form-wrapper [id^="field_"][id$="_5"] .gfield_label {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: white !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hm-donation-form-wrapper [id^="field_"][id$="_5"] input {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: white !important;
    background: transparent !important;
    border: none !important;
    text-align: right !important;
    text-shadow: none !important;
    padding: 0 !important;
    width: auto !important;
    pointer-events: none !important;
}

/* ========================================
   STRIPE CREDIT CARD FIELD (Field 17)
   Professional Styling with Security Badge
   ======================================== */

.hm-donation-form-wrapper [id^="field_"][id$="_17"] {
    position: relative !important;
}

.hm-donation-form-wrapper [id^="field_"][id$="_17"] .ginput_container {
    position: relative !important;
}

/* Security badge and info */
.hm-donation-form-wrapper [id^="field_"][id$="_17"]::before {
    content: '' !important;
    display: block !important;
    margin-bottom: 15px !important;
}

/* Add security information */
.hm-donation-form-wrapper .hm-stripe-security {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    margin-bottom: 25px !important;
    padding: 15px 20px !important;
    background: var(--hm-bg-light) !important;
    border-radius: var(--hm-radius-md) !important;
}

.hm-donation-form-wrapper .hm-security-icon {
    font-size: 20px !important;
    color: var(--hm-accent-color) !important;
    cursor: help !important;
    transition: var(--hm-transition) !important;
    position: relative !important;
}

.hm-donation-form-wrapper .hm-security-icon:hover {
    color: var(--hm-accent-hover) !important;
    transform: scale(1.1) !important;
}

/* Security tooltip */
.hm-donation-form-wrapper .hm-security-tooltip {
    position: absolute !important;
    bottom: calc(100% + 15px) !important;
    right: 0 !important;
    width: 320px !important;
    padding: 20px !important;
    background: white !important;
    border-radius: var(--hm-radius-md) !important;
    box-shadow: var(--hm-shadow-lg) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(10px) !important;
    transition: var(--hm-transition) !important;
    z-index: 1000 !important;
    border: 2px solid var(--hm-accent-color) !important;
}

.hm-donation-form-wrapper .hm-security-icon:hover+.hm-security-tooltip {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* ========================================
   SUBMIT BUTTON
   Professional Gradient Button
   ======================================== */

.hm-donation-form-wrapper .gform_footer,
.hm-donation-form-wrapper .gform_page_footer {
    margin: 30px 0 0 0 !important;
    padding: 0 !important;
}

.hm-donation-form-wrapper .gform_button,
.hm-donation-form-wrapper .gform_next_button,
.hm-donation-form-wrapper input[type="submit"] {
    width: 66% !important;
    margin: 0 auto !important;
    display: block !important;
    padding: 20px 40px !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: white !important;
    background: linear-gradient(135deg, var(--hm-accent-color), var(--hm-accent-hover)) !important;
    border: none !important;
    border-radius: var(--hm-radius-lg) !important;
    cursor: pointer !important;
    transition: var(--hm-transition) !important;
    box-shadow: var(--hm-shadow-md) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    position: relative !important;
    overflow: hidden !important;
}

.hm-donation-form-wrapper .gform_button::before,
.hm-donation-form-wrapper input[type="submit"]::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent) !important;
    transition: left 0.5s !important;
}

.hm-donation-form-wrapper .gform_button:hover,
.hm-donation-form-wrapper input[type="submit"]:hover {
    transform: translateY(-3px) !important;
    box-shadow: var(--hm-shadow-lg) !important;
}

.hm-donation-form-wrapper .gform_button:hover::before,
.hm-donation-form-wrapper input[type="submit"]:hover::before {
    left: 100% !important;
}

.hm-donation-form-wrapper .gform_button:active,
.hm-donation-form-wrapper .gform_next_button:active,
.hm-donation-form-wrapper input[type="submit"]:active {
    transform: translateY(1px) !important;
    box-shadow: var(--hm-shadow-sm) !important;
}

/* ========================================
   VALIDATION & ERROR MESSAGES
   ======================================== */

.hm-donation-form-wrapper .gfield_error {
    background: rgba(231, 76, 60, 0.05) !important;
    border-left: 4px solid var(--hm-error-color) !important;
    padding: 15px !important;
    border-radius: var(--hm-radius-md) !important;
}

.hm-donation-form-wrapper .validation_message {
    color: var(--hm-error-color) !important;
    font-size: 14px !important;
    margin-top: 8px !important;
}

.hm-donation-form-wrapper .gform_validation_errors {
    background: rgba(231, 76, 60, 0.1) !important;
    color: var(--hm-error-color) !important;
    border-left: 4px solid var(--hm-error-color) !important;
    padding: 15px 20px !important;
    border-radius: var(--hm-radius-md) !important;
    margin-bottom: 20px !important;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .hm-donation-form-container {
        padding: 50px 10px 20px 10px !important;
        /* Increased top padding */
        margin-top: 20px !important;
        width: 95% !important;
        max-width: 95% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Keep Field 8 as 2 columns (it likely has longer text) */
    .hm-donation-form-wrapper [id^="field_"][id$="_8"] .gfield_radio {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* Field 3 (Amounts) - Force 4 columns on mobile as requested */
    .hm-donation-form-wrapper [id^="field_"][id$="_3"] .gfield_radio {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 6px !important;
        /* Tight gap to fit */
    }

    .hm-donation-form-wrapper [id^="field_"][id$="_8"] label {
        padding: 12px 10px !important;
        font-size: 16px !important;
    }

    /* Force Field 3 to be full width and remove container constraints */
    #field_9_3,
    #field_14_3,
    .hm-donation-form-wrapper [id^="field_"][id$="_3"] {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Remove specific padding from the input container and list */
    #field_9_3 .ginput_container,
    #field_14_3 .ginput_container,
    .hm-donation-form-wrapper [id^="field_"][id$="_3"] .ginput_container,
    #field_9_3 .gfield_radio,
    #field_14_3 .gfield_radio,
    .hm-donation-form-wrapper [id^="field_"][id$="_3"] .gfield_radio {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }

    .hm-donation-form-wrapper [id^="field_"][id$="_3"] label {
        padding: 10px 5px !important;
        /* Minimal horizontal padding */
        font-size: 16px !important;
        /* Smaller font */
        min-height: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Adjust Impact Calculator for Mobile */
    .hm-donation-form-wrapper .hm-impact-calculator,
    .hm-donation-form-wrapper .gfield_description.impact-calculator,
    html body #gform_wrapper_2 .hm-impact-calculator,
    html body #gform_wrapper_11 .hm-impact-calculator {
        flex-direction: column !important;
        text-align: center !important;
        gap: 10px !important;
        padding: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .hm-donation-form-wrapper .hm-impact-icon {
        margin-bottom: 5px !important;
    }

    .hm-donation-form-wrapper .hm-message-text,
    .hm-donation-form-wrapper .hm-impact-text {
        font-size: 15px !important;
        text-align: center !important;
    }

    .hm-donation-form-wrapper [id^="field_"][id$="_5"] .ginput_container {
        padding: 20px !important;
        flex-direction: column !important;
        gap: 10px !important;
        text-align: center !important;
    }

    .hm-donation-form-wrapper [id^="field_"][id$="_5"] input {
        font-size: 32px !important;
        text-align: center !important;
    }

    .hm-donation-form-wrapper .gform_button,
    .hm-donation-form-wrapper input[type="submit"] {
        padding: 18px 30px !important;
        font-size: 18px !important;
        width: 100% !important;
        /* Revert to full width on mobile */
    }

    .hm-donation-form-wrapper [id^="field_"][id$="_6"] .gfield_radio,
    .hm-donation-form-wrapper [id^="field_"][id$="_15"] .gfield_radio {
        max-width: 100% !important;
    }
}

@media (max-width: 480px) {

    .hm-donation-form-wrapper [id^="field_"][id$="_8"] label {
        font-size: 16px !important;
        padding: 12px 8px !important;
    }

    /* Ultra compact labels for Field 3 on small screens */
    .hm-donation-form-wrapper [id^="field_"][id$="_3"] label {
        font-size: 16px !important;

        padding: 15px 5px !important;
        min-height: 50px !important;
        width: 75px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        word-break: normal !important;
        white-space: nowrap !important;
    }

    .hm-donation-form-wrapper [id^="field_"][id$="_5"] input {
        font-size: 28px !important;
    }

    .hm-donation-form-wrapper .hm-impact-calculator {
        flex-direction: column !important;
        text-align: center !important;
    }

    .hm-donation-form-wrapper .hm-meal-count {
        font-size: 20px !important;
    }
}

/* ========================================
   FIELD 3 (FORM 3): PRODUCT FIELD BUTTONS
   Professional Gradient Buttons (like Field 8)
   ======================================== */

.hm-donation-form-wrapper [id^="field_3_3"] .gfield_radio {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 15px !important;
    margin-bottom: 25px !important;
}

.hm-donation-form-wrapper [id^="field_3_3"] .gchoice {
    margin: 0 !important;
}

.hm-donation-form-wrapper [id^="field_3_3"] input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.hm-donation-form-wrapper [id^="field_3_3"] label {
    display: block !important;
    padding: 18px 20px !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--hm-text-dark) !important;
    background: white !important;
    border: 3px solid var(--hm-border-color) !important;
    border-radius: var(--hm-radius-md) !important;
    cursor: pointer !important;
    transition: var(--hm-transition) !important;
    box-shadow: var(--hm-shadow-sm) !important;
    text-align: center !important;
    margin: 0 !important;
}

.hm-donation-form-wrapper [id^="field_3_3"] label:hover {
    transform: translateY(-3px) !important;
    box-shadow: var(--hm-shadow-md) !important;
    border-color: var(--hm-accent-color) !important;
}

.hm-donation-form-wrapper [id^="field_3_3"] input[type="radio"]:checked+label {
    background: linear-gradient(135deg, var(--hm-accent-color), var(--hm-accent-hover)) !important;
    border-color: var(--hm-accent-color) !important;
    color: white !important;
    box-shadow: var(--hm-shadow-md) !important;
}

/* Responsive for Field 3 */
@media (max-width: 768px) {
    .hm-donation-form-wrapper [id^="field_3_3"] .gfield_radio {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .hm-donation-form-wrapper [id^="field_3_3"] label {
        padding: 15px 10px !important;
        font-size: 18px !important;
    }
}

@media (max-width: 480px) {
    .hm-donation-form-wrapper [id^="field_3_3"] label {
        font-size: 16px !important;
        padding: 12px 8px !important;
    }
}

/* ========================================
   LOADING STATE
   ======================================== */

.hm-donation-form-wrapper .gform_ajax_spinner {
    display: none !important;
}

.hm-donation-form-wrapper.submitting .gform_button,
.hm-donation-form-wrapper.submitting input[type="submit"] {
    background: var(--hm-text-light) !important;
    cursor: wait !important;
    pointer-events: none !important;
}

.hm-donation-form-wrapper.submitting .gform_button::after,
.hm-donation-form-wrapper.submitting input[type="submit"]::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 20px !important;
    height: 20px !important;
    margin: -10px 0 0 -10px !important;
    border: 3px solid rgba(255, 255, 255, 0.3) !important;
    border-top-color: white !important;
    border-radius: 50% !important;
    animation: spin 0.8s linear infinite !important;
}

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

/* ========================================
      SECURITY INFO MODAL
      ======================================== */

.hm-security-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hm-security-modal.show {
    display: block;
    opacity: 1;
}

.hm-security-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 0;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    z-index: 1000000;
}

.hm-security-modal-header {
    background-color: var(--hm-accent-color);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hm-security-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.hm-security-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hm-security-modal-close:hover {
    opacity: 1;
}

.hm-security-modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

.hm-security-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.hm-security-item:last-child {
    margin-bottom: 0;
}

.hm-security-item i {
    font-size: 1.5rem;
    color: var(--hm-accent-color);
    margin-right: 15px;
    margin-top: 2px;
    flex-shrink: 0;
}

.hm-security-item div {
    flex: 1;
}

.hm-security-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--hm-text-dark);
    font-size: 1.1rem;
}

.hm-security-item p {
    margin: 0;
    color: var(--hm-text-light);
    line-height: 1.5;
}

/* ========================================
   UPSELL BUTTONS - ENSURE CLICKABILITY
   ======================================== */

.hm-upsell-yes-btn,
.hm-upsell-no-btn {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 999999 !important;
}

/* ========================================
   HIDE PREVIOUS BUTTON
   ======================================== */
#gform_wrapper_3 .gform_previous_button {
    display: none !important;
}

/* ========================================
   CUSTOM FIELD WIDTH
   ======================================== */
#field_1_1 {
    width: 30vw !important;
}

/* ========================================
   MOBILE RESPONSIVE - COMPACT FORM
   ======================================== */

@media (max-width: 768px) {

    /* Reduce all field spacing */
    #gform_wrapper_3 .gfield,
    #gform_wrapper_3 .gform_fields .gfield {
        margin-bottom: 10px !important;
    }

    /* Smaller labels */
    #gform_wrapper_3 .gfield_label {
        font-size: 14px !important;
        margin-bottom: 6px !important;
    }

    /* Compact inputs */
    #gform_wrapper_3 input[type="text"],
    #gform_wrapper_3 input[type="email"],
    #gform_wrapper_3 input[type="tel"],
    #gform_wrapper_3 input[type="number"],
    #gform_wrapper_3 select,
    #gform_wrapper_3 textarea {
        padding: 10px 12px !important;
        font-size: 14px !important;
    }

    /* Compact product buttons */
    #gform_wrapper_3 .hm-product-button {
        padding: 12px 16px !important;
        font-size: 16px !important;
        min-height: 50px !important;
    }

    /* Compact toggle switches */
    #gform_wrapper_3 .hm-toggle-switch {
        padding: 8px !important;
    }

    #gform_wrapper_3 .hm-toggle-option {
        padding: 10px 16px !important;
        font-size: 14px !important;
    }

    /* Compact impact calculator */
    #gform_wrapper_3 .hm-impact-calculator {
        margin-top: 10px !important;
        margin-bottom: 10px !important;
        padding: 12px 16px !important;
    }

    /* Smaller buttons */
    #gform_wrapper_3 .gform_button,
    #gform_wrapper_3 .gform_next_button,
    #gform_wrapper_3 .gform_previous_button {
        padding: 12px 24px !important;
        font-size: 14px !important;
    }

    /* Compact footer */
    #gform_wrapper_3 .gform_footer {
        margin-top: 15px !important;
        padding-top: 12px !important;
    }

    /* Full width for name field on mobile */
    #field_1_1 {
        width: 100% !important;
    }
}

@media (max-width: 480px) {

    /* Extra compact for very small screens */
    #gform_wrapper_3 .gfield {
        margin-bottom: 8px !important;
    }

    #gform_wrapper_3 .gfield_label {
        font-size: 13px !important;
    }

    #gform_wrapper_3 input[type="text"],
    #gform_wrapper_3 input[type="email"],
    #gform_wrapper_3 input[type="tel"],
    #gform_wrapper_3 input[type="number"],
    #gform_wrapper_3 select,
    #gform_wrapper_3 textarea {
        padding: 8px 10px !important;
        font-size: 13px !important;
    }

    #gform_wrapper_3 .hm-product-button {
        padding: 10px 12px !important;
        font-size: 14px !important;
        min-height: 45px !important;
    }

    /* FIELD 2_9 LABEL - HEADING STYLE Override hidden_label and apply custom styling========================================*/

    /* First, make the label visible by overriding hidden_label class */
    .hm-donation-form-wrapper #field_2_9.hidden_label .gfield_label,
    .hm-donation-form-wrapper #field_11_9.hidden_label .gfield_label,
    #gform_wrapper_2 #field_2_9.hidden_label .gfield_label,
    #gform_wrapper_11 #field_11_9.hidden_label .gfield_label,
    #field_2_9.hidden_label .gfield_label,
    #field_11_9.hidden_label .gfield_label,
    body #field_2_9.hidden_label label,
    body #field_11_9.hidden_label label,
    #field_9_9.hidden_label .gfield_label,
    #field_14_9.hidden_label .gfield_label {
        visibility: visible !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        clip: auto !important;
        clip-path: none !important;
        display: block !important;
        overflow: visible !important;
        margin: 0 0 1rem 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }

    /* Then apply the custom heading-style formatting */
    .hm-donation-form-wrapper #field_2_9 .gfield_label,
    .hm-donation-form-wrapper #field_11_9 .gfield_label,
    #gform_wrapper_2 #field_2_9 .gfield_label,
    #gform_wrapper_11 #field_11_9 .gfield_label,
    #field_2_9 .gfield_label,
    #field_11_9 .gfield_label,
    body #field_2_9 label.gfield_label,
    body #field_11_9 label.gfield_label,
    #field_9_9 .gfield_label,
    #field_14_9 .gfield_label {
        font-size: 1.75rem !important;
        font-family: poppins, sans-serif !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
        color: #222 !important;
    }

    /* ========================================
   FIELD 2_3 STYLING (Donation Amount)
   Center and set to 100% width on mobile as requested
   ======================================== */
    #field_2_3,
    #field_11_3,
    #field_9_3,
    #field_14_3 {
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        float: none !important;
        clear: both !important;
        display: block !important;
    }

    #field_2_3 .ginput_container_radio,
    #field_11_3 .ginput_container_radio,
    #field_9_3 .ginput_container_radio,
    #field_14_3 .ginput_container_radio {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    /* ========================================
   FIELD 2_9 STYLING (Custom Donation Amount)
   Center in the form
   ======================================== */
    #field_2_9,
    #field_11_9,
    #field_9_9,
    #field_14_9 {
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        float: none !important;
        clear: both !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }

    #field_2_9 .ginput_container,
    #field_11_9 .ginput_container,
    #field_9_9 .ginput_container,
    #field_14_9 .ginput_container {
        margin-left: auto !important;
        margin-right: auto !important;
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
    }

    #field_2_9 .gfield_label,
    #field_11_9 .gfield_label,
    #field_9_9 .gfield_label,
    #field_14_9 .gfield_label {
        text-align: center !important;
        width: 100% !important;
    }

    /* ========================================
   SEPARATOR STYLING (- OR -)
   ======================================== */
    .hm-separator-wrapper {
        display: block !important;
        width: 100% !important;
        clear: both !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }

    .hm-separator {
        text-align: center;
        font-weight: 700;
        color: #666;
        margin: 1.5rem 0;
        font-family: poppins, sans-serif;
        font-size: 1.2rem;
        width: 100%;
        clear: both;
        display: block !important;
    }

    .hm-impact-wrapper {
        display: block !important;
        width: 100% !important;
        clear: both !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }
}

/* ========================================
   FORM 2 SPECIFIC: CENTERING & SIZING
   ======================================== */

/* Center Field 3 (Donation Amount Buttons) */
#field_2_3,
#field_11_3,
#field_9_3,
#field_14_3 {
    float: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    clear: both !important;
}

/* Center Field 12 (Dedication Toggle) */
#field_2_12,
#field_11_12,
#field_9_22,
#field_14_22 {
    float: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    clear: both !important;
}

/* Field 9 (Custom Amount): 40% width and centered (Desktop only) */
@media (min-width: 481px) {

    #field_2_9,
    #field_11_9,
    #field_9_9,
    #field_14_9 {
        float: none !important;
        width: 40% !important;
        min-width: 200px !important;
        /* Prevent it from getting too small on mobile */
        margin-left: auto !important;
        margin-right: auto !important;
        clear: both !important;
    }
}

#field_2_9 .ginput_container,
#field_11_9 .ginput_container,
#field_9_9 .ginput_container,
#field_14_9 .ginput_container {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
}

#field_2_9 input,
#field_11_9 input,
#field_9_9 input,
#field_14_9 input {
    width: 100% !important;
    max-width: none !important;
    /* Override the 300px limit set earlier */
}

#gform_wrapper_9 .gform_page_footer,
#gform_wrapper_14 .gform_page_footer {
    display: flex !important;
    gap: 15px !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: 10px !important;
    /* Reduced from default */
    padding-top: 0 !important;
}

/* ========================================
   FORM 9: COMPACT SPACING (Modal Fit)
   ======================================== */
#gform_wrapper_9 .gform_body,
#gform_wrapper_14 .gform_body {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

#gform_wrapper_9 .gfield,
#gform_wrapper_14 .gfield {
    margin-bottom: 12px !important;
    /* Standard is often ~20-30px */
    padding-bottom: 0 !important;
}

#gform_wrapper_9 .gsection,
#gform_wrapper_14 .gsection {
    margin-bottom: 10px !important;
    border-bottom: none !important;
}

#gform_wrapper_9 .ginput_container,
#gform_wrapper_14 .ginput_container {
    margin-top: 4px !important;
}

/* Compact Headings */
#gform_wrapper_9 h3.gform_title,
#gform_wrapper_14 h3.gform_title {
    margin-bottom: 10px !important;
    margin-top: 5px !important;
}

/* Specific fields if needed */
#field_9_6 .gfield_radio,
#field_14_6 .gfield_radio {
    gap: 5px !important;
    /* Tighter radio options */
}


#gform_wrapper_9 .gform_previous_button,
#gform_wrapper_14 .gform_previous_button {
    display: inline-block !important;
    width: 60px !important;
    min-width: 60px !important;
    height: 52px !important;
    flex: 0 0 60px !important;
    color: transparent !important;
    /* Hide text initially (prevents "Previous" flash) */
    font-size: 24px !important;
    line-height: normal !important;
    position: relative !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    z-index: 10 !important;
    cursor: pointer !important;

    background-color: var(--hm-accent-color, #F36F28) !important;
    background: linear-gradient(135deg, var(--hm-accent-color, #F36F28), var(--hm-accent-color, #d65a1c)) !important;

    /* Reset hacks */
    text-indent: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

#gform_wrapper_9 .gform_previous_button.hm-arrow-visible,
#gform_wrapper_14 .gform_previous_button.hm-arrow-visible {
    color: #fff !important;
}

/* FOUC Prevention removed - footer visibility now handled by forced visibility rules below */

/* Hide previous button when upsell is active */
#gform_wrapper_9.hm-upsell-active .gform_previous_button,
#gform_wrapper_14.hm-upsell-active .gform_previous_button {
    display: none !important;
}

/* Hide footer only when upsell is actually active (Page 2 with qualifying conditions) */
/* JavaScript will add .hm-upsell-active class when showing the upsell */
#gform_wrapper_9.hm-upsell-active .gform_page_footer,
#gform_wrapper_14.hm-upsell-active .gform_page_footer {
    display: none !important;
}

/* Re-show footer if JS determines we should skip upsell */
#gform_wrapper_9.hm-no-upsell .gform_page_footer,
#gform_wrapper_14.hm-no-upsell .gform_page_footer {
    display: flex !important;
}

/* Vertically Center Upsell Message (Desktop & Mobile) */
#gform_wrapper_9.hm-upsell-active .gform_body,
#gform_wrapper_14.hm-upsell-active .gform_body {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-height: 60vh !important;
    /* Force height to allow centering */
}

#gform_wrapper_9.hm-upsell-active .gform_fields,
#gform_wrapper_14.hm-upsell-active .gform_fields {
    width: 100% !important;
}

/* Removed ::after pseudo-element */

/* Ensure Next button takes remaining space */
#gform_wrapper_9 .gform_next_button,
#gform_wrapper_14 .gform_next_button {
    width: auto !important;
    flex: 1 !important;
    margin: 0 !important;
}

/* ========================================
   FORM 7: EXIT INTENT ICON
   ======================================== */
.hm-exit-intent-icon {
    text-align: center !important;
    margin-bottom: 30px !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.hm-pulsing-icon {
    font-size: 100px !important;
    line-height: 1 !important;
    animation: hmPulse 2s infinite ease-in-out !important;
    -webkit-animation: hmPulse 2s infinite ease-in-out !important;
    display: inline-block !important;
    padding: 10px !important;
}

@keyframes hmPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

@-webkit-keyframes hmPulse {
    0% {
        -webkit-transform: scale(1);
    }

    50% {
        -webkit-transform: scale(1.15);
    }

    100% {
        -webkit-transform: scale(1);
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.hm-scroll-locked {
    overflow: hidden !important;
    position: relative !important;
    /* Helps with some mobile properties */
    height: 100% !important;
    /* Prevents body scroll on some devices */
}

/* ========================================
   Form 9 Fix: Force Footer & Button Visibility
   ======================================== */
/* Target flexible ID to catch AJAX duplicates */
[id^="gform_wrapper_9"] .gform_footer,
[id^="gform_wrapper_14"] .gform_footer,
[id^="gform_wrapper_9"] .gform_page_footer,
[id^="gform_wrapper_14"] .gform_page_footer,
[id^="gform_wrapper_9"] .gform-footer,
[id^="gform_wrapper_14"] .gform-footer,
[id^="gform_wrapper_9"] .gform-page-footer,
[id^="gform_wrapper_14"] .gform-page-footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    width: auto !important;
    z-index: 99 !important;
    padding-top: 10px !important;
}

[id^="gform_wrapper_9"] .gform_next_button,
[id^="gform_wrapper_14"] .gform_next_button,
[id^="gform_wrapper_9"] .gform_button,
[id^="gform_wrapper_14"] .gform_button {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    width: auto !important;
}