/* Gravity Forms Theme Styles - Cleaned & Organized */

/* === Labels === */
.gform_wrapper .gfield_label {
    font-weight: 700;
    color: var(--wp--preset--color--contrast);
    font-size: 13px;
    font-style: normal;
    line-height: 130%;
    letter-spacing: 0.52px;
    text-transform: uppercase;
}
footer .gform_wrapper .gfield_label{
    font-weight: 600;
    color: var(--wp--preset--color--white);
    font-size: 15px;
    line-height: 24px;
    letter-spacing: 0.52px;
    text-transform: uppercase;
}
footer .gform_wrapper .gfield_label{
    display: none;
}
footer .gform_wrapper .ginput_container{
    margin-top: 12px;
    margin-bottom: 16px;
}
/* === Input Containers === */
.ginput_container {
    margin-top: 12px;
    margin-bottom: 32px;
    position: relative;
}

/* === Inputs, Selects, Textareas === */
.gform_wrapper input,
.gform_wrapper input[type="email"],
.gform_wrapper select,
.gform_wrapper textarea {
    width: 100%;
    font-family: inherit;
    box-sizing: border-box;
    padding: 20px;
    border: 1px solid var(--wp--preset--color--gray-3);
    background-color: var(--wp--preset--color--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    align-self: stretch;
}

.gform_wrapper select {
    padding-right: 32px;
    background-image: url('data:image/svg+xml;utf8,<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20.1795 9.53055L12.6795 17.0306C12.6098 17.1003 12.5271 17.1556 12.4361 17.1933C12.345 17.2311 12.2474 17.2505 12.1489 17.2505C12.0503 17.2505 11.9527 17.2311 11.8616 17.1933C11.7706 17.1556 11.6879 17.1003 11.6182 17.0306L4.11823 9.53055C3.9775 9.38982 3.89844 9.19895 3.89844 8.99993C3.89844 8.80091 3.9775 8.61003 4.11823 8.4693C4.25896 8.32857 4.44983 8.24951 4.64885 8.24951C4.84788 8.24951 5.03875 8.32857 5.17948 8.4693L12.1489 15.4396L19.1182 8.4693C19.1879 8.39962 19.2706 8.34435 19.3617 8.30663C19.4527 8.26892 19.5503 8.24951 19.6489 8.24951C19.7474 8.24951 19.845 8.26892 19.936 8.30663C20.0271 8.34435 20.1098 8.39962 20.1795 8.4693C20.2492 8.53899 20.3044 8.62171 20.3421 8.71276C20.3799 8.8038 20.3993 8.90138 20.3993 8.99993C20.3993 9.09847 20.3799 9.19606 20.3421 9.2871C20.3044 9.37815 20.2492 9.46087 20.1795 9.53055Z" fill="%234D4D4D"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 25px 24px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.gform_required_legend {
    display: none;
}

/* === Fieldset & Legend === */
.gform_wrapper fieldset {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.gform_wrapper fieldset:not(:has(.ginput_container_consent)),
.gform_wrapper legend:not(:has(.ginput_container_consent)) {
    display: none !important;
}

.gform_wrapper .ginput_container_consent fieldset,
.gform_wrapper .ginput_container_consent legend {
    display: revert !important;
}

/* === Consent & Checkbox Styles === */
.gform_wrapper .ginput_container_consent {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    position: relative;
}

.gform_wrapper .gfield--type-consent .ginput_container_consent {
    margin: 8px 0;
}

.gform_wrapper .ginput_container {
    position: relative;
}

.gform_wrapper input[type="checkbox"] {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 25px;
    height: 24px;
    opacity: 0;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

.gform_wrapper .ginput_container label {
    position: relative;
    padding-left: 36px;
    align-items: center;
    font-weight: 500;
    font-size: 15px;
    z-index: 1;
    margin: 0;
}

.gform_wrapper .ginput_container label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 25px;
    height: 24px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="25" height="24" viewBox="0 0 25 24" fill="none"><path d="M21.8516 4.5V19.5C21.8516 19.8978 21.6935 20.2794 21.4122 20.5607C21.1309 20.842 20.7494 21 20.3516 21H5.35156C4.95374 21 4.57221 20.842 4.2909 20.5607C4.0096 20.2794 3.85156 19.8978 3.85156 19.5V4.5C3.85156 4.10218 4.0096 3.72064 4.2909 3.43934C4.57221 3.15804 4.95374 3 5.35156 3H20.3516C20.7494 3 21.1309 3.15804 21.4122 3.43934C21.6935 3.72064 21.8516 4.10218 21.8516 4.5ZM20.3516 19.5V4.5H5.35156V19.5H20.3516Z" fill="%239A9A9A"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    z-index: 1;
}

.gform_wrapper input[type="checkbox"]:checked+label::before {
    z-index: 2;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M19.5 3C19.8978 3 20.2792 3.15815 20.5605 3.43945C20.8419 3.72076 21 4.10218 21 4.5V19.5C21 19.8978 20.8419 20.2792 20.5605 20.5605C20.2792 20.8419 19.8978 21 19.5 21H4.5C4.10218 21 3.72076 20.8419 3.43945 20.5605C3.15815 20.2792 3 19.8978 3 19.5V4.5C3 4.10218 3.15815 3.72076 3.43945 3.43945C3.72076 3.15815 4.10218 3 4.5 3H19.5ZM15.6035 9.01367C15.5556 9.02325 15.5083 9.03782 15.4629 9.05664C15.372 9.09438 15.2893 9.15007 15.2197 9.21973L10.5 13.9395L8.78125 12.2197C8.71087 12.1493 8.62733 12.094 8.53711 12.0566C8.44705 12.0194 8.34935 12 8.25 12C8.20041 12 8.15144 12.0051 8.10352 12.0146C7.95924 12.0435 7.82529 12.1142 7.71973 12.2197C7.6494 12.2901 7.59397 12.3727 7.55664 12.4629C7.53804 12.5078 7.52425 12.5546 7.51465 12.6025C7.50498 12.6507 7.5 12.7001 7.5 12.75C7.5 12.7999 7.50499 12.8493 7.51465 12.8975C7.52425 12.9454 7.53804 12.9922 7.55664 13.0371C7.59396 13.1273 7.6494 13.2099 7.71973 13.2803L9.96973 15.5303C10.0393 15.5999 10.122 15.6556 10.2129 15.6934C10.2583 15.7122 10.3056 15.7268 10.3535 15.7363C10.4016 15.7459 10.4507 15.751 10.5 15.751C10.5986 15.751 10.697 15.7311 10.7881 15.6934C10.879 15.6556 10.9617 15.5999 11.0312 15.5303L16.2812 10.2803C16.3508 10.2107 16.4057 10.128 16.4434 10.0371C16.4811 9.94606 16.501 9.84856 16.501 9.75C16.501 9.65145 16.4811 9.55393 16.4434 9.46289C16.4057 9.372 16.3508 9.2893 16.2812 9.21973C16.2117 9.1501 16.129 9.09438 16.0381 9.05664C15.947 9.0189 15.8486 8.99902 15.75 8.99902C15.7007 8.99902 15.6516 9.00409 15.6035 9.01367Z" fill="%23222222"/></svg>');
}

/* === Validation Styles === */
.gform_wrapper .gfield_error input,
.gform_wrapper .gfield_error select,
.gform_wrapper .gfield_error textarea,
.gform_wrapper input[aria-invalid="true"],
.gform_wrapper select[aria-invalid="true"],
.gform_wrapper textarea[aria-invalid="true"] {
    border-color: var(--wp--preset--color--red-2) !important;
}

.gform_wrapper .gfield_error .gfield_label,
.gform_wrapper label[for][aria-invalid="true"] {
    color: var(--wp--preset--color--red-2) !important;
}

.gform_wrapper .validation_message,
.gform_wrapper .gfield_validation_message {
    color: var(--wp--preset--color--red-2);
    padding: 8px 20px;
    font-size: 14px;
    margin-top: -32px;
    margin-bottom: 12px;
    font-weight: 500;
    border-radius: 6px;
}

.gform_wrapper .gfield--type-consent .validation_message,
.gform_wrapper .gfield--type-consent .gfield_validation_message {
    margin-top: 0;
    margin-left: 16px;
}

.gform_wrapper .gfield--type-consent .gfield_consent_label a {
    color: var(--wp--preset--color--red-2);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    line-height: 24px;
}

.gform_submission_error {
    margin-top: 0;
    margin-bottom: 16px;
    padding: 16px 24px;
    background-color: var(--wp--preset--color--red-2);
    color: var(--wp--preset--color--white);
    font-size: 15px;
    line-height: 24px;
    font-weight: 500;
    border-radius: 6px;
}

/* === Footer === */
.gform_wrapper .gform_actions_row {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 32px;
}

.gform_wrapper .gform_footer {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 0;
}

.gform_wrapper .gform_footer input[type="submit"] {
    display: flex;
    padding: 14px 40px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: auto;
    margin-top: -56px;
    border-radius: 999px;
    color: var(--wp--preset--color--white);
    font-weight: 600;
    font-size: 15px;
    line-height: 24px;
    text-transform: none !important;
    background: var(--wp--preset--color--gray-4);
    margin-left: auto;
    z-index: 3;
}

footer .gform_wrapper .gform_footer input[type="submit"] {
    margin-left: 0;
    margin-top: 0;
    background: var(--wp--preset--color--green-1);
    border-color: var(--wp--preset--color--green-1);
    color: var(--wp--preset--color--blue-2);
}
footer .gform_wrapper .gform_footer input[type="submit"]:hover {
    background: var(--wp--preset--color--white);
    border-color: var(--wp--preset--color--white);
    color: var(--wp--preset--color--black);
}
.gform_wrapper .gform_footer input[type="submit"]:hover {
    background: var(--wp--preset--color--red-2);
}