/* =========================================================
   Walter Coenen · Widgets
   Cookie-Consent · Barrierefreiheits-Assistent · Bewerbung
   Nutzt Tokens aus styles.css — flächig, rahmenlos, Navy/Blau/Mist.
   ========================================================= */

/* ---- gemeinsame Bausteine ---- */
.wc-w-backdrop {
  position: fixed; inset: 0; z-index: 940; background: rgba(8,15,26,.55);
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease-out), visibility .35s;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.wc-w-backdrop.show { opacity: 1; visibility: visible; }

.wc-switch { position: relative; flex-shrink: 0; width: 50px; height: 30px; border-radius: 999px; background: var(--mist-2); cursor: pointer; transition: background .25s var(--ease-out); border: none; padding: 0; }
.wc-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px -2px rgba(12,22,34,.4); transition: transform .25s var(--ease-out); }
.wc-switch[aria-checked="true"] { background: var(--blue); }
.wc-switch[aria-checked="true"]::after { transform: translateX(20px); }
.wc-switch[aria-disabled="true"] { background: var(--blue); opacity: .5; cursor: not-allowed; }

/* =========================================================
   COOKIE-CONSENT-BANNER
   ========================================================= */
.wc-cookie {
  position: fixed; left: 50%; bottom: clamp(14px, 2.5vw, 28px); transform: translate(-50%, 140%);
  z-index: 950; width: min(1080px, calc(100vw - 28px));
  background: #fff; border-radius: var(--r-m); box-shadow: var(--shadow);
  padding: clamp(22px, 2.6vw, 34px); opacity: 0; transition: transform .55s var(--ease-out), opacity .45s;
  max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain;
}
.wc-cookie.show { transform: translate(-50%, 0); opacity: 1; }
.wc-ck-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.wc-ck-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--mist); color: var(--blue); display: grid; place-items: center; flex-shrink: 0; }
.wc-ck-ic svg { width: 24px; height: 24px; }
.wc-ck-head h2 { font-family: 'Raleway', sans-serif; font-weight: 700; font-size: clamp(19px, 1.8vw, 24px); letter-spacing: -.02em; color: var(--ink); margin: 0; }
.wc-ck-text { font-size: 14.5px; line-height: 1.62; color: var(--soft); font-weight: 500; margin: 0 0 18px; max-width: 74ch; }
.wc-ck-text a { color: var(--blue); font-weight: 700; }
.wc-ck-text a:hover { text-decoration: underline; }

.wc-ck-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.wc-ck-actions .wc-btn-primary { margin-left: auto; }
.wc-btn-primary, .wc-btn-ghost, .wc-btn-text {
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; border-radius: 999px;
  padding: 15px 28px; transition: transform .25s var(--ease-out), background .25s, color .25s; border: none;
  display: inline-flex; align-items: center; gap: 9px;
}
.wc-btn-primary { background: var(--blue); color: #fff; box-shadow: 0 16px 32px -16px rgba(31,115,192,.9); }
.wc-btn-primary:hover { background: var(--blue-deep); transform: translateY(-2px); }
.wc-btn-ghost { background: var(--mist); color: var(--ink); }
.wc-btn-ghost:hover { background: var(--mist-2); transform: translateY(-2px); }
.wc-btn-text { background: none; color: var(--soft); padding: 15px 16px; }
.wc-btn-text:hover { color: var(--blue); }
.wc-btn-text .chev { width: 15px; height: 15px; transition: transform .3s var(--ease-out); }
.wc-btn-text[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* Ausklappbereich: Tabs (Cookies + Barrierefreiheit) */
.wc-ck-panel { overflow: hidden; max-height: 0; transition: max-height .45s var(--ease-out); }
.wc-ck-panel.open { max-height: 1400px; }
.wc-ck-panel-inner { padding-top: 22px; margin-top: 20px; border-top: 1px solid var(--mist-2); }
.wc-tabs { display: flex; gap: 8px; background: var(--mist); padding: 5px; border-radius: 999px; width: fit-content; max-width: 100%; margin-bottom: 22px; }
.wc-tab { font: inherit; font-weight: 700; font-size: 13.5px; color: var(--soft); background: none; border: none; cursor: pointer; padding: 10px 20px; border-radius: 999px; transition: background .25s, color .25s; white-space: nowrap; }
.wc-tab.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-s); }
.wc-tabpane { display: none; }
.wc-tabpane.on { display: block; animation: wcFade .35s var(--ease-out); }
@keyframes wcFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Cookie-Kategorien */
.wc-cat { display: flex; align-items: flex-start; gap: 16px; padding: 16px 0; border-top: 1px solid var(--mist-2); }
.wc-cat:first-child { border-top: none; }
.wc-cat-body { flex: 1; min-width: 0; }
.wc-cat-body h3 { font-size: 15.5px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.wc-cat-body p { font-size: 13.5px; line-height: 1.55; color: var(--soft); font-weight: 500; margin: 0; }
.wc-cat .wc-locked { font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--blue); background: rgba(31,115,192,.1); padding: 8px 14px; border-radius: 999px; flex-shrink: 0; }

