/**
 * Gadby Gravity Forms Enhancements
 *
 * Usage: add the class "gadby-round-submit" in one of:
 *   - Form Settings → CSS Class Name  (applies to the form wrapper;
 *     the submit button inside gets styled automatically)
 *   - Directly on the submit button (if your GF version exposes that field)
 *
 * Optional size modifiers:  gadby-round-submit-small | gadby-round-submit-large
 * Optional colour modifier: gadby-round-submit-teal  (teal instead of navy)
 * Add these alongside gadby-round-submit in the same class field, e.g.
 *   "gadby-round-submit gadby-round-submit-large gadby-round-submit-teal"
 *
 * Note: <input type="submit"> renders its value on a single line in all
 * browsers. For multi-line button text (e.g. "CONTACT / US"), configure the
 * form to output a <button> element, or keep the label short.
 */

:is(
    input[type="submit"].gadby-round-submit,
    button.gadby-round-submit,
    .gadby-round-submit :is(input[type="submit"], button[type="submit"])
) {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 160px !important;
    height: 160px !important;
    min-width: 0 !important;
    max-width: none !important;
    aspect-ratio: 1 / 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 50% !important;
    background-color: #1a2b4a !important;
    color: #ffffff !important;
    font-family: var(--font-heading, 'Auguste Sans', serif) !important;
    font-weight: 600 !important;
    font-size: 1.4rem !important;
    line-height: 1.2 !important;
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
    white-space: normal;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
}

:is(
    input[type="submit"].gadby-round-submit:hover,
    button.gadby-round-submit:hover,
    .gadby-round-submit :is(input[type="submit"], button[type="submit"]):hover
) {
    transform: scale(1.05);
    opacity: 0.9;
}

:is(
    input[type="submit"].gadby-round-submit:active,
    button.gadby-round-submit:active,
    .gadby-round-submit :is(input[type="submit"], button[type="submit"]):active
) {
    transform: scale(0.98);
}

:is(
    input[type="submit"].gadby-round-submit:focus-visible,
    button.gadby-round-submit:focus-visible,
    .gadby-round-submit :is(input[type="submit"], button[type="submit"]):focus-visible
) {
    outline: 2px solid #5FBCC9;
    outline-offset: 4px;
}

:is(
    input[type="submit"].gadby-round-submit.gadby-round-submit-small,
    button.gadby-round-submit.gadby-round-submit-small,
    .gadby-round-submit.gadby-round-submit-small :is(input[type="submit"], button[type="submit"])
) {
    width: 120px !important;
    height: 120px !important;
    font-size: 1.125rem !important;
    letter-spacing: 0.15em !important;
}

:is(
    input[type="submit"].gadby-round-submit.gadby-round-submit-large,
    button.gadby-round-submit.gadby-round-submit-large,
    .gadby-round-submit.gadby-round-submit-large :is(input[type="submit"], button[type="submit"])
) {
    width: 200px !important;
    height: 200px !important;
    font-size: 1.5rem !important;
}

:is(
    input[type="submit"].gadby-round-submit.gadby-round-submit-teal,
    button.gadby-round-submit.gadby-round-submit-teal,
    .gadby-round-submit.gadby-round-submit-teal :is(input[type="submit"], button[type="submit"])
) {
    background-color: #5FBCC9 !important;
}

/* When the class is on the form wrapper, remove GF's default footer
   spacing so the round button sits naturally where the submit would have been. */
.gform_wrapper.gadby-round-submit .gform_footer {
    display: flex;
    justify-content: flex-start;
    padding: 0;
}

@media (max-width: 768px) {
    :is(
        input[type="submit"].gadby-round-submit,
        button.gadby-round-submit,
        .gadby-round-submit :is(input[type="submit"], button[type="submit"])
    ) {
        width: 130px !important;
        height: 130px !important;
        font-size: 1.1rem !important;
    }

    :is(
        input[type="submit"].gadby-round-submit.gadby-round-submit-small,
        button.gadby-round-submit.gadby-round-submit-small,
        .gadby-round-submit.gadby-round-submit-small :is(input[type="submit"], button[type="submit"])
    ) {
        width: 100px !important;
        height: 100px !important;
        font-size: 0.9rem !important;
    }

    :is(
        input[type="submit"].gadby-round-submit.gadby-round-submit-large,
        button.gadby-round-submit.gadby-round-submit-large,
        .gadby-round-submit.gadby-round-submit-large :is(input[type="submit"], button[type="submit"])
    ) {
        width: 160px !important;
        height: 160px !important;
        font-size: 1.25rem !important;
    }
}
