/* Meike Schiek – Bausteine. Grundlage: design/bundle.css und der Entwurf Variante 6.
   Regel: Was wie ein Knopf aussieht, ist ein <button> für eine echte Aktion.
   Alles, was woanders hinführt, ist ein unterstrichener Link. */

/* ---------- Knopf ---------- */
.ms-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--target-min); padding: var(--space-3) var(--space-6);
  border: 2px solid var(--accent); border-radius: var(--radius-pill);
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-sans); font-size: var(--fs-small); line-height: 20px; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.ms-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.ms-btn--secondary { background: transparent; color: var(--accent); }
.ms-btn--secondary:hover { background: var(--rose-soft); color: var(--accent-hover); }
.ms-btn--breit { width: 100%; }
.ms-btn[disabled], .ms-btn[aria-disabled="true"] { background: var(--line); border-color: var(--line); color: var(--ink-muted); cursor: not-allowed; }

/* ---------- Links ---------- */
/* Link im Text: immer unterstrichen (WCAG 1.4.1) */
.ms-link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ms-link:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }

/* Weiterführender Link („Alle Bücher ansehen“) */
.ms-weiter {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: var(--target-min);
  font-weight: 700; color: var(--accent);
  text-decoration: underline; text-underline-offset: 4px;
}
.ms-weiter:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
.ms-weiter--gross { font-size: var(--fs-lead); }

.ms-linkreihe { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-8); }

/* Ganze Kachel klickbar, der Link bleibt der eigentliche Titel */
.ms-stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

/* ---------- Kleine Überzeile ---------- */
.ms-kicker {
  font-size: var(--fs-small); line-height: 20px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
}
.ms-kicker--flieder { color: var(--lilac-deep); }
.ms-kicker--rosa { color: var(--accent); }
.ms-kicker--muted { color: var(--ink-muted); }
.ms-kicker--herz { display: inline-flex; align-items: center; gap: 10px; }
.ms-kicker--herz svg { color: var(--accent); --herz-fuellung: var(--rose); }

/* Nebenangaben (Lesezeit, Datum, Preis) */
.ms-meta { font-size: var(--fs-small); line-height: 24px; color: var(--ink-muted); }
.ms-meta--fett { font-weight: 700; }

/* ---------- Kachel ---------- */
.ms-kachel {
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
  padding: var(--space-6);
  border-radius: var(--radius-kachel);
  background: var(--surface);
  color: var(--ink);
}
@media (min-width: 700px) { .ms-kachel { padding: var(--space-8); } }
.ms-kachel--flieder { background: var(--lilac-soft); }
.ms-kachel--pfirsich { background: var(--peach-soft); }
.ms-kachel--rosa { background: var(--rose-soft); }
.ms-kachel--hoch { min-height: 340px; justify-content: space-between; }
.ms-kachel--buch { border-radius: var(--radius-kachel) var(--radius-kachel) var(--radius-kachel) var(--radius-sm); min-height: 300px; justify-content: space-between; }
.ms-kachel__text { display: flex; flex-direction: column; gap: 10px; }
.ms-kachel__titel { font-size: var(--fs-h3); line-height: 1.25; }
.ms-kachel__titel a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.ms-kachel__titel a:hover { color: var(--accent); text-decoration-thickness: 2px; }
.ms-kachel__kopf { display: flex; justify-content: space-between; gap: var(--space-2); }
.ms-kachel__anfang { font-family: var(--font-serif); font-style: italic; }

/* Symbol in einem kleinen Aquarellfleck */
.ms-fleck-symbol {
  display: flex; align-items: center; justify-content: center;
  width: 72px; height: 66px; color: var(--ink);
  border-radius: 52% 48% 45% 55% / 50% 55% 45% 50%;
  background: var(--rose);
}
.ms-fleck-symbol--flieder { background: var(--lilac); }
.ms-fleck-symbol--pfirsich { background: var(--peach); border-radius: 45% 55% 40% 60% / 55% 45% 55% 45%; }

/* ---------- Karte (weiße Fläche) ---------- */
.ms-karte { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); color: var(--ink); }

/* ---------- Aquarellflecken (reiner Schmuck) ---------- */
.ms-blob {
  position: absolute; z-index: 0; pointer-events: none;
  border-radius: 58% 42% 55% 45% / 48% 60% 40% 52%;
}
.ms-blob--b { border-radius: 45% 55% 40% 60% / 55% 45% 55% 45%; }
.ms-blob--c { border-radius: 55% 45% 50% 50% / 45% 55% 45% 55%; }
.ms-blob--pfirsich { background: var(--peach-soft); }
.ms-blob--flieder { background: var(--lilac-soft); }
.ms-blob--rosa { background: var(--rose-soft); }
.ms-blob--flieder-voll { background: var(--lilac); opacity: .6; }
/* Inhalt über den Flecken */
.ms-ueber-blob { position: relative; z-index: 1; }

