/* Gemeinsame Bausteine der Website. Bis 01.08.2026 stand dieses CSS in jeder
   einzelnen Seite eingebettet und wurde bei jedem Aufruf neu uebertragen.
   Als eigene Datei laesst der Browser es im Zwischenspeicher. */

/* ===== Fusszeile — aus components/ultra-footer.php ausgelagert am 01.08.2026 ===== */
/* Visually hidden but accessible für Screen-Reader & SEO-Hierarchie */
  .sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
  .rs-footer {
    background: #0a0a0b;
    position: relative;
    margin-top: 0;
    padding-top: 5rem;
  }
  /* Gradient-Accent statt einfacher Border */
  .rs-footer-accent {
    position: absolute; top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #00f5ff 20%, #7c3aed 50%, #34C759 80%, transparent 100%);
    opacity: .5;
  }

  /* Trust-Leiste */
  .rs-footer-trust {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
    padding: 0 0 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 2.5rem;
  }
  .rs-trust-item {
    display: flex; flex-direction: column; gap: .25rem;
    padding: 1rem 1.1rem;
    background: rgba(255,255,255,.025);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 12px;
    text-decoration: none; color: inherit;
    transition: transform .2s, border-color .2s, background .2s;
  }
  a.rs-trust-item { cursor: pointer; }
  a.rs-trust-item:hover { transform: translateY(-2px); }
  .rs-trust-value {
    font-size: 1.05rem; font-weight: 700; color: #fff;
    letter-spacing: -.01em; line-height: 1.2;
  }
  .rs-trust-label {
    font-size: .72rem; color: rgba(255,255,255,.5); font-weight: 500;
  }
  .rs-trust-google { border-color: rgba(252,190,21,.25); background: linear-gradient(135deg, rgba(252,190,21,.06), rgba(255,255,255,.01)); }
  .rs-trust-google:hover { border-color: rgba(252,190,21,.55); background: linear-gradient(135deg, rgba(252,190,21,.09), rgba(255,255,255,.02)); }
  .rs-trust-google .rs-trust-stars { color: #FCBE15; letter-spacing: .06em; font-size: .92rem; margin-right: .3rem; }
  .rs-trust-apple  { border-color: rgba(255,255,255,.12); }
  .rs-trust-apple .rs-trust-value { background: linear-gradient(135deg, #fff, #aaa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
  .rs-trust-samsung { border-color: rgba(20,80,200,.25); background: linear-gradient(135deg, rgba(20,80,200,.06), rgba(255,255,255,.01)); }
  .rs-trust-samsung .rs-trust-value { color: #5aa8ff; }
  @media (max-width: 780px) {
    .rs-footer-trust { grid-template-columns: repeat(2, 1fr); gap: .65rem; padding-bottom: 1.75rem; margin-bottom: 1.75rem; }
    .rs-trust-item { padding: .75rem .85rem; }
    .rs-trust-value { font-size: .92rem; }
    .rs-trust-label { font-size: .66rem; }
  }
  @media (max-width: 420px) {
    .rs-footer-trust { grid-template-columns: 1fr; }
  }
  @media (max-width: 640px) {
    .rs-footer { padding-top: 3rem; }
  }
  .rs-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem 1.5rem;
  }
  @media (max-width: 640px) {
    .rs-footer-inner { padding: 1.5rem 1rem 1rem; }
    .rs-footer-top { gap: 1rem; padding-bottom: 1rem; margin-bottom: 1rem; }
    .rs-footer-brand p { font-size: 0.75rem; margin-bottom: 0.5rem; }
    .rs-footer-brand img { width: 120px; height: auto; }
    .rs-footer-contact-block { font-size: 0.78rem; gap: 0.25rem; }
    .rs-footer-phone { font-size: 1rem; }
  }

  /* Top: Brand links + Kontakt rechts */
  .rs-footer-top {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 2rem;
  }
  @media (min-width: 768px) {
    .rs-footer-top {
      flex-direction: row;
      justify-content: space-between;
      align-items: flex-start;
    }
  }

  .rs-footer-brand { max-width: 380px; }
  .rs-footer-brand img {
    filter: brightness(1.1);
    margin-bottom: 0.75rem;
  }
  .rs-footer-brand p {
    color: rgba(255,255,255,0.55);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0 0 1rem;
  }
  .rs-footer-social {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.25rem;
  }
  .rs-footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 1.1rem;
    transition: transform 0.2s ease, border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
  }
  .rs-footer-social a svg {
    width: 1.15rem; height: 1.15rem;
  }
  .rs-footer-social a:hover {
    transform: translateY(-2px);
    color: #fff;
    border-color: rgba(0, 245, 255, .5);
    background: rgba(0, 245, 255, .12);
    box-shadow: 0 6px 18px rgba(0, 245, 255, .18);
  }
  /* Brand-colored hovers wenn data-social erkannt wird */
  .rs-footer-social a[aria-label*="Facebook" i]:hover  { border-color: #1877F2; background: rgba(24,119,242,.15); box-shadow: 0 6px 18px rgba(24,119,242,.25); }
  .rs-footer-social a[aria-label*="Instagram" i]:hover { border-color: #e1306c; background: linear-gradient(135deg, rgba(225,48,108,.15), rgba(252,176,69,.15)); box-shadow: 0 6px 18px rgba(225,48,108,.25); }
  .rs-footer-social a[aria-label*="YouTube" i]:hover   { border-color: #FF0000; background: rgba(255,0,0,.15); box-shadow: 0 6px 18px rgba(255,0,0,.25); }
  .rs-footer-social a[aria-label*="TikTok" i]:hover    { border-color: #FE2C55; background: rgba(254,44,85,.15); box-shadow: 0 6px 18px rgba(254,44,85,.25); }

  /* Kontakt-Block */
  .rs-footer-contact-block {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    text-align: left;
  }
  @media (min-width: 768px) {
    .rs-footer-contact-block { text-align: right; }
  }
  .rs-footer-contact-block a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.2s;
  }
  .rs-footer-contact-block a:hover { color: #007AFF; }
  .rs-footer-phone {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff !important;
    letter-spacing: -0.01em;
  }

  /* 3-Spalten Links — IMMER 3 Spalten, auch mobil */
  .rs-footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 1.5rem;
  }
  @media (max-width: 640px) {
    .rs-footer-columns { gap: 0.8rem; }
  }

  /* Standorte als ruhige Fliesstext-Zeile (31.07.2026) */
  .rs-footer-standorte { margin-top: 1.5rem; padding-top: 1.25rem;
                          border-top: 1px solid rgba(255,255,255,.07); }
  .rs-footer-orte {
    margin: 0; font-size: .82rem; line-height: 1.9;
    color: rgba(255,255,255,.45);
  }
  .rs-footer-orte strong { color: rgba(255,255,255,.7); font-weight: 600; }
  .rs-footer-orte-label { color: rgba(255,255,255,.45); }
  .rs-footer-orte a {
    color: rgba(255,255,255,.62); text-decoration: none;
    transition: color .15s ease; white-space: nowrap;
  }
  .rs-footer-orte a:hover { color: #fff; text-decoration: underline; }
  .rs-footer-orte .rs-trenner { color: rgba(255,255,255,.22); margin: 0 .1rem; }
  .rs-footer-mehr-inline { font-weight: 600; color: rgba(255,255,255,.85) !important; }
  @media (max-width: 768px) {
    .rs-footer-orte { font-size: .78rem; line-height: 2; }
  }

  /* Aufklappbare Spalten (31.07.2026) */
  .rs-footer-col summary { list-style: none; cursor: default; }
  .rs-footer-col summary::-webkit-details-marker { display: none; }
  .rs-footer-col summary::after { content: ''; }
  .rs-footer-mehr a { font-weight: 600; color: rgba(255,255,255,.9) !important; }

  @media (max-width: 768px) {
    /* Auf dem Handy antippbar — mit sichtbarem Zustand */
    .rs-footer-col { border-bottom: 1px solid rgba(255,255,255,.08); }
    .rs-footer-col summary {
      cursor: pointer;
      display: flex; align-items: center; justify-content: space-between;
      padding: .9rem 0; min-height: 44px;
    }
    .rs-footer-col summary::after {
      content: '+'; font-size: 1.3rem; line-height: 1;
      color: rgba(255,255,255,.5); transition: transform .2s ease;
    }
    .rs-footer-col[open] summary::after { content: '\2212'; }
    .rs-footer-col ul { padding-bottom: .8rem; }
  }

  .rs-footer-col h4 {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 0.75rem;
  }
  @media (max-width: 640px) {
    .rs-footer-col h4 {
      font-size: 0.65rem;
      margin-bottom: 0.4rem;
    }
  }
  .rs-footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }
  @media (max-width: 640px) {
    .rs-footer-col ul { gap: 0.15rem; }
  }
  .rs-footer-col ul li a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-size: 0.88rem;
    padding: 0.2rem 0;
    display: inline-block;
    transition: color 0.2s;
  }
  @media (max-width: 640px) {
    .rs-footer-col ul li a {
      font-size: 0.72rem;
      padding: 0.12rem 0;
    }
  }
  .rs-footer-col ul li a:hover { color: #007AFF; }

  /* Standorte Section */
  .rs-footer-standorte {
    margin-top: 2rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(255,255,255,.08);
  }

  /* Featured: Unser Standort Kumpfmühl (V2 Premium) */
  .rs-footer-home {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.1rem;
    padding: 1.15rem 1.4rem;
    background: linear-gradient(135deg, rgba(0,245,255,.08), rgba(124,58,237,.05));
    border: 1px solid rgba(0,245,255,.25);
    border-radius: 16px;
    margin-bottom: 1.75rem;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all .35s cubic-bezier(.4,0,.2,1);
  }
  .rs-footer-home::before {
    content: ''; position: absolute; inset: 0; border-radius: 16px; padding: 1px;
    background: linear-gradient(135deg, #00f5ff 0%, transparent 50%, #7c3aed 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: .55; transition: opacity .35s;
    pointer-events: none;
  }
  .rs-footer-home::after {
    content: ''; position: absolute; top: -40px; right: -40px;
    width: 160px; height: 160px; border-radius: 50%;
    background: radial-gradient(circle, rgba(0,245,255,.10) 0%, transparent 70%);
    pointer-events: none;
  }
  .rs-footer-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0,0,0,.35), 0 0 25px rgba(0,245,255,.12);
  }
  .rs-footer-home:hover::before { opacity: 1; }

  /* Map-Pin Icon-Bubble */
  .rs-footer-home::before, .rs-footer-home::after { z-index: 0; }
  .rs-footer-home-pin {
    flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.35rem; line-height: 1;
    background: linear-gradient(135deg, rgba(0,245,255,.20), rgba(124,58,237,.12));
    border: 1px solid rgba(0,245,255,.35);
    box-shadow: 0 6px 18px rgba(0,245,255,.18);
    position: relative; z-index: 1;
  }

  .rs-footer-home-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    position: relative; z-index: 1;
  }
  .rs-footer-home-kicker {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #00f5ff;
    display: inline-flex; align-items: center; gap: .35rem;
  }
  .rs-footer-home-kicker::before {
    content: ''; width: 5px; height: 5px; border-radius: 50%;
    background: #00f5ff; box-shadow: 0 0 6px #00f5ff;
  }
  .rs-footer-home-link {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    line-height: 1.2;
    letter-spacing: -.01em;
    transition: color .2s ease;
  }
  .rs-footer-home-link:hover { color: #00f5ff; }
  .rs-footer-home-addr {
    font-size: 0.82rem;
    color: rgba(255,255,255,.62);
    letter-spacing: -.005em;
  }
  .rs-footer-home-cta {
    position: relative; z-index: 1;
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #00f5ff;
    text-decoration: none;
    padding: 0.6rem 1.1rem;
    background: rgba(0,245,255,.06);
    border: 1px solid rgba(0,245,255,.30);
    border-radius: 50px;
    transition: all 0.28s cubic-bezier(.4,0,.2,1);
    white-space: nowrap;
  }
  .rs-footer-home-cta:hover {
    background: rgba(0,245,255,.14);
    border-color: rgba(0,245,255,.55);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0,245,255,.18);
  }
  .rs-footer-home-cta::after {
    content: '→'; transition: transform .25s; font-weight: 800;
    display: inline-block;
  }
  .rs-footer-home-cta:hover::after { transform: translateX(3px); }

  /* Umland / Landkreis — Premium Chips */
  .rs-footer-umland h4 {
    color: rgba(255,255,255,.55);
    font-size: 0.72rem;
    font-weight: 700;
    margin: 0 0 1rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    display: inline-flex; align-items: center; gap: .45rem;
  }
  .rs-footer-umland h4::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: rgba(167,139,250,.6); box-shadow: 0 0 6px rgba(167,139,250,.5);
  }
  .rs-footer-standorte-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.55rem;
  }
  .rs-footer-standorte-list li { display: inline-flex; }
  .rs-footer-standorte-list li a {
    position: relative;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,.70);
    text-decoration: none;
    padding: 0.42rem 0.95rem;
    background: linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    white-space: nowrap;
    backdrop-filter: blur(8px);
  }
  .rs-footer-standorte-list li a::before {
    content: ''; position: absolute; inset: 0; border-radius: 50px; padding: 1px;
    background: linear-gradient(135deg, #00f5ff 0%, transparent 70%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: 0; transition: opacity .3s;
    pointer-events: none;
  }
  .rs-footer-standorte-list li a:hover {
    color: #fff;
    transform: translateY(-2px);
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(0,0,0,.3), 0 0 14px rgba(0,245,255,.12);
  }
  .rs-footer-standorte-list li a:hover::before { opacity: 1; }

  @media (max-width: 640px) {
    .rs-footer-home {
      grid-template-columns: auto 1fr;
      grid-template-rows: auto auto;
      gap: .85rem;
      padding: 1rem 1.1rem;
    }
    .rs-footer-home-cta { grid-column: 1 / -1; width: 100%; justify-content: center; }
    .rs-footer-home-link { font-size: 1rem; }
    .rs-footer-standorte-list { gap: 0.4rem 0.45rem; }
    .rs-footer-standorte-list li a {
      font-size: 0.74rem;
      padding: 0.34rem 0.8rem;
    }
  }

  /* Bottom */
  .rs-footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    text-align: center;
    color: rgba(255,255,255,0.35);
    font-size: 0.8rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  @media (min-width: 640px) {
    .rs-footer-bottom {
      flex-direction: row;
      justify-content: space-between;
    }
  }
  .rs-footer-disclaimer { font-size: 0.75rem; }

/* ===== Sparky-Chatfenster — aus components/sparky-widget.php ausgelagert am 01.08.2026 ===== */
/* ── Sparky Widget ────────────────────────────────────────── */
#sparky-btn {
    position: fixed; bottom: 24px; right: 24px;
    width: 60px; height: 60px; border-radius: 50%;
    background: linear-gradient(135deg, #fcbe15 0%, #f59e0b 100%);
    border: none; cursor: pointer; z-index: 99999;
    box-shadow: 0 8px 24px rgba(252,190,21,.35), 0 4px 12px rgba(0,0,0,.15);
    display: flex; align-items: center; justify-content: center;
    transition: transform .2s ease;
}
#sparky-btn:hover { transform: scale(1.08); }
#sparky-btn svg { width: 32px; height: 32px; color: #1a1a1a; }
#sparky-btn::after {
    content: ''; position: absolute; top: 6px; right: 6px;
    width: 12px; height: 12px; border-radius: 50%;
    background: #10b981; border: 2px solid #fff;
    animation: sparkyPulse 2s infinite;
}
@keyframes sparkyPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .7; transform: scale(1.15); }
}

