/**
 * EMG Gravity Forms Fake Submit Button Styles
 * Hides real submit button and styles fake submit button
 */

/* Hide the real Gravity Forms submit button */
.gform_wrapper input[type="submit"].emg-gf-submit-hidden,
.gform_wrapper button[type="submit"].emg-gf-submit-hidden {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* Ensure fake buttons are always visible, even if they accidentally get hidden class */
.emg-gf-fake-submit-button.emg-gf-submit-hidden {
    position: static !important;
    left: auto !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
    height: auto !important;
    width: auto !important;
    overflow: visible !important;
}

/* Style the fake submit button to match Gravity Forms default styling */
.emg-gf-fake-submit-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    background-color: #0073aa;
    color: #ffffff;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.emg-gf-fake-submit-button:hover {
    background-color: #005a87;
    color: #ffffff;
}

.emg-gf-fake-submit-button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.emg-gf-fake-submit-button:active {
    background-color: #004a6b;
}

/* Error message styling */
.emg-gf-fake-submit-error {
    color: #dc3232;
    padding: 12px 15px;
    margin: 15px 0;
    background: #fff;
    border-left: 4px solid #dc3232;
    border-radius: 2px;
    font-size: 14px;
    line-height: 1.5;
}

/* Ensure fake button appears in the footer area */
.gform_footer .emg-gf-fake-submit-button {
    margin-top: 10px;
}
