/* rmd-kadence-child/assets/css/footer.css
   Dunkler Footer nach Mockup. NUR Tokens. Desktop: 4 Spalten, Gruppen offen. Mobile: jede
   Ueberkategorie (inkl. Adresse/Bezahlung) als Accordion per + auf-/zuklappbar (footer.js). */

/* Die fruehere Kontakt-Kachelzeile (.rmd-fcontact) wurde durch den globalen Baustein 'contactbar'
   ersetzt (template-parts/blocks/contactbar.php, CSS in blocks.css, Daten in rmd_contactbar_data). */

/* ===== Dunkler Footer ===== */
.rmd-footer{background:var(--color-dark);color:var(--color-on-dark-muted);font-family:var(--font-body)}
.rmd-footer__cols{display:grid;grid-template-columns:1.2fr 1.3fr 1fr 1.1fr;gap:var(--space-10);padding-top:var(--space-16);padding-bottom:var(--space-8)}
.rmd-footer__col{min-width:0}
.rmd-footer__group+.rmd-footer__group{margin-top:var(--space-8)}

/* Kopf (Ueberkategorie) - Desktop: reine Ueberschrift; der Button ist nur Traeger. Kadence faerbt
   jeden <button> gelb -> harter Reset. */
.rmd-footer__head{margin:0 0 var(--space-5)}
.rmd-footer__toggle{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);width:100%;padding:0;text-align:left;cursor:default;font-family:var(--font-head);font-size:var(--fs-base);font-weight:var(--fw-bold);color:var(--color-on-dark);line-height:1.2;background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important;min-height:0!important}
.rmd-footer__toggle:hover,.rmd-footer__toggle:focus{background:transparent!important;color:var(--color-on-dark)}
.rmd-footer__plus{display:none}

/* Einzel-Link (Top-Level ohne Kinder) */
.rmd-footer__headlink{display:block;font-family:var(--font-head);font-size:var(--fs-base);font-weight:var(--fw-bold);color:var(--color-on-dark);text-decoration:none}
.rmd-footer__headlink:hover{color:var(--color-on-dark-muted)}

/* Link-Liste / Block-Sub */
.rmd-footer__sub{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--space-3)}
.rmd-footer__sub li{margin:0}
.rmd-footer__sub a{font-size:var(--fs-sm);color:var(--color-on-dark-muted);text-decoration:none;transition:color .12s}
.rmd-footer__sub a:hover{color:var(--color-on-dark)}
.rmd-footer__addr{font-size:var(--fs-sm);line-height:1.85}
.rmd-footer__addr a{color:var(--color-on-dark-muted);text-decoration:none}
.rmd-footer__addr a:hover{color:var(--color-on-dark)}
.rmd-footer__gap{display:block;height:var(--space-4)}

.rmd-footer__socials{display:flex;gap:var(--space-3);margin-top:var(--space-2)}
.rmd-footer__socials a{width:40px;height:40px;border-radius:var(--radius-pill);background:var(--color-dark-social);display:flex;align-items:center;justify-content:center;transition:background .15s}
.rmd-footer__socials a:hover{background:var(--color-dark-social-hover)}
.rmd-footer__socials .rmd-ic{width:18px;height:18px;color:var(--color-on-dark);fill:currentColor;stroke:currentColor}

/* "Vertrag widerrufen" - schlichter, linksbuendiger Link (ersetzt den gelben Plugin-Button).
   Das Plugin-Element (eu-owb) wird global ausgeblendet - wir zeigen den Link hier im Footer. */
