/* =====================================================================
   /product/blog/public/assets/tts.css
   Text-to-Speech bottom bar — senior-friendly, Hindi-first, free (Web Speech API).
   ===================================================================== */

/* Inline highlight on the currently-spoken element */
.tts-now {
  background: linear-gradient(90deg, rgba(251,191,36,.25), rgba(251,191,36,.10)) !important;
  border-left: 4px solid #C65D00 !important;
  padding-left: 10px !important;
  transition: background .25s, padding-left .25s;
  scroll-margin-top: 100px;
}

/* Floating action button — bottom-right above scroll */
.tts-fab {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 9990;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #C65D00, #a04d00);
  color: #fff;
  border: 0;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
  font-family: 'Noto Sans Devanagari','Inter',system-ui,sans-serif;
  box-shadow: 0 12px 32px rgba(198,93,0,.45);
  cursor: pointer;
  min-height: 52px;
  transition: transform .15s, box-shadow .15s;
}
.tts-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(198,93,0,.55); }
.tts-fab__icon { font-size: 22px; line-height: 1; }
.tts-fab.is-playing { background: linear-gradient(135deg, #16a34a, #15803d); }
.tts-fab.is-paused  { background: linear-gradient(135deg, #f59e0b, #d97706); }

/* Bottom control bar — appears when TTS active */
.tts-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%) translateY(120px);
  background: #fff;
  border: 1.5px solid #f3e8d0;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(15,23,42,.18);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9991;
  font-family: 'Noto Sans Devanagari','Inter',system-ui,sans-serif;
  transition: transform .3s cubic-bezier(.2,.8,.3,1);
  max-width: 96vw;
  flex-wrap: wrap;
  justify-content: center;
}
.tts-bar.is-open { transform: translateX(-50%) translateY(0); }

.tts-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #1E3A5F;
  font-size: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all .15s;
  flex-shrink: 0;
}
.tts-btn:hover { border-color: #C65D00; color: #C65D00; background: #fef3c7; }
.tts-btn:disabled { opacity: .35; cursor: not-allowed; }
.tts-btn.is-primary {
  background: #C65D00;
  color: #fff;
  border-color: #C65D00;
  width: 60px;
  height: 60px;
  font-size: 26px;
}
.tts-btn.is-primary:hover { background: #a04d00; border-color: #a04d00; color: #fff; }

.tts-meta {
  font-size: 13.5px;
  font-weight: 700;
  color: #475569;
  padding: 0 8px;
  text-align: center;
  min-width: 100px;
}
.tts-meta b { color: #1E3A5F; font-weight: 800; }

.tts-speed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef3c7;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  cursor: pointer;
  border: 1.5px solid transparent;
  min-height: 40px;
  user-select: none;
}
.tts-speed:hover { border-color: #C65D00; }

.tts-lang {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #1E3A5F;
  cursor: pointer;
  border: 1.5px solid transparent;
  min-height: 40px;
}
.tts-lang:hover { border-color: #1E3A5F; }

/* Close button */
.tts-bar__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: #f1f5f9;
  color: #64748b;
  font-size: 16px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* Toast for unsupported browsers */
.tts-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: #1E3A5F;
  color: #fff;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
  z-index: 99999;
  transition: transform .3s;
  font-family: 'Noto Sans Devanagari','Inter',system-ui,sans-serif;
  max-width: 90vw;
  text-align: center;
}
.tts-toast.is-open { transform: translateX(-50%) translateY(0); }

/* Mobile tweaks */
@media (max-width: 540px) {
  .tts-fab { right: 12px; bottom: 16px; padding: 12px 18px; font-size: 14.5px; }
  .tts-bar { bottom: 8px; padding: 10px 12px; gap: 8px; }
  .tts-btn { width: 46px; height: 46px; font-size: 19px; }
  .tts-btn.is-primary { width: 54px; height: 54px; font-size: 24px; }
  .tts-meta { font-size: 12.5px; min-width: 70px; padding: 0 4px; }
  .tts-speed, .tts-lang { font-size: 12px; padding: 5px 9px; }
}
