/* ============================================
   CSS VARIABLES
   ============================================ */

.gform-theme--api,
.gform-theme--foundation {
    --gf-form-gap: 25px;
    --gf-field-gap: 12px;
    --gf-font-size-primary: 16px;
    --gf-label-width: 30%;
    --gf-label-req-gap: 6px;
    --gf-form-footer-margin-y-start: 24px;
    --gf-form-footer-gap: 8px;
    --gf-field-date-width: 168px;
    --gf-field-time-width: 110px;
    --gf-field-list-btns-gap: 8px;
    --gf-field-list-btns-width: calc(32px + var(--gf-field-list-btns-gap) + var(--gf-field-gap));
    --gf-field-pg-steps-gap: 8px 24px;
}


/* ============================================
   GLOBAL FORM ELEMENTS
   ============================================ */

body .gform_wrapper .gform_validation_container {
    display: none;
}

.gform_required_legend {
    display: none;
}

.gform-theme p {
    margin: 0;
}

.gform-theme br {
    display: none;
}


/* ============================================
   FORM INPUTS (text, select, textarea)
   ============================================ */

input,
select,
textarea {
    background: #fff;
    border: 1px solid var(--wp--preset--color--black);
    border-radius: var(--wp--custom--border--radius--small);
    color: var(--wp--preset--color--black);
    font-size: var(--wp--preset--font-size--normal);
    line-height: var(--wp--custom--line-height--medium);
    padding: 12px;
    width: 100%;
    height: auto;
    min-height: 52px;
    margin: 10px 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus,
select:focus,
textarea:focus,
input:not(.image-comparison__range):hover,
select:hover,
textarea:hover {
    background-color: var(--wp--preset--color--senary);
    color: #000;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
    outline: 1px dashed #fdc41f;
    outline-offset: 2px;
}

::placeholder {
    color: #000;
}

input:focus::placeholder,
select:focus::placeholder,
textarea:focus::placeholder,
input:hover::placeholder,
select:hover::placeholder,
textarea:hover::placeholder {
    color: #000;
}


/* ============================================
   CHECKBOXES & RADIO BUTTONS
   ============================================ */

input[type="checkbox"],
input[type="radio"] {
    width: 25px;
    height: 25px;
    min-height: 100%;
    cursor: pointer;
    margin: 0;
}

.gchoice {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gchoice input {
    order: 1;
    width: 20px;
    height: 20px;
    min-height: auto;
    margin: 10px;
}

.gchoice label {
    order: 2;
}

.gfield_checkbox,
.gfield_radio {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 20px;
}

.gfield_checkbox > .gchoice {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    background: #ffffff29;
    border-radius: var(--wp--custom--border--radius--medium);
    transition: all 0.25s 
cubic-bezier(0.4, 0, 0.2, 1);
}

.gfield_radio .gchoice {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    background: #ffffff29;
    border-radius: var(--wp--custom--border--radius--medium);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.gfield_radio .gchoice label,.gfield_checkbox .gchoice label {
    flex: 1;
    cursor: pointer;
    padding: 10px;
}

.gfield_radio .gchoice input {
    margin: 10px;
}

.gfield_radio .gchoice:hover {
    background: #ffffff4f;
}

.gfield_radio .gchoice.selected {
    background: var(--wp--preset--color--quaternary);
}


/* ============================================
   SELECT DROPDOWNS
   ============================================ */

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #fff url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="white" d="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"/></svg>') no-repeat 98% 14px;
    background-size: 20px;
}

select:hover {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"/></svg>');
}


/* ============================================
   TEXTAREA
   ============================================ */

textarea {
    width: 100%;
    resize: vertical;
}

textarea.small {
    height: 150px;
}

textarea.medium {
    height: 250px;
}

textarea.large {
    height: 350px;
}


/* ============================================
   LABELS & DESCRIPTIONS
   ============================================ */

.gfield_label.gform-field-label {
    font-weight: 700;
}

.gfield_description {
    color: var(--gf-color-out-ctrl-dark-lighter);
}

.gsection_title {
    border-bottom: 1px solid #00000012;
    padding-bottom: var(--wp--custom--layout--small-padding);
    color: var(--wp--preset--color--primary);
    font-size: var(--wp--preset--font-size--large);
}


/* ============================================
   FORM LAYOUT (Foundation Theme)
   ============================================ */

.gform-theme--foundation .gform_fields {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-gap: var(--gf-form-gap) 0;
    width: 100%;
}

.gform-theme--foundation .gfield {
    grid-column: 1 / -1;
    min-width: 0;
}

.gform-theme--foundation fieldset {
    border: none;
    display: block;
    margin: 0;
    padding: 0;
}

.gform-theme--foundation .gform_footer,
.gform-theme--foundation .gform_page_footer {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gf-form-footer-gap);
    margin-top: var(--gf-form-footer-margin-y-start);
}


/* ============================================
   BUTTONS
   ============================================ */

form button,
.has-background .gform-theme-button {
    background-color: var(--wp--preset--color--quinary);
    color: var(--wp--preset--color--primary);
}


/* ============================================
   VALIDATION & CONFIRMATION MESSAGES
   ============================================ */

.gform_confirmation_message {
    text-align: center;
    margin: auto;
    max-width: var(--wp--custom--layout--small-content);
    background: var(--wp--preset--color--quaternary);
    color: var(--wp--preset--color--white);
    border-radius: var(--wp--custom--border--radius--medium);
    padding: var(--wp--preset--spacing--medium);
}

.gform_validation_errors>* {font-size:16px;margin: 0;}

.gform_validation_errors {
    background: #c30000;
    color: #FFF;
    padding: var(--wp--preset--spacing--medium);
    margin-bottom: var(--wp--preset--spacing--medium);
    border-radius: var(--wp--custom--border--radius--medium);
}

.gform_validation_errors>ol li {
    font-size: 16px;
    margin: 25px 0 0 0;
}

.gform_validation_errors > ol li a {color:#FFF;}

.validation_message {
    font-size: 16px;
    font-weight: 600;
    border: 2px solid black;
    background: #FFF;
    padding: var(--wp--preset--spacing--small);
    border-radius: var(--wp--custom--border--radius--medium);
}

/* ============================================
   HIDDEN LABELS & SCREEN READER TEXT
   ============================================ */

.gform-theme--foundation .hidden_label .gfield_label,
.gform-theme--foundation .hidden_sub_label,
.gform-theme--foundation .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    border: 0;
}


/* ============================================
   IMAGE CHOICE FIELDS
   ============================================ */

.ginput_container_image_choice .gfield_radio {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.ginput_container_image_choice .gfield_radio > div {
    flex: 1 1 150px;
    text-align: center;
    background: #ffffff21;
    border: 1px dashed #fff;
    padding: var(--wp--custom--layout--small-padding);
    border-radius: var(--wp--custom--border-radius--medium);
    cursor: pointer;
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ginput_container_image_choice .gfield_radio > div input {
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
}

.gform-theme--framework .ginput_container_image_choice .gfield_radio > div img {
    margin: auto;
    max-width: 90px;
    width: 100%;
    height: 90px;
    object-fit: none;
}

.gform-theme--framework .ginput_container_image_choice .gfield_radio > .gchoice.selected,
.gform-theme--framework .ginput_container_image_choice .gfield_radio > .gchoice:hover {
    background: #fff;
}


/* ============================================
   CONSENT FIELDS
   ============================================ */

.ginput_container_consent {
    display: flex;
    gap: 15px;
    color: inherit;
}


/* ============================================
   MULTI-PAGE PROGRESS STEPS
   ============================================ */

.gf_page_steps {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-bottom: var(--wp--preset--spacing--large);
}

.gf_page_steps::after {
    content: '';
    position: absolute;
    top: calc(50% - 15px);
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--wp--custom--color--neutral--200);
}

.gf_step {
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 10px;
}

.gf_step_label {
    font-weight: 600;
    font-size: 16px;
}

.gf_step_number {
    font-size: 22px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    color: #ffffff;
    background: var(--wp--preset--color--primary);
    border: 10px solid transparent;
    box-shadow: inset 0 0 0 3px #ffffff;
    border-radius: 50%;
    z-index: 25;
}

.gf_step_active .gf_step_number {
    background: var(--wp--preset--color--quinary);
    color: var(--wp--preset--color--primary);
    box-shadow: inset 0 0 0 3px var(--wp--preset--color--primary);
}

.gf_step_active .gf_step_label {
    color: var(--wp--preset--color--primary);
}


/* ============================================
   RESPONSIVE GRID (min-width: 640px)
   ============================================ */

@media (min-width: 640px) {
    .gform-theme--foundation .gform_fields {
        column-gap: var(--gf-form-gap);
    }

    .gform-theme--foundation .gfield--width-full {
        grid-column: span 12;
    }

    .gform-theme--foundation .gfield--width-eleven-twelfths {
        grid-column: span 11;
    }

    .gform-theme--foundation .gfield--width-five-sixths {
        grid-column: span 10;
    }

    .gform-theme--foundation .gfield--width-three-quarter {
        grid-column: span 9;
    }

    .gform-theme--foundation .gfield--width-two-thirds {
        grid-column: span 8;
    }

    .gform-theme--foundation .gfield--width-seven-twelfths {
        grid-column: span 7;
    }

    .gform-theme--foundation .gfield--width-half {
        grid-column: span 6;
    }

    .gform-theme--foundation .gfield--width-five-twelfths {
        grid-column: span 5;
    }

    .gform-theme--foundation .gfield--width-third {
        grid-column: span 4;
    }

    .gform-theme--foundation .gfield--width-quarter {
        grid-column: span 3;
    }

    .gform-theme--foundation .gfield--width-one-sixth {
        grid-column: span 2;
    }

    .gform-theme--foundation .gfield--width-one-twelfth {
        grid-column: span 1;
    }

    .gform-theme--foundation .left_label .gfield > .ginput_container,
    .gform-theme--foundation .right_label .gfield > .ginput_container {
        float: right;
        width: calc(100% - var(--gf-label-width));
    }
}