/* RETRO BOXING e. V. – v1447 – Light-Kontrast-Schutz.
 * Nur Light-Modus. Die bewusst rahmenlosen Standardseiten-Contentwrapper,
 * farbige Angebotskarten, Foto-Heros, reCAPTCHA und Dark bleiben unveraendert.
 * Richtwert: sichtbare UI-Umrandungen mindestens 3:1 zur Innenflaeche.
 */
@media screen {
  html[data-rb-theme="light"] body {
    --rb-light-ui-border:#596c7a;
    --rb-light-ui-border-focus:#942a2a;
    --rb-light-ui-ink:#182630;
  }

  /* Kontakt: AUSSENRAHMEN und Adresse/Anfahrt/Kontakt muessen erkennbar sein.
     Ueberlagert spaetere Light-Legacy-Regeln, nicht das Dark-Design. */
  html[data-rb-theme="light"] body main.page-slug-kontakt .rb-contact-form-card {
    border:2px solid var(--rb-light-ui-border)!important;
  }
  html[data-rb-theme="light"] body main.page-slug-kontakt .rb-contact-location__group {
    box-sizing:border-box!important;
    min-width:0;
    padding:clamp(13px,1.9vw,18px)!important;
    background:#fbfcfd!important;
    border:1px solid var(--rb-light-ui-border)!important;
    border-radius:14px!important;
    color:var(--rb-light-ui-ink)!important;
  }
  html[data-rb-theme="light"] body main.page-slug-kontakt .rb-contact-location__map,
  html[data-rb-theme="light"] body main.page-slug-kontakt .rb-contact-location__map-wrap {
    border-color:var(--rb-light-ui-border)!important;
  }
  html[data-rb-theme="light"] body main.page-slug-kontakt .rb-contact-form-card form.form-grid .form-row > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  html[data-rb-theme="light"] body main.page-slug-kontakt .rb-contact-form-card form.form-grid .form-row > :is(select,textarea):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  html[data-rb-theme="light"] body main.page-slug-kontakt .rb-contact-form-card form.form-grid .form-row .phone-input-group > :is(input,select) {
    border-color:var(--rb-light-ui-border)!important;
  }
  html[data-rb-theme="light"] body main.page-slug-kontakt .rb-contact-form-card :is(input,select,textarea):focus-visible {
    border-color:var(--rb-light-ui-border-focus)!important;
    outline:2px solid var(--rb-light-ui-border-focus)!important;
    outline-offset:2px!important;
  }

  /* Dieselbe deutliche Kante fuer die haeufig verwendeten hellen Kontakt-,
     FAQ-, Download- und Event-Module; keine globalen Rechte-/Statusfarben. */
  html[data-rb-theme="light"] body main.site-main :is(
    .home-contact-form-card,.contact-role-card,.faq-item,.download-card,.event-card,
    .contact-card,.info-line
  ):not(.is-success):not(.is-warning):not(.is-danger) {
    border-color:var(--rb-light-ui-border)!important;
  }
  html[data-rb-theme="light"] body main.page-slug-home .home-contact-form-card :is(
    input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
    select,textarea
  ),
  html[data-rb-theme="light"] body main.page-slug-probetraining .probetraining-form-card :is(
    input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
    select,textarea
  ) {
    border-color:var(--rb-light-ui-border)!important;
  }

  /* Beschriftungen und dezente Hilfstexte sind auch auf Hell kontrastreich. */
  html[data-rb-theme="light"] body main.page-slug-kontakt .rb-contact-form-card :is(label,.help,.section-sub),
  html[data-rb-theme="light"] body main.page-slug-home .home-contact-form-card :is(label,.help,.section-sub) {
    color:#32434f!important;
    opacity:1!important;
  }
}