#sparky-card {
    position: fixed; bottom: 96px; right: 24px;
    width: 380px; max-width: calc(100vw - 32px);
    height: 560px; max-height: calc(100vh - 120px);
    background: #ffffff; color: #1a1a1a;
    border-radius: 16px; box-shadow: 0 24px 48px rgba(0,0,0,.25);
    display: none; flex-direction: column;
    z-index: 9999; overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
#sparky-card.open { display: flex; animation: sparkySlideIn .25s ease; }
@keyframes sparkySlideIn {
    from { opacity: 0; transform: translateY(20px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

#sparky-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #fff;
    display: flex; align-items: center; gap: 12px;
}
#sparky-header .sparky-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, #fcbe15 0%, #f59e0b 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
}
#sparky-header h3 { margin: 0; font-size: 15px; font-weight: 700; }
#sparky-header .sparky-status { font-size: 12px; color: rgba(255,255,255,.6); display: flex; align-items: center; gap: 6px; }
#sparky-header .sparky-status::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%; background: #10b981;
}
#sparky-header .sparky-beta {
    background: #fcbe15; color: #1a1a1a;
    font-size: 9px; font-weight: 800;
    padding: 2px 6px; border-radius: 4px;
    margin-left: 4px; vertical-align: middle;
    letter-spacing: .04em;
}
#sparky-close {
    margin-left: auto; background: rgba(255,255,255,.1); border: none;
    width: 28px; height: 28px; border-radius: 50%;
    color: #fff; cursor: pointer; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
}
#sparky-close:hover { background: rgba(255,255,255,.2); }

