/* Base theme variables and resets */
.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;
}

/*Hide Validation*/
body .gform_wrapper .gform_validation_container {display: none;}
.gform_required_legend {display: none;}
.gform-theme p {margin: 0;}
.gform-theme br {display:none;}

/* Form elements base styles */
input, select, textarea {
    background: transparent;
    border: 1px solid var(--wp--preset--color--black);
    color: var(--wp--preset--color--black);
    font-size: var(--wp--preset--font-size--normal);
    border-radius: var(--wp--custom--border-radius--medium);
    line-height: var(--wp--custom--line-height--medium);
    padding: 12px;
    width: 100%;
    min-height: 52px;
    transition: all .15s cubic-bezier(.4, 0, .2, 1);
}


/* Survey */
.gfield_radio .gchoice {display: flex;flex-direction: row-reverse;justify-content: space-between;border-radius: var(--wp--custom--border-radius--medium);align-items: center;transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);}
.gfield_label.gform-field-label {font-weight: bold;}
.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);}
.gfield_checkbox > .gchoice {display: flex;gap: 30px;flex-direction: row-reverse;justify-content: space-between;align-items: center;}
.gfield_checkbox,
.gfield_radio {display:flex;flex-direction: column;gap: 5px;margin-top: 20px;}
.gfield_description {color: var(--gf-color-out-ctrl-dark-lighter);}


/* Placeholder styles */
::placeholder { color: #000; }
.has-background ::placeholder { color: #FFF; }
input:focus::placeholder, select:focus::placeholder, textarea:focus::placeholder,
input:hover::placeholder, select:hover::placeholder, textarea:hover::placeholder {
    color: #000;
}


/* Specific input types */
input[type="checkbox"], input[type="radio"] {
    width: 25px;
    height: 25px;
    min-height: 100%;
    cursor: pointer;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent 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 {resize: vertical;}
textarea.small {height:150px;}

/* Background variants */
.has-background input, .has-background textarea, .has-background select {
    border-color: var(--wp--preset--color--white);
    color: var(--wp--preset--color--white);
}


/* Focus and hover states */
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;
}

/*Checkboxes*/
.gfield_radio .gchoice label {flex: 1;cursor: pointer;padding: 10px;}
.gfield_radio .gchoice {background: var(--wp--preset--color--senary);}
.gfield_radio .gchoice:hover {background: #e9e5fb;}
.gfield_radio .gchoice.selected {background: var(--wp--preset--color--quaternary);}
.gfield_radio .gchoice input {margin: 10px;}

/* Form layout */
.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; }

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

/* Footer */
.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);
}

form button {
    background-color: var(--wp--preset--color--quaternary);
    border: 0;
}

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

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

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

/* Accessibility */
.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 choices */
.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 .25s cubic-bezier(.4, 0, .2, 1);
}

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

/* Coffee */
.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;
}

/* Preserved gform_14 choice styling */
#gform_14 .gchoice:after {
    content: '';
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='15' height='12' viewBox='0 0 15 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.782 11.451c.294.33.72.549 1.146.549.426 0 .851-.183 1.146-.549l7.435-8.305a1.962 1.962 0 0 0 0-2.597c-.655-.732-1.67-.732-2.326 0L5.928 7.573 2.817 4.098c-.655-.732-1.67-.732-2.326 0a1.962 1.962 0 0 0 0 2.597l4.29 4.756z' fill='%23fff'/%3E%3C/svg%3E");
    position: absolute;
    pointer-events: none;
    display: block;
    right: -15px;
    top: -15px;
    width: 40px;
    height: 40px;
    overflow: hidden;
    border-radius: 50%;
    background-color: var(--wp--preset--color--septenary);
    background-position: 50%;
    background-size: 15px;
    background-repeat: no-repeat;
    z-index: 3;
    -webkit-transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform;
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    transform: translate(-50%, 50%) scale(.5);
    opacity: 0;
}

#gform_14 .gchoice.selected:after {
    transform: translate(-50%, 50%);
    opacity: 1;
}

/* Media queries */
@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));
    }
}