/* v1453 – Zwei gezielte Korrekturen; die übrigen Komponenten bleiben unberührt.
 * (1) Echte Eingabefelder von Kontakt/Homeseite im Hellmodus.
 * (2) CAPTCHA-Zeilen mit eigener Hoehe und Platz fuer die Einwilligung.
 * Diese Regeln stehen nach dem bisherigen Public-Theme, damit alte mobile
 * Overflow-/Padding-Regeln die Korrektur nicht wieder ueberschreiben. */
@media screen {
  /* Ausschließlich tatsächlich sichtbare Kontaktfelder – keine Hidden-Inputs,
     Datenschutz-/Spam-Fallen und kein reCAPTCHA-Response-Textarea. */
  html[data-rb-theme="light"] body main.page-slug-kontakt .rb-contact-form-card :is(
    #contactFirstName,#contactLastName,#contactEmail,#contactPhone,#contactMessage,
    #contactDepartmentSelect,.phone-input-group>input,.phone-input-group>select
  ),
  html[data-rb-theme="light"] body main.page-slug-home .home-contact-form-card :is(
    #homeFirstName,#homeLastName,#homeEmail,#homePhone,#homeMessage,
    #homeDepartmentSelect,.phone-input-group>input,.phone-input-group>select
  ) {
    box-sizing:border-box!important;
    visibility:visible!important;
    opacity:1!important;
    background-color:#d9e1e6!important;
    background-image:none!important;
    border:2px solid #71838f!important;
    border-radius:15px!important;
    color:#192632!important;
    -webkit-text-fill-color:#192632!important;
    box-shadow:0 2px 5px rgba(19,32,42,.08),inset 0 1px 0 rgba(255,255,255,.68)!important;
  }
  html[data-rb-theme="light"] body main.page-slug-kontakt .rb-contact-form-card :is(
    #contactFirstName,#contactLastName,#contactEmail,#contactPhone,#contactMessage,
    #contactDepartmentSelect,.phone-input-group>input,.phone-input-group>select
  ):focus-visible,
  html[data-rb-theme="light"] body main.page-slug-home .home-contact-form-card :is(
    #homeFirstName,#homeLastName,#homeEmail,#homePhone,#homeMessage,
    #homeDepartmentSelect,.phone-input-group>input,.phone-input-group>select
  ):focus-visible {
    border-color:#963030!important;
    outline:2px solid #963030!important;
    outline-offset:2px!important;
  }

  /* Jedes vorhandene CAPTCHA: Inhalt im normalen Dokumentfluss lassen;
     insbesondere das mobile overflow:hidden und padding:0 der Kontaktformulare
     duerfen keine Einwilligungstexte oder Aktivierungsbuttons abschneiden. */
  html body main.site-main form .form-row:has(.g-recaptcha[data-sitekey]) {
    display:flex!important;
    flex-direction:column!important;
    justify-content:flex-start!important;
    align-items:stretch!important;
    gap:14px!important;
    box-sizing:border-box!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-width:100%!important;
    padding:clamp(17px,3vw,23px)!important;
    margin-block:16px!important;
    overflow:visible!important;
    contain:none!important;
    border-radius:15px!important;
  }
  html body main.site-main form .form-row:has(.g-recaptcha[data-sitekey]) > label {
    display:block!important;
    position:static!important;
    margin:0!important;
    padding:0!important;
    width:100%!important;
    text-align:center!important;
    line-height:1.4!important;
  }
  html body main.site-main form .form-row:has(.g-recaptcha[data-sitekey]) > .rb-recaptcha-consent {
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-start!important;
    align-content:normal!important;
    gap:16px!important;
    height:auto!important;
    min-height:0!important;
    width:100%!important;
    max-width:100%!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    background:transparent!important;
    background-image:none!important;
    box-shadow:none!important;
    overflow:visible!important;
  }
  html body main.site-main form .form-row:has(.g-recaptcha[data-sitekey]) > .rb-recaptcha-consent > p {
    display:block!important;
    position:static!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
    line-height:1.6!important;
    overflow-wrap:break-word!important;
    text-align:center!important;
  }
  html body main.site-main form .form-row:has(.g-recaptcha[data-sitekey]) > .rb-recaptcha-consent:not(.is-active) > .btn {
    position:static!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:auto!important;
    min-height:46px!important;
    max-width:100%!important;
    margin:0!important;
    padding:11px 17px!important;
    line-height:1.35!important;
    white-space:normal!important;
    text-align:center!important;
    flex:0 0 auto!important;
  }
  html body main.site-main form .form-row:has(.g-recaptcha[data-sitekey]) > .help {
    display:block!important;
    position:static!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
    text-align:center!important;
    line-height:1.55!important;
    overflow-wrap:break-word!important;
  }
  html body main.site-main form .form-row:has(.g-recaptcha[data-sitekey]) .rb-captcha-layout-v1448 {
    flex:none!important;
    position:relative!important;
    margin:5px auto!important;
  }
  html[data-rb-theme="light"] body main.site-main form .form-row:has(.g-recaptcha[data-sitekey]) {
    border:1px solid #9eacb6!important;
    background:rgba(239,244,247,.9)!important;
  }
}

