/* Accent word in the heading — `font-size`/`line-height: inherit` defeat the
   global `span { font-size }` reset in app.css (CSS-only exception per
   CLAUDE.md) so the word tracks the heading's size instead of dropping to the
   base text size. */
.job-application-form__accent {
    font-size: inherit;
    line-height: inherit;
}

/* ─────────────────────────────────────────────────────────────────────────
   Direct Job Application Form — pill-style skin matching the Figma design.
   Scoped via the form's own cssClass (see pd_gf_form_definitions() in
   includes/functions/seed-gravity-forms.php) so other Gravity Forms on the
   site (Contact, Employer Contact) keep the shared rectangular skin from
   assets/css/components.css.
   ───────────────────────────────────────────────────────────────────────── */

form.pd-form--job-application .gform_fields {
    row-gap: 19px;
    column-gap: 24px;
}

/* Validation error messages — red text.
   Per-field messages (.validation_message) live inside the field markup, so
   they're descendants of <form>. The top-of-form validation summary (only
   shown if the form's `validationSummary` setting is on) is rendered before
   the <form> tag opens like the required-legend above, so it needs the same
   `_wrapper` targeting instead. */
form.pd-form--job-application .validation_message {
    color: var(--color-error);
}

.pd-form--job-application_wrapper .gform_validation_errors,
.pd-form--job-application_wrapper .gform_validation_errors * {
    color: var(--color-error);
}

/* Space it away from the form/fields below — it's a sibling of <form>, so
   margin-bottom here pushes the whole form (not just the first field) down. */
.pd-form--job-application_wrapper .gform_validation_errors {
    margin-bottom: 24px;
}

/* GF auto-renders this "'*' indicates required fields" legend whenever
   requiredIndicator isn't 'text' (see pd_gf_form_definitions()) — not part
   of the Figma design, so hide it here.
   Note: GF renders the heading/legend block BEFORE the <form> tag opens —
   both are siblings inside the outer .gform_wrapper div, so a `form.pd-form-
   -job-application .gform_required_legend` selector never matches. GF does
   append `_wrapper`-suffixed classes (from the form's own cssClass) to that
   wrapper div, so target that instead. */
.pd-form--job-application_wrapper .gform_required_legend {
    display: none;
}

form.pd-form--job-application .gfield_label {
    display: block !important;
    margin-bottom: 7px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    line-height: 19.5px;
    letter-spacing: 0.78px;
    text-transform: uppercase;
    color: var(--color-gray);
}

/* Required asterisk — GF's own native indicator span (a sibling right after
   </label>, not baked into the label/placeholder text — see requiredIndicator
   in pd_gf_form_definitions()), un-hidden and colored just for this form. */
form.pd-form--job-application .gfield_required {
    display: inline !important;
    margin-left: 4px;
    color: var(--color-pink);
}

form.pd-form--job-application input[type="text"],
form.pd-form--job-application input[type="email"],
form.pd-form--job-application input[type="tel"] {
    height: auto;
    padding: 15px 17px;
    background: var(--color-light-blue);
    border: 1px solid transparent;
    border-radius: 13px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 16px;
    color: var(--color-dark);
    transition: border-color var(--duration-fast) var(--ease);
}

form.pd-form--job-application input[type="text"]:focus,
form.pd-form--job-application input[type="email"]:focus,
form.pd-form--job-application input[type="tel"]:focus {
    border-color: var(--color-pink);
}

form.pd-form--job-application input[type="text"]::placeholder,
form.pd-form--job-application input[type="email"]::placeholder,
form.pd-form--job-application input[type="tel"]::placeholder {
    color: #757575;
    opacity: 1;
}

form.pd-form--job-application textarea {
    min-height: 120px;
    padding: 15px 17px;
    background: var(--color-light-blue);
    border: 1px solid transparent;
    border-radius: 13px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    color: var(--color-dark);
    resize: none;
    transition: border-color var(--duration-fast) var(--ease);
}

form.pd-form--job-application textarea:focus {
    border-color: var(--color-pink);
}

form.pd-form--job-application textarea::placeholder {
    color: #757575;
    opacity: 1;
}

/* ── File upload — dashed dropzone ────────────────────────────────────────
   The native <input type="file"> is stretched invisibly over the whole box
   (position:absolute, opacity:0) so click-to-browse and native drag-and-drop
   both work with zero JS for the interaction itself.

   The decorative icon + copy is drawn entirely with CSS (::before/::after,
   a CSS-only exception per CLAUDE.md) anchored to GF's own always-present
   markup, rather than injected via a gform_field_content PHP filter — that
   approach didn't reliably survive Gravity Forms' AJAX validation reload
   (a full server re-render inside a hidden iframe, then DOM-swapped back
   in), so the whole dropzone visual would vanish after a failed submit.
   Pure CSS has no render path to fail on: it's just always there. */
form.pd-form--job-application .gfield--type-fileupload,
form.pd-form--job-application .gfield--type-html {
    grid-column: 1 / -1;
}

/* display:flex column (rather than fixed-height + absolutely-positioned
   children at fixed `top` offsets) so a wrapped label line pushes the hint
   line down instead of the two overlapping — see the mask icon/label/hint
   rules below, which rely on being flex items rather than absolute. */
