/* S&D Bewerbungsformular – scoped styles. Inputs/buttons reuse the Webflow site classes
   (form_input, form_field-label, button), these rules only add layout and form-specific parts. */
.sdb {
  --sdb-text: var(--_primitives---colors--neutral-darkest, #030201);
  --sdb-brand: var(--_primitives---colors--mikado, #352315);
  --sdb-muted: var(--_primitives---colors--neutral-dark, #4e4d4d);
  --sdb-fill: var(--_primitives---opacity--neutral-darkest-5, #0302010d);
  --sdb-fill-hover: var(--_primitives---opacity--neutral-darkest-15, #03020126);
  --sdb-line: var(--_primitives---opacity--neutral-darkest-15, #03020126);
  --sdb-error: #b42318;
  color: var(--sdb-text);
  text-align: left;
  width: 100%;
}
.sdb *, .sdb *::before, .sdb *::after { box-sizing: border-box; }
.sdb [hidden] { display: none !important; }
.sdb-form { display: grid; gap: 2.5rem; }
.sdb-section { border: 0; margin: 0; padding: 0; min-width: 0; }
.sdb-section-title {
  display: block; width: 100%; padding: 0 0 .75rem; margin-bottom: 1.25rem;
  font-family: var(--_typography---font-styles--heading, inherit);
  font-size: 1.25rem; font-weight: 600; line-height: 1.3;
  border-bottom: 1px solid var(--sdb-text);
}
.sdb-section-desc { margin: -0.5rem 0 1rem; color: var(--sdb-muted); }
.sdb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1.25rem; }
.sdb-field { min-width: 0; grid-column: 1 / -1; display: flex; flex-direction: column; }
.sdb-field.is-half { grid-column: auto; }
.sdb .sdb-label { margin-bottom: .5rem; }
.sdb-req { color: var(--sdb-muted); }
.sdb-help { font-size: .875rem; color: var(--sdb-muted); margin: -0.25rem 0 .5rem; }
.sdb .form_input { width: 100%; font-family: inherit; }
.sdb input[type="date"].form_input { min-height: 2.75rem; appearance: none; -webkit-appearance: none; }
.sdb .sdb-select {
  appearance: none; -webkit-appearance: none; padding-right: 2.5rem; 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='%23030201' stroke-width='1.5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right .9rem center !important;
}
.sdb-date { display: grid; grid-template-columns: 1fr 1.6fr 1.2fr; gap: .5rem; }
.sdb-note { grid-column: 1 / -1; margin: 0; font-size: .875rem; color: var(--sdb-muted); }

/* radio pills */
.sdb-choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.sdb-choice { position: relative; margin: 0; cursor: pointer; }
.sdb-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sdb-choice span {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: .5rem 1rem; border-radius: 6px;
  background: var(--sdb-fill); border: 1px solid transparent; transition: background-color .2s, border-color .2s, color .2s; line-height: 1.3;
}
.sdb-choice:hover span { background: var(--sdb-fill-hover); }
.sdb-choice input:checked + span { background: var(--sdb-brand); color: #fff; }
.sdb-choice input:focus-visible + span { outline: 2px solid var(--sdb-text); outline-offset: 2px; }

/* checkbox */
.sdb-check { display: flex; gap: .75rem; align-items: flex-start; margin: 0; cursor: pointer; font-weight: 400; }
.sdb-check input { width: 1.125rem; height: 1.125rem; margin: .2rem 0 0; flex: 0 0 auto; accent-color: var(--sdb-brand); cursor: pointer; }

/* file upload */
.sdb-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.sdb-drop {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .25rem; min-height: 4.5rem; padding: 1rem;
  border: 1px dashed var(--sdb-fill-hover); border-radius: 6px; background: var(--sdb-fill); cursor: pointer; margin: 0; text-align: center;
  transition: background-color .2s, border-color .2s;
}
.sdb-drop:hover, .sdb-drop.is-over { background: var(--sdb-fill-hover); border-color: var(--sdb-text); }
.sdb-file-input:focus-visible + .sdb-drop { outline: 2px solid var(--sdb-text); outline-offset: 2px; }
.sdb-drop-title { font-weight: 600; text-decoration: underline; }
.sdb-drop-sub { color: var(--sdb-muted); }
.sdb-filelist { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .375rem; }
.sdb-filelist:empty { display: none; }
.sdb-filelist li { display: flex; align-items: center; gap: .75rem; padding: .375rem .375rem .375rem .75rem; background: var(--sdb-fill); border-radius: 6px; font-size: .9375rem; }
.sdb-fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdb-fsize { color: var(--sdb-muted); font-size: .8125rem; }
.sdb-fremove { border: 0; background: transparent; font-size: 1.25rem; line-height: 1; width: 2rem; height: 2rem; border-radius: 4px; cursor: pointer; color: inherit; }
.sdb-fremove:hover { background: var(--sdb-fill-hover); }

/* repeat groups */
.sdb-group { grid-column: 1 / -1; display: grid; gap: 1.25rem; }
.sdb-card { border: 1px solid var(--sdb-line); border-radius: 8px; padding: 1.25rem; margin: 0; min-width: 0; }
.sdb-card-title { font-weight: 600; padding: 0 .375rem; margin-left: -0.375rem; }
.sdb .sdb-add { justify-self: start; }
.sdb .sdb-remove { margin-top: 1rem; }

/* errors + actions */
.sdb-error { color: var(--sdb-error); font-size: .875rem; margin-top: .375rem; }
.sdb-error:empty { display: none; }
.sdb .has-error .form_input, .sdb .has-error .sdb-drop { border-color: var(--sdb-error); }
.sdb .has-error .sdb-choice span { border-color: var(--sdb-error); }
.sdb-actions { display: grid; gap: 1rem; justify-items: start; }
.sdb .sdb-submit { min-width: 14rem; cursor: pointer; }
.sdb .sdb-submit.is-loading { opacity: .6; cursor: progress; }
.sdb-status { font-size: .9375rem; }
.sdb-status:empty { display: none; }
.sdb-status.is-error { color: var(--sdb-error); }
.sdb-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sdb-loading { padding: 3rem 0; color: var(--sdb-muted); }

.sdb-success { padding: 3rem 1.5rem; text-align: center; background: var(--sdb-fill); border-radius: 8px; outline: none; }
.sdb-success-icon {
  width: 3rem; height: 3rem; margin: 0 auto 1rem; border-radius: 50%; background: var(--sdb-brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.sdb-success h3 { margin: 0 0 .5rem; }
.sdb-success p { margin: 0 auto .5rem; max-width: 32rem; }
.sdb-ref { color: var(--sdb-muted); font-size: .875rem; }

@media screen and (max-width: 767px) {
  .sdb-grid { grid-template-columns: 1fr; }
  .sdb-field.is-half { grid-column: 1 / -1; }
  .sdb-card { padding: 1rem; }
  .sdb .sdb-submit { width: 100%; }
  .sdb-actions { justify-items: stretch; }
}
