:root {
    --field-height: 60px;
    --field-padding-v: 30px;
    --field-padding-h: 20px;
}

body .gform_wrapper.gravity-theme {
    .gform_required_legend, .gform_validation_errors {
        display: none;
    }
     .gform_fields {
        gap: 20px;
    }
    input::placeholder, textarea::placeholder {
        opacity: 0;
    }
    input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]),
    textarea,
    select {
        color: #fff;
        border-radius: 0;
        font-size: 16px;
        background: var(--fl-global-gray-db);
        border-color: var(--fl-global-gray-db);
        padding: calc(var(--field-padding-v) / 3) var(--field-padding-h) 0;
    }
    select {
        appearance: none; /* Disable unncecessary glossy look'n'feel in macOS */
        padding: calc(var(--field-padding-v) / 3) var(--field-height) 0 var(--field-padding-h);
    }
    input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]),
    select {
        height: var(--field-height);
    }
    textarea {
        padding: var(--field-padding-v) var(--field-padding-h);
    }
    input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):focus,
    input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):active,
    textarea:focus, textarea:focus-visible, textarea:active,
    select:focus, select:active {
        border-color: var(--fl-global-gray-db);
        box-shadow: 1px 0 2px var(--fl-global-violet-ll),
        0 1px 2px var(--fl-global-violet-ll),
        -1px 0 2px var(--fl-global-violet-ll),
        0 -1px 2px var(--fl-global-violet-ll);
    }

    .gfield {
        position: relative;

        /* Label as placeholder, shifting above when focused */
        .gfield_label {
            margin: 0;
            z-index: 10;
            font-size: 90%;
            font-weight: 1000;
            position: absolute;
            pointer-events: none;
            letter-spacing: 0.02em;
            text-transform: uppercase;
            transform: translateY(-50%);
            top: var(--field-padding-v);
            left: var(--field-padding-h);
            color: var(--fl-global-grey-0);
            transition: top 200ms, font-size 200ms;

            > .gfield_required, > .gfield_required * {
                color: inherit;
                font-size: 100%;
            }
        }
        &:not(.gfield--label-top):not(.gfield--type-repeater):not(.gfield--type-fileupload):has(
            input:not([type=checkbox]):not([type=radio]):is(:active, :focus, :focus-visible, :not(:placeholder-shown)),
            textarea:active, textarea:focus, textarea:focus-visible,
            select, select:active, select:focus
        ) .gfield_label {
            font-size: 60%;
            top: calc(var(--field-padding-v) / 2);
        }
    }

    .ginput_container_select {
        position: relative;

        &:after {
             top: 1px;
             z-index: 2;
             right: 1px;
             content: '';
             bottom: 1px;
             position: absolute;
             pointer-events: none;
             width: var(--field-height);
             background: no-repeat 50% 50% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 8' width='14' height='8'%3E%3Cpath d='M7 8c-.27 0-.52-.11-.71-.29l-6-6C-.1 1.32-.1.68.29.29s1.03-.39 1.42 0L7 5.58 12.29.29c.39-.39 1.02-.39 1.41 0s.39 1.02 0 1.41l-6 6c-.19.19-.44.29-.71.29Z' fill='%23fff'/%3E%3C/svg%3E");
         }
    }

    .gform_footer {
        padding: 0;
        margin-top: 2vw;
        position: relative;
        justify-content: flex-end;

        .gform_button {
            border: 0;
            position: relative;
            min-height: 60px;
            padding: 10px 20px;
            border-radius: 50px;
            margin-bottom: 0 !important;
            background: var(--fl-global-violet);
            font: 300 var(--cta-button-l) / 1 AtypDisplay;

            &:hover {
                 background: var(--fl-global-violet-ll);
             }

            /*Custom spinner*/
            &:before {
                inset: 0;
                opacity: 0;
                content: '';
                z-index: 10;
                margin: auto;
                aspect-ratio: 1;
                position: absolute;
                pointer-events: none;
                height: calc(60px / 1.5);
                transition: opacity 200ms;
                /*animation: spinner 3s linear infinite;*/
                background: no-repeat 50% 50% / contain url("/wp-content/uploads/2024/10/logo.svg");
            }
            span {
                transition: opacity 400ms;
            }
        }
        &:has(.gform_ajax_spinner) .gform_button {
            &:before {
                opacity: 0.8;
            }
            span {
                opacity: 0;
            }
        }
    }
    .gfield_validation_message, .validation_message {
        border: 0;
        padding: 0;
        width: auto;
        line-height: 1;
        background: none;
        margin: 5px var(--field-padding-h) 0;
    }
    .gfield_error [aria-invalid="true"] {
        border-color: red !important;
    }
}


/*Subscribe*/
#gform_wrapper_3.gravity-theme .gform_footer {
    margin-top: 1.5vw;
}

.gform_ajax_spinner {
    display: none;
}