/* ============================================================================
   shell.css — Unified stylesheet for Flanders Portales (docs, help, induction)
   Matches the premium look & feel of the Flanders Design System (BRAND.md)
   ============================================================================ */

/* Theme variables fallback if not defined by the page */
:root {
  --fl-font: 'Geist', system-ui, -apple-system, sans-serif;
  --fl-violet: #7a6cff;
  --fl-violet-hover: #6457e6;
  --fl-cta: #2563eb;
  --fl-cta-hover: #1d4ed8;
  --fl-bg-light: #ffffff;
  --fl-bg-dark: #0a0a0a;
  --fl-surface-light: #f9fafb;
  --fl-surface-dark: #111827;
  --fl-border-light: #e5e7eb;
  --fl-border-dark: #374151;
  --fl-text-light: #171717;
  --fl-text-dark: #ededed;
  --fl-text-secondary-light: #6b7280;
  --fl-text-secondary-dark: #9ca3af;
  --fl-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --fl-backdrop: rgba(10, 10, 10, 0.7);
}

/* Loading & Login Screens Wrapper */
.fl-overlay-container {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fl-font);
  background: var(--fl-bg-light);
  color: var(--fl-text-light);
  transition: opacity 0.3s ease;
}

html[data-theme="dark"] .fl-overlay-container {
  background: var(--fl-bg-dark);
  color: var(--fl-text-dark);
}

/* Loading Screen */
.fl-loading-content {
  text-align: center;
}

.fl-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--fl-border-light);
  border-top-color: var(--fl-violet);
  border-radius: 50%;
  animation: fl-spin 1s linear infinite;
  margin: 0 auto 16px;
}

html[data-theme="dark"] .fl-spinner {
  border-color: var(--fl-border-dark);
  border-top-color: var(--fl-violet);
}

/* Loading mark: Infracommerce isologo inside a spinning ring (Flanders look) */
.fl-loader {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
}

.fl-loader .fl-loader-ring {
  position: absolute;
  inset: 0;
  border: 3px solid var(--fl-border-light);
  border-top-color: var(--fl-violet);
  border-radius: 50%;
  animation: fl-spin 1s linear infinite;
}

html[data-theme="dark"] .fl-loader .fl-loader-ring {
  border-color: var(--fl-border-dark);
  border-top-color: var(--fl-violet);
}

.fl-loader .fl-loader-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: block;
  object-fit: contain;
}

@keyframes fl-spin {
  to { transform: rotate(360deg); }
}

/* Login Card style */
.fl-login-card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--fl-border-light);
  box-shadow: var(--fl-shadow);
  text-align: center;
  animation: fl-fade-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="dark"] .fl-login-card {
  background: var(--fl-surface-dark);
  border-color: var(--fl-border-dark);
}

@keyframes fl-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.fl-logo-glow {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: block;
  object-fit: contain;
  box-shadow: 0 0 16px rgba(122, 108, 255, 0.4);
  margin: 0 auto 24px;
}

.fl-login-card h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  color: var(--fl-text-light);
}

html[data-theme="dark"] .fl-login-card h2 {
  color: var(--fl-text-dark);
}

.fl-login-card p {
  font-size: 14px;
  color: var(--fl-text-secondary-light);
  margin: 0 0 24px;
}

html[data-theme="dark"] .fl-login-card p {
  color: var(--fl-text-secondary-dark);
}

/* Google Sign-in Button */
.fl-btn-google {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 24px;
  border-radius: 12px;
  border: 1px solid var(--fl-border-light);
  background: #ffffff;
  color: #374151;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

html[data-theme="dark"] .fl-btn-google {
  background: #111827;
  border-color: var(--fl-border-dark);
  color: #ededed;
}

.fl-btn-google:hover {
  background: #f9fafb;
  transform: translateY(-1px);
}

html[data-theme="dark"] .fl-btn-google:hover {
  background: #1f2937;
}

.fl-btn-google svg {
  width: 18px;
  height: 18px;
}

/* Blocked screen (e.g. Induction AI Agents Team gate) */
.fl-blocked-card {
  width: 100%;
  max-width: 480px;
  padding: 32px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #fee2e2;
  box-shadow: var(--fl-shadow);
  text-align: center;
  animation: fl-fade-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="dark"] .fl-blocked-card {
  background: var(--fl-surface-dark);
  border-color: #7f1d1d;
}

.fl-blocked-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: #dc2626;
  margin: 0 0 12px;
}