#sparky-messages {
    flex: 1; overflow-y: auto; padding: 16px;
    background: #f9fafb;
    display: flex; flex-direction: column; gap: 10px;
}
.sparky-msg {
    max-width: 85%; padding: 10px 14px; border-radius: 14px;
    font-size: 14px; line-height: 1.45; white-space: pre-wrap;
    word-wrap: break-word;
}
.sparky-msg.user {
    align-self: flex-end; background: #1a1a1a; color: #fff;
    border-bottom-right-radius: 4px;
}
.sparky-msg.bot {
    align-self: flex-start; background: #fff; border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}
.sparky-msg.error {
    align-self: stretch; background: #fef3c7; border: 1px solid #fcd34d;
    color: #92400e; font-size: 13px;
}
.sparky-typing {
    align-self: flex-start; background: #fff; border: 1px solid #e5e7eb;
    padding: 12px 16px; border-radius: 14px; border-bottom-left-radius: 4px;
    display: inline-flex; gap: 4px;
}
.sparky-typing span {
    width: 6px; height: 6px; background: #9ca3af; border-radius: 50%;
    animation: sparkyBounce 1.4s infinite;
}
.sparky-typing span:nth-child(2) { animation-delay: .15s; }
.sparky-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes sparkyBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: .5; }
    30% { transform: translateY(-6px); opacity: 1; }
}

