/* ============================================================
   Patmins – Marken-Theme für das edvGO Design System
   Farben: Deep Burgundy · Soft Cream · Dusty Rose · Warm Taupe (Brand Board der Kundin)
   Hex-Werte nur in den Theme-Blöcken; alles andere über Tokens.
   ============================================================ */

[data-theme="patmins"],
[data-theme="patmins-inverse"],
[data-theme="patmins-admin"] {
  /* Rohfarben (auch für die aus der Vorlage übernommenen festen Farben, dc2react: --pm-c-<hex>) */
  --pm-c-5b1f2e: #5B1F2E;
  --pm-c-461722: #461722;
  --pm-c-f8f1ea: #F8F1EA;
  --pm-c-ffffff: #FFFFFF;
  --pm-c-c97b7b: #C97B7B;
  --pm-c-2a0c14: #2A0C14;
  --pm-c-eadcd6: #EADCD6;
  --pm-c-ede4dd: #EDE4DD;
  --pm-c-3a1720: #3A1720;
  --pm-c-ebd3cc: #EBD3CC;
  --pm-overlay-text-shadow: 0 1px 12px rgba(40, 10, 18, .55);
  --font-heading: "Libre Caslon Text", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

[data-theme="patmins"] {
  --color-primary: #5B1F2E;          /* Deep Burgundy */
  --color-primary-hover: #461722;
  --color-on-primary: #F8F1EA;       /* Soft Cream */
  --color-surface: #F8F1EA;          /* Soft Cream – Seitenhintergrund */
  --color-surface-muted: #F1E3DB;    /* Creme/Taupe für Wechselflächen */
  --color-text: #5B1F2E;
  --color-text-muted: #6B4A50;
  --color-border: #D6C4BE;           /* Warm Taupe */
  --color-accent: #C97B7B;           /* Dusty Rose – nur dekorativ */
  --color-accent-soft: #EBD3CC;
  --color-card: #FCF8F4;
  --tw-ring-offset-color: #F8F1EA;
}
[data-theme="patmins-inverse"] {
  --color-primary: #F8F1EA;
  --color-primary-hover: #D6C4BE;
  --color-on-primary: #5B1F2E;
  --color-surface: #5B1F2E;
  --color-surface-muted: #4C1926;
  --color-text: #F8F1EA;
  --color-text-muted: #EADCD6;
  --color-border: #7A3A49;
  --color-accent: #C97B7B;
  --color-accent-soft: #6E2B3B;
  --color-card: #4C1926;
  --tw-ring-offset-color: #5B1F2E;
}
[data-theme="patmins-admin"] {
  --color-primary: #5B1F2E;
  --color-primary-hover: #461722;
  --color-on-primary: #FFFFFF;
  --color-surface: #FFFFFF;
  --color-surface-muted: #F8F1EA;
  --color-text: #3A1720;
  --color-text-muted: #6B4A50;
  --color-border: #E4D7D2;
  --color-success: #2F6B4A;
  --color-warning: #8A5A12;
  --color-danger: #A3302F;
  --color-accent: #C97B7B;
  --color-accent-soft: #EBD3CC;
  --color-card: #FFFFFF;
}

/* Grundfläche + Links (nur innerhalb des Marken-Containers, Regel 10) */
[data-theme="patmins"] { background: var(--color-surface); color: var(--color-text); }
[data-theme="patmins-admin"] { color: var(--color-text); }
[data-theme^="patmins"] a:not([class~="pm-linkbtn"]) { color: var(--color-primary); }
[data-theme^="patmins"] a:not([class~="pm-linkbtn"]):hover { color: var(--color-primary-hover); }
[data-theme="patmins-inverse"] a:not([class~="pm-linkbtn"]) { color: var(--color-text); }

/* Typografie-Helfer (über className an DS-Komponenten) */
[class~="pm-display"] { font-family: var(--font-heading); font-size: clamp(2.3rem, 1.5rem + 3.2vw, 3.9rem) !important; line-height: 1.08; font-weight: 400 !important; letter-spacing: -0.015em; text-wrap: balance; }
[class~="pm-h2"] { font-family: var(--font-heading); font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.6rem) !important; line-height: 1.12; font-weight: 400 !important; letter-spacing: -0.01em; text-wrap: balance; }
[class~="pm-h3"] { font-family: var(--font-heading); font-size: 1.4rem !important; line-height: 1.22; font-weight: 400 !important; text-wrap: balance; }
[class~="pm-lead"] { font-size: 1.125rem !important; line-height: 1.6; text-wrap: pretty; }
[class~="pm-card"] { background: var(--color-card) !important; overflow: hidden; display: flex; flex-direction: column; height: 100%; }
[class~="pm-nav"] nav ul a { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; }
[class~="pm-nav"] nav { padding-top: 0.35rem; padding-bottom: 0.35rem; }
[class~="pm-footer"] h2 { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--color-text-muted); font-weight: 500; }
[class~="pm-wrap"] { padding-left: clamp(1.25rem, 4vw, 3rem) !important; padding-right: clamp(1.25rem, 4vw, 3rem) !important; }
[class~="pm-menu-label"] { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
[class~="pm-logo"] { height: clamp(44px, 6vw, 66px); width: auto; }
[class~="pm-footer-logo"] { height: 44px; width: auto; align-self: flex-start; }
[class~="pm-linkbtn"] { text-decoration: none; white-space: nowrap; }
[class~="pm-linkbtn"]:hover { text-decoration: none; }

/* Porträts (Who we are) */
[class~="pm-portrait"] { width: 50%; aspect-ratio: 1 / 1; overflow: hidden; margin: 0 auto; }
[class~="pm-portrait-img"] { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Bildflächen (ersetzen <image-slot>): leer = sanfte Markenfläche, gefüllt = Bild */
[class~="pm-slot"] { position: relative; width: 100%; height: 100%; min-height: 100%; overflow: hidden; background: var(--color-accent-soft); }
[class~="pm-slot--rounded"] { border-radius: 8px; }
[class~="pm-slot--circle"] { border-radius: 50%; }
[class~="pm-slot--pill"] { border-radius: 999px; }
[class~="pm-slot--contain"] { background: transparent; }
[class~="pm-slot--contain"]:not([class~="pm-slot--filled"]) { background: var(--color-accent-soft); }
[class~="pm-slot"] > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
[class~="pm-slot--contain"] > img { object-fit: contain; }
[class~="pm-slot--edit"] { cursor: pointer; outline: 1.5px dashed var(--color-border); outline-offset: -1.5px; }
[class~="pm-slot--edit"]:focus-visible { outline: 2px solid var(--color-primary); }
[class~="pm-slot-ph"] { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; text-align: center; font-size: 13px; color: var(--color-text-muted); }

/* Hinweis-Toast (Admin-Bildupload) */
[class~="pm-toast"] { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: var(--z-overlay); background: var(--pm-c-3a1720); color: var(--pm-c-ffffff); padding: 12px 18px; border-radius: 10px; font: 15px/1.4 system-ui, sans-serif; max-width: 90vw; }

/* Zitat über dem Hero-Bild: Lesbarkeit auf Fotos */
[class~="pm-hero-quote"] { text-shadow: var(--pm-overlay-text-shadow); }

/* Links im Fließtext klar erkennbar (WCAG 1.4.1, axe link-in-text-block) */
[data-theme^="patmins"] p a:not([class~="pm-linkbtn"]),
[data-theme^="patmins"] footer span a { text-decoration: underline; text-underline-offset: 3px; }

/* Serverseitig erzeugter Inhalt der Event-/Artikelseiten (api/page.php) – sichtbar ohne JavaScript, im Browser
   ersetzt die Website ihn sofort durch die gestaltete Ansicht */
[class~="pm-ssr"] { max-width: 760px; margin: 0 auto; padding-top: 48px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 14px; font-size: 17px; line-height: 1.7; }
[class~="pm-ssr"] h1 { font-family: var(--font-heading); font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.4rem); line-height: 1.1; font-weight: 400; margin: 0; }
[class~="pm-ssr"] h2, [class~="pm-ssr"] h3 { font-family: var(--font-heading); font-weight: 400; margin: 12px 0 0; }
[class~="pm-ssr"] p { margin: 0; }
[class~="pm-ssr-kicker"], [class~="pm-ssr-meta"] { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--color-text-muted); }
[class~="pm-ssr-lead"] { font-size: 1.15rem; color: var(--color-text-muted); }
/* Zitat liegt auf dem Hero-Foto – ohne Foto (noch keins hochgeladen) ausblenden, sonst Creme auf Rosé (Kontrast) */
[class~="pm-slot"]:not([class~="pm-slot--filled"]) + [class~="pm-hero-quote"] { display: none; }
[class~="pm-slot--label"] { background: transparent !important; display: flex; align-items: center; }
[class~="pm-slot-name"] { font-family: var(--font-heading); font-size: 1.15rem; color: var(--color-text); white-space: nowrap; }

