/* ==========================================================================
   WordPress-Zusatz zum Stylesheet des Entwurfs (css/style.css bleibt unveraendert).
   1. Huellen von Elementor   2. Rahmen der Software-Seite   3. Rechtstexte
   4. Elementor-Editor        5. Werkzeugleiste von WordPress
   6. Eigene Knoepfe gegen die Grundregeln des Themes schuetzen
   ========================================================================== */

/* 1. Jeder Baustein steckt in zwei bis drei Huellen von Elementor. Auf der fertigen Seite duerfen sie
      keine eigene Flaeche bilden, sonst kleben z. B. die Sprungleiste der Service-Seite und die
      Scroll-Geschichte nicht mehr. Im Editor bleiben die Huellen normale Kaesten (zum Anklicken). */
body.pcd:not(.pcd-im-editor):not(.elementor-editor-active) .e-con.pcd-huelle,
body.pcd:not(.pcd-im-editor):not(.elementor-editor-active) .e-con.pcd-huelle > .e-con-inner,
body.pcd:not(.pcd-im-editor):not(.elementor-editor-active) .elementor-widget[class*="elementor-widget-pcd-"],
body.pcd:not(.pcd-im-editor):not(.elementor-editor-active) .elementor-widget[class*="elementor-widget-pcd-"] > .elementor-widget-container {
  display: contents;
}

/* 2. Rahmen aus Elementor-Containern (Software-Seite): gewoehnliche Bloecke mit den Massen des Entwurfs */
.e-con.pcd-block { display: block; width: auto; max-width: none; min-height: 0; margin: 0; padding: 0; gap: 0; flex: none; }
.e-con.pcd-block.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--pad); }
.e-con.pcd-block.software { padding: clamp(5rem, 11vw, 8.5rem) 0; overflow: clip; }
.e-con.pcd-block.software.software--seite { padding-top: clamp(2rem, 5vw, 4rem); }
/* Im Entwurf hat nur das erste Programm keinen Abstand nach oben (.product:first-child). In Elementor ist jedes
   Programm das erste Kind seiner eigenen Huelle, deshalb bekommt hier jedes weitere den Abstand zurueck. Seit 1.0.46
   ueber die Variable aus style.css, damit das Android-Programm am Computer seinen kleineren Abstand behaelt. */
.e-con > .elementor-widget:not(:first-child) .product:first-child { margin-top: var(--produkt-abstand, clamp(3.5rem, 8vw, 6rem)); }

