/* MAIN STYLES */
.gform_wrapper.gravity-theme {
    --field_background: white;
    --field_border: none;
    --field_color: black;
    --field_font_size: 20px;
    --field_font_weight: 400;
    --field_line_height: 1;
    --field_border_radius: 30px;
    --field_padding_x: 24px;
    --field_padding_y: 13px;

    --label_color: black;
    --label_font_size: 20px;
    --label_line_height: 1;
    --label_font_weight: 400;
    --label_active_size: 12px;

    --choice_label_color: black;
    --choice_label_font_size: 20px;
    --choice_label_line_height: 1;
    --choice_label_font_weight: 400;

    --submit_background: black;
    --submit_border: none;
    --submit_color: white;
    --submit_hover_background: white;
    --submit_hover_color: black;

    --focus_border: 1px dotted;

    --column-gap: 12px;
    --row-gap: 20px;
}

/* Gravity Forms styling to make the labels display in the placeholder position then float up when the field is selected or has a value. */
.gform_wrapper.gravity-theme :is(.gfield, .ginput_complex>span) {
    position: relative;
}

/* Hide placeholders to prevent them displaying behind the labels */
.gform_wrapper.gravity-theme ::placeholder {
    color: transparent;
}

/* INPUTS */
.gform_wrapper.gravity-theme :is(textarea, select, button, input:not([type="radio"], [type="checkbox"])) {
    background-color: var(--field_background);
    color: var(--field_color);
    border: var(--field_border);
    border-radius: var(--field_border_radius);
    font-size: var(--field_font_size);
    font-weight: var(--field_font_weight);
    line-height: var(--field_line_height);
    height: auto;
    padding: var(--field_padding_y) var(--field_padding_x);
    transition: 0.3s;
}

@media only screen and (max-width: 641px) {
    .gform_wrapper.gravity-theme input:not([type=radio]):not([type=checkbox]):not([type=image]):not([type=file]) {
        line-height: var(--field_line_height);
        min-height: 0;
    }
}

/* Fix select line height */
.gform_wrapper.gravity-theme select.gfield_select {
    line-height: calc(var(--field_line_height) * 1.2);
    height: auto;
}

/* INPUT Active states */
.gform_wrapper.gravity-theme :is(.is-selected, .has-value) :is(textarea, select, button, input:not([type="radio"], [type="checkbox"])),
.gform_wrapper.gravity-theme select {
    padding-top: calc(var(--field_padding_y) * 1.5);
    padding-bottom: calc(var(--field_padding_y) / 2);
}

/* INPUT FOCUS */
.gform_wrapper.gravity-theme :is(input, textarea, select, button):focus {
    outline: var(--focus_border);
}

/* LABELS */
.gform_wrapper.gform_wrapper.gravity-theme label:not(.gform-field-label--type-inline) {
    color: var(--label_color);
    font-size: var(--field_font_size);
    font-weight: var(--label_font_weight);
    line-height: var(--label_line_height);
    position: absolute;
    top: calc(var(--field_padding_y) + var(--label_font_size) * .1);
    left: var(--field_padding_x);
    transition: 0.3s;
    pointer-events: none;
    margin: 0;
    padding: 0;
}

/* Hide labels on complex fields */
.gform_wrapper.gravity-theme legend.gfield_label {
    display: none;
}

/* LABELS Active states */
.gform_wrapper.gravity-theme :is(.is-selected, .has-value) label:not(.gform-field-label--type-inline) {
    top: calc(var(--field_padding_y) / 2);
    left: var(--field_padding_x);
    font-size: var(--label_active_size);
}

/* Fix the label position for complex fields. */
.gform_wrapper.gravity-theme .ginput_complex.gform-grid-row,
.gform_wrapper.gravity-theme .ginput_complex .gform-grid-col {
    column-gap: var(--column-gap);
    margin-inline: 0;
    padding-inline: 0;
}

.gform_wrapper.gravity-theme .ginput_complex:not(.ginput_container_address) fieldset:not([style*="display:none"]):not(.ginput_full),
.gform_wrapper.gravity-theme .ginput_complex:not(.ginput_container_address) span:not([style*="display:none"]):not(.ginput_full) {
    padding-right: 0;
}

.gform_wrapper.gravity-theme .ginput_complex:not(.ginput_container_address) fieldset:not([style*="display:none"]):not(.ginput_full)~span:not(.ginput_full),
.gform_wrapper.gravity-theme .ginput_complex:not(.ginput_container_address) span:not([style*="display:none"]):not(.ginput_full)~span:not(.ginput_full) {
    padding-left: 0;
}

/* Checkboxes and Radio Buttons */
.gform_wrapper.gravity-theme input:is([type="checkbox"], [type="radio"]) {
    background-color: var(--field_background);
    appearance: none;
    border: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--field_font_size);
    line-height: var(--field_line_height);
    font-weight: var(--field_font_weight);
    width: 32px;
    height: 32px;
    margin-right: var(--column-gap);
}

.gform_wrapper.gravity-theme input:is([type="checkbox"], [type="radio"])::before {
    content: ' ';
    color: var(--field_color);
}

.gform_wrapper.gravity-theme input:is([type="checkbox"]):checked::before {
    content: '✓';
}

.gform_wrapper.gravity-theme input:is([type="radio"]):checked::before {
    content: '●';
}

.gform_wrapper.gravity-theme label.gform-field-label--type-inline {
    color: var(--choice_label_color);
    font-size: var(--choice_label_font_size);
    font-weight: var(--choice_label_font_weight);
    line-height: var(--choice_label_line_height);
}

/* SUBMIT */
.gform_wrapper.gravity-theme input[type="submit"] {
    background-color: var(--submit_background);
    border: var(--submit_border);
    color: var(--submit_color);
    line-height: calc(var(--field_line_height) * 1.2);
}

.gform_wrapper.gravity-theme input[type="submit"]:is(:hover, :focus) {
    background-color: var(--submit_hover_background);
    color: var(--submit_hover_color);
}

/* Field col and row gaps */
.gform_wrapper.gravity-theme .gform_fields,
.gform_wrapper.gravity-theme .ginput_complex {
    column-gap: var(--column-gap);
    row-gap: var(--row-gap);
}

@media (max-width: 640px) {
    .gform_wrapper.gravity-theme .ginput_complex span {
        flex: 0 0 100%;
        margin-bottom: 0;
        padding-left: 0;
    }
}