/* data-hide-empty: Bildbereich ohne hochgeladenes Bild auf der öffentlichen Seite ausblenden (dc-lite.js ImageSlot) */
[class~="pm-slot-empty-hide"] { display: none; }

/* Formatierter Text (Artikel, E-Mail-Vorschau, Editor) – PMDC.RichContent / PMDC.RichEditor in dc-lite.js */
[class~="pm-rich"] > * { margin: 0 0 14px; }
[class~="pm-rich"] > *:last-child { margin-bottom: 0; }
[class~="pm-rich"] p { text-wrap: pretty; }
[class~="pm-rich"] h2 { font-family: var(--font-heading); font-size: 1.5rem; line-height: 1.25; font-weight: 400; margin-top: 12px; text-wrap: balance; }
[class~="pm-rich"] h3 { font-size: 1.1rem; line-height: 1.4; font-weight: 600; margin-top: 8px; }
[class~="pm-rich"] > h2:first-child, [class~="pm-rich"] > h3:first-child { margin-top: 0; }
[class~="pm-rich"] ul { list-style: disc; padding-left: 22px; }
[class~="pm-rich"] li { margin: 0 0 4px; }
[class~="pm-rich"] strong, [class~="pm-rich"] b { font-weight: 600; }
[class~="pm-rich"] em, [class~="pm-rich"] i { font-style: italic; }
[data-theme^="patmins"] [class~="pm-rich"] a { text-decoration: underline; text-underline-offset: 3px; }
[class~="pm-rich--article"] > * { margin-bottom: 20px; }
[class~="pm-rich--article"] h2 { font-size: 1.75rem; margin-top: 20px; }
[class~="pm-rich--article"] h3 { font-size: 1.25rem; margin-top: 12px; }
[class~="pm-rich--mail"] { font-size: 15px; line-height: 1.65; }
[class~="pm-rich--mail"] h2 { font-size: 21px; }
[class~="pm-rich--mail"] h3 { font-size: 16px; }

