/*
 * Zweck: Floating-Overlays (WhatsApp-Float, Call-Float, Cookie-Banner)
 * Verwendet von: includes/footer.php (alle Seiten)
 * Abhängigkeiten: base.css (Tokens: --accent, --bg-white, --line, --max-w, --radius, --t, --text, --whatsapp)
 */

/* ─── WhatsApp Float ─── */
.wa-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 52px;
  height: 52px;
  background: var(--whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37,211,102,.35);
  z-index: 100;
  color: white;
  transition: transform var(--t);
}
.wa-float:hover { transform: scale(1.08); color: white; }
.wa-float svg { width: 26px; height: 26px; }

/* ─── Call Float (über WhatsApp-Button) ─── */
.call-float {
  position: fixed;
  bottom: 84px;
  right: 20px;
  width: 52px;
  height: 52px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(30,58,95,0.35);
  z-index: 100;
  color: white;
  transition: transform var(--t);
}
.call-float:hover { transform: scale(1.08); color: white; }
.call-float svg { width: 24px; height: 24px; }

/* ─── Cookie Banner ─── */
.cookies {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--text);
  color: rgba(255,255,255,.92);
  padding: 1rem;
  z-index: 200;
  transform: translateY(100%);
  transition: transform .4s ease;
  box-shadow: 0 -6px 24px rgba(0,0,0,.15);
}
.cookies.show { transform: translateY(0); }
.cookies-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.25rem;
  align-items: center;
}
.cookies p { font-size: 0.85rem; color: rgba(255,255,255,.85); }
.cookies a { color: white; text-decoration: underline; }
.cookies-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cookies button { padding: 0.7rem 1rem; min-height: 44px; border-radius: var(--radius); font-size: 0.85rem; font-weight: 500; transition: all var(--t); }
.cookies .accept { background: white; color: var(--text); }
.cookies .accept:hover { background: var(--accent-soft); }
.cookies .reject { background: transparent; color: white; border: 1px solid rgba(255,255,255,.3); }
.cookies .reject:hover { border-color: white; }

/* ─── Responsive ─── */
@media (max-width: 880px) {
  .cookies-inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* Cookies kompakter, Buttons in 2-Spalten-Grid */
  .cookies { padding: 0.85rem; }
  .cookies-inner { grid-template-columns: 1fr; gap: 0.75rem; }
  .cookies p { font-size: 0.8rem; line-height: 1.45; }
  .cookies-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .cookies button { width: 100%; }

  /* Floating-Buttons auf Mobile etwas kleiner + näher an Rand */
  .wa-float { width: 48px; height: 48px; bottom: 16px; right: 16px; }
  .wa-float svg { width: 22px; height: 22px; }
  .call-float { width: 48px; height: 48px; bottom: 72px; right: 16px; }
  .call-float svg { width: 22px; height: 22px; }
}

/* ─── Kontakt-Modal ─── */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}
.contact-modal[aria-hidden="false"] { display: flex; }
.contact-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
}
.contact-modal-content {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 1.5rem;
  max-width: 540px;
  width: calc(100% - 2rem);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.contact-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: 0;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.5rem;
}
.contact-modal h3 { margin: 0 0 0.25rem; font-size: 1.4rem; }
.contact-modal-sub {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.contact-modal-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
}
.qr-block { text-align: center; }
.qr-block img {
  width: 180px;
  height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: white;
}
.qr-caption {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.action-block .action-intro {
  margin: 0 0 0.75rem;
  font-weight: 600;
  color: var(--text);
}
.btn-large {
  width: 100%;
  padding: 1rem 1.2rem !important;
  font-size: 0.95rem;
  justify-content: center;
}
.action-note {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}
@media (max-width: 640px) {
  .contact-modal-content { padding: 1.5rem 1.25rem 1.25rem; }
  .contact-modal-body {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .qr-block img { width: 160px; height: 160px; }
  .action-block { order: -1; }
}
