/*
 * Base layout for the Cordoniq website forms (see cordoniq-forms.js). Optional: everything is
 * scoped to .cq-form, and fonts and colours come from the page, so the theme can restyle freely.
 */

/* The script shows and hides parts with the hidden attribute; keep it stronger than the layout below */
.cq-form [hidden] {
    display: none !important;
}

.cq-form .cq-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
}

.cq-form .cq-field {
    display: flex;
    flex-direction: column;
    flex: 1 1 100%;
    gap: 4px;
}

.cq-form .cq-field.cq-half {
    flex: 1 1 calc(50% - 8px);
    min-width: 200px;
}

.cq-form input,
.cq-form select,
.cq-form textarea {
    font: inherit;
    padding: 10px 12px;
    border: 1px solid #c8c4cc;
    border-radius: 4px;
    box-sizing: border-box;
    width: 100%;
}

.cq-form textarea {
    min-height: 120px;
    resize: vertical;
}

.cq-form .cq-invalid {
    border-color: #e53935;
    outline: 1px solid #e53935;
}

.cq-form .cq-note {
    flex: 1 1 100%;
    font-size: 0.85em;
    margin: 0;
}

.cq-form .cq-status {
    flex: 1 1 100%;
    color: #e53935;
    margin: 0;
}

.cq-form button[type="submit"] {
    font: inherit;
    cursor: pointer;
}

.cq-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: default;
}

/* A label kept for screen readers where the design shows only a placeholder */
.cq-form .cq-hidden-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* The honeypot: off screen rather than display:none, which some bots skip */
.cq-form .cq-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
