/**
 * @license MIT, https://opensource.org/license/MIT
 */

.contact form {
    display: flex;
    flex-direction: column;
}

.contact .col {
    margin-bottom: 1rem;
    width: 100%;
}

@media screen and (min-width: 768px) {
    .contact .row {
        display: flex;
        gap: 2rem;
    }
}

.contact label {
    color: var(--pico-contrast-hover);
    display: inline-block;
    margin: 0.5rem 0;
}

.contact input, textarea {
    border: 1px solid var(--pico-muted-border-color);
    background-color: var(--pico-muted-background-color);
    color: var(--pico-contrast);
    resize: vertical;
    font-size: 1rem;
    display: block;
    padding: 1rem;
    width: 100%;
}

.contact input::-webkit-input-placeholder,
.contact textarea::-webkit-input-placeholder {
    color: var(--pico-muted-color);
}

.contact .errors {
    color: var(--pico-form-element-invalid-focus-color);
}

.contact .error {
    border-color: var(--pico-form-element-invalid-border-color);
}

.contact .h-captcha {
    text-align: center;
}

.contact .h-captcha iframe {
    margin-bottom: 0.5rem;
    max-width: 100%;
}

.contact button {
    display: block;
    margin-inline-end: auto;
    margin-inline-start: auto;
}

.contact button:disabled {
    border: 1px solid var(--pico-muted-border-color);
    background-color: var(--pico-background-color);
    color: var(--pico-muted-background-color);
}

.contact button:has(.success:not(.hidden)) {
    background-color: var(--pico-form-element-valid-focus-color);
    border: 1px solid var(--pico-form-element-valid-focus-color);
    color: var(--pico-primary-inverse);
}

.contact button:has(.failure:not(.hidden)) {
    background-color: var(--pico-form-element-invalid-focus-color);
    border: 1px solid var(--pico-form-element-invalid-focus-color);
    color: var(--pico-primary-inverse);
}