/* ---------- Platzhalter für Bilder ---------- */
.ms-cover {
  display: flex; align-items: flex-end;
  aspect-ratio: 2 / 3; padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--rose); color: var(--ink);
  box-shadow: var(--shadow-cover);
  font-family: var(--font-serif); font-size: var(--fs-small); line-height: 20px;
}
.ms-cover--flieder { background: var(--lilac); }
.ms-cover--pfirsich { background: var(--peach); }

.ms-foto {
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-6); text-align: center;
  background: var(--peach); color: var(--ink);
  font-size: var(--fs-small); line-height: 24px;
}

/* ---------- Liste mit Herzen ---------- */
.ms-herzliste { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.ms-herzliste li { display: flex; gap: 14px; }
.ms-herzliste svg { flex: 0 0 20px; margin-top: 5px; color: var(--lilac-deep); }

/* ---------- Zitat und Leserstimme ---------- */
.ms-zitat { font-family: var(--font-serif); font-style: italic; font-size: var(--fs-quote); line-height: 1.5; color: var(--accent); }

.ms-stimme {
  display: flex; flex-direction: column; gap: var(--space-2);
  max-width: 560px; padding: 20px 24px;
  background: var(--rose-soft); border-radius: 18px;
}
.ms-stimme blockquote p { font-family: var(--font-serif); font-style: italic; font-size: 19px; line-height: 29px; }
.ms-stimme figcaption { font-size: var(--fs-small); line-height: 24px; font-weight: 700; }
.ms-stimme figcaption span { font-weight: 400; color: var(--ink-muted); }

.ms-quote { padding: var(--space-6) var(--space-8); background: var(--rose-soft); border-radius: var(--radius-md); color: var(--ink); max-width: 560px; }
.ms-quote p { font-family: var(--font-serif); font-style: italic; font-size: var(--fs-quote); line-height: 1.55; }
.ms-quote footer { margin-top: var(--space-3); font-size: var(--fs-small); line-height: 24px; color: var(--ink-muted); }

/* ---------- Hinweiskasten: Hilfsangebote, Triggerwarnung ---------- */
.ms-notice { display: grid; gap: var(--space-2); max-width: 560px; padding: var(--space-4) var(--space-6); background: var(--lilac-soft); border-radius: var(--radius-md); color: var(--ink); }
.ms-notice__title { font-size: var(--fs-small); line-height: 20px; font-weight: 700; color: var(--lilac-deep); }
.ms-notice p { font-size: var(--fs-small); line-height: 24px; }

/* ---------- Formular ---------- */
.ms-form { display: flex; flex-direction: column; gap: var(--space-4); }
.ms-field { display: grid; gap: var(--space-1); }
.ms-label { font-size: var(--fs-small); line-height: 20px; font-weight: 700; color: var(--ink); }
.ms-hint { font-size: var(--fs-small); line-height: 24px; color: var(--ink-muted); }
.ms-input {
  width: 100%; min-height: var(--target-min); padding: 0 var(--space-4);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  font-family: var(--font-sans); font-size: var(--fs-text);
}
textarea.ms-input { min-height: 160px; padding: var(--space-3) var(--space-4); line-height: var(--lh-text); resize: vertical; }
.ms-input[aria-invalid="true"] { border: 2px solid var(--error); }
.ms-error { font-size: var(--fs-small); line-height: 24px; color: var(--error); font-weight: 600; }
/* Falle für Spam-Programme (Honeypot), für Menschen unsichtbar */
.ms-honig { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Formularkasten auf hellem oder dunklem Grund */
.ms-formkasten { padding: var(--space-6); border-radius: var(--radius-lg); background: var(--bg); color: var(--ink); }
@media (min-width: 700px) { .ms-formkasten { padding: var(--space-8); } }

/* ---------- Dunkle Fläche ---------- */
.ms-dunkel { background: var(--night); color: var(--on-night); }
.ms-dunkel a { color: var(--rose-soft); }
.ms-dunkel a:hover { color: #ffffff; }
.ms-dunkel :focus-visible { outline-color: var(--on-night-focus); }
.ms-dunkel .ms-formkasten a { color: var(--accent); }
.ms-dunkel .ms-formkasten :focus-visible { outline-color: var(--focus); }
.ms-dunkel .ms-kicker { color: var(--on-night-muted); }
.ms-dunkel :is(h1, h2, h3) em { color: var(--on-night-accent); }

/* ---------- Themen-Links ---------- */
.ms-themen { text-align: center; font-size: 18px; line-height: 34px; text-wrap: balance; }

/* Filter als Links, aktive Auswahl ohne Unterstrich und fett */
.ms-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-6); }
.ms-filter a { display: inline-flex; align-items: center; min-height: var(--target-min); color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.ms-filter a[aria-current] { color: var(--ink); font-weight: 700; text-decoration: none; }

/* ---------- Blogkarte ---------- */
.ms-blogkarte {
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end; gap: var(--space-3);
  min-height: 280px; padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-soft); color: var(--ink);
}
@media (min-width: 700px) { .ms-blogkarte { padding: 36px; } }
.ms-blogkarte :is(h2, h3) { font-size: var(--fs-h3); line-height: 1.3; }
.ms-blogkarte :is(h2, h3) a { color: var(--ink); }
.ms-blogkarte :is(h2, h3) a:hover { color: var(--accent); }
.ms-blogkarte--dunkel { background: var(--night); color: var(--on-night); box-shadow: none; }
.ms-blogkarte--dunkel :is(h2, h3) a { color: var(--on-night); }
.ms-blogkarte--dunkel :is(h2, h3) a:hover { color: var(--rose-soft); }
.ms-blogkarte--dunkel .ms-meta { color: var(--on-night-muted); }
.ms-blogkarte--dunkel :focus-visible { outline-color: var(--on-night-focus); }

/* ---------- Fragen und Antworten ---------- */
.ms-faq { display: flex; flex-direction: column; gap: var(--space-3); max-width: 720px; }
.ms-faq details { background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-soft); }
.ms-faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  min-height: var(--target-min); padding: var(--space-4) var(--space-6);
  font-weight: 700; cursor: pointer; list-style: none;
}
.ms-faq summary::-webkit-details-marker { display: none; }
.ms-faq summary svg { flex: none; color: var(--accent); transition: transform .2s ease; }
.ms-faq details[open] summary svg { transform: rotate(180deg); }
.ms-faq details > div { padding: 0 var(--space-6) var(--space-5); }