/* Editor (Admin) */
[class~="pm-rte"] { border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); overflow: hidden; }
[class~="pm-rte"]:focus-within { outline: 2px solid var(--color-primary); outline-offset: 2px; }
[class~="pm-rte-bar"] { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; border-bottom: 1px solid var(--color-border); background: var(--color-surface-muted); }
[class~="pm-rte-btn"] { min-width: 40px; min-height: 40px; padding: 0 12px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--color-text); font-family: var(--font-sans); font-size: 14px; font-weight: 500; line-height: 1; cursor: pointer; }
[class~="pm-rte-btn"]:hover { background: var(--color-border); }
[class~="pm-rte-btn"]:active { background: var(--color-border); border-color: var(--color-primary); }
[class~="pm-rte-btn"]:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }
[class~="pm-rte-btn"][aria-pressed="true"] { background: var(--color-primary); color: var(--color-on-primary); }
[class~="pm-rte-btn"][aria-pressed="true"]:hover { background: var(--color-primary-hover); }
[class~="pm-rte-btn"]:disabled { opacity: .5; cursor: default; }
[class~="pm-rte-btn--b"] { font-weight: 700; }
[class~="pm-rte-btn--i"] { font-style: italic; font-family: var(--font-heading); font-size: 16px; }
[class~="pm-rte-sep"] { width: 1px; height: 22px; margin: 0 4px; background: var(--color-border); }
[class~="pm-rte-area"] { min-height: 300px; max-height: 70vh; overflow: auto; padding: 14px 16px; font-size: 16px; line-height: 1.65; outline: none; overflow-wrap: anywhere; }
[class~="pm-rte--sm"] [class~="pm-rte-area"] { min-height: 170px; }
[class~="pm-rte--disabled"] [class~="pm-rte-area"] { color: var(--color-text-muted); background: var(--color-surface-muted); }