#sparky-quick-replies {
    padding: 10px 12px 4px; border-top: 1px solid #f3f4f6; background: #fff;
    display: flex; gap: 6px; flex-wrap: wrap;
}
.sparky-qr-btn {
    background: #fff; color: #1a1a1a;
    border: 1px solid #d1d5db; border-radius: 999px;
    padding: 6px 12px; font-size: 13px; cursor: pointer;
    font-family: inherit; transition: all .15s ease;
    white-space: nowrap;
}
.sparky-qr-btn:hover { background: #f9fafb; border-color: #fcbe15; color: #1a1a1a; }
.sparky-qr-btn:active { transform: scale(.97); }
.sparky-qr-btn:disabled { opacity: .4; cursor: not-allowed; }

#sparky-escalation-bar {
    padding: 8px 16px; background: #fef3c7; border-top: 1px solid #fcd34d;
    color: #92400e; font-size: 12px;
    display: none; gap: 8px; align-items: center; flex-wrap: wrap;
}
#sparky-escalation-bar.show { display: flex; }
#sparky-escalation-bar a, .sparky-lead-trigger-btn {
    color: #92400e; font-weight: 600;
    background: #fff; padding: 4px 10px; border-radius: 4px;
    text-decoration: none; font-size: 11px;
    border: 1px solid #fcd34d;
    cursor: pointer; font-family: inherit;
}
.sparky-lead-trigger-btn:hover { background: #fcd34d; }

/* Lead-Form Overlay (im Sparky-Card sichtbar) */
#sparky-lead-form {
    display: none; position: absolute; inset: 0;
    background: rgba(0,0,0,.5); z-index: 10;
    align-items: center; justify-content: center;
    padding: 16px;
}
#sparky-lead-form.show { display: flex; }
.sparky-lead-inner {
    background: #fff; border-radius: 14px; padding: 20px;
    width: 100%; max-width: 360px; position: relative;
    max-height: 90%; overflow-y: auto;
    color: #1a1a1a;
}
.sparky-lead-inner h3 { margin: 0 0 6px; font-size: 16px; color: #1a1a1a; }
.sparky-lead-inner p { margin: 0 0 14px; font-size: 13px; color: #666; line-height: 1.4; }
.sparky-lead-inner label {
    display: block; margin-bottom: 10px; font-size: 12px; font-weight: 600; color: #374151;
}
.sparky-lead-inner input, .sparky-lead-inner textarea {
    display: block; width: 100%; margin-top: 4px;
    padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 8px;
    font-size: 16px; font-family: inherit; box-sizing: border-box;
    background: #fff; color: #1a1a1a;
}
.sparky-lead-inner input:focus, .sparky-lead-inner textarea:focus {
    outline: none; border-color: #fcbe15;
}
.sparky-lead-inner textarea { resize: vertical; font-size: 14px; }
#sparky-lead-submit {
    width: 100%; margin-top: 6px;
    background: #1a1a1a; color: #fff; border: none;
    padding: 10px; border-radius: 8px; font-size: 14px; font-weight: 600;
    cursor: pointer; font-family: inherit;
}
#sparky-lead-submit:hover { background: #000; }
#sparky-lead-submit:disabled { opacity: .5; cursor: not-allowed; }
#sparky-lead-close {
    position: absolute; top: 8px; right: 8px;
    width: 28px; height: 28px; border-radius: 50%;
    background: #f3f4f6; border: none; cursor: pointer;
    font-size: 18px; color: #6b7280;
    display: flex; align-items: center; justify-content: center;
}
#sparky-lead-status {
    margin-top: 10px; font-size: 12px; min-height: 16px;
    text-align: center;
}
#sparky-lead-status.success { color: #059669; font-weight: 600; }
#sparky-lead-status.error { color: #dc2626; font-weight: 600; }