/* ---------- Tabelle mit Buchdaten ---------- */
.ms-daten { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-6); font-size: var(--fs-small); line-height: 24px; }
.ms-daten dt { font-weight: 700; }
.ms-daten dd { margin: 0; }

/* ---------- Drück-Effekt: jedes Bedienelement reagiert beim Klicken oder Tippen ----------
   Knöpfe werden kurz kleiner und dunkler, Links dunkler mit dickerer Unterstreichung.
   Der leere touchstart-Listener in teile/kopf.php sorgt dafür, dass iOS :active zeigt. */
a, button, summary { -webkit-tap-highlight-color: transparent; }

.ms-btn, .ms-menue__knopf, .ms-warenkorb { transition: transform .12s ease, background-color .12s ease, color .12s ease; }
.ms-btn:active { transform: scale(.96); background: var(--accent-press); border-color: var(--accent-press); color: var(--on-accent); }
.ms-btn--secondary:active { background: var(--rose); color: var(--accent-press); }
.ms-menue__knopf:active { transform: scale(.96); background: var(--rose-press); color: var(--ink); }
.ms-warenkorb:active { transform: scale(.96); background: var(--rose-press); color: var(--accent-press); }
.ms-menue__knopf[aria-current]:active, .ms-warenkorb[aria-current]:active { background: var(--ink-press); color: #ffffff; }

/* Links: in main höhere Spezifität, damit auch Titel-Links in Karten reagieren */
main a:not(.ms-btn, .ms-menue__knopf):active,
.ms-fuss a:active,
.ms-skip:active { color: var(--accent-press); text-decoration-thickness: 2px; }
main .ms-dunkel a:not(.ms-btn):active,
main .ms-blogkarte--dunkel a:active { color: #ffffff; text-decoration-thickness: 2px; }
main .ms-dunkel .ms-formkasten a:active { color: var(--accent-press); }

/* Ganze Kachel klickbar: die Kachel gibt beim Drücken nach */
.ms-kachel { transition: transform .12s ease; }
.ms-kachel:has(.ms-stretch:active) { transform: scale(.985); }

.ms-faq summary:active { background: var(--rose-soft); border-radius: var(--radius-md); }

/* Weniger Bewegung: nur der Farbwechsel bleibt */
@media (prefers-reduced-motion: reduce) {
  .ms-btn:active, .ms-menue__knopf:active, .ms-warenkorb:active, .ms-kachel:has(.ms-stretch:active) { transform: none; }
}
