/*
 * GD CTA Form widget
 * Depends on gd-colors.css, gd-header.css and gd-button.css.
 *
 * The form inside is the central Elementor Pro form, so its fields and button
 * are styled here through the Elementor Pro class names.
 */

.gd-cta-form {
    position: relative;
    box-sizing: border-box;
    /* The picture may rise above the card; nothing else reaches the edges */
    overflow: visible;
    padding: clamp(1.25rem, 2.4vw, 1.9rem) clamp(1.25rem, 2.4vw, 1.9rem);
    border-radius: 20px;
    background-color: var(--gd-light-grey, #EAECE9);
}

/* Title and text use all the room up to the picture */
.gd-cta-form__content {
    position: relative;
    z-index: 1;
}

/* Leave room for the picture on wide screens */
@media (min-width: 900px) {
    .gd-cta-form {
        padding-right: 16rem;
    }
}

.gd-cta-form .gd-header--h2 {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 700;
}

.gd-cta-form__text {
    margin: 0.4rem 0 1.25rem;
    font-family: "versostest", sans-serif;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #6b7280;
}

.gd-cta-form__text strong {
    color: var(--gd-dark-blueish-grey, #3B4F5B);
}

.gd-cta-form__image {
    position: absolute;
    right: clamp(1rem, 4vw, 3.5rem);
    bottom: 0;
    z-index: 0;
    display: none;
    width: 13rem;
    height: auto;
    pointer-events: none;
}

@media (min-width: 900px) {
    .gd-cta-form__image {
        display: block;
    }
}

.gd-cta-form__privacy {
    margin: 0.9rem 0 0;
    font-family: "versostest", sans-serif;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #6b7280;
}

.gd-cta-form__privacy a {
    color: var(--gd-blue, #6EC1E4);
}

/* ---- The central Elementor Pro form ---- */

/* Keep the field row compact instead of stretching it across the whole card */
.gd-cta-form__form {
    max-width: 52rem;
}

.gd-cta-form__form .elementor-widget-container,
.gd-cta-form__form .e-con,
.gd-cta-form__form .e-con-inner {
    padding: 0;
    margin: 0;
}

/* !important: Elementor generates per-element spacing rules (negative wrapper margin, group padding) that are more specific. */
.gd-cta-form .gd-cta-form__form .elementor-form-fields-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.75rem;
    margin: 0 !important;
    width: 100%;
}

.gd-cta-form .gd-cta-form__form .elementor-form-fields-wrapper > .elementor-field-group {
    flex: 1 1 10rem;
    width: auto;
    max-width: none;
    margin: 0 !important;
    padding: 0 !important;
}

.gd-cta-form .gd-cta-form__form .elementor-form-fields-wrapper > .elementor-field-group.elementor-field-type-submit {
    flex: 0 0 auto;
}

.gd-cta-form .elementor-field-textual {
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 0 1.1rem;
    font-family: "versostest", sans-serif;
    font-size: 1rem;
    color: var(--gd-dark-blueish-grey, #3B4F5B);
    background-color: var(--gd-white, #ffffff);
    border: 1px solid #D9D9D9;
    border-radius: 10px;
}

.gd-cta-form .elementor-field-textual::placeholder {
    color: #9ca3af;
}

.gd-cta-form .elementor-field-textual:focus {
    outline: none;
    border-color: var(--gd-blue, #6EC1E4);
    box-shadow: 0 0 0 3px rgba(110, 193, 228, 0.35);
}

/* Submit: the GD Button look on Elementor's <button> */
.gd-cta-form .elementor-button.gd-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 10px 24px;
    font-family: "versostest", sans-serif;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5;
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    background-color: var(--e-global-color-primary) !important;
}

.gd-cta-form .elementor-button.gd-button:hover,
.gd-cta-form .elementor-button.gd-button:focus {
    background-color: black !important;
}

/* Result messages */
.gd-cta-form .elementor-message {
    margin: 0.75rem 0 0;
    font-family: "versostest", sans-serif;
    font-size: 0.95rem;
}

.gd-cta-form .elementor-message-success {
    color: #166534;
}

.gd-cta-form .elementor-message-danger {
    color: #b91c1c;
}

@media (max-width: 599px) {
    .gd-cta-form .gd-cta-form__form .elementor-form-fields-wrapper > .elementor-field-group,
    .gd-cta-form .gd-cta-form__form .elementor-form-fields-wrapper > .elementor-field-group.elementor-field-type-submit {
        flex: 1 1 100%;
    }
}

.gd-cta-form--unavailable {
    padding: 1rem;
    border: 1px dashed #b91c1c;
    color: #b91c1c;
}
