/* ---------- FLOATING ACTION STACK (mobile language FAB + scroll-to-top) ---------- */
.fab-stack{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:200;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:12px;
}

.fab{
  width:48px;
  height:48px;
  border-radius:50%;
  border:1px solid var(--border);
  background:var(--white);
  color:var(--ink);
  box-shadow:var(--shadow-lg);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:transform .2s var(--ease), box-shadow .2s var(--ease), opacity .2s var(--ease);
}
.fab:hover{ transform:translateY(-2px); box-shadow:0 16px 40px -12px rgba(16,24,40,0.22); }
.fab svg{ width:20px; height:20px; }

/* Language FAB — shown at every breakpoint (desktop, tablet, mobile).
   Shows the active language's flag instead of a generic globe icon. */
.lang-fab-wrap{ display:block; position:relative; }
.lang-fab .lang-flag{ width:24px; height:24px; }
.lang-fab .lang-flag svg{ width:100%; height:100%; }

.lang-fab-popup{
  position:absolute;
  bottom:calc(100% + 10px);
  right:0;
  min-width:180px;
  background:var(--white);
  border:1px solid var(--border);
  border-radius:var(--radius-m);
  box-shadow:var(--shadow-lg);
  padding:6px;
  display:flex;
  flex-direction:column;
  gap:2px;
  opacity:0;
  visibility:hidden;
  transform:translateY(6px) scale(.98);
  transform-origin:bottom right;
  transition:opacity .2s ease-in-out, transform .2s ease-in-out, visibility .2s ease-in-out;
}
.lang-fab-popup.open{ opacity:1; visibility:visible; transform:translateY(0) scale(1); }

.lang-fab-popup .lang-option{
  width:100%;
  justify-content:flex-start;
  padding:10px 12px;
  border-radius:9px;
  gap:10px;
  height:auto;
}
.lang-fab-popup .lang-option .lang-name{
  position:static; width:auto; height:auto; margin:0; padding:0; overflow:visible; clip:auto;
}
.lang-fab-popup .lang-option.is-active{ background:var(--gray-100); }

/* Scroll-to-top FAB */
.scroll-top-fab{ opacity:0; visibility:hidden; pointer-events:none; transform:translateY(8px); }
.scroll-top-fab.visible{ opacity:1; visibility:visible; pointer-events:auto; transform:translateY(0); }

#langSwitcher{ display:none; }

@media (prefers-reduced-motion: reduce){
  .fab, .lang-fab-popup{ transition:none; }
}
