/* Constant Contact inline signup forms, styled like the site's old horizontal CF7 signup
   (sand fields, teal text, green uppercase button, small centered legal line). See inc/constant-contact.php. */

.ctct-inline-form { width: 100%; max-width: 620px; margin: 0 auto; }

html body .ctct-inline-form div.ctct-form-embed div.ctct-form-defaults {
    background: transparent !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    font-family: Lato, -apple-system, "Segoe UI", Roboto, sans-serif !important;
}

/* CC's own title, in the site's type; its intro line and the field label stay hidden (placeholder instead). */
html body .ctct-inline-form div.ctct-form-embed .ctct-form-defaults .ctct-form-header {
    margin: 0 0 18px !important;
    color: #237176 !important;
    font: 900 26px/1.2 Lato, sans-serif !important;
    text-align: center !important;
}
html body .ctct-inline-form div.ctct-form-embed .ctct-form-defaults .ctct-form-text,
html body .ctct-inline-form div.ctct-form-embed .ctct-form-custom .ctct-form-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    margin: 0 !important;
}

/* One row: fields, then the button. */
html body .ctct-inline-form div.ctct-form-embed form.ctct-form-custom {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 6px !important;
}
html body .ctct-inline-form div.ctct-form-embed form.ctct-form-custom .ctct-form-field {
    flex: 1 1 160px !important;
    margin: 0 !important;
}
html body .ctct-inline-form div.ctct-form-embed form.ctct-form-custom input.ctct-form-element {
    height: 60px !important;
    min-height: 60px !important;
    padding: 12px 16px !important;
    background: #e5d7c7 !important;
    color: #237176 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font: 400 16px/1.2 Lato, -apple-system, "Segoe UI", Roboto, sans-serif !important;
}
html body .ctct-inline-form div.ctct-form-embed form.ctct-form-custom input.ctct-form-element::placeholder { color: #237176; opacity: .8; }
html body .ctct-inline-form div.ctct-form-embed form.ctct-form-custom input.ctct-form-element:focus { outline: 2px solid #018957 !important; outline-offset: -2px; }

html body .ctct-inline-form div.ctct-form-embed form.ctct-form-custom button.ctct-form-button {
    order: 2;
    flex: 0 0 auto !important;
    width: auto !important;
    height: 60px !important;
    margin: 0 !important;
    padding: 12px 28px !important;
    background: #018957 !important;
    color: #fdf3e7 !important;
    border: 0 !important;
    border-radius: 0 !important;
    font: 900 12px/1 Lato, sans-serif !important;
    letter-spacing: 1.8px !important;
    text-transform: uppercase !important;
    cursor: pointer;
}
html body .ctct-inline-form div.ctct-form-embed form.ctct-form-custom button.ctct-form-button:hover { background: #016e46 !important; }

/* Consent line + CC's footer: full width under the row, small and centered. */
html body .ctct-inline-form div.ctct-form-embed form.ctct-form-custom > *:not(.ctct-form-field):not(.ctct-form-button) {
    order: 3;
    flex: 1 1 100% !important;
}
html body .ctct-inline-form div.ctct-form-embed .ctct-form-defaults .ctct-gdpr-text,
html body .ctct-inline-form div.ctct-form-embed .ctct-form-defaults .ctct-gdpr-text a {
    margin: 10px auto 0 !important;
    max-width: 560px;
    color: #237176 !important;
    font: 400 11px/1.5 Lato, sans-serif !important;
    text-align: center !important;
}
/* CC's logo pill: not needed on-site. */
html body .ctct-inline-form div.ctct-form-embed .ctct-form-defaults .ctct-form-footer { display: none !important; }

/* Errors under their field; the success message in the site's teal. */
html body .ctct-inline-form div.ctct-form-embed .ctct-form-errorMessage { font: 400 12px Lato, sans-serif !important; margin: 4px 0 0 !important; }
html body .ctct-inline-form div.ctct-form-embed .ctct-form-defaults .ctct-form-success .ctct-form-header,
html body .ctct-inline-form div.ctct-form-embed .ctct-form-defaults .ctct-form-success .ctct-form-text {
    position: static !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    color: #237176 !important;
    text-align: center !important;
}

@media (max-width: 767px) {
    html body .ctct-inline-form div.ctct-form-embed form.ctct-form-custom button.ctct-form-button { flex: 1 1 100% !important; }
}

/* The title sits above the row (the rule above would push it under). */
html body .ctct-inline-form div.ctct-form-embed form.ctct-form-custom > h2.ctct-form-header,
html body .ctct-inline-form div.ctct-form-embed form.ctct-form-custom > p.ctct-form-text { order: 0 !important; flex: 1 1 100% !important; }

/* CC's reCAPTCHA badge floats over the consent line: keep it working, out of sight. */
html body .ctct-inline-form .grecaptcha-badge { visibility: hidden !important; }

/* After a signup CC hides the form inline (display: none): let that win over the flex row. */
html body .ctct-inline-form div.ctct-form-embed form.ctct-form-custom[style*="none"] { display: none !important; }