/* v1454 – reCAPTCHA-Hotfix nach Live-Screenshot.
 * Der innere Consent-Kasten soll nicht mehr in einen zweiten Border laufen
 * oder unten aus dem aeußeren Rahmen ragen. Deshalb bleibt nur der aeussere
 * CAPTCHA-Rahmen sichtbar; der innere Consent-Wrapper wird neutralisiert,
 * behaelt aber Inhalt, Zentrierung und Abstaende. */
@media screen {
  html body main.site-main form .form-row:has(.rb-recaptcha-consent) {
    padding-bottom:clamp(18px,3vw,24px)!important;
    overflow:visible!important;
  }
  html body main.site-main form .form-row:has(.rb-recaptcha-consent) > .rb-recaptcha-consent,
  html body main.site-main form .form-row .rb-recaptcha-consent:not(.is-active) {
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:16px!important;
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    background-image:none!important;
    box-shadow:none!important;
    overflow:visible!important;
  }
  html body main.site-main form .form-row .rb-recaptcha-consent:not(.is-active) > p {
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:0 clamp(2px,1vw,8px)!important;
    text-align:center!important;
    line-height:1.58!important;
  }
  html body main.site-main form .form-row .rb-recaptcha-consent:not(.is-active) > .btn {
    position:static!important;
    width:auto!important;
    max-width:100%!important;
    margin:0 auto 2px!important;
    align-self:center!important;
  }
  html body main.site-main form .form-row .rb-recaptcha-consent + .help,
  html body main.site-main form .form-row > .help {
    margin-top:2px!important;
  }
}

/* v1455 – Screenshotkorrektur: kein Hinweistext unter dem CAPTCHA-Kasten,
 * der hinter den Aktivieren-Button rutschen kann. Der Text ist redundant:
 * die Consent-Meldung erklaert schon die Aktivierung, und nach dem Klick
 * enthaelt Googles Widget selbst den Roboter-Hinweis.
 * Nur bei tatsaechlich initialisiertem Consent ausblenden. */
@media screen {
  html body main.site-main form .form-row:has(> .rb-recaptcha-consent) {
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    box-sizing:border-box!important;
    width:100%!important;
    max-height:none!important;
    height:auto!important;
    min-height:0!important;
    gap:16px!important;
    padding-bottom:clamp(22px,3vw,28px)!important;
    overflow:visible!important;
  }
  html body main.site-main form .form-row.form-row-full:has(.g-recaptcha[data-sitekey]):has(> .rb-recaptcha-consent) > .help {
    display:none!important;
  }
  html body main.site-main form .form-row > .rb-recaptcha-consent:not(.is-active) {
    position:static!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    width:100%!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    box-shadow:none!important;
    background:transparent!important;
    background-image:none!important;
    overflow:visible!important;
  }
  html body main.site-main form .form-row > .rb-recaptcha-consent:not(.is-active) > button.btn {
    position:static!important;
    display:inline-flex!important;
    align-self:center!important;
    justify-content:center!important;
    text-align:center!important;
    flex:0 0 auto!important;
    height:auto!important;
    min-height:46px!important;
    margin:0 auto!important;
    max-width:100%!important;
    white-space:normal!important;
    transform:none!important;
  }
}