html[data-theme="dark"] .fl-blocked-card h2 {
  color: #f87171;
}

/* Blocked-card body copy needs an explicit color: without one it inherits the
   page body color, which on a hardcoded-dark login page (#ededed) collides with
   the card's light surface → invisible. Mirror the .fl-login-card p pattern. */
.fl-blocked-card p {
  color: var(--fl-text-light);
}

html[data-theme="dark"] .fl-blocked-card p {
  color: var(--fl-text-dark);
}

/* Context selector drop-down in topbar */
.fl-context-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  margin-left: 16px;
}

.fl-context-picker:hover {
  background: var(--border);
}

.fl-context-picker .arrow {
  margin-left: 8px;
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

.fl-context-picker.open .arrow {
  transform: rotate(180deg);
}

.fl-context-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 100;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: var(--sh-lg);
  padding: 8px;
  display: none;
}

.fl-context-menu.show {
  display: block;
}

.fl-context-menu-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  /* Light is the default; --text-faint on the white menu surface is only ~3.4:1
     (below AA for this 11px label), so use the secondary token. Dark overrides below. */
  color: var(--fl-text-secondary-light);
  padding: 6px 8px;
  letter-spacing: 0.05em;
}

/* Dark theme keeps the faint de-emphasis (--text-faint clears AA on the dark surface). */
html[data-theme="dark"] .fl-context-menu-title {
  color: var(--text-faint);
}

.fl-context-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-soft);
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fl-context-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.fl-context-item.active {
  color: var(--violet);
  background: color-mix(in srgb, var(--violet) 8%, transparent);
  font-weight: 700;
}

/* User avatar button / menu */
.fl-user-profile {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-left: 8px;
}

.fl-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--fl-violet);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  border: 2px solid var(--border);
  transition: border-color 0.2s ease;
}

.fl-user-profile:hover .fl-avatar {
  border-color: var(--fl-violet);
}

.fl-user-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 100;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: var(--sh-lg);
  padding: 8px;
  display: none;
}

.fl-user-menu.show {
  display: block;
}

