/* Oeffentliche Link-Seite. Farben, Rundung und Schrift kommen als CSS-Variablen
 * aus themeCss() (function.php): --bg --fg --btn --btn-fg --radius --font */

/* Vazirmatn (OFL, fonts/OFL.txt) - lokal statt Google Fonts, das im Iran oft langsam oder gesperrt ist.
   Variable Schrift: eine Datei fuer alle Staerken 100-900. */
@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
/* Hintergrund auf html: deckt die ganze Seitenhoehe ab, nicht nur das erste Bildschirmfenster */
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh; color: var(--fg);
  font-family: var(--font); font-size: 16px; line-height: 1.45;
}
/* --font aus themeCss() enthaelt Vazirmatn bereits fuer die persischen Zeichen */
.pl-wrap { width: min(640px, 100%); margin: 0 auto; padding: 44px 16px 30px; }

.pl-head { text-align: center; margin-bottom: 26px; }
.pl-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 14px; }
.pl-avatar-empty { display: grid; place-items: center; background: color-mix(in srgb, var(--fg) 14%, transparent); font-size: 40px; font-weight: 700; }
.pl-name { font-size: 1.25rem; margin: 0 0 6px; }
.pl-bio { margin: 0 auto; max-width: 30em; opacity: .85; }

.pl-blocks > * { margin: 0 0 14px; }

/* Knoepfe in fuenf Stilen */
.pl-btn {
  display: flex; align-items: center; justify-content: center; position: relative;
  min-height: 58px; padding: 14px 56px; border-radius: var(--radius);
  text-decoration: none; font-weight: 600; text-align: center; word-break: break-word;
  color: var(--btn-fg); transition: transform .12s ease, filter .12s;
}
.pl-btn:hover { transform: scale(1.02); }
.pl-btn:active { transform: scale(.99); }
.pl-btn:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; }
.btn-fill .pl-btn { background: var(--btn); }
.btn-outline .pl-btn { border: 2px solid var(--btn); }
.btn-outline .pl-btn:hover { background: color-mix(in srgb, var(--btn) 14%, transparent); }
.btn-soft .pl-btn { background: color-mix(in srgb, var(--btn) 22%, transparent); backdrop-filter: blur(6px); }
.btn-shadow .pl-btn { background: var(--btn); box-shadow: 0 4px 14px rgba(0,0,0,.14); }
.btn-hard .pl-btn { background: var(--btn); border: 2px solid var(--btn-fg); box-shadow: 4px 4px 0 var(--btn-fg); }
.btn-hard .pl-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--btn-fg); }

.pl-thumb { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; line-height: 1; }
.pl-empty { opacity: .45; border: 2px dashed var(--btn); background: none !important; box-shadow: none !important; }

.fx-pulse { animation: pl-pulse 2s ease-in-out infinite; }
.fx-shake { animation: pl-shake 4s ease-in-out infinite; }
.fx-glow { animation: pl-glow 2.2s ease-in-out infinite; }
@keyframes pl-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes pl-shake { 0%, 88%, 100% { transform: rotate(0); } 90% { transform: rotate(-2deg); } 94% { transform: rotate(2deg); } 97% { transform: rotate(-1deg); } }
@keyframes pl-glow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--btn) 60%, transparent); } 50% { box-shadow: 0 0 22px 4px color-mix(in srgb, var(--btn) 60%, transparent); } }
@media (prefers-reduced-motion: reduce) { .fx-pulse, .fx-shake, .fx-glow { animation: none; } }

.pl-header { font-size: 1.05rem; text-align: center; margin: 26px 0 12px !important; }
.pl-text { white-space: normal; opacity: .9; }

.pl-social { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.pl-social a { color: var(--fg); display: inline-flex; align-items: center; gap: 8px; transition: transform .12s; }
.pl-social a:hover { transform: scale(1.12); }
.pl-social svg { width: 28px; height: 28px; }
.pl-social.as-buttons { gap: 10px; }
.pl-social.as-buttons a { padding: 8px 14px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--fg) 30%, transparent); text-decoration: none; font-weight: 600; font-size: .9rem; }
.pl-social.as-buttons svg { width: 18px; height: 18px; }

.pl-embed { border-radius: min(var(--radius), 18px); overflow: hidden; background: rgba(0,0,0,.15); }
.pl-embed-title { padding: 10px 14px; font-weight: 600; }
.pl-embed iframe { width: 100%; border: 0; display: block; }
.pl-embed-video iframe { aspect-ratio: 16 / 9; height: auto; }
.pl-embed-audio iframe { height: 352px; }
.pl-embed-audio-s iframe { height: 152px; }

.pl-image img { width: 100%; display: block; border-radius: min(var(--radius), 18px); }
.pl-image figcaption { text-align: center; font-size: .9rem; opacity: .8; margin-top: 6px; }
.pl-image a { display: block; transition: transform .12s; }
.pl-image a:hover { transform: scale(1.01); }

