/* Weber Contact Form
 * Pixel-match of the prior Elementor form, computed from the live page.
 * Page background: #E7F0FB. Body font: "Neue Rain", sans-serif.
 */

.wcf-form {
    box-sizing: border-box;
    width: 100%;
    max-width: 495px;
    margin: 0;
    font-family: inherit;
    color: #0D0F12;
}

.wcf-form *,
.wcf-form *::before,
.wcf-form *::after {
    box-sizing: border-box;
}

/* Matches Elementor's .elementor-form-fields-wrapper exactly:
 *   margin-left/right: calc(-24px/2) = -12px  (cancels field padding L/R)
 *   margin-bottom:     -24px                  (cancels trailing field padding-bottom)
 * Each field has 12px horizontal padding and 24px bottom padding for spacing.
 */
.wcf-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px -24px;
}

.wcf-field,
.wcf-messages,
.wcf-submit-wrap {
    width: 100%;
    padding: 0 12px 24px;
    box-sizing: border-box;
    min-width: 0;
}

.wcf-half {
    width: 50%;
}

@media (max-width: 480px) {
    .wcf-half {
        width: 100%;
    }
}

.wcf-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wcf-form input[type="text"],
.wcf-form input[type="email"],
.wcf-form input[type="tel"],
.wcf-form select,
.wcf-form textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px 16px;
    border: 1px solid #0D0F12;
    border-radius: 16px;
    background-color: transparent;
    color: #0D0F12;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.wcf-form input[type="text"],
.wcf-form input[type="email"],
.wcf-form input[type="tel"],
.wcf-form textarea {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Match Elementor's select: padding 12px 20px 12px 16px.
 * Caret: clean downward triangle, 11px wide, 10px from right edge.
 * Using a simple polygon path with a viewBox that contains it fully (no
 * clipping). Visual equivalent of Elementor's stylized arrow without the
 * viewBox-overflow problem the original path has when used as a bg image.
 */
.wcf-form select {
    padding: 12px 20px 12px 16px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path d='M0 1 Q0 0 1 0 L11 0 Q12 0 12 1 L7 7 Q6 8 5 7 Z' fill='%230D0F12'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 11px 8px;
}

/* Match Elementor's textarea: resize default (both directions). */
.wcf-form textarea {
    min-height: 218px;
    line-height: 24px;
}

.wcf-form input::placeholder,
.wcf-form textarea::placeholder {
    color: #0D0F12;
    opacity: 0.6;
}

.wcf-form select:invalid {
    color: #0D0F12;
    opacity: 0.6;
}

/* Option dropdown styling: let the browser render with its native bg
 * so the select chrome doesn't inherit white from the options. */
.wcf-form select option[disabled],
.wcf-form select option[value=""] {
    color: #999;
}

/* Focus state: red border on all fields, matching Elementor's
 * kit-7 :focus rule which sets border-color: var(--e-global-color-primary).
 */
.wcf-form input:focus,
.wcf-form select:focus,
.wcf-form textarea:focus {
    border-color: #EC1C22;
    outline: 0;
}

.wcf-form [aria-invalid="true"] {
    border-color: #EC1C22 !important;
}

.wcf-messages {
    grid-column: span 2;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: #EC1C22;
}

.wcf-messages:empty {
    display: none;
}

.wcf-messages.is-success {
    color: #0D0F12;
    font-size: 20px;
    text-align: center;
}

/* Prefix with .wcf-form to win specificity against Elementor's kit-7
 * global button styles that target all `button` elements. */
.wcf-form .wcf-submit,
.wcf-form button.wcf-submit {
    position: relative;
    display: inline-block;
    width: auto;
    padding: 8px 24px;
    margin: 0;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    text-align: center;
    color: #E7F0FB;
    background-color: #EC1C22;
    border: 1px solid #EC1C22;
    border-radius: 32px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* Submitting state: button keeps its size, text fades out, a centered
 * spinner overlays. Cursor switches to "wait" so the change is felt.
 * CSS-only animation, no JS rAF needed. */
.wcf-form .wcf-submit.is-submitting,
.wcf-form button.wcf-submit.is-submitting {
    color: transparent;
    cursor: wait;
}

.wcf-form .wcf-submit::before,
.wcf-form button.wcf-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #E7F0FB;
    border-top-color: transparent;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.wcf-form .wcf-submit.is-submitting::before,
.wcf-form button.wcf-submit.is-submitting::before {
    opacity: 1;
    animation: wcf-spin 0.6s linear infinite;
}

@keyframes wcf-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .wcf-form .wcf-submit.is-submitting::before {
        animation-duration: 1.5s;
    }
}

.wcf-form .wcf-submit:hover,
.wcf-form button.wcf-submit:hover {
    background-color: #0D0F12;
    color: #E7F0FB;
    border-color: #0D0F12;
}

/* Keyboard-only focus indicator (does not fire on mouse click), so the
 * button returns to its default look after a click that fails validation. */
.wcf-form .wcf-submit:focus-visible,
.wcf-form button.wcf-submit:focus-visible {
    outline: 2px solid #0D0F12;
    outline-offset: 2px;
}
.wcf-form .wcf-submit:focus:not(:focus-visible) {
    outline: none;
}

.wcf-form .wcf-submit[disabled],
.wcf-form button.wcf-submit[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

.wcf-form.is-success .wcf-field,
.wcf-form.is-success .wcf-submit-wrap {
    display: none;
}
