/* fab-footer.css
   Styles für Footer, Suchfeld, FAB-Menü und Go-To-Top
*/

/* --------- Variablen (einfach anpassbar) --------- */
:root{
  --fab-bg: #1f2937;
  --fab-fg: #fff;
  --fab-shadow: 0 6px 18px rgba(0,0,0,0.25);
  --tooltip-bg: rgba(0,0,0,0.85);
  --tooltip-fg: #fff;
  --z-fab-wrapper: 3000;
  --z-tooltip: 4000;
  --z-go-top: 2999;
}

/* ---------------- GLOBAL ---------------- */
.site-footer {
  padding: 20px;
  text-align: center;
  background: #333;
  color: #e5e5e5;
  font-size: 15px;
}

.glow-link {
  color: #ff4b4b;
  font-weight: 700;
  text-decoration: none;
  transition: transform .18s ease, color .18s ease, text-shadow .18s ease;
  position: relative;
}
.glow-link:hover {
  color: #ffd955;
  transform: scale(1.06);
  text-shadow:
    0 0 6px #FFC300,
    0 0 12px #FF5733;
}

/* ---------------- FOOTER SEARCH ---------------- */
.footer-search-section { margin-top: 12px; }

.footer-search-form .search-wrapper {
  display: flex;
  max-width: 360px;
  margin: 8px auto 0;
  border: 1px solid #ccc;
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.footer-search-form .search-input {
  flex: 1;
  border: none;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  background: transparent;
}

.footer-search-form .search-btn {
  padding: 0 18px;
  border: none;
  background: #0074D9;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

/* Modal/Overlay */
.footer-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-search-overlay.hidden { display:none; }
.footer-search-modal {
  background: #111;
  color: #fff;
  width: min(90%, 720px);
  max-height: 80vh;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
}

/* ---------------- FAB WRAPPER / BUTTONS ---------------- */
.ui-fab-wrapper {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: var(--z-fab-wrapper);
  touch-action: manipulation;
  pointer-events: auto;
}

/* Haupt-FAB */
.fab-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--fab-bg);
  color: var(--fab-fg);
  font-size: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--fab-shadow);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.fab-btn:active {
  transform: translateZ(0) scale(0.98);   /* war: scale(0.98) allein */
}

.fab-btn.open {
  transform: translateZ(0) rotate(90deg); /* war: rotate(90deg) allein */
}

/* Ausklapp-Menü */
.ui-fab-menu {
  position: absolute;
  bottom: 70px;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease;
  will-change: transform, opacity;
  overflow: visible; /* wichtig für Tooltip */
}
.ui-fab-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Menü-Items */
.fab-item {
  background: #374151 !important;
  color: #f9fafb !important;
  border: none;
  padding: 10px 12px;
  min-width: 46px;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative; /* für pseudo-element */
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  transition: transform .12s ease, background .12s;
}
.fab-item:active { transform: scale(0.98); }

/* Tooltip mit pseudo-elementen */
.fab-item::after {
   bottom: auto;
  top: 50%;
  left: 110%;
  transform: translateY(-50%) translateX(-4px);
  content: attr(data-label);
  position: absolute;
  white-space: nowrap;
  background: var(--tooltip-bg);
  color: var(--tooltip-fg);
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;

  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  transform-origin: center bottom;
  z-index: var(--z-tooltip);
  box-shadow: 0 6px 12px rgba(0,0,0,0.28);
}

/* kleiner Pfeil */
.fab-item::before {
   bottom: auto;
  top: 50%;
  left: calc(110% - 12px);
  transform: translateY(-50%) translateX(-4px);
  border-top-color: transparent;
  border-right-color: var(--tooltip-bg);  /* Pfeil zeigt links */
}

/* Hover-State für rechte Position */
.fab-item:hover::after,
.fab-item:focus-visible::after {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
}
.fab-item:hover::before,
.fab-item:focus-visible::before {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
}



/* Tooltip-Fallback als echtes DOM-Element */
.fab-tooltip {
  max-width: calc(100vw - 80px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.fab-tooltip.show {
  opacity: 1;
  transform: translate(4px, -50%);  /* kleiner Einschub-Effekt von rechts */
}




/* ---------------- Floating Go-To-Top ---------------- */
.fab-go-top {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: var(--z-go-top);
  display: none;                    /* JS setzt display wenn nötig */
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--fab-bg);        /* war: #0f172a – jetzt gleich wie FAB */
  color: var(--fab-fg);             /* war: #fff – jetzt per Variable */
  font-size: 22px;
  align-items: center;
  justify-content: center;          /* inline-flex entfernt, nur display:none */
  box-shadow: var(--fab-shadow);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;  /* wie fab-btn */
}
.fab-go-top:active {
  transform: translateZ(0) scale(0.97);   /* war: scale(0.97) allein */
}


.fab-btn,
.fab-go-top {
  transform: translateZ(0);          /* GPU-Layer fixiert Position */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  will-change: transform;
}


/* ---------------- Dark Mode ---------------- */
body.dark .fab-btn,
body.dark .fab-item,
body.dark .fab-go-top {
  background: #4b5563;
  color: #eaeaea;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 420px) {
  .fab-btn { width: 52px; height: 52px; font-size: 24px; }
  .fab-item { font-size: 14px; padding: 10px; min-width: 44px; border-radius: 8px; }
  .ui-fab-wrapper { bottom: 16px; left: 14px; }
  .fab-go-top { right: 14px; bottom: 16px; width: 44px; height: 44px; font-size: 18px; }
}