/* v1457 – Strukturelle reCAPTCHA-Reparatur.
 * Der bisherige .form-row-Container wird fuer reCAPTCHA nicht mehr verwendet:
 * dessen mobile overflow/height/grid-Regeln liessen den Aktivierungsbutton
 * hinter den nachfolgenden Senden-Button rutschen. Die neue isolierte Zeile
 * enthaelt Label, Einwilligung und Google-Widget im normalen Dokumentfluss.
 * Die Google-Validierung und das Einwilligungs-JS sind unveraendert. */
@media screen {
  html body main.site-main form.form-grid > .rb-captcha-section-v1457 {
    grid-column:1 / -1!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:18px!important;
    position:relative!important;
    float:none!important;
    clear:both!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    box-sizing:border-box!important;
    overflow:visible!important;
    contain:none!important;
    padding:clamp(18px,4vw,25px)!important;
    margin:18px 0 22px!important;
    border:1px solid rgba(170,185,195,.45)!important;
    border-radius:17px!important;
    background:rgba(255,255,255,.02)!important;
  }
  html body main.site-main form.form-grid > .rb-captcha-section-v1457 > label {
    display:block!important;
    position:static!important;
    width:100%!important;
    height:auto!important;
    margin:0!important;
    padding:0!important;
    text-align:center!important;
    font-weight:750!important;
    line-height:1.45!important;
  }
  html body main.site-main form.form-grid > .rb-captcha-section-v1457 > .rb-recaptcha-consent {
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-start!important;
    flex:0 0 auto!important;
    gap:20px!important;
    position:static!important;
    float:none!important;
    clear:both!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    background-image:none!important;
    box-shadow:none!important;
    overflow:visible!important;
    contain:none!important;
  }
  html body main.site-main form.form-grid > .rb-captcha-section-v1457 > .rb-recaptcha-consent > p {
    display:block!important;
    position:static!important;
    flex:0 0 auto!important;
    width:100%!important;
    max-width:48ch!important;
    height:auto!important;
    margin:0!important;
    padding:0!important;
    font-size:inherit!important;
    line-height:1.62!important;
    text-align:center!important;
    overflow-wrap:break-word!important;
  }
  html body main.site-main form.form-grid > .rb-captcha-section-v1457 > .rb-recaptcha-consent:not(.is-active) > button.btn {
    position:static!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 auto!important;
    align-self:center!important;
    float:none!important;
    clear:both!important;
    width:auto!important;
    max-width:100%!important;
    min-height:48px!important;
    height:auto!important;
    padding:12px 16px!important;
    margin:0!important;
    white-space:normal!important;
    text-align:center!important;
    line-height:1.4!important;
    transform:none!important;
  }
  /* Unterhalb der Consent-Zeile folgt die Submit-Zeile erst nach dem
     tatsaechlichen Button-Ende; sie kann nicht ueber dem Widget liegen. */
  html body main.site-main form.form-grid > .rb-captcha-section-v1457 + .form-row {
    grid-column:1 / -1!important;
    position:relative!important;
    margin-top:0!important;
    clear:both!important;
  }
  html body main.site-main form.form-grid > .rb-captcha-section-v1457 .rb-captcha-layout-v1448 {
    display:block;
    flex:none!important;
    align-self:center!important;
    position:relative!important;
    box-sizing:border-box!important;
    width:var(--rb-captcha-visible-width-v1448,304px)!important;
    max-width:100%!important;
    height:var(--rb-captcha-visible-height-v1448,78px)!important;
    min-height:0!important;
    margin:3px auto 8px!important;
    padding:0!important;
    border:0!important;
    overflow:visible!important;
    transform:none!important;
  }
  html body main.site-main form.form-grid > .rb-captcha-section-v1457 .rb-captcha-layout-v1448[hidden] {
    display:none!important;
  }
  html body main.site-main form.form-grid > .rb-captcha-section-v1457 .rb-captcha-layout-v1448 > .g-recaptcha:not([hidden]) {
    display:block!important;
    position:absolute!important;
    top:0!important;
    left:0!important;
    width:304px!important;
    min-width:304px!important;
    max-width:none!important;
    height:78px!important;
    min-height:78px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    transform:scale(var(--rb-captcha-scale-v1448,1))!important;
    transform-origin:top left!important;
  }
  html[data-rb-theme="light"] body main.site-main form.form-grid > .rb-captcha-section-v1457 {
    border-color:#96a5b0!important;
    background:#f1f5f8!important;
  }
}