.fl-user-info {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.fl-user-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fl-user-email {
  font-size: 12px;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fl-menu-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fl-menu-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.fl-menu-btn.logout-btn {
  color: var(--error);
}

.fl-menu-btn.logout-btn:hover {
  background: color-mix(in srgb, var(--error) 8%, transparent);
}

/* Redirect alert banner styled for Flanders Portales */
.fl-redirect-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: color-mix(in srgb, var(--fl-violet) 10%, #fff7ed);
  border-bottom: 1px solid #ffedd5;
  color: #c2410c;
  font-family: var(--fl-font);
  font-size: 13px;
  font-weight: 500;
  animation: fl-slide-down 0.3s ease;
  z-index: 40;
}

html[data-theme="dark"] .fl-redirect-alert {
  background: #2a1b10;
  border-bottom-color: #432b18;
  color: #ff9d43;
}

/* Shared-link fallback banners (Cases 2 & 3). Reuse .fl-redirect-alert layout but
   re-tint: 'info' (Case 2 — shown in another Espacio) reads as informative (violet/
   blue); 'blocked' (Case 3 — tema not enabled anywhere) reads as a soft block (red). */
.fl-shared-link-alert.fl-alert-info {
  background: color-mix(in srgb, var(--fl-cta) 10%, #eff6ff);
  border-bottom-color: color-mix(in srgb, var(--fl-cta) 25%, transparent);
  color: #1d4ed8;
}
html[data-theme="dark"] .fl-shared-link-alert.fl-alert-info {
  background: #101a2e;
  border-bottom-color: #1e3a5f;
  color: #93c5fd;
}
.fl-shared-link-alert.fl-alert-blocked {
  background: color-mix(in srgb, var(--fl-cta) 4%, #fef2f2);
  border-bottom-color: color-mix(in srgb, #dc2626 25%, transparent);
  color: #b91c1c;
}
html[data-theme="dark"] .fl-shared-link-alert.fl-alert-blocked {
  background: #2a1212;
  border-bottom-color: #4a1e1e;
  color: #f87171;
}

.fl-alert-icon {
  font-size: 16px;
}

.fl-alert-text {
  flex: 1;
}

.fl-alert-close {
  background: transparent;
  border: none;
  color: currentColor;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.fl-alert-close:hover {
  opacity: 1;
}

@keyframes fl-slide-down {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Scroll container and favorites styles for Space Picker */
.fl-context-list {
  max-height: min(60vh, 480px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 4px;
}

.fl-context-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.fl-context-row:hover {
  background: var(--surface-2);
}

.fl-context-row.active {
  background: color-mix(in srgb, var(--fl-violet) 8%, transparent);
}

.fl-context-item-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  color: var(--text-soft);
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--fl-font);
  font-size: 13px;
  font-weight: 500;
}

html[data-theme="dark"] .fl-context-item-btn {
  color: #c5c5d2;
}

.fl-context-row.active .fl-context-item-btn {
  color: var(--fl-violet);
  font-weight: 700;
}

.fl-context-row:hover .fl-context-item-btn {
  color: var(--text);
}

.fl-context-fav-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 8px 12px;
  color: var(--text-faint);
  transition: color 0.15s ease, transform 0.1s ease;
}

.fl-context-fav-btn:hover {
  color: #fbbf24;
  transform: scale(1.15);
}

.fl-context-fav-btn.fav {
  color: #f59e0b;
}

/* Mobile responsive collapsing for top nav-bar */
.fl-mobile-ctrls {
  display: none;
  padding: 8px 4px;
}

.fl-mobile-ctrls .fl-menu-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 6px 8px;
  letter-spacing: 0.05em;
}

.fl-mobile-lang {
  display: flex;
  gap: 4px;
  padding: 4px 8px;
}

.fl-mobile-lang button {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.fl-mobile-lang button:hover {
  background: var(--border);
  color: var(--text);
}

.fl-mobile-lang button.active {
  background: var(--fl-violet);
  color: #fff;
  border-color: var(--fl-violet);
}

/* Banderas del selector mobile: SVG inline del sprite (#fl-flag-*), NO emoji —
   Windows no trae los glifos de bandera y el emoji degradaba a las 2 letras del
   país (help-#207). Los portales repiten esta regla en su <style> inline porque
   shell.css lo inyecta shell.js en runtime y el topbar no puede esperarlo.
   Ver web/shared/flags.js. */
.fl-mobile-lang .fl-flag {
  width: 1.5em;
  height: 1em;
  flex: 0 0 auto;
  display: block;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.fl-mobile-font-ctrls {
  display: flex;
  gap: 4px;
  padding: 4px 8px;
}

.fl-mobile-font-ctrls button {
  flex: 1;
}

.fl-mobile-only {
  display: none;
}

/* Breakpoint "chrome/mobile" compartido = 760px. Colapsa idioma/tema/fuente al menú del
   avatar a la MISMA medida que los portales ya compactan el topbar (web/help + web/induction
   @media 760). Antes era 680 → en la banda 681–760px idioma/tema quedaban visibles y
   desbordaban la barra angosta. MANTENER EN SYNC con el 760 de help/induction. */
@media (max-width: 760px) {
  .brand-name {
    display: none !important;
  }
  
  .topbar-spacer,
  .progress-wrap {
    display: none !important;
  }

  .search-box {
    flex: 1 !important;
    min-width: 80px !important;
    max-width: 160px !important;
    margin-left: 8px !important;
    margin-right: 8px !important;
  }
  
  .ctrl-group > .lang-switch,
  .ctrl-group > #theme-toggle,
  .ctrl-group > .fontsize-ctrl {
    display: none !important;
  }

  .fl-context-picker {
    margin-left: 8px !important;
    max-width: 140px;
  }

  .fl-context-picker > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px;
  }

  .fl-mobile-ctrls,
  .fl-mobile-only {
    display: block;
  }
}

/* ============================================================================
   Floating Help Bubble & Panel (HELP-P141)
   ============================================================================ */
.fl-help-bubble-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  font-family: var(--fl-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

.fl-help-bubble-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--fl-violet, #7a6cff);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(122, 108, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background-color 0.2s ease;
  outline: none;
}

.fl-help-bubble-btn:hover {
  background: var(--fl-violet-hover, #6457e6);
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(122, 108, 255, 0.5);
}

.fl-help-bubble-btn:focus-visible {
  outline: 2px solid var(--fl-cta, #2563eb);
  outline-offset: 3px;
}

.fl-help-bubble-btn .fl-help-bubble-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fl-help-panel {
  position: absolute;
  bottom: 62px;
  right: 0;
  width: 290px;
  background: var(--surface, var(--fl-bg-light, #ffffff));
  border: 1px solid var(--border, var(--fl-border-light, #e5e7eb));
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 12px;
  box-sizing: border-box;
  animation: fl-bubble-fade-in 0.2s ease-out;
}

html[data-theme="dark"] .fl-help-panel {
  background: var(--surface, var(--fl-surface-dark, #111827));
  border-color: var(--border, var(--fl-border-dark, #374151));
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

.fl-help-panel.fl-hidden,
.fl-help-panel[hidden] {
  display: none !important;
}

@keyframes fl-bubble-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.fl-help-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border, #f3f4f6);
}

html[data-theme="dark"] .fl-help-panel-header {
  border-bottom-color: var(--border, #374151);
}

.fl-help-panel-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text, var(--fl-text-light, #171717));
}

html[data-theme="dark"] .fl-help-panel-title {
  color: var(--text, var(--fl-text-dark, #ededed));
}

.fl-help-panel-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  color: var(--text-soft, var(--fl-text-secondary-light, #6b7280));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.fl-help-panel-close:hover {
  background: var(--surface-2, rgba(0, 0, 0, 0.05));
  color: var(--text, #111827);
}

html[data-theme="dark"] .fl-help-panel-close:hover {
  background: var(--surface-2, rgba(255, 255, 255, 0.08));
  color: var(--text, #ededed);
}

.fl-help-panel-close:focus-visible {
  outline: 2px solid var(--fl-violet, #7a6cff);
  outline-offset: 1px;
}

.fl-help-panel-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fl-help-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text, var(--fl-text-light, #374151));
  background: var(--surface-2, #f9fafb);
  border: 1px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  text-align: left;
}

html[data-theme="dark"] .fl-help-option {
  background: var(--surface-2, #1f2937);
  color: var(--text, var(--fl-text-dark, #e5e7eb));
}

.fl-help-option:hover {
  background: var(--border, #f3f4f6);
  border-color: var(--border, #e5e7eb);
  color: var(--text, #111827);
}

html[data-theme="dark"] .fl-help-option:hover {
  background: #283548;
  border-color: var(--border, #374151);
  color: #ffffff;
}

.fl-help-option:focus-visible {
  outline: 2px solid var(--fl-violet, #7a6cff);
  outline-offset: 2px;
}

.fl-help-option-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--fl-violet, #7a6cff);
}

.fl-help-option-label {
  flex: 1;
  line-height: 1.3;
}

.fl-help-option-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint, #9ca3af);
  flex-shrink: 0;
}

.fl-help-option:hover .fl-help-option-arrow {
  color: var(--fl-violet, #7a6cff);
}

/* Buscador de tareas y lista */
.fl-help-search-container {
  margin-bottom: 10px;
}

.fl-help-search-input {
  width: 100%;
  padding: 7px 10px;
  font-size: 12px;
  font-family: inherit;
  border-radius: 6px;
  border: 1px solid var(--border, #e5e7eb);
  background: var(--surface-2, #f9fafb);
  color: var(--text, #111827);
  outline: none;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

html[data-theme="dark"] .fl-help-search-input {
  background: var(--surface-2, #1f2937);
  border-color: var(--border, #374151);
  color: var(--text, #f3f4f6);
}

.fl-help-search-input:focus {
  border-color: var(--fl-violet, #7a6cff);
}

.fl-help-tasks-container {
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fl-help-tasks-loading,
.fl-help-tasks-error,
.fl-help-tasks-empty {
  padding: 12px;
  font-size: 12px;
  text-align: center;
  color: var(--text-muted, #6b7280);
  background: var(--surface-2, #f9fafb);
  border-radius: 6px;
}

html[data-theme="dark"] .fl-help-tasks-loading,
html[data-theme="dark"] .fl-help-tasks-error,
html[data-theme="dark"] .fl-help-tasks-empty {
  background: var(--surface-2, #1f2937);
  color: var(--text-muted, #9ca3af);
}

.fl-help-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fl-help-task-item {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  background: var(--surface-2, #f9fafb);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

html[data-theme="dark"] .fl-help-task-item {
  border-color: var(--border, #374151);
  background: var(--surface-2, #1f2937);
}

.fl-help-task-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #111827);
  text-align: left;
  gap: 8px;
}

html[data-theme="dark"] .fl-help-task-header {
  color: var(--text, #f3f4f6);
}

.fl-help-task-header:hover {
  background: var(--border, rgba(0, 0, 0, 0.03));
}

html[data-theme="dark"] .fl-help-task-header:hover {
  background: rgba(255, 255, 255, 0.04);
}

.fl-help-task-title {
  flex: 1;
  line-height: 1.3;
}

.fl-help-task-toggle {
  font-size: 10px;
  color: var(--text-muted, #9ca3af);
  flex-shrink: 0;
}

.fl-help-task-body {
  padding: 8px 10px 10px 10px;
  border-top: 1px solid var(--border, #e5e7eb);
  font-size: 12px;
  line-height: 1.4;
  color: var(--text, #374151);
}

html[data-theme="dark"] .fl-help-task-body {
  border-top-color: var(--border, #374151);
  color: var(--text, #d1d5db);
}

.fl-help-task-permission {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 6px;
  border-radius: 4px;
  margin-bottom: 8px;
  background: rgba(122, 108, 255, 0.08);
  color: var(--fl-violet, #7a6cff);
}

.fl-help-task-steps-label,
.fl-help-task-example-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted, #6b7280);
  margin-bottom: 4px;
}

html[data-theme="dark"] .fl-help-task-steps-label,
html[data-theme="dark"] .fl-help-task-example-label {
  color: var(--text-muted, #9ca3af);
}

.fl-help-task-steps-list {
  margin: 0 0 8px 16px;
  padding: 0;
  font-size: 12px;
}

.fl-help-task-steps-list li {
  margin-bottom: 2px;
}

.fl-help-task-verified {
  font-size: 11px;
  color: var(--text-muted, #6b7280);
  margin-top: 4px;
  margin-bottom: 8px;
}

html[data-theme="dark"] .fl-help-task-verified {
  color: var(--text-muted, #9ca3af);
}

.fl-help-task-example-content {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  background: var(--surface, #ffffff);
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid var(--border, #e5e7eb);
  margin-bottom: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

html[data-theme="dark"] .fl-help-task-example-content {
  background: var(--surface, #111827);
  border-color: var(--border, #374151);
}

.fl-help-task-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.fl-help-task-link,
.fl-help-task-btn {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--fl-violet, #7a6cff);
  text-decoration: none;
  background: none;
  border: none;
  padding: 2px 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.fl-help-task-link:hover,
.fl-help-task-btn:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .fl-help-bubble-container {
    bottom: 16px;
    right: 16px;
  }
  .fl-help-panel {
    right: 0;
    width: calc(100vw - 32px);
    max-width: 320px;
  }
}

