/* BodegaFlex POS — Centro de ayuda «Soporte y tutoriales» */
.bf-soporte-wrap {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bf-soporte-hero {
  background: linear-gradient(135deg, #1a3a6b 0%, #0f294d 100%);
  color: #ffffff;
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bf-soporte-hero h2 {
  margin: 0 0 4px 0;
  font-size: 1.25rem;
  color: #ffffff;
}

.bf-soporte-hero p {
  margin: 0;
  font-size: 0.9rem;
  color: #dbeafe;
  line-height: 1.4;
}

.bf-soporte-wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 10px;
  background: #16a34a;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.bf-soporte-wa-btn:hover {
  background: #15803d;
}

.bf-soporte-offline-banner {
  background: #fef3c7;
  border: 1.5px solid #f59e0b;
  color: #92400e;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
}

.bf-soporte-controles {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bf-soporte-buscador {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.96rem;
  background: #ffffff;
  color: #0f172a;
  box-sizing: border-box;
}

.bf-soporte-buscador:focus {
  outline: none;
  border-color: #1a3a6b;
  box-shadow: 0 0 0 3px rgba(26, 58, 107, 0.14);
}

.bf-soporte-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bf-soporte-cat-chip {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.bf-soporte-cat-chip.active {
  background: #1a3a6b;
  border-color: #1a3a6b;
  color: #ffffff;
}

.bf-soporte-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.84rem;
  color: #475569;
}

.bf-soporte-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}

.bf-soporte-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.bf-soporte-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.bf-soporte-badge-cod {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 0.76rem;
  font-weight: 800;
}

.bf-soporte-duracion {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
}

.bf-soporte-card h3 {
  margin: 0;
  font-size: 1rem;
  color: #0f172a;
  line-height: 1.3;
}

.bf-soporte-card p {
  margin: 0;
  font-size: 0.86rem;
  color: #475569;
  line-height: 1.45;
  flex: 1;
}

.bf-soporte-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.bf-soporte-estado-tag {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.bf-soporte-estado-disponible {
  background: #dcfce7;
  color: #166534;
}

.bf-soporte-estado-pendiente {
  background: #f1f5f9;
  color: #475569;
}

.bf-soporte-estado-grabar {
  background: #fef3c7;
  color: #92400e;
}

.bf-soporte-btn-ver {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  background: #1a3a6b;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
}

.bf-soporte-btn-ver:hover {
  background: #142d54;
}

/* Modal / Overlay (soporta abrirse incluso por encima de pantalla de suscripción vencida) */
#bf-soporte-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483200;
  background: rgba(15, 23, 42, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  overflow-y: auto;
}

.bf-soporte-modal-card {
  background: #f8fafc;
  width: 100%;
  max-width: 960px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 16px;
  padding: 16px;
  box-sizing: border-box;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.bf-soporte-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.bf-soporte-btn-cerrar {
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  cursor: pointer;
}

/* Reproductor modal de un tutorial */
#bf-soporte-player-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483300;
  background: rgba(15, 23, 42, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
}

.bf-soporte-player-card {
  background: #ffffff;
  color: #0f172a;
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 16px;
  padding: 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bf-soporte-video {
  width: 100%;
  max-height: 56vh;
  border-radius: 10px;
  background: #0f172a;
}

.bf-soporte-video-placeholder {
  background: #f1f5f9;
  border: 1.5px dashed #94a3b8;
  border-radius: 10px;
  padding: 16px;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.45;
}

.bf-soporte-pasos {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: #1e293b;
}

.bf-soporte-vacio {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  color: #475569;
}

@media (max-width: 480px) {
  .bf-soporte-grid {
    grid-template-columns: 1fr;
  }
  .bf-soporte-hero {
    padding: 14px;
  }
  .bf-soporte-wa-btn {
    width: 100%;
  }
}

/* Botones pre-login de «Soporte y tutoriales»: siempre visibles, activos y con contraste claro */
#btn-login-open-ayuda,
#btn-setup-open-ayuda {
  background: #eff6ff !important;
  color: #1a3a6b !important;
  border: 1.5px solid #93c5fd !important;
  border-radius: 10px !important;
  padding: 9px 18px !important;
  min-height: 44px !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  text-decoration: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  box-shadow: 0 1px 3px rgba(26, 58, 107, 0.12) !important;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

#btn-login-open-ayuda:hover,
#btn-setup-open-ayuda:hover {
  background: #dbeafe !important;
  border-color: #60a5fa !important;
}

html[data-tema="noche"] #btn-login-open-ayuda,
html[data-tema="noche"] #btn-setup-open-ayuda {
  background: #1e3a5f !important;
  color: #dbeafe !important;
  border: 1.5px solid #3b82f6 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

html[data-tema="noche"] #btn-login-open-ayuda:hover,
html[data-tema="noche"] #btn-setup-open-ayuda:hover {
  background: #254a78 !important;
  border-color: #60a5fa !important;
}

/* Tarjeta destacada del Video Maestro y compatibilidad limpia con tema noche */
.bf-soporte-card.bf-soporte-vm-card {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
}

html[data-tema="noche"] #bf-soporte-overlay .bf-soporte-modal-card {
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #334155;
}

html[data-tema="noche"] #bf-soporte-overlay .bf-soporte-modal-header strong {
  color: #f8fafc;
}

html[data-tema="noche"] #bf-soporte-overlay .bf-soporte-btn-cerrar,
html[data-tema="noche"] #bf-soporte-player-overlay .bf-soporte-btn-cerrar {
  background: #1e293b;
  color: #f1f5f9;
  border-color: #475569;
}

html[data-tema="noche"] .bf-soporte-card {
  background: #1e293b;
  border-color: #334155;
}

html[data-tema="noche"] .bf-soporte-card h3 {
  color: #f8fafc;
}

html[data-tema="noche"] .bf-soporte-card p {
  color: #cbd5e1;
}

html[data-tema="noche"] .bf-soporte-card.bf-soporte-vm-card {
  background: #272213;
  border-color: #6b4f12;
  border-left: 4px solid #f59e0b;
}

html[data-tema="noche"] .bf-soporte-buscador {
  background: #1e293b;
  color: #f8fafc;
  border-color: #475569;
}

html[data-tema="noche"] .bf-soporte-cat-chip:not(.active) {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #475569;
}

html[data-tema="noche"] .bf-soporte-meta-bar {
  color: #cbd5e1;
}

html[data-tema="noche"] #bf-soporte-player-overlay .bf-soporte-player-card {
  background: #0f172a;
  color: #f1f5f9;
  border: 1px solid #334155;
}

html[data-tema="noche"] #bf-soporte-player-overlay .bf-soporte-pasos {
  color: #e2e8f0;
}

html[data-tema="noche"] #bf-soporte-player-overlay .bf-soporte-video-placeholder {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #475569;
}
