/*
 * Base layout for WPForms.
 *
 * The export shipped the plugin's JS references and the theme's own overrides (see the
 * "form section" block in theme.css) but not the plugin's base stylesheet. Without it the
 * structural rules were missing entirely: the `*-hide` label modifiers did nothing, so
 * the screen-reader "First"/"Last" sublabels rendered as visible text, the paired
 * name fields stacked instead of sitting side by side, and fields had no vertical rhythm.
 *
 * Used by every marketing page carrying a WPForms form (careers, contact, guide,
 * book-now, fuel, acquisitions, offerings, investors, whistleblower-policy). Anything
 * theme.css already sets is deliberately not repeated so its values keep winning.
 */

.wpforms-container {
    margin-bottom: 24px;
}

/* --- fields --------------------------------------------------------------------- */

.wpforms-container .wpforms-field {
    margin-bottom: 16px;
    padding: 0;
}

.wpforms-container .wpforms-field:last-child {
    margin-bottom: 0;
}

.wpforms-container .wpforms-field-label {
    display: block;
    font-weight: 700;
}

/*
 * WPForms marks labels it wants visually hidden rather than removing them, so the
 * markup stays accessible. These modifiers are the whole reason "First" and "Last"
 * were showing up as stray text under the name inputs.
 */
.wpforms-container .wpforms-field-label.wpforms-label-hide,
.wpforms-container .wpforms-field-sublabel.wpforms-sublabel-hide {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wpforms-container .wpforms-field-sublabel {
    display: block;
    font-size: 0.8em;
    font-weight: 400;
}

.wpforms-container .wpforms-required-label {
    color: inherit;
    border: none;
}

/* --- inputs --------------------------------------------------------------------- */

.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="tel"],
.wpforms-container input[type="url"],
.wpforms-container input[type="number"],
.wpforms-container select,
.wpforms-container textarea {
    width: 100%;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
    font-family: inherit;
}

.wpforms-container textarea {
    padding: 12px 16px;
    resize: vertical;
}

/* --- multi-column rows (first/last name, address, …) ---------------------------- */

/*
 * WPForms lays these out with floats, not flexbox. Five pages (contact, guide,
 * book-now, investors, whistleblower-policy) already carry these rules inline in their
 * pages/<slug>.css; the remaining WPForms pages (careers, fuel, acquisitions,
 * offerings) never got them. Matching the float model here rather than imposing a flex
 * one keeps a single behaviour everywhere — a flex row would have overridden and broken
 * the five pages that were already correct.
 */
.wpforms-container .wpforms-field-row {
    clear: both;
}

.wpforms-container .wpforms-field-row:before,
.wpforms-container .wpforms-field-row:after {
    content: "";
    display: table;
}

.wpforms-container .wpforms-field-row:after {
    clear: both;
}

.wpforms-container .wpforms-one-half {
    float: left;
    clear: none;
    width: calc(50% - 10px);
    margin-left: 20px;
}

.wpforms-container .wpforms-one-third {
    float: left;
    clear: none;
    width: calc(33.333% - 14px);
    margin-left: 20px;
}

.wpforms-container .wpforms-first {
    clear: both !important;
    margin-left: 0 !important;
}

@media only screen and (max-width: 600px) {
    .wpforms-container .wpforms-one-half,
    .wpforms-container .wpforms-one-third {
        float: none;
        width: 100%;
        margin-left: 0;
    }
}

/* --- submit --------------------------------------------------------------------- */

.wpforms-container .wpforms-submit-container {
    margin-top: 20px;
}

.wpforms-container .wpforms-submit {
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
}

/* --- file upload ---------------------------------------------------------------- */

/*
 * The modern uploader is a dropzone: the plugin's JS turns it into a click/drag target.
 * Its base box and centred prompt live in the plugin stylesheet, so without them the
 * field collapsed to a bare floating icon.
 */
.wpforms-container .wpforms-uploader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
    padding: 16px;
    border: 1px dashed rgba(18, 33, 47, 0.35);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    text-align: center;
}

.wpforms-container .wpforms-uploader .dz-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.wpforms-container .wpforms-uploader .dz-message svg {
    width: 32px;
    height: 32px;
}

.wpforms-container .wpforms-uploader .modern-title {
    font-size: 0.95em;
}

/* --- privacy data-request form (Complianz) -------------------------------------- */

/*
 * The plugin's own stylesheet was not exported either. Its submit button inherits the
 * page's dark text colour on a dark button, leaving the label unreadable.
 */
#cmplz-datarequest-form input[type="submit"] {
    padding: 12px 28px;
    border: 0;
    border-radius: 6px;
    background: var(--e-global-color-secondary, #ebbc00);
    color: #12212f;
    cursor: pointer;
    font-weight: 700;
}

#cmplz-datarequest-form label {
    display: block;
}

#cmplz-datarequest-form .cmplz_datarequest label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* --- validation ----------------------------------------------------------------- */

.wpforms-container label.wpforms-error {
    display: block;
    margin-top: 6px;
    font-size: 0.85em;
    color: #d63638;
}

.wpforms-container input.wpforms-error,
.wpforms-container select.wpforms-error,
.wpforms-container textarea.wpforms-error {
    border-color: #d63638;
}
