/* Custom Colours (for section styles) */
:root {
    --theme--main: var(--wp--preset--color--primary);
    --theme--accent: var(--wp--preset--color--accent);
    --theme--main-alt: var(--wp--preset--color--mid-orange);
    --theme--accent-alt: var(--wp--preset--color--mid-grey);
    --theme--light: var(--wp--preset--color--base);
    --theme--dark: var(--wp--preset--color--contrast);
    --theme--grey: var(--wp--preset--color--white-grey);
    --theme--error: var(--wp--preset--color--primary);
}

/*  Overrides */
.gform-theme--api,
.gform-theme--framework {
    --theme--gf-progressbar-colour: var(--theme--main) !important;
    --gf-field-pg-prog-bar-bg-color-blue: var(--theme--gf-progressbar-colour) !important;
    --gf-color-in-ctrl-contrast: var(--theme--dark) !important;
    --gf-ctrl-btn-bg-color-primary: var(--theme--main) !important;
    --gf-ctrl-btn-bg-color-hover-primary: var(--theme--dark) !important;
    --gf-ctrl-btn-color-primary: var(--theme--dark);
    --gf-ctrl-btn-color-hover-primary: var(--theme--light) !important;
    --gf-ctrl-border-color: var(--theme--dark) !important;
    --gf-ctrl-bg-color: transparent !important;
    --gf-color-danger: var(--theme--error) !important;
    --gf-ctrl-color-focus: var(--theme--accent-alt) !important;
    --gf-ctrl-border-color-focus: var(--theme--main-alt) !important;
    --gf-ctrl-btn-border-color-focus-primary: var(--theme--main) !important;
    --gf-ctrl-label-color-primary: var(--theme--dark) !important;
    --gf-ctrl-label-color-secondary: var(--theme--dark) !important;
    --gf-form-validation-border-color: rgba(var(--gf-color-danger-rgb), 0.75);
    --gf-ctrl-choice-check-color: var(--theme--main) !important;
    --gf-radius: 50px;
    --gf-local-radius: 3.125rem !important;
    --gf-ctrl-radius: 3.125rem !important;
    --gf-ctrl-textarea-radius: 1.1875rem !important;
    --gf-font-size-secondary: 12.8px;
    --gf-font-size-tertiary: 12.8px;
    --gf-form-gap-x: 0.5rem !important;
    --gf-form-gap-y: 1.5rem !important;
    --gf-padding-x: 0.875rem !important;
    --gf-padding-y: 0.75rem !important;
}

/* Default style */
.gform_wrapper.gform-theme {
    .gform_body .gform_fields .gfield {
        :is(input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=password], select, textarea):focus {
            border: 1px solid var(--gf-ctrl-border-color-focus) !important;
            box-shadow: 0 0.25em 0.75em 0 rgba(0, 0, 0, 0.05) !important;
            color: var(--theme--dark) !important;
        }
    }

    input[type=button]:focus,
    input[type=submit]:focus {
        border: 1px solid var(--gf-ctrl-btn-border-color-focus-primary) !important;
        box-shadow: 0 0.25em 0.75em 0 rgba(0, 0, 0, 0.05) !important;
    }

    .gf_progressbar .gf_progressbar_percentage {
        background-color: var(--theme--gf-progressbar-colour) !important;
    }

    .gfield_required {
        color: var(--theme--error);
        display: inline-block;
        font-size: 0.85em;
        padding-left: 0.25em;
    }

    .gfield_validation_message {
        font-style: italic;
    }
}

/* Section Teal form styles */
.is-style-section-teal .gform_wrapper.gform-theme {
    --theme--main: var(--wp--preset--color--primary);
    --theme--main-alt: var(--wp--preset--color--accent);
    --theme--light: var(--wp--preset--color--contrast);
    --theme--dark: var(--wp--preset--color--base);
    --theme--error: var(--wp--preset--color--mid-orange);
    --gf-ctrl-btn-bg-color-primary: transparent !important;
    --gf-ctrl-btn-bg-color-hover-primary: var(--theme--main-alt) !important;
    --gf-ctrl-btn-border-color-primary: var(--theme--dark);
    --gf-ctrl-btn-border-color-hover-primary: var(--theme--main-alt) !important;
    --gf-ctrl-btn-color-hover-primary: var(--theme--light) !important;
    --gf-ctrl-border-color-error: var(--theme--error) !important;
    --gf-ctrl-color-focus: var(--theme--main-alt) !important;
    --gf-ctrl-border-color-focus: var(--theme--main-alt) !important;
    --gf-ctrl-label-color-primary: var(--theme--dark) !important;
    --gf-ctrl-label-color-secondary: var(--theme--dark) !important;
    --gf-form-validation-border-color: rgba(var(--gf-color-danger-rgb), 0.75);
    --gf-ctrl-choice-check-color: var(--theme--main-alt);
}

/* Section Black form styles */
.is-style-section-black .gform_wrapper.gform-theme {
    --theme--main: var(--wp--preset--color--primary);
    --theme--main-alt: var(--wp--preset--color--mid-orange);
    --theme--light: var(--wp--preset--color--contrast);
    --theme--dark: var(--wp--preset--color--base);
    --theme--error: var(--wp--preset--color--primary);
    --gf-ctrl-btn-bg-color-primary: var(--theme--main) !important;
    --gf-ctrl-btn-bg-color-hover-primary: var(--theme--accent) !important;
    --gf-ctrl-btn-border-color-primary: var(--theme--light);
    --gf-ctrl-btn-border-color-hover-primary: var(--theme--light) !important;
    --gf-ctrl-btn-color-hover-primary: var(--theme--light) !important;
    --gf-ctrl-border-color-error: var(--theme--error) !important;
    --gf-ctrl-color-focus: var(--theme--main-alt) !important;
    --gf-ctrl-border-color-focus: var(--theme--main) !important;
    --gf-ctrl-label-color-primary: var(--theme--dark) !important;
    --gf-ctrl-label-color-secondary: var(--theme--dark) !important;
    --gf-form-validation-border-color: rgba(var(--gf-color-danger-rgb), 0.75);
    --gf-ctrl-choice-check-color: var(--theme--main-alt);
}

/* Section Plum form styles */
.is-style-section-plum .gform_wrapper.gform-theme {
    --theme--main: var(--wp--preset--color--primary);
    --theme--main-alt: var(--wp--preset--color--mid-orange);
    --theme--light: var(--wp--preset--color--contrast);
    --theme--dark: var(--wp--preset--color--base);
    --theme--error: var(--wp--preset--color--primary);
    --gf-ctrl-btn-bg-color-primary: var(--theme--main) !important;
    --gf-ctrl-btn-bg-color-hover-primary: var(--theme--accent) !important;
    --gf-ctrl-btn-border-color-primary: var(--theme--light);
    --gf-ctrl-btn-border-color-hover-primary: var(--theme--light) !important;
    --gf-ctrl-btn-color-hover-primary: var(--theme--light) !important;
    --gf-ctrl-border-color-error: var(--theme--error) !important;
    --gf-ctrl-color-focus: var(--theme--main-alt) !important;
    --gf-ctrl-border-color-focus: var(--theme--main) !important;
    --gf-ctrl-label-color-primary: var(--theme--dark) !important;
    --gf-ctrl-label-color-secondary: var(--theme--dark) !important;
    --gf-form-validation-border-color: rgba(var(--gf-color-danger-rgb), 0.75);
    --gf-ctrl-choice-check-color: var(--theme--main-alt);
}