/* =========================================================
   BARRIEREFREIHEIT — Steuerungen (geteilt: Banner-Tab + Panel)
   ========================================================= */
.wc-a11y-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.wc-a11y-opt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--mist); border-radius: var(--r-s); cursor: pointer; transition: background .2s; text-align: left; border: none; font: inherit; width: 100%; }
.wc-a11y-opt:hover { background: var(--mist-2); }
.wc-a11y-opt.on { background: rgba(31,115,192,.1); }
.wc-a11y-ic { width: 40px; height: 40px; border-radius: 12px; background: #fff; color: var(--blue); display: grid; place-items: center; flex-shrink: 0; transition: background .2s, color .2s; }
.wc-a11y-opt.on .wc-a11y-ic { background: var(--blue); color: #fff; }
.wc-a11y-ic svg { width: 21px; height: 21px; }
.wc-a11y-label { flex: 1; min-width: 0; }
.wc-a11y-label b { display: block; font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.wc-a11y-label span { font-size: 12.5px; color: var(--soft); font-weight: 600; }
.wc-a11y-state { width: 22px; height: 22px; border-radius: 7px; background: #fff; display: grid; place-items: center; flex-shrink: 0; box-shadow: inset 0 0 0 2px var(--mist-2); transition: background .2s, box-shadow .2s; }
.wc-a11y-opt.on .wc-a11y-state { background: var(--blue); box-shadow: inset 0 0 0 2px var(--blue); }
.wc-a11y-state svg { width: 13px; height: 13px; color: #fff; opacity: 0; transform: scale(.5); transition: opacity .2s, transform .2s; }
.wc-a11y-opt.on .wc-a11y-state svg { opacity: 1; transform: scale(1); }

/* Schritt-Steuerung (Schriftgröße) */
.wc-a11y-step { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--mist); border-radius: var(--r-s); }
.wc-a11y-step .wc-a11y-ic { background: #fff; }
.wc-a11y-step.on .wc-a11y-ic { background: var(--blue); color: #fff; }
.wc-step-ctrl { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.wc-step-btn { width: 36px; height: 36px; border-radius: 50%; border: none; background: #fff; color: var(--ink); font-size: 20px; font-weight: 700; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-s); transition: transform .2s, color .2s; line-height: 1; }
.wc-step-btn:hover { color: var(--blue); transform: translateY(-1px); }
.wc-step-btn:disabled { opacity: .4; cursor: not-allowed; }
.wc-step-val { min-width: 46px; text-align: center; font-size: 14px; font-weight: 700; color: var(--ink); }

/* =========================================================
   BARRIEREFREIHEIT-PANEL (eigenständig, über Launcher)
   ========================================================= */
.wc-a11y-panel {
  position: fixed; z-index: 945; right: clamp(14px, 2.5vw, 26px); bottom: clamp(86px, 12vw, 104px);
  width: min(420px, calc(100vw - 28px)); max-height: min(80vh, 720px); overflow-y: auto; overscroll-behavior: contain;
  background: #fff; border-radius: var(--r-m); box-shadow: var(--shadow);
  padding: clamp(22px, 2.4vw, 28px); transform: translateY(20px) scale(.97); transform-origin: bottom right;
  opacity: 0; visibility: hidden; transition: transform .4s var(--ease-out), opacity .35s, visibility .35s;
}
.wc-a11y-panel.show { transform: none; opacity: 1; visibility: visible; }
.wc-a11y-phead { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.wc-a11y-phead .wc-ck-ic { background: var(--mist); }
.wc-a11y-phead h2 { font-family: 'Raleway', sans-serif; font-weight: 700; font-size: 20px; letter-spacing: -.02em; color: var(--ink); margin: 0; flex: 1; line-height: 1.1; }
.wc-a11y-phead .wc-x { width: 40px; height: 40px; border-radius: 50%; background: var(--mist); color: var(--ink); border: none; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; transition: background .2s; }
.wc-a11y-phead .wc-x:hover { background: var(--mist-2); }
.wc-a11y-phead .wc-x svg { width: 20px; height: 20px; }
.wc-a11y-panel .wc-a11y-grid { grid-template-columns: 1fr; }
.wc-a11y-reset { width: 100%; justify-content: center; margin-top: 18px; }

/* =========================================================
   FLOATING LAUNCHER (Barrierefreiheit)
   ========================================================= */
.wc-launch {
  position: fixed; z-index: 930; right: clamp(14px, 2.5vw, 26px); bottom: clamp(14px, 2.5vw, 26px);
  width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--navy); color: #fff; display: grid; place-items: center;
  box-shadow: 0 18px 40px -16px rgba(12,22,34,.7); transition: transform .3s var(--ease-out), background .3s, opacity .3s var(--ease-out), visibility .3s;
}
.wc-launch:hover { transform: translateY(-3px) scale(1.05); background: var(--blue); }
.wc-launch svg { width: 30px; height: 30px; }
.wc-launch::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--blue); opacity: 0; transform: scale(.8); transition: opacity .3s, transform .3s; }
.wc-launch:focus-visible::after { opacity: 1; transform: scale(1); }
/* Launcher ausblenden, sobald die mobile Navigation (oder ein Overlay) geöffnet ist */
body.mnav-lock .wc-launch { opacity: 0; visibility: hidden; transform: scale(.85); pointer-events: none; }

/* =========================================================
   AKTIVE BARRIEREFREIHEITS-MODI (am <html> / <body>)
   ========================================================= */
html.wc-contrast { filter: contrast(1.32) saturate(1.12); }
body.wc-links a:not(.btn):not(.logo):not(.wc-btn-primary):not(.wc-btn-ghost) { text-decoration: underline !important; text-underline-offset: 3px; text-decoration-thickness: 2px !important; }
body.wc-spacing { letter-spacing: .06em; word-spacing: .14em; line-height: 1.85; }
body.wc-readable, body.wc-readable * { font-family: 'Raleway', system-ui, sans-serif !important; font-weight: 600 !important; }
body.wc-readable .lite { font-weight: 500 !important; }
body.wc-nomotion *, body.wc-nomotion *::before, body.wc-nomotion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
body.wc-bigcursor, body.wc-bigcursor * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M10 6l28 16-12 3-5 12z' fill='%23fff' stroke='%230c1622' stroke-width='2.4' stroke-linejoin='round'/%3E%3C/svg%3E") 6 6, auto !important; }

/* Lesemaske */
.wc-readmask { position: fixed; left: 0; width: 100%; z-index: 935; pointer-events: none; background: rgba(8,15,26,.62); transition: height .05s linear; display: none; }
body.wc-readmaskon .wc-readmask { display: block; }
.wc-readmask.top { top: 0; }
.wc-readmask.bot { bottom: 0; }

/* =========================================================
   BEWERBUNGS-MODAL
   ========================================================= */
.wc-apply {
  position: fixed; inset: 0; z-index: 960; display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(14px, 3vw, 48px); overflow-y: auto; opacity: 0; visibility: hidden;
  background: rgba(8,15,26,.6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  transition: opacity .35s var(--ease-out), visibility .35s;
}
.wc-apply.show { opacity: 1; visibility: visible; }
.wc-apply-card {
  position: relative; width: min(680px, 100%); background: #fff; border-radius: var(--r-m);
  box-shadow: var(--shadow); padding: clamp(26px, 3.2vw, 44px); margin: 0 auto;
  transform: translateY(24px) scale(.98); transition: transform .4s var(--ease-out);
}
.wc-apply.show .wc-apply-card { transform: none; }
.wc-apply-x { position: absolute; top: clamp(16px,2vw,22px); right: clamp(16px,2vw,22px); width: 44px; height: 44px; border-radius: 50%; background: var(--mist); color: var(--ink); border: none; cursor: pointer; display: grid; place-items: center; transition: background .2s, transform .2s; z-index: 2; }
.wc-apply-x:hover { background: var(--mist-2); transform: rotate(90deg); }
.wc-apply-x svg { width: 22px; height: 22px; }
.wc-apply-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 2.4px; text-transform: uppercase; color: var(--blue-bright); margin: 0 0 12px; }
.wc-apply-card h2 { font-family: 'Raleway', sans-serif; font-weight: 700; font-size: clamp(24px, 2.8vw, 34px); letter-spacing: -.03em; color: var(--ink); margin: 0 0 8px; line-height: 1.1; }
.wc-apply-job { font-size: 15px; font-weight: 600; color: var(--soft); margin: 0 0 26px; }
.wc-apply-job b { color: var(--blue); font-weight: 700; }

.wc-field { margin-bottom: 18px; }
.wc-field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.wc-field label .req { color: var(--blue); }
.wc-field input[type="text"], .wc-field input[type="email"], .wc-field input[type="tel"], .wc-field textarea {
  width: 100%; font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); background: var(--mist-3);
  border: 1.5px solid var(--mist-2); border-radius: var(--r-s); padding: 14px 16px; transition: border-color .2s, box-shadow .2s, background .2s;
}
.wc-field input:focus, .wc-field textarea:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(31,115,192,.15); }
.wc-field textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
.wc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Datei-Upload (Dropzone) */
.wc-drop { position: relative; display: flex; align-items: center; gap: 16px; padding: 20px; background: var(--mist-3); border: 1.5px dashed var(--mist-2); border-radius: var(--r-s); cursor: pointer; transition: border-color .25s, background .25s; }
.wc-drop:hover, .wc-drop.drag { border-color: var(--blue); background: rgba(31,115,192,.05); }
.wc-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.wc-drop-ic { width: 46px; height: 46px; border-radius: 12px; background: #fff; color: var(--blue); display: grid; place-items: center; flex-shrink: 0; box-shadow: var(--shadow-s); }
.wc-drop-ic svg { width: 24px; height: 24px; }
.wc-drop-txt b { display: block; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.wc-drop-txt span { font-size: 12.5px; color: var(--soft); font-weight: 600; }
.wc-files { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wc-file { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: var(--mist); border-radius: var(--r-s); font-size: 13.5px; font-weight: 600; color: var(--ink); }
.wc-file .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-file .fsz { color: var(--soft); font-weight: 700; font-size: 12px; flex-shrink: 0; }
.wc-file-rm { width: 28px; height: 28px; border-radius: 50%; border: none; background: #fff; color: var(--soft); cursor: pointer; display: grid; place-items: center; flex-shrink: 0; transition: color .2s, background .2s; }
.wc-file-rm:hover { background: #ffe9e9; color: #d33; }
.wc-file-rm svg { width: 15px; height: 15px; }

/* Datenschutz-Checkbox */
.wc-consent { display: flex; align-items: flex-start; gap: 13px; margin: 6px 0 8px; cursor: pointer; }
.wc-consent input { position: absolute; opacity: 0; pointer-events: none; }
.wc-consent .box { width: 24px; height: 24px; border-radius: 7px; background: var(--mist-3); box-shadow: inset 0 0 0 2px var(--mist-2); flex-shrink: 0; display: grid; place-items: center; margin-top: 1px; transition: background .2s, box-shadow .2s; }
.wc-consent .box svg { width: 14px; height: 14px; color: #fff; opacity: 0; transform: scale(.5); transition: opacity .2s, transform .2s; }
.wc-consent input:checked + .box { background: var(--blue); box-shadow: inset 0 0 0 2px var(--blue); }
.wc-consent input:checked + .box svg { opacity: 1; transform: scale(1); }
.wc-consent input:focus-visible + .box { box-shadow: inset 0 0 0 2px var(--blue), 0 0 0 3px rgba(31,115,192,.25); }
.wc-consent-txt { font-size: 13px; line-height: 1.55; color: var(--soft); font-weight: 500; }
.wc-consent-txt a { color: var(--blue); font-weight: 700; }
.wc-consent-txt a:hover { text-decoration: underline; }

/* Spamschutz: Honeypot + Rechen-Captcha */
.wc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.wc-captcha { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--mist); border-radius: var(--r-s); margin: 4px 0 18px; flex-wrap: wrap; }
.wc-captcha-q { font-size: 14.5px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.wc-captcha-q .qbadge { width: 34px; height: 34px; border-radius: 10px; background: #fff; color: var(--blue); display: grid; place-items: center; box-shadow: var(--shadow-s); }
.wc-captcha-q .qbadge svg { width: 19px; height: 19px; }
.wc-captcha input { width: 92px; font: inherit; font-size: 15px; font-weight: 700; color: var(--ink); background: #fff; border: 1.5px solid var(--mist-2); border-radius: 11px; padding: 11px 14px; text-align: center; }
.wc-captcha input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,115,192,.15); }

.wc-apply-submit { width: 100%; justify-content: center; margin-top: 4px; }
.wc-apply-foot { font-size: 12px; color: var(--soft); font-weight: 500; text-align: center; margin: 16px 0 0; line-height: 1.5; }
.wc-ssl { display: inline-flex; align-items: center; gap: 5px; color: var(--green, #1a9d52); font-weight: 700; }
.wc-ssl svg { width: 14px; height: 14px; }

.wc-err { font-size: 13px; font-weight: 700; color: #d33; margin: 10px 0 0; display: none; align-items: center; gap: 8px; }
.wc-err.show { display: flex; }
.wc-err svg { width: 17px; height: 17px; flex-shrink: 0; }

/* Erfolgs-Zustand */
.wc-apply-done { text-align: center; padding: clamp(20px,3vw,40px) 0; display: none; }
.wc-apply-done.show { display: block; }
.wc-apply-done .check { width: 76px; height: 76px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; margin: 0 auto 24px; box-shadow: 0 22px 44px -18px rgba(31,115,192,.9); }
.wc-apply-done .check svg { width: 38px; height: 38px; }
.wc-apply-done h2 { font-family: 'Raleway', sans-serif; font-weight: 700; font-size: clamp(24px,2.6vw,32px); letter-spacing: -.02em; color: var(--ink); margin: 0 0 12px; }
.wc-apply-done p { font-size: 15px; line-height: 1.6; color: var(--soft); font-weight: 500; margin: 0 auto 26px; max-width: 44ch; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 640px) {
  .wc-cookie { padding: 20px 18px; bottom: 10px; width: calc(100vw - 20px); }
  .wc-ck-actions { flex-direction: column; align-items: stretch; }
  .wc-ck-actions .wc-btn-primary, .wc-ck-actions .wc-btn-ghost, .wc-ck-actions .wc-btn-text { margin-left: 0; width: 100%; justify-content: center; }
  .wc-ck-actions .wc-btn-text { order: 3; }
  .wc-a11y-grid { grid-template-columns: 1fr; }
  .wc-tabs { width: 100%; }
  .wc-tab { flex: 1; text-align: center; }
  .wc-row { grid-template-columns: 1fr; }
  .wc-a11y-panel { left: 10px; right: 10px; width: auto; bottom: 84px; }
  .wc-launch { width: 52px; height: 52px; }
  .wc-launch svg { width: 27px; height: 27px; }
}
@media (max-width: 380px) {
  .wc-captcha { flex-direction: column; align-items: stretch; }
  .wc-captcha input { width: 100%; }
}

/* reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  .wc-cookie, .wc-a11y-panel, .wc-apply-card, .wc-w-backdrop, .wc-apply { transition-duration: .01ms; }
}
