/**
 * Visually matches the OLD Careers form (Gravity Forms, on the legacy site
 * at mespack.com.mialias.net/careers/) on the NEW native ACFE form
 * (Careers Application field group, [acfe_form name="careers-application"]):
 * no visible label above First/Last Name, E-mail or LinkedIn URL profile
 * (placeholder text only, set on each field's own Presentation tab),
 * underline-only inputs/selects, a 4-column Languages checkbox grid
 * (column-count: 4, measured live on the old form), a dashed drop-zone
 * look for the CV upload, and the theme's own button-regular-primary look
 * (resources/css/site.css: inline-flex, uppercase, bold, rounded-full,
 * px-7 py-2.5, text-sm, text-gray-dark on bg-blue, hover bg-blue-dark) on
 * both the Submit and Select-files buttons — requested 2026-12-02 in place
 * of the old form's own red, now that the form lives on the new site.
 * The Submit button's HTML is also set directly to this class on the
 * Form's own Attributes tab (so it's semantically correct, not just
 * visually patched); the file-uploader's "Select files" button has no
 * such setting (it's ACF core's own hardcoded markup), so it's restyled
 * here instead, using the theme's real tokens (--color-blue, -blue-dark,
 * -gray-dark, --font-aktiv-grotesk-extended — see site.css) rather than
 * literal values, so it stays in sync if the theme's palette changes.
 *
 * Both buttons render inside .form-embed, the same wrapper class the
 * parent's resources/css/marketo.css already targets with Tailwind
 * `!important` utilities (`input, select { @apply w-full! h-12! rounded-md!
 * px-5! py-3! ... }`) — same cascade-layer fix as marketo-checkbox.css:
 * declared inside `@layer oc-overrides`, the first layer in the document
 * (this stylesheet is enqueued before the parent's compiled bundle). This
 * also beats button-regular-primary's own (non-!important) padding/size,
 * which is why the Submit button still needs its box-model replicated
 * here even though it now carries the real utility class too.
 *
 * EVERY declaration below is `!important`, not just the ones that visibly
 * needed it at first: for a *normal*-weight declaration, cascade layers
 * are compared by layer order alone and the LATER layer always wins
 * regardless of selector specificity — so an unweighted rule here (this
 * stylesheet's layer is declared first, i.e. earliest) loses even to
 * Tailwind's own `@layer base` reset (e.g. its preflight `border-width: 0`),
 * confirmed empirically: a first draft of this file with plain `border:
 * 1px dashed ...` on `.acf-uploader-wrapper` and no explicit width/height
 * reset on the two buttons rendered with no border at all, and with the
 * Submit/Select-files buttons stretched to the parent's `w-full! h-12!`
 * text-input size. Only for `!important` declarations does layer order
 * invert so the first-declared layer (this one) wins — the same mechanic
 * marketo-checkbox.css documents at length.
 *
 * Field selectors use the Careers Application field group's own
 * `data-name` attributes on ACF's standard front-end markup (confirmed
 * live: .acf-field, .acf-label, .acf-input, .acf-checkbox-list,
 * .acf-file-uploader, .acf-true-false, .acf-form-submit) rather than
 * anything Careers-page-specific, so — like oc-marketo-checkbox.css — this
 * file is enqueued unconditionally: the generic "Form" Page Builder layout,
 * and the field group it points at, could in principle be reused elsewhere.
 */
@layer oc-overrides {
  /* Fields the old form shows with no visible label — placeholder text only */
  .form-embed [data-name="first_name"] > .acf-label,
  .form-embed [data-name="last_name"] > .acf-label,
  .form-embed [data-name="e-mail"] > .acf-label,
  .form-embed [data-name="linkedin_url_profile"] > .acf-label,
  .form-embed [data-name="marketing_consent"] > .acf-label,
  .form-embed [data-name="privacy_consent"] > .acf-label {
    display: none !important;
  }

  /* Underline-only text/email/url inputs and selects, matching the old form exactly */
  .form-embed input[type="text"],
  .form-embed input[type="email"],
  .form-embed input[type="url"],
  .form-embed select {
    height: auto !important;
    border: none !important;
    border-bottom: 1px solid #000 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 5px 0 !important;
  }

  /* Languages: 4-column checkbox grid, same column-count as the old form */
  .form-embed .acf-checkbox-list {
    columns: 4 !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .form-embed .acf-checkbox-list li {
    break-inside: avoid !important;
    margin-bottom: 0.5rem !important;
  }

  .form-embed .acf-checkbox-list label {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
  }

  /* CV upload: dashed drop-zone look (values sampled live from the old form's own drop-zone) */
  .form-embed .acf-file-uploader .acf-uploader-wrapper {
    display: block !important;
    border: 1px dashed var(--oc-input-border, #ccc) !important;
    border-radius: 4px !important;
    background: rgba(0, 0, 0, 0.02) !important;
    padding: 24px !important;
    text-align: center !important;
  }

  /* True/False consent rows: checkbox beside its own message text, not stacked */
  .form-embed .acf-true-false label {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
  }

  /* Theme's own button-regular-primary look (see file docblock) for both action */
  /* buttons, reset to their own natural button size instead of the parent's */
  /* full-width input sizing */
  .form-embed .acf-file-uploader a.acf-button,
  .form-embed .acf-form-submit input[type="submit"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0.625rem 1.75rem !important;
    font-family: var(--font-aktiv-grotesk-extended) !important;
    font-weight: 700 !important;
    font-size: 0.875rem !important;
    line-height: normal !important;
    text-transform: uppercase !important;
    text-align: center !important;
    background: var(--color-blue) !important;
    border: 1px solid var(--color-blue) !important;
    border-radius: 9999px !important;
    color: var(--color-gray-dark) !important;
    box-shadow: none !important;
    transition: background-color 0.15s, border-color 0.15s;
  }

  .form-embed .acf-file-uploader a.acf-button:hover,
  .form-embed .acf-form-submit input[type="submit"]:hover {
    background: var(--color-blue-dark) !important;
    border-color: var(--color-blue-dark) !important;
  }
}
