/* ===============================
   LANGUAGE FAB - SHARED STYLES
   Mobile floating action button for language switching
   =============================== */

/* Base FAB Styles */
.lang-fab {
  display: none; /* Hidden by default, shown only on mobile */
  position: fixed;
  bottom: 24px;
  left: 20px; /* Default: bottom-left (for homepage) */
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand, #fc7306);
  color: white;
  border: none;
  box-shadow: 0 4px 14px rgba(252, 115, 6, 0.4);
  cursor: pointer;
  z-index: 999;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.2s ease;
  font-family: inherit;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

/* Hide FAB when scrolling (mobile only) */
.lang-fab.hide-on-scroll {
  opacity: 0;
  transform: translateY(100px);
  pointer-events: none;
}

.lang-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(252, 115, 6, 0.5);
}

.lang-fab:active {
  transform: scale(0.95);
}

.fab-text {
  font-size: 0.8rem;
  font-weight: 700;
}

/* Show FAB only on mobile */
@media (max-width: 768px) {
  .lang-fab {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ===============================
   RIGHT-SIDE VARIANT (for articles page)
   Use class: lang-fab-right
   =============================== */
.lang-fab.lang-fab-right {
  left: auto;
  right: 20px; /* Position on right side */
}

/* ===============================
   DARK MODE SUPPORT
   =============================== */
body.dark-mode .lang-fab {
  background: #e56600;
  box-shadow: 0 4px 14px rgba(229, 102, 0, 0.4);
}

body.dark-mode .lang-fab:hover {
  box-shadow: 0 6px 20px rgba(229, 102, 0, 0.5);
}

/* ===============================
   LANGUAGE-BASED CONTENT FILTERING
   Show/hide Q&A items based on URL lang param or body class
   =============================== */

/* Default: Show English content, hide Hindi content */
.qa-item[data-language="hi"],
.prelims-qa-item[data-language="hi"] {
  display: none;
}

.qa-item[data-language="en"],
.prelims-qa-item[data-language="en"] {
  display: block;
}

/* When Hindi is selected (body has lang-hi class or URL has ?lang=hi) */
body.lang-hi .qa-item[data-language="en"],
body.lang-hi .prelims-qa-item[data-language="en"] {
  display: none;
}

body.lang-hi .qa-item[data-language="hi"],
body.lang-hi .prelims-qa-item[data-language="hi"] {
  display: block;
}
