/* ==========================================================================
   Franklin Core – Feature Enhancements
   Neue, seitenübergreifende Funktionen: Onboarding-Tour, Hell-/Dunkelmodus,
   Sprachumschalter. Wird auf allen Unterseiten zusätzlich zu shared.css und
   chat-widget.css eingebunden und überschreibt gezielt (mit !important) die
   vorhandenen Tailwind-Utility-Klassen für den Hellmodus, ohne shared.css
   selbst anfassen zu müssen.
   ========================================================================== */

/* ---------------------------- Toolbar (Tour / Theme / Sprache) ---------------------------- */
.fc-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
}
.fc-tool-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.fc-tool-btn:hover { background: rgba(255, 255, 255, 0.1); color: #f1f5f9; transform: translateY(-1px); }
.fc-tool-btn:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }
.fc-tool-btn svg { width: 17px; height: 17px; }

.fc-lang-wrap { position: relative; }
.fc-lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 200px;
  max-height: 300px;
  overflow-y: auto;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, .45);
  z-index: 200;
}
.fc-lang-menu.hidden { display: none; }
.fc-lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  background: transparent;
  border: none;
  cursor: pointer;
}
.fc-lang-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.fc-lang-item.active { color: #60a5fa; }
.fc-lang-item .fc-check { opacity: 0; font-size: 11px; }
.fc-lang-item.active .fc-check { opacity: 1; }

/* Google-Translate-Widget: eigenes UI übernimmt die Bedienung, das
   Standard-Banner/Icon von Google wird versteckt. */
.goog-te-banner-frame,
.goog-te-gadget-icon,
body > .skiptranslate { display: none !important; }
body { top: 0 !important; }
#google_translate_element { display: none !important; }

/* ---------------------------- Onboarding-Tour ---------------------------- */
#fc-tour-overlay { position: fixed; inset: 0; z-index: 9000; }
#fc-tour-overlay.hidden { display: none; }
#fc-tour-backdrop { position: absolute; inset: 0; background: rgba(2, 6, 23, 0.72); }
#fc-tour-highlight {
  position: absolute;
  border-radius: 14px;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .55), 0 0 0 9999px rgba(2, 6, 23, .72);
  transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease;
  pointer-events: none;
}
#fc-tour-tooltip {
  position: absolute;
  width: min(320px, 88vw);
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  padding: 18px 20px;
  color: #e2e8f0;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .5);
  z-index: 9001;
}
#fc-tour-step-count { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #60a5fa; margin-bottom: 6px; }
#fc-tour-title { font-size: 15px; font-weight: 800; color: #f8fafc; margin-bottom: 6px; }
#fc-tour-text { font-size: 12.5px; line-height: 1.6; color: #cbd5e1; margin-bottom: 16px; }
#fc-tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#fc-tour-skip { font-size: 11px; font-weight: 700; color: #94a3b8; background: none; border: none; cursor: pointer; }
#fc-tour-skip:hover { color: #e2e8f0; }
.fc-tour-nav { display: flex; gap: 8px; }
#fc-tour-back, #fc-tour-next {
  font-size: 12px; font-weight: 700; padding: 8px 14px; border-radius: 10px; cursor: pointer; border: 1px solid transparent;
}
#fc-tour-back { background: rgba(255, 255, 255, .06); color: #cbd5e1; border-color: rgba(255, 255, 255, .1); }
#fc-tour-back:disabled { opacity: .35; cursor: not-allowed; }
#fc-tour-next { background: linear-gradient(90deg, #3b82f6, #10b981); color: #fff; }
#fc-tour-next:hover { filter: brightness(1.08); }
body.fc-tour-active { overflow: hidden; }

/* ==========================================================================
   Hellmodus (Light Mode)
   Best-effort-Überschreibung der im Markup verwendeten Tailwind-Utility-
   Klassen und der Custom-Klassen aus shared.css (glass, card, nav-link, ...).
   Aktiviert über die Klasse "fc-light" auf <html>.
   ========================================================================== */
html.fc-light body { background: #eef2f7 !important; color: #1e293b !important; }
html.fc-light .ambient-bg { opacity: .12 !important; }

html.fc-light .glass,
html.fc-light .glass-strong,
html.fc-light .card {
  background: rgba(255, 255, 255, .82) !important;
  border-color: rgba(15, 23, 42, .08) !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06) !important;
  color: #1e293b !important;
}

html.fc-light [class*="bg-slate-950"],
html.fc-light [class*="bg-slate-900"],
html.fc-light [class*="bg-slate-800"] { background-color: #ffffff !important; }

html.fc-light [class*="bg-slate-950/"],
html.fc-light [class*="bg-slate-900/"],
html.fc-light [class*="bg-white/[0.01]"],
html.fc-light [class*="bg-white/[0.02]"],
html.fc-light [class*="bg-white/5"] { background-color: rgba(15, 23, 42, .035) !important; }

html.fc-light [class*="text-slate-100"],
html.fc-light [class*="text-slate-200"],
html.fc-light [class*="text-slate-300"] { color: #1e293b !important; }
html.fc-light [class*="text-slate-400"] { color: #475569 !important; }
html.fc-light [class*="text-slate-500"],
html.fc-light [class*="text-slate-600"] { color: #64748b !important; }

html.fc-light [class*="border-white/5"],
html.fc-light [class*="border-white/10"] { border-color: rgba(15, 23, 42, .09) !important; }

html.fc-light .nav-link { color: #334155 !important; }
html.fc-light .nav-link.active,
html.fc-light .nav-link:hover { color: #1d4ed8 !important; }

html.fc-light .fc-tool-btn { background: rgba(15, 23, 42, .05); border-color: rgba(15, 23, 42, .1); color: #334155; }
html.fc-light .fc-tool-btn:hover { background: rgba(15, 23, 42, .1); color: #0f172a; }
html.fc-light .fc-lang-menu { background: #ffffff; border-color: rgba(15, 23, 42, .1); box-shadow: 0 20px 45px rgba(15, 23, 42, .15); }
html.fc-light .fc-lang-item { color: #334155; }
html.fc-light .fc-lang-item:hover { background: rgba(15, 23, 42, .06); color: #0f172a; }

html.fc-light #fc-tour-tooltip { background: #ffffff; border-color: rgba(15, 23, 42, .1); color: #1e293b; box-shadow: 0 25px 60px rgba(15, 23, 42, .18); }
html.fc-light #fc-tour-title { color: #0f172a; }
html.fc-light #fc-tour-text { color: #334155; }
html.fc-light #fc-tour-backdrop { background: rgba(15, 23, 42, .35); }
html.fc-light #fc-tour-highlight { box-shadow: 0 0 0 4px rgba(37, 99, 235, .5), 0 0 0 9999px rgba(15, 23, 42, .35); }

html.fc-light .folder-card:hover { background-color: rgba(15, 23, 42, .03) !important; }
html.fc-light .folder-icon { background: linear-gradient(135deg, rgba(59, 130, 246, .18) 0%, rgba(99, 102, 241, .12) 100%) !important; }

@media (max-width: 640px) {
  .fc-lang-menu { right: -40px; }
}