/* 3. Rechtstexte (AGB, Impressum, Datenschutz, Versand, Widerruf): ruhige Lesespalte in beiden Farbschemata */
.pcd-prosa { display: block; width: auto; max-width: none; margin: 0; padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(3.5rem, 8vw, 6rem); }
.pcd-prosa .elementor-widget-text-editor {
  display: block; width: 100%; max-width: calc(76ch + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad);
  color: var(--muted); font-size: 1.02rem; line-height: 1.75;
  /* Lange Adressen, die als Text (nicht als Link) im Rechtstext stehen, duerfen umbrechen. Gemessen 27.11.2026: Am
     360-Pixel-Handy machten sie die Datenschutzseite 442 statt 360 Pixel breit (z. B. eine Hilfe-Adresse von
     Google). Gewoehnliche Woerter bricht der Browser weiter nur an Leerzeichen um; der Wortlaut bleibt gleich. */
  overflow-wrap: anywhere;
}
.pcd-prosa p { margin: 0 0 1.05em; }
.pcd-prosa strong, .pcd-prosa b { color: var(--text); font-weight: 650; }
.pcd-prosa p:has(> strong:first-child) { margin-top: 1.7em; }
.pcd-prosa p:first-child { margin-top: 0; }
.pcd-prosa a:not(.btn) { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.pcd-prosa ul, .pcd-prosa ol { margin: 0 0 1.05em 1.3rem; }
.pcd-prosa ul { list-style: disc; }
.pcd-prosa ol { list-style: decimal; }
.pcd-prosa li { margin: .3em 0; }
.pcd-prosa h2, .pcd-prosa h3, .pcd-prosa h4 { color: var(--text); margin: 1.8em 0 .6em; line-height: 1.2; }
.pcd-prosa .pcd-prosa__knopf { margin: 0 0 1.8em; }
.pcd-prosa .pcd-prosa__datei {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .45rem;
  margin: 0 0 .8rem; padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: 14px;
}
.pcd-prosa .pcd-prosa__datei .btn { margin-left: auto; }
.pcd-prosa .pcd-prosa__datei + p:not(.pcd-prosa__datei) { margin-top: 1.4em; }

/* Die Titel der Rechtstexte sind lang ("Allgemeine Geschaeftsbedingungen"): etwas kleiner als "Service" oder "Kontakt" */
.seite-agb .page-title, .seite-impressum .page-title, .seite-datenschutz .page-title, .seite-versand .page-title,
.seite-widerruf .page-title, .seite-app-datenschutz .page-title { font-size: clamp(1.9rem, 4.4vw, 3.4rem); max-width: 18ch; }

/* 4. Im Elementor-Editor: alles sofort sichtbar und ohne festgehaltene Scroll-Strecken */
html.pcd-editor [data-reveal], html.pcd-editor [data-in], html.pcd-editor .reveal-armed {
  opacity: 1 !important; translate: none !important; animation: none !important;
}
html.pcd-editor .story-title .tw { translate: none !important; }
html.pcd-editor .intro { display: none !important; }
html.pcd-editor .e-con.pcd-huelle { --padding-top: 0px; --padding-bottom: 0px; --padding-left: 0px; --padding-right: 0px; }

/* 5. Angemeldet zeigt WordPress oben seine Werkzeugleiste: Kopfleiste und Sprungleiste ruecken darunter */
body.admin-bar .nav, body.admin-bar .progress { top: 32px; }
body.admin-bar .subnav { top: calc(var(--nav-h) + 32px); }
@media (max-width: 782px) {
  body.admin-bar .nav, body.admin-bar .progress { top: 46px; }
  body.admin-bar .subnav { top: calc(var(--nav-h) + 46px); }
}

/* 6. Eigene Knoepfe der Kopfleiste und der Bildansicht gegen die Grundregeln des Themes schuetzen. Auf Seiten
      ausserhalb der Schlank-Betriebsart (Shop-Seiten: Kasse, Warenkorb, Mein Konto; die Rechtstexte nicht, gemessen
      27.11.2026 am Impressum) laedt reset.css von Hello Elementor 3.5.2:
      jeder <button> bekommt Innenabstand .5rem 1rem, einen rosa Rand (#c36) und beim Zeigen und nach dem Klick
      (Fokus) eine rosa Flaeche mit weisser Schrift. Gemessen 26.11.2026 an /kasse/: Symbol im Umschalter 10,4 statt
      20 px breit. Der KI-Assistent ist in assistent.css schon geschuetzt. "button." vorne hebt die Gewichtung ueber
      die des Themes ([type="button"]:hover), unabhaengig von der Reihenfolge der Dateien. */
button.theme-toggle, button.burger, button.lightbox__zu, button.lightbox__pfeil { padding: 0; }
button.lightbox__zu, button.lightbox__pfeil { border: 0; }
button.theme-toggle:is(:hover, :focus), button.burger:is(:hover, :focus) { background-color: var(--ghost-bg); color: var(--text); }
button.lightbox__zu:is(:hover, :focus) { background-color: rgb(255 255 255 / .14); color: #fff; }
button.lightbox__pfeil:focus { background-color: rgb(255 255 255 / .14); color: #fff; }
button.lightbox__pfeil:hover { background-color: rgb(255 255 255 / .26); color: #fff; }

/* Seiten ohne eigene Bausteine (z. B. "Seite nicht gefunden"): Inhalt des Themes lesbar unter die Kopfleiste setzen */
body.pcd .site-main { max-width: calc(76ch + 2 * var(--pad)); margin-inline: auto; padding: calc(var(--nav-h) + 3rem) var(--pad) 5rem; }
body.pcd .site-main .page-header h1, body.pcd .site-main .entry-title { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1rem; }
