@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/*
 * Login/registro no cargan dashboard.css: sin esto el modal no es overlay fijo y el vídeo no se ve.
 */
#tutorialModal.modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.72);
  box-sizing: border-box;
}

#tutorialModal .modal-content.modal-video {
  width: min(96vw, 1200px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--white, #fff);
  border-radius: var(--radius, 12px);
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
}

#tutorialModal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--primary-color, #2a499c) 0%, var(--primary-dark, #1e3570) 100%);
  color: #fff;
  flex-shrink: 0;
}

#tutorialModal .modal-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
}

#tutorialModal .modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  line-height: 1;
}

#tutorialModal .modal-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

#tutorialModal .modal-body.video-container {
  padding: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.login-tutoriales-panel {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.login-tutoriales-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-color, #2a499c);
  margin: 0 0 0.35rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-tutoriales-hint {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0 0 0.75rem 0;
}

.login-tutoriales-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.login-tutorial-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.login-tutorial-row:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.login-tutorial-row-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
}

.login-tutorial-row-text i {
  color: var(--primary-color, #2a499c);
  width: 1.1rem;
}

.login-tutorial-row-play {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-color, #2a499c);
  white-space: nowrap;
}

.login-tutorial-row-play i {
  margin-right: 0.2rem;
}

.modal-video {
  max-width: 90vw;
  width: 90vw;
  max-width: 1200px;
}

.video-container {
  padding: 0;
  background: #000;
}

/* 16:9 con aspect-ratio: el truco padding-bottom + height:0 rompe altura del <video> en varios navegadores */
#tutorialModal .video-wrapper,
#videoTutorialModal .video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 200px;
  max-height: min(75vh, 85vw);
  background: #000;
  overflow: hidden;
}

#tutorialModal .video-wrapper iframe,
#tutorialModal .video-wrapper .tutorial-video-element,
#tutorialModal .video-wrapper .tutorial-iframe-element,
#videoTutorialModal .video-wrapper iframe,
#videoTutorialModal .video-wrapper .tutorial-video-element {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

#tutorialModal .video-wrapper .tutorial-video-element,
#videoTutorialModal .video-wrapper .tutorial-video-element {
  object-fit: contain;
  background: #000;
}