@media screen {
  html body main.site-main form.form-grid > .rb-captcha-section-v1457 > .rb-recaptcha-consent.is-active > p,
  html body main.site-main form.form-grid > .rb-captcha-section-v1457 > .rb-recaptcha-consent.is-active > button.btn {
    display:none!important;
  }
}

/* v1464 – Sichtbare neutrale Konturen in Hell und Dunkel.
 * Die v1458-CAPTCHA-Struktur wird absichtlich NICHT angefasst.
 * Keine globalen Eingabefeld-/Badge-/Status-Overrides und keine Navigation.
 */
@media screen {
  /* Auf der Startseite hatte der helle Kontaktkarten-Wrapper zwar eine
     Border-FARBE, aber keine durchgehende Border-LINIE. */
  html[data-rb-theme="light"] body main.page-slug-home .home-contact-form-card {
    border:1px solid #596c7a!important;
  }
  /* Schwache halbtransparente Social-Links (10% / 6%) in den Footern
     erhalten einen sichtbaren, aber weiterhin dezenten Rand. */
  html[data-rb-theme="light"] body .footer .social-row a {
    border-color:#637683!important;
  }
  html[data-rb-theme="dark"] body .footer .social-row a {
    border-color:#788792!important;
  }
  /* Dunkle Kontakt-/Probetraining-Felder: vorher ca. 8% weisser Rand.
     Nur gewoehnliche Benutzereingaben, kein verstecktes Google-Textarea.
     Die bisherigen Fokus-/Fehlerfarben behalten ihre Prioritaet. */
  html[data-rb-theme="dark"] body main:is(.page-slug-home,.page-slug-kontakt,.page-slug-probetraining) :is(
    .home-contact-form-card,.rb-contact-form-card,.probetraining-form-card
  ) .form-row > :is(
    input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    select,
    textarea:not(.g-recaptcha-response):not([name="g-recaptcha-response"])
  ):not(:focus):not(:focus-visible):not([aria-invalid="true"]) {
    border-color:#75838e!important;
  }
  html[data-rb-theme="dark"] body main:is(.page-slug-home,.page-slug-kontakt,.page-slug-probetraining) :is(
    .home-contact-form-card,.rb-contact-form-card,.probetraining-form-card
  ) .form-row .phone-input-group > :is(input,select):not(:focus):not(:focus-visible):not([aria-invalid="true"]) {
    border-color:#75838e!important;
  }
  /* Sichtbarer Keyboard-Fokus fuer Footer-Links; kein Einfluss auf
     CTA-Hintergruende oder auf Maus-/Touch-Zustaende. */
  html[data-rb-theme="light"] body .footer .social-row a:focus-visible {
    outline:3px solid #9b2828!important;
    outline-offset:3px!important;
  }
  html[data-rb-theme="dark"] body .footer .social-row a:focus-visible {
    outline:3px solid #e0aa59!important;
    outline-offset:3px!important;
  }
}
