/* ============================================================
   assets/css/translit.css
   इंग्रजी → मराठी टाइपिंगची पर्याय-यादी आणि चालू/बंद बटण
   ------------------------------------------------------------
   app.css मधले रंग (--line, --zendu, --cream ...) वापरतो, पण
   ते नसतील तरी चालावे म्हणून प्रत्येक ठिकाणी fallback दिला आहे.
   ============================================================ */

.tl-box {
  position: absolute;
  z-index: 3000;
  display: none;
  max-width: 340px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line, rgba(17, 19, 21, .14));
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(17, 19, 21, .18);
}

.tl-box.show { display: block; }

.tl-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--cream, #111315);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.tl-opt:hover { background: var(--surface-2, #F2F4F7); }

.tl-opt.on {
  background: var(--zendu, #B45309);
  color: #fff;
}

.tl-n {
  flex: none;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--surface-2, #F2F4F7);
  color: var(--muted, #5B6470);
  font-size: 11px;
  font-weight: 700;
}

.tl-opt.on .tl-n {
  background: rgba(255, 255, 255, .25);
  color: #fff;
}

.tl-tip {
  margin: 4px 4px 2px;
  padding-top: 6px;
  border-top: 1px solid var(--line, rgba(17, 19, 21, .10));
  color: var(--muted, #5B6470);
  font-size: 11.5px;
  text-align: center;
}

/* ---- चालू / बंद बटण ----
   कार्डाची झलक (.pv-wrap, z-index 900) आणि lightbox (950) यांच्या
   खाली राहावे म्हणून z-index मुद्दाम कमी ठेवला आहे. */
.tl-toggle {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-radius: 21px;
  background: var(--zendu, #B45309);
  color: #fff;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 6px 22px rgba(17, 19, 21, .18);
  cursor: pointer;
  transition: transform .12s, background .15s, color .15s;
}

.tl-toggle svg { width: 17px; height: 17px; flex: none; }
.tl-toggle:active { transform: scale(.96); }

.tl-toggle.off {
  background: #fff;
  color: var(--muted, #5B6470);
  border-color: var(--line, rgba(17, 19, 21, .14));
}

@media (max-width: 520px) {
  .tl-toggle { right: 12px; bottom: 12px; height: 38px; padding: 0 13px; font-size: 12.5px; }
  .tl-box { max-width: calc(100vw - 24px); }
  .tl-opt { font-size: 17px; padding: 10px; }   /* बोटाने दाबता यावे */
}

/* झलक किंवा lightbox उघडे असताना बटण लपवा */
.pv-wrap.show ~ .tl-toggle,
body:has(.pv-wrap.show) .tl-toggle,
body:has(#lightbox.show) .tl-toggle { display: none; }
