/* Consent-Banner und Cookie-Einstellungen. Palette, Radien und Schriften aus DESIGN.md:
   dark #0b1920, accent #2453ff (nur auf hellem Grund), borderLight #d7d7d7, grey #666,
   Radius card 16px / pill 999rem, UI-Schrift Inter, Fließtext Montserrat 300. */
.mb-consent, .mb-consent-dialog, .mb-consent-placeholder {
  --mbc-dark: #0b1920; --mbc-accent: #2453ff; --mbc-accent-soft: #eef2ff; --mbc-accent-line: #b9c7ff;
  --mbc-line: #d7d7d7; --mbc-grey: #666666; --mbc-radius: 16px; --mbc-pill: 999rem;
  --mbc-ease: cubic-bezier(.2, .7, .2, 1);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}
.mb-consent *, .mb-consent-dialog *, .mb-consent-placeholder * { box-sizing: border-box; }
.mb-consent p, .mb-consent-dialog p { margin: 0; }

/* Banner: unten rechts als Karte, auf schmalen Viewports als Blatt am unteren Rand */
.mb-consent {
  position: fixed; z-index: 90; inset: auto 0.75rem 0.75rem 0.75rem;
  color: #fff; background: rgba(11, 25, 32, .96); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--mbc-radius); padding: 1.5rem;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .7);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  animation: mbc-rise .35s var(--mbc-ease);
}
.mb-consent[hidden] { display: none; }
@media (min-width: 640px) { .mb-consent { inset: auto 1.25rem 1.25rem auto; width: min(27rem, calc(100vw - 2.5rem)); padding: 1.75rem; } }
@keyframes mbc-rise { from { opacity: 0; transform: translateY(12px); } }
.mb-consent__eyebrow { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: #6b8dff; font-weight: 500; }
.mb-consent__title { margin: .5rem 0 0; font-size: 1.1rem; font-weight: 500; letter-spacing: -.01em; line-height: 1.3; color: #fff; }
.mb-consent__text { margin-top: .6rem; font-family: 'Montserrat', 'Inter', sans-serif; font-weight: 300; font-size: .875rem; line-height: 1.6; color: rgba(255, 255, 255, .72); text-wrap: pretty; }
.mb-consent__text a, .mb-consent__links a, .mb-consent__link { color: rgba(255, 255, 255, .85); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .35); }
.mb-consent__text a:hover, .mb-consent__links a:hover, .mb-consent__link:hover { color: #fff; text-decoration-color: #fff; }
.mb-consent__actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: 1.25rem; }
.mb-consent__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-top: 1rem; font-size: .8rem; }
.mb-consent__links { display: flex; gap: 1rem; }
.mb-consent__link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* Pillen: eine Vokabel für alle Aktionen */
.mb-consent__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.75rem; padding: 0 1.25rem;
  border-radius: var(--mbc-pill); border: 1px solid transparent; font: 500 .875rem/1 'Inter', system-ui, sans-serif;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .3s var(--mbc-ease), color .3s var(--mbc-ease), border-color .3s var(--mbc-ease), transform .3s var(--mbc-ease);
}
.mb-consent__btn:active { transform: translateY(1px); }
.mb-consent__btn:focus-visible, .mb-consent__link:focus-visible, .mb-consent__close:focus-visible, .mb-consent-switch input:focus-visible { outline: 2px solid var(--mbc-accent); outline-offset: 4px; }
.mb-consent .mb-consent__btn--primary { background: #fff; color: var(--mbc-dark); }
.mb-consent .mb-consent__btn--primary:hover { background: rgba(255, 255, 255, .9); }
.mb-consent .mb-consent__btn--secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.mb-consent .mb-consent__btn--secondary:hover { border-color: rgba(255, 255, 255, .7); }
.mb-consent .mb-consent__btn:focus-visible { outline-color: #fff; }

/* Einstellungen: heller Dialog in der obersten Ebene */
.mb-consent-dialog {
  width: min(38rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); margin: auto; padding: 0; border: 0;
  border-radius: var(--mbc-radius); background: #fff; color: #000; box-shadow: 0 40px 100px -40px rgba(11, 25, 32, .6);
  overflow: hidden;
}
.mb-consent-dialog[open] { display: flex; flex-direction: column; animation: mbc-rise .3s var(--mbc-ease); }
.mb-consent-dialog::backdrop { background: rgba(11, 25, 32, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.mb-consent-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.5rem 1.5rem 0; }
.mb-consent-dialog__title { margin: 0; font-size: 1.35rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }
.mb-consent-dialog__intro { margin-top: .5rem; font-family: 'Montserrat', 'Inter', sans-serif; font-weight: 300; font-size: .9rem; line-height: 1.6; color: var(--mbc-grey); text-wrap: pretty; }
.mb-consent__close { flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 1px solid var(--mbc-line); border-radius: var(--mbc-pill); background: #fff; color: #000; cursor: pointer; transition: background-color .3s var(--mbc-ease); }
.mb-consent__close:hover { background: #f8f9fa; }
.mb-consent-dialog__body { overflow: auto; padding: 1.25rem 1.5rem; }
.mb-consent__hint { margin-bottom: 1rem; padding: .75rem 1rem; border: 1px solid var(--mbc-accent-line); border-radius: 10px; background: var(--mbc-accent-soft); font-size: .85rem; line-height: 1.5; color: #1941d6; }
.mb-consent__hint[hidden] { display: none; }
.mb-consent__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.mb-consent__row { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; padding: 1rem 1.1rem; border: 1px solid var(--mbc-line); border-radius: 12px; transition: border-color .3s var(--mbc-ease), box-shadow .3s var(--mbc-ease); }
.mb-consent__row[hidden] { display: none; }
.mb-consent__row[data-highlight] { border-color: var(--mbc-accent); box-shadow: 0 0 0 3px var(--mbc-accent-soft); }
.mb-consent__row-title { font-size: .95rem; font-weight: 500; line-height: 1.3; }
.mb-consent__row-text { grid-column: 1; font-family: 'Montserrat', 'Inter', sans-serif; font-weight: 300; font-size: .85rem; line-height: 1.55; color: var(--mbc-grey); text-wrap: pretty; }
.mb-consent__row-services { grid-column: 1; margin-top: .35rem; font-size: .75rem; line-height: 1.5; color: var(--mbc-grey); }
.mb-consent__row-services b { font-weight: 500; color: #000; }
.mb-consent-switch { grid-column: 2; grid-row: 1 / span 3; align-self: start; display: inline-flex; align-items: center; }
.mb-consent-switch input { appearance: none; -webkit-appearance: none; margin: 0; width: 2.75rem; height: 1.5rem; border-radius: var(--mbc-pill); background: var(--mbc-line); position: relative; cursor: pointer; transition: background-color .3s var(--mbc-ease); }
.mb-consent-switch input::after { content: ''; position: absolute; top: .1875rem; left: .1875rem; width: 1.125rem; height: 1.125rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .3s var(--mbc-ease); }
.mb-consent-switch input:checked { background: var(--mbc-accent); }
.mb-consent-switch input:checked::after { transform: translateX(1.25rem); }
.mb-consent-switch input:disabled { cursor: default; opacity: .55; }
.mb-consent-dialog__foot { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: 1rem 1.5rem 1.5rem; border-top: 1px solid #e9ecef; }
.mb-consent-dialog .mb-consent__btn--primary { background: #000; color: #fff; }
.mb-consent-dialog .mb-consent__btn--primary:hover { background: rgba(0, 0, 0, .9); }
.mb-consent-dialog .mb-consent__btn--secondary { background: #fff; color: #000; border-color: var(--mbc-line); }
.mb-consent-dialog .mb-consent__btn--secondary:hover { border-color: #000; }
.mb-consent-dialog .mb-consent__link { margin-left: auto; color: var(--mbc-grey); font-size: .85rem; }
.mb-consent-dialog .mb-consent__link:hover { color: #000; }
@media (max-width: 480px) {
  .mb-consent__actions { grid-template-columns: 1fr; }
  .mb-consent-dialog__foot .mb-consent__btn { flex: 1 1 100%; }
  .mb-consent-dialog .mb-consent__link { margin: .25rem auto 0; }
}

/* Hinweis anstelle eines gesperrten Drittinhalts (Zwei-Klick-Lösung) */
.mb-consent-placeholder {
  display: flex; flex-direction: column; justify-content: center; gap: .75rem; padding: 1.5rem;
  border-radius: var(--mbc-radius); background: var(--mbc-dark); color: #fff; text-align: left;
}
.mb-consent-placeholder[hidden] { display: none; }
.mb-consent-placeholder--overlay { position: absolute; inset: 0; z-index: 2; border-radius: 0; background: rgba(11, 25, 32, .9); }
.mb-consent-placeholder__title { font-size: 1rem; font-weight: 500; line-height: 1.3; }
.mb-consent-placeholder__text { font-family: 'Montserrat', 'Inter', sans-serif; font-weight: 300; font-size: .85rem; line-height: 1.55; color: rgba(255, 255, 255, .72); max-width: 36rem; text-wrap: pretty; }
.mb-consent-placeholder__text a { color: rgba(255, 255, 255, .85); text-decoration: underline; text-underline-offset: 3px; }
.mb-consent-placeholder__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-top: .25rem; }
.mb-consent-placeholder .mb-consent__btn--primary { background: #fff; color: var(--mbc-dark); }
.mb-consent-placeholder .mb-consent__btn--primary:hover { background: rgba(255, 255, 255, .9); }
.mb-consent-placeholder .mb-consent__link { color: rgba(255, 255, 255, .8); font-size: .85rem; }
.mb-consent-placeholder .mb-consent__link:hover { color: #fff; }

/* Im JOIN-Container setzt karriere.html Farbe und Schrift für das Widget; der Hinweis behält seine eigenen. */
#join-widget .mb-consent-placeholder { color: #fff; padding: 1.5rem !important; }
/* Spezifischer als karriere.html's Regel für join-Links (#join-widget a[href*=…]:not(…)). */
#join-widget section.mb-consent-placeholder p.mb-consent-placeholder__text a { color: rgba(255, 255, 255, .85) !important; }

@media (prefers-reduced-motion: reduce) {
  .mb-consent, .mb-consent-dialog[open] { animation: none; }
  .mb-consent__btn, .mb-consent-switch input, .mb-consent-switch input::after, .mb-consent__row { transition: none; }
}