#sparky-input-area {
    padding: 12px 16px; border-top: 1px solid #e5e7eb;
    background: #fff;
    display: flex; gap: 8px; align-items: flex-end;
}
#sparky-input {
    flex: 1; border: 1px solid #d1d5db; border-radius: 10px;
    padding: 10px 12px; font-size: 16px; font-family: inherit;
    resize: none; max-height: 100px; line-height: 1.4;
    background: #f9fafb; color: #1a1a1a;
}
#sparky-input:focus { outline: none; border-color: #fcbe15; background: #fff; }
#sparky-send {
    background: #1a1a1a; color: #fff; border: none;
    width: 38px; height: 38px; border-radius: 10px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
#sparky-send:disabled { opacity: .4; cursor: not-allowed; }
#sparky-send svg { width: 18px; height: 18px; }

#sparky-footer {
    padding: 8px 16px 12px; background: #fff;
    font-size: 11px; color: #6b7280; text-align: center;
    border-top: 1px solid #f3f4f6;
    line-height: 1.5;
}
#sparky-footer-brand {
    display: block;
    color: #374151;
    font-weight: 500;
    letter-spacing: 0.01em;
}
#sparky-footer-meta {
    display: block;
    margin-top: 4px;
    color: #9ca3af;
    font-size: 10.5px;
}
#sparky-footer-meta a { color: #6b7280 !important; }
#sparky-footer button {
    background: none; border: none; color: #6b7280;
    cursor: pointer; font-size: 10.5px; text-decoration: underline;
    padding: 0;
}

/* Mobile: Button höher (über Sticky-CTA-Bar), Card Vollbild */
@media (max-width: 640px) {
    #sparky-btn {
        bottom: 90px;  /* über Sticky-CTA-Bar (bottom 0, ~70px hoch) */
        right: 16px;
        width: 56px; height: 56px;
    }
    #sparky-btn svg { width: 28px; height: 28px; }
    #sparky-card {
        bottom: 0; right: 0; left: 0; top: 0;
        width: 100%; max-width: 100%;
        height: 100dvh; max-height: 100dvh;
        border-radius: 0;
    }
}

/* Wenn Sparky offen ist: alle anderen Floating-Buttons ausblenden,
   damit nichts den Chat überlagert (Sparky-Button selbst + Sticky-CTA-Bar). */
body.sparky-open #sparky-btn,
body.sparky-open #rs-maint-btn,
body.sparky-open #sticky-cta-bar {
    display: none !important;
}