.pl-divider-line { height: 1px; background: color-mix(in srgb, var(--fg) 30%, transparent); margin: 24px 10% !important; }
.pl-divider-space { height: 24px; }
.pl-divider-dots { text-align: center; height: 20px; }
.pl-divider-dots::before { content: "• • •"; opacity: .5; letter-spacing: 6px; }

.pl-hidden { opacity: .35; filter: grayscale(1); position: relative; }

.pl-foot { text-align: center; margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pl-brand { color: var(--fg); font-weight: 800; text-decoration: none; opacity: .75; padding: 8px 16px; border-radius: 999px; background: color-mix(in srgb, var(--fg) 10%, transparent); }
.pl-share { border: 0; background: none; color: var(--fg); opacity: .7; cursor: pointer; font: inherit; font-size: .85rem; text-decoration: underline; }
.pl-report { color: var(--fg); opacity: .5; font-size: .78rem; }
.is-preview .pl-wrap { padding-top: 30px; }

/* snapbio: Anzeigenplatz (aradads) */
.pl-ad { display: flex; justify-content: center; margin: 18px 0; min-height: 50px; overflow: hidden; }
.pl-ad iframe { max-width: 100%; }
.pl-ad-preview { border: 2px dashed color-mix(in srgb, var(--fg) 40%, transparent); border-radius: 12px; padding: 16px; font-size: .85rem; opacity: .7; align-items: center; }

/* ---------- snapbio 05.10.2026: Elemente nebeneinander, Link-Bild, Foto-Hintergrund ---------- */
.pl-blocks { display: flex; flex-wrap: wrap; gap: 14px; align-items: stretch; }
.pl-blocks > * { margin: 0; }
.pl-cell { flex: 1 1 100%; min-width: 0; display: flex; flex-direction: column; }
.pl-cell > * { flex: 1 1 auto; }
.pl-cell.w-half { flex: 0 0 calc(50% - 7px); }
.pl-cell.w-third { flex: 0 0 calc(33.333% - 9.4px); }
.pl-cell .pl-header { margin: 12px 0 0 !important; }
.pl-cell .pl-divider-line { margin: 10px 10% !important; }

/* Schmale Zellen: Knopf als Kachel, Symbol bzw. Bild ueber dem Text */
.w-half .pl-btn, .w-third .pl-btn { flex-direction: column; gap: 8px; padding: 14px 10px; min-height: 96px; height: 100%; }
.w-half .pl-thumb, .w-third .pl-thumb { position: static; transform: none; font-size: 1.8rem; }
.w-third .pl-label { font-size: .88rem; }
.w-half .pl-embed-video iframe, .w-third .pl-embed-video iframe { aspect-ratio: 16 / 10; }
.w-half .pl-text, .w-third .pl-text { font-size: .9rem; }

/* Pro: Link mit Bild */
.pl-thumb-img { width: 40px; height: 40px; border-radius: min(var(--radius), 10px); overflow: hidden; display: block; }
.pl-thumb-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.w-half .pl-btn.has-img, .w-third .pl-btn.has-img { padding: 0 0 12px; overflow: hidden; justify-content: flex-start; }
.w-half .has-img .pl-thumb-img, .w-third .has-img .pl-thumb-img { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 0; }
.w-half .has-img .pl-label, .w-third .has-img .pl-label { padding: 0 10px; }

/* Foto-Hintergrund (mitgeliefert oder eigenes Bild) als eigene Ebene, damit er weichgezeichnet werden kann.
   inset und scale ueberdecken die Raender, die blur() sonst hell ausfransen laesst. */
body.has-bgimg::before {
  content: ""; position: fixed; inset: -40px; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(0,0,0,.10), rgba(0,0,0,.10)), var(--bg-img) center / cover no-repeat;
  filter: blur(var(--bg-blur, 0px)); transform: scale(1.04);
}
body.has-bgimg .pl-wrap { position: relative; }

/* Pro: bewegter Farbverlauf */
body.bg-anim { background: var(--bg); background-size: 300% 300%; animation: pl-bg-move 18s ease-in-out infinite; }
html:has(body.bg-anim) { background: var(--bg); background-size: 300% 300%; animation: pl-bg-move 18s ease-in-out infinite; }
@keyframes pl-bg-move { 0%, 100% { background-position: 0% 30%; } 50% { background-position: 100% 70%; } }
@media (prefers-reduced-motion: reduce) { body.bg-anim, html:has(body.bg-anim) { animation: none; } }

@media (max-width: 300px) {
  .pl-cell.w-third { flex-basis: calc(50% - 7px); }
}

/* Kacheln nebeneinander: Rundung begrenzen, sonst werden Pillen-Knoepfe zu Blasen */
.w-half .pl-btn, .w-third .pl-btn { border-radius: min(var(--radius), 22px); }
