/* TrackAlert Wizard - tour del dashboard.
   Estilo alineado con la maqueta del tour: tarjeta blanca, borde soft-black,
   título en primary y contador de pasos a la izquierda del pie. */

.shepherd-element {
  background-color: var(--color-white, #fff);
  border: 2px solid var(--color-soft-black, #dfe7e9);
  border-radius: 8px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  max-width: 380px;
}

.shepherd-content {
  border-radius: 8px;
}

.shepherd-header {
  background-color: transparent !important;
  padding: 16px 16px 4px;
  border-radius: 8px 8px 0 0;
}

.shepherd-title {
  color: var(--color-primary, #09606e) !important;
  font-weight: 800 !important;
  font-size: 1.05rem !important;
  line-height: 1.3;
}

.shepherd-cancel-icon {
  color: var(--color-medium-black, #746e7c) !important;
  opacity: 0.6;
}

.shepherd-cancel-icon:hover {
  opacity: 1;
  color: var(--color-primary, #09606e) !important;
}

.shepherd-text {
  color: var(--color-black, #454545);
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 8px 16px 0;
}

.shepherd-text b {
  color: var(--color-primary, #09606e);
}

.shepherd-footer {
  padding: 12px 16px 16px;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* Contador «Paso X de Y» */
.wizard-progress {
  color: var(--color-medium-black, #746e7c);
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: auto;
  white-space: nowrap;
}

/* Botón Siguiente - verde primario con flecha SVG */
.shepherd-button.shepherd-button-primary {
  background-color: #09606e !important;
  color: #fff !important;
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition:
    background-color 0.2s ease,
    transform 0.1s ease;
}

.shepherd-button.shepherd-button-primary:hover:not(:disabled) {
  background-color: #065a6b !important;
  transform: translateY(-1px);
}

/* Flecha derecha para Siguiente */
.shepherd-button.shepherd-button-primary::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

/* Ocultar flecha del finish */
.shepherd-button.shepherd-button-primary.is-finish::after {
  display: none;
}

/* Botón Atrás - borde color primario, flecha SVG izquierda */
.shepherd-button.shepherd-button-secondary {
  background-color: transparent !important;
  color: #065a6b !important;
  border: 2px solid #09606e !important;
  border-radius: 6px;
  padding: 6px 14px;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s ease;
}

.shepherd-button.shepherd-button-secondary:hover:not(:disabled) {
  background-color: rgba(9, 96, 110, 0.08) !important;
}

/* Flecha izquierda para Atrás  */
.shepherd-button.shepherd-button-secondary::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%23065A6B'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

/* Flecha del tooltip: sigue el fondo de la tarjeta */
.shepherd-arrow::before {
  background-color: var(--color-white, #fff) !important;
  border: 2px solid var(--color-soft-black, #dfe7e9);
  border-width: 0 2px 2px 0;
}

/* Recuadro del elemento resaltado */
.shepherd-modal-overlay-container {
  fill: rgba(26, 26, 26, 0.68);
}

/* Selector de idioma dentro del tour */
.wizard-lang-picker {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: 0 0 100%;
  order: -1;
  margin: 0 0 4px;
}

.wizard-lang-btn {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  background: none;
  border: 2px solid rgba(13, 186, 154, 0.5);
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  opacity: 0.5;
  overflow: hidden;
  line-height: 0;
  transition:
    opacity 0.2s,
    border-color 0.2s;
}

.wizard-lang-btn img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: fill;
  display: block;
}

.wizard-lang-btn:hover {
  opacity: 0.85;
}

.wizard-lang-btn.active {
  opacity: 1;
  border-color: #0dba9a;
  cursor: default;
}

/* Modo oscuro: la app usa prefers-color-scheme, no una clase en <html> */
@media (prefers-color-scheme: dark) {
  .shepherd-element {
    background-color: var(--color-hard-black, #1a1a1a);
    border-color: rgba(223, 231, 233, 0.2);
  }

  .shepherd-title {
    color: #4fd1c5 !important;
  }

  .shepherd-text {
    color: var(--color-soft-white, #fcfcfc);
  }

  .shepherd-text b {
    color: #4fd1c5;
  }

  .shepherd-arrow::before {
    background-color: var(--color-hard-black, #1a1a1a) !important;
    border-color: rgba(223, 231, 233, 0.2);
  }

  .shepherd-button.shepherd-button-secondary {
    color: #4fd1c5 !important;
    border-color: #4fd1c5 !important;
  }

  .shepherd-button.shepherd-button-secondary::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%234FD1C5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18'/%3E%3C/svg%3E");
  }

  .wizard-progress {
    color: rgba(252, 252, 252, 0.7);
  }

  .wizard-lang-btn {
    border-color: rgba(13, 186, 154, 0.55);
  }
}

/* Botón flotante de ayuda: relanza el tour desde cualquier punto del dashboard */
#wizard-launcher {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 9996;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  border: 2px solid #09606e;
  background-color: #09606e;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.15s ease,
    background-color 0.2s ease;
}

#wizard-launcher:hover {
  background-color: #065a6b;
  transform: translateY(-2px);
}

@media print {
  #wizard-launcher {
    display: none;
  }
}

@media (prefers-color-scheme: dark) {
  #wizard-launcher {
    border-color: #4fd1c5;
    background-color: #0dba9a;
  }

  #wizard-launcher:hover {
    background-color: #4fd1c5;
  }
}
