/* ═════════════════════════════════════════════════════════════════════════════
   MakeBOQ Universal Translation System Stylesheet
   - Zero ugly Google Translate banners, tooltips, or borders
   - Non-overlapping floating translate pill
   - Responsive language selector popup for mobile, tablet, and desktop
   ═════════════════════════════════════════════════════════════════════════════ */

/* ── Hide ALL Google Translate Default Toolbars, Frames & Highlights ── */
.goog-te-banner-frame,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover,
.goog-te-gadget-simple,
.skiptranslate > iframe {
  display: none !important;
  visibility: hidden !important;
}

body {
  top: 0 !important;
  position: static !important;
}

.goog-text-highlight {
  background-color: transparent !important;
  box-shadow: none !important;
}

/* Hidden off-screen Google Translate combo container (required for API to hook) */
#google_translate_element {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0.001 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

/* ── Floating Sticky Translate Pill ── */
.makeboq-translate-pill {
  position: fixed;
  bottom: 96px; /* Positioned cleanly above desktop chatbot button (24px + 56px = 80px + 16px gap) */
  right: 24px;
  z-index: 9990;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #1B2A5E 0%, #243a7e 100%);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 99px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(27, 42, 94, 0.28);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

.makeboq-translate-pill:hover,
.makeboq-translate-pill:focus-visible {
  background: linear-gradient(135deg, #F47920 0%, #e0650d 100%);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(244, 121, 32, 0.35);
  color: #ffffff;
}

.makeboq-translate-pill .globe-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.makeboq-translate-pill .lang-tag {
  background: rgba(255, 255, 255, 0.18);
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-left: 2px;
}

/* ── In-card Translate Trigger (e.g. on Sample Reports) ── */
.btn-ov-translate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  color: #fff;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-ov-translate:hover {
  background: rgba(244, 121, 32, 0.3);
  border-color: #F47920;
  color: #FDBA74;
}

/* ── Universal Language Selector Modal ── */
.makeboq-lang-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 48, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.makeboq-lang-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.makeboq-lang-modal-card {
  background: #ffffff;
  border-radius: 22px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(10, 18, 48, 0.35);
  border: 1.5px solid rgba(27, 42, 94, 0.12);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.makeboq-lang-modal-overlay.active .makeboq-lang-modal-card {
  transform: translateY(0) scale(1);
}

.makeboq-lang-header {
  background: linear-gradient(135deg, #1B2A5E 0%, #2a459e 100%);
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.makeboq-lang-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  font-family: 'Manrope', sans-serif;
  color: #ffffff !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.makeboq-lang-header .sub-info {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85) !important;
  margin-top: 3px;
  font-weight: 500;
}

.makeboq-lang-close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.makeboq-lang-close-btn:hover {
  background: rgba(239, 68, 68, 0.85);
  transform: scale(1.08);
}

.makeboq-lang-body {
  padding: 16px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.makeboq-lang-section-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 10px;
}

.makeboq-lang-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.makeboq-lang-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-family: 'Manrope', 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  user-select: none;
}

.makeboq-lang-btn:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  transform: translateY(-1.5px);
}

.makeboq-lang-btn.active {
  background: #fff7ed;
  border-color: #f97316;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.16);
}

.makeboq-lang-name {
  display: flex;
  flex-direction: column;
}

.makeboq-lang-native {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e293b;
}

.makeboq-lang-btn.active .makeboq-lang-native {
  color: #ea580c;
}

.makeboq-lang-english {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}

.makeboq-lang-btn.active .makeboq-lang-english {
  color: #f97316;
}

.makeboq-lang-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: #10b981;
  display: none;
}

.makeboq-lang-btn.active .makeboq-lang-badge {
  display: inline-block;
}

.makeboq-lang-footer {
  padding: 12px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.makeboq-lang-reset-btn {
  background: transparent;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'Manrope', sans-serif;
}

.makeboq-lang-reset-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #1e293b;
}

/* ── Tablet & Mobile Positioning (<= 1024px) ── */
@media (max-width: 1024px) {
  /* Floating Translate Pill positioned cleanly above the Chatbot */
  .makeboq-translate-pill {
    bottom: 156px !important; /* Stacked 12px above 84px + 60px = 144px */
    right: 16px !important;
    padding: 7px 14px !important;
    font-size: 0.78rem !important;
    box-shadow: 0 6px 20px rgba(27, 42, 94, 0.32) !important;
  }
}

@media (max-width: 768px) {
  .makeboq-lang-modal-card {
    max-height: 85vh;
  }

  .makeboq-lang-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