form.pd-form--job-application .ginput_container_fileupload {
    position: relative;
    display: flex;
    /* Stacked + centered below 480px: the horizontal icon+text row (matching
       Figma's desktop layout) leaves too little width for the bold uppercase
       prompt line on narrow phones once the icon badge + gap are subtracted,
       forcing an awkward 3-4 line wrap next to a vertically-centered icon. */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 17px;
    background: var(--color-light-blue);
    border: 1.5px dashed #D9BFCA;
    border-radius: 13px;
    transition: border-color var(--duration-fast) var(--ease), background var(--duration-fast) var(--ease);
}

@media (min-width: 480px) {
    form.pd-form--job-application .ginput_container_fileupload {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        gap: 14px;
    }
}

form.pd-form--job-application .ginput_container_fileupload.is-dragover {
    border-color: var(--color-pink);
    background: color-mix(in srgb, var(--color-pink) 8%, var(--color-light-blue));
}

form.pd-form--job-application .ginput_container_fileupload input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}

form.pd-form--job-application .ginput_container_fileupload input[type="file"]::file-selector-button {
    display: none;
}

/* Icon badge — white rounded square with a centered upload-icon background
   image. A plain (non-mask) background-image layered under a solid white
   background-color, rather than a CSS mask, so the box can be solid white
   with the icon in a different color on top without needing a second
   layered pseudo-element (only ::before/::after are available here). */
form.pd-form--job-application .ginput_container_fileupload::before {
    content: '';
    display: block;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background-color: #FFFFFF;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
    pointer-events: none;
}

/* Text block (bold prompt + gray hint, stacked) — repurposes GF's own
   "accepted file types" copy (always rendered since allowedExtensions is set
   on this field, see pd_gf_form_definitions()): its real generated text is
   collapsed to font-size:0 and our copy is drawn via ::before/::after
   instead, anchored to markup that survives Gravity Forms' AJAX validation
   reload (a PHP-injected copy would not — see script.js's docblock). */
form.pd-form--job-application .gform_fileupload_rules {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0;
    line-height: 0;
    /* No text-align here — inherits from .ginput_container_fileupload's own
       center/left flip (see the 480px breakpoint above) instead of fighting it. */
    pointer-events: none;
}

@media (min-width: 480px) {
    form.pd-form--job-application .gform_fileupload_rules {
        align-items: flex-start;
    }
}

form.pd-form--job-application .gform_fileupload_rules::before {
    /* --pd-cv-filename is set inline by script.js once a file is chosen
       (holding an already-quoted string), falling back to the prompt copy. */
    content: var(--pd-cv-filename, "Sleep je CV hierheen of klik om te uploaden");
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 15px;
    line-height: 22.5px;
    letter-spacing: 0.78px;
    text-transform: uppercase;
    color: var(--color-dark);
}

form.pd-form--job-application .gform_fileupload_rules::after {
    /* Actual configured limit (maxFileSize: 5 in pd_gf_form_definitions()) —
       kept accurate to the real server-enforced limit rather than copying
       the Figma mockup's "max. 10 MB" text verbatim. */
    content: "PDF of Word · max. 5 MB";
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 13px;
    line-height: 19.5px;
    color: var(--color-gray);
}

/* ── Privacy notice — plain text, no input, per Figma ─────────────────────── */

/* An `html` field (pd_gf_form_definitions()), not a `consent` checkbox — this
   form's submit itself is the acknowledgment, nothing to check or require.
   script.js moves this field to render right after .gform_footer (Figma:
   privacy line below the button) — it's then an orphaned <li>, no longer a
   descendant of .gform_fields' <ul>, so it needs its own list-style reset
   and block display instead of inheriting the ul's. */
form.pd-form--job-application .gfield--type-html {
    display: block;
    list-style: none;
    margin-top: 16px;
    text-align: center;
}

form.pd-form--job-application .pd-form-notice {
    margin: 0;
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 19.5px;
    color: var(--color-gray);
}

/* font-size/line-height: inherit defeat the global `a { font-size:
   var(--text-base) }` reset in app.css (CSS-only exception per CLAUDE.md) so
   the link matches the surrounding 13px notice text instead of jumping to the
   base type size. */
form.pd-form--job-application .pd-form-notice a {
    font-size: inherit;
    line-height: inherit;
    color: var(--color-pink);
    text-decoration: underline;
}

/* ── Submit button — full-width rounded pill, plain text (no icon per Figma) ── */
form.pd-form--job-application .gform_footer {
    margin-top: 24px;
}

form.pd-form--job-application .gform_footer .gform_button {
    width: 100%;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 28px;
    background: var(--ja-theme, var(--color-pink));
    color: #FFFFFF;
    border: none;
    border-radius: 9999px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: filter var(--duration-fast) var(--ease);
}

/* The button's label is a bare <span> injected via this module's own
   gform_submit_button filter (template.php) — the global `span { color }`
   reset in app.css otherwise forces it dark regardless of the button's own
   color. */
form.pd-form--job-application .gform_footer .gform_button span {
    color: inherit;
}

form.pd-form--job-application .gform_footer .gform_button:hover {
    filter: brightness(0.9);
}