.eu-owb-order-withdraw-from-contract-button{display:none!important}
/* Separate Zeilen unten NUR auf Mobile (Desktop: stehen in der Support-Spalte, s. __coldesk). */
.rmd-footer__withdraw{display:none;padding-top:var(--space-6)}
.rmd-footer__withdraw a{font-size:var(--fs-sm);color:var(--color-on-dark-muted);text-decoration:underline;text-underline-offset:3px}
.rmd-footer__withdraw a:hover{color:var(--color-on-dark)}
.rmd-footer__paybar{display:none;justify-content:center;margin-top:var(--space-6);padding-top:var(--space-4)}
.rmd-footer__pay{display:flex;gap:var(--space-2);flex-wrap:wrap;justify-content:center}
.rmd-footer__pay span{background:var(--color-bg);border-radius:6px;padding:6px 8px;font-family:var(--font-head);font-size:11px;font-weight:var(--fw-bold);color:#333;display:flex;align-items:center;min-height:26px}

/* Desktop/Tablet: Vertrag widerrufen + Bezahlung (mit Ueberschrift) in der Support-Spalte, linksbuendig. */
.rmd-footer__coldesk{margin-top:var(--space-8)}
.rmd-footer__withdraw-link{display:inline-block;font-size:var(--fs-sm);color:var(--color-on-dark-muted);text-decoration:underline;text-underline-offset:3px}
.rmd-footer__withdraw-link:hover{color:var(--color-on-dark)}
.rmd-footer__group--pay{margin-top:var(--space-6)}
.rmd-footer__payhead{font-family:var(--font-head);font-size:var(--fs-base);font-weight:var(--fw-bold);color:var(--color-on-dark);margin:0 0 var(--space-4)}
.rmd-footer__coldesk .rmd-footer__pay{justify-content:flex-start}

.rmd-footer__bottom{margin-top:0;padding-top:var(--space-6);padding-bottom:var(--space-6);display:flex;justify-content:space-between;align-items:center;gap:var(--space-4);flex-wrap:wrap;font-size:var(--fs-xs)}
.rmd-footer__bottom nav{display:flex;gap:var(--space-5);flex-wrap:wrap}
.rmd-footer__bottom a{color:var(--color-on-dark-muted);text-decoration:none}
.rmd-footer__bottom a:hover{color:var(--color-on-dark)}

.rmd-footer a:focus-visible,
.rmd-footer button:focus-visible{outline:3px solid var(--color-signal-hover);outline-offset:2px}
/* Kadence faerbt a:focus/a:active dunkel (global-palette) -> auf dem dunklen Footer wird die Schrift
   nach dem Klick schwarz/unsichtbar. Footer-Links behalten in Fokus/Aktiv ihre helle Farbe. */
.rmd-footer a:focus,.rmd-footer a:active{color:var(--color-on-dark)}

/* ===== Tablet: 2 Spalten ===== */
@media(max-width:1024px){
  .rmd-footer__cols{grid-template-columns:1fr 1fr}
}

/* ===== Mobile: 1 Spalte, Accordion pro Ueberkategorie ===== */
@media(max-width:768px){
  .rmd-footer__cols{grid-template-columns:1fr;gap:0;padding-top:var(--space-6)}
  .rmd-footer__group,
  .rmd-footer__group+.rmd-footer__group{margin-top:0;border-top:1px solid var(--color-dark-line)}
  .rmd-footer__col:first-child .rmd-footer__group:first-child{border-top:0}

  .rmd-footer__head{margin:0}
  .rmd-footer__toggle{cursor:pointer;padding:var(--space-4) 0;min-height:52px}
  .rmd-footer__headlink{padding:var(--space-4) 0;min-height:52px;display:flex;align-items:center}

  /* +/- Indikator */
  .rmd-footer__plus{display:block;position:relative;width:18px;height:18px;flex:0 0 18px}
  .rmd-footer__plus::before,
  .rmd-footer__plus::after{content:"";position:absolute;background:var(--color-on-dark);border-radius:2px}
  .rmd-footer__plus::before{top:50%;left:0;right:0;height:2px;transform:translateY(-50%)}
  .rmd-footer__plus::after{left:50%;top:0;bottom:0;width:2px;transform:translateX(-50%);transition:opacity .2s,transform .2s}
  .rmd-footer__group.is-open .rmd-footer__plus::after{opacity:0}

  /* Sublisten zu, bis geoeffnet */
  .rmd-footer__sub{display:none;padding:0 0 var(--space-5)}
  .rmd-footer__group.is-open .rmd-footer__sub{display:flex}

  /* Fusszeile mobil zentriert: Legal-Links + Copyright mittig */
  .rmd-footer__bottom{margin-top:0;flex-direction:column;align-items:center;text-align:center;gap:var(--space-3)}
  .rmd-footer__bottom nav{justify-content:center}

  /* Vertrag widerrufen + Bezahlung mobil separat unten (Desktop-Block in der Spalte aus). */
  .rmd-footer__coldesk{display:none}
  .rmd-footer__withdraw{display:block;text-align:center}
  .rmd-footer__paybar{display:flex}
}
