/* Jobs-Seite (26.11.2026, Termin mit Moritz): „Bewerben“ an jeder Stelle, Bewerbungsformular als Fenster von rechts,
   ruhiger Satz statt leerer Liste. Ergänzt site.css (.jobs, .job); Felder im Linienstil wie das Kontaktformular. */

:root { --fehler: #B42318; }

/* Knopf unter den Angaben einer Stelle */
.job__bewerben { margin-top: 1.7rem; }
.job__bewerben .knopf, .jobs__leer .knopf, .bw .knopf { cursor: pointer; font-family: inherit; }

/* Keine Stelle in dieser Sprache: Die Liste wird leer gebaut, dann steht hier der Satz (sonst ausgeblendet) */
.jobs__leer { display: none; }
.jobs__liste:empty { display: none; }
.jobs__liste:empty + .jobs__leer { display: block; border-top: 1px solid var(--schwarz); padding-top: clamp(1.6rem, 3vw, 2.4rem); }
.jobs__leer p { font-size: clamp(1.25rem, 2.2vw, 1.8rem); font-weight: 300; line-height: 1.35; letter-spacing: -.01em; max-width: 34ch; margin-bottom: 1.8rem; }

/* Fenster: rechts, volle Höhe, Seite dahinter gedämpft */
html.bw-offen { overflow: hidden; }
.bw { position: fixed; inset: 0 0 0 auto; width: min(760px, 100%); max-width: 100%; height: 100%; max-height: 100%; margin: 0 0 0 auto;
  padding: 0; border: 0; background: var(--weiss); color: var(--schwarz); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  box-shadow: -30px 0 90px rgba(11, 13, 18, .14); }
.bw::backdrop { background: rgba(11, 13, 18, .44); }
.bw[open] { animation: bw-rein .6s var(--ease) both; }
.bw[open]::backdrop { animation: bw-schleier .45s ease both; }
.bw.ist-zu { animation: bw-raus .26s ease-in both; }
.bw.ist-zu::backdrop { animation: bw-schleier .26s ease-in reverse both; }
@keyframes bw-rein { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes bw-raus { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(24px); } }
@keyframes bw-schleier { from { opacity: 0; } to { opacity: 1; } }

.bw__innen { min-height: 100%; padding: 0 clamp(1.4rem, 4.6vw, 3.8rem) clamp(2.4rem, 5vw, 3.6rem); }
.bw__kopf { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.3rem 0 1rem; background: var(--weiss); border-bottom: 1px solid transparent; transition: border-color .25s ease; }
.bw.ist-gerollt .bw__kopf { border-bottom-color: var(--linie); }
.bw__kopf .kicker { margin: 0; }
.bw__zu { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -13px; border-radius: 50%; color: var(--schwarz); transition: background .2s ease; }
.bw__zu:hover { background: #F1F2F3; }
.bw__titel { font-size: clamp(1.9rem, 3.4vw, 2.8rem); font-weight: 300; line-height: 1.08; letter-spacing: -.02em; max-width: 20ch;
  margin: clamp(.9rem, 2.4vw, 1.9rem) 0 clamp(2rem, 4vw, 2.9rem); }

/* Felder */
.bw__formular { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.8rem 2.2rem; }
.bw-feld { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.bw-feld--breit { grid-column: 1 / -1; }
.bw-feld > label { font-size: .82rem; letter-spacing: .02em; color: var(--grau-text); }
.bw-feld input:not([type="file"]), .bw-feld textarea, .bw-feld select { font: inherit; font-size: 1.05rem; color: var(--schwarz); background: transparent;
  border: 0; border-bottom: 1px solid #C9CDD1; border-radius: 0; padding: .5rem 0 .65rem; width: 100%; transition: border-color .2s ease, box-shadow .2s ease; }
.bw-feld input:not([type="file"]):hover, .bw-feld textarea:hover, .bw-feld select:hover { border-bottom-color: #8E9296; }
.bw-feld input:not([type="file"]):focus, .bw-feld textarea:focus, .bw-feld select:focus { outline: none; border-bottom-color: var(--schwarz); box-shadow: 0 1px 0 var(--schwarz); }
.bw-feld input::placeholder, .bw-feld textarea::placeholder { color: #A3A7AB; }
.bw-feld textarea { min-height: 116px; resize: vertical; line-height: 1.55; }
.bw-feld select { padding-right: 1.6rem; -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235C5E61' stroke-width='1.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 2px center; }
.bw-feld select:has(option[value=""]:checked) { color: #A3A7AB; }
.bw-feld select option { color: var(--schwarz); }
.bw-feld__info { font-size: .78rem; color: var(--grau-text); margin-top: .15rem; }

/* PDF-Felder: eine Zeile wie die übrigen Felder; das unsichtbare Dateifeld liegt darüber (Klicken und Hineinziehen) */
.bw-datei { position: relative; display: flex; align-items: center; gap: .85rem; min-height: 3.1rem; padding: .55rem 0 .7rem;
  border-bottom: 1px solid #C9CDD1; transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease; }
.bw-datei:hover { border-bottom-color: #8E9296; }
.bw-datei:focus-within { border-bottom-color: var(--schwarz); box-shadow: 0 1px 0 var(--schwarz); }
.bw-datei:has(.bw-datei__input:focus-visible) { outline: 2px solid var(--schwarz); outline-offset: 4px; }
.bw-datei.ist-drueber { background-color: var(--hellblau); border-bottom-color: var(--schwarz); }
.bw-datei__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.bw-datei__input::-webkit-file-upload-button { cursor: pointer; }
.bw-datei__zeichen { flex: none; display: grid; place-items: center; color: var(--grau-text); }
.bw-datei__text { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: .6rem; font-size: 1.05rem; }
.bw-datei__wahl { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.bw-datei__ziehen { color: var(--grau-text); }
.bw-datei__name, .bw-datei__groesse { display: none; }
.bw-datei__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bw-datei__groesse { flex: none; font-size: .88rem; color: var(--grau-text); white-space: nowrap; }
.bw-datei.hat-datei .bw-datei__leer { display: none; }
.bw-datei.hat-datei .bw-datei__name, .bw-datei.hat-datei .bw-datei__groesse { display: block; }
.bw-datei.hat-datei .bw-datei__zeichen { color: var(--schwarz); }
.bw-datei__weg { position: relative; z-index: 1; flex: none; font-size: .85rem; color: var(--grau-text); text-decoration: underline;
  text-underline-offset: 3px; padding: .3rem 0; }
.bw-datei__weg:hover { color: var(--schwarz); }
@media (hover: none), (pointer: coarse) { .bw-datei__ziehen { display: none; } }

/* Fehler: Linie und kurzer Satz unter dem Feld */
.bw-fehler { font-size: .8rem; line-height: 1.45; color: var(--fehler); margin-top: .25rem; }
.bw-feld.ist-fehler > label { color: var(--fehler); }
.bw-feld.ist-fehler input:not([type="file"]), .bw-feld.ist-fehler select, .bw-feld.ist-fehler .bw-datei { border-bottom-color: var(--fehler); }
.bw-feld.ist-fehler input:not([type="file"]):focus, .bw-feld.ist-fehler select:focus, .bw-feld.ist-fehler .bw-datei:focus-within { box-shadow: 0 1px 0 var(--fehler); }

/* Senden, Hinweis zum Datenschutz */
.bw-fuss { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 1.8rem; margin-top: .4rem; }
.bw-meldung { flex: 1 0 100%; font-size: .92rem; line-height: 1.5; }
.bw-meldung.ist-fehler { color: var(--fehler); }
.bw-meldung a { color: inherit; }
.bw-fuss .knopf { flex: none; }
.bw-fuss .knopf[disabled] { opacity: .6; cursor: progress; }
.bw-hinweis { flex: 1 1 16rem; font-size: .8rem; line-height: 1.5; color: var(--grau-text); max-width: 40ch; }
.bw-hinweis a { color: inherit; }
.bw-falle { display: none; }

/* Nach dem Senden */
.bw__danke { padding-top: clamp(1rem, 6vh, 4rem); outline: none; }
.bw__danke p { font-size: clamp(1.05rem, 1.4vw, 1.25rem); font-weight: 300; line-height: 1.6; color: #2a2c2f; max-width: 40ch; margin: -1rem 0 2.2rem; }

@media (max-width: 599px) {
  .bw { width: 100%; box-shadow: none; }
  .bw__formular { grid-template-columns: minmax(0, 1fr); gap: 1.55rem; }
  .bw-fuss { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .bw-fuss .knopf { justify-content: center; }
  .bw-meldung, .bw-hinweis { flex: none; }
  .job__bewerben .knopf, .jobs__leer .knopf { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .bw[open], .bw[open]::backdrop, .bw.ist-zu, .bw.ist-zu::backdrop { animation: none; }
}
