/*
 * tutorial.css — Estilo do Tutorial
 * 
 * REGRAS OBRIGATÓRIAS:
 * ❌ NÃO escurecer a tela
 * ❌ NÃO usar overlay opaco
 * ❌ NÃO bloquear visualmente o jogo
 * ✅ Jogo sempre totalmente visível
 * ✅ Apenas highlights nos elementos
 */

/* ========================================
   MESSAGE BOX (flutuante, não-bloqueante)
   ======================================== */

.tutorial-message-box {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: 600px;
  max-width: 90vw;
  background: white;
  border: 2px solid #2c3e50;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 9999;
  
  /* Inicialmente escondido */
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.tutorial-message-box.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Variante: posicionado à esquerda */
.tutorial-message-box.left-aligned {
  left: 20px;
  transform: translateX(-100%) translateY(20px);
}

.tutorial-message-box.left-aligned.active {
  opacity: 1;
  transform: translateX(0) translateY(0);
  pointer-events: auto;
}

/* Header */
.tutorial-message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #2c3e50;
  color: white;
  border-radius: 6px 6px 0 0;
  font-size: 13px;
  font-weight: 600;
}

#tutorialStepCounter {
  flex: 1;
}

.tutorial-close-button {
  background: transparent;
  border: none;
  color: white;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.tutorial-close-button:hover {
  opacity: 0.7;
}

/* Body */
.tutorial-message-body {
  padding: 20px;
}

#tutorialMessageTitle {
  margin: 0 0 12px 0;
  font-size: 18px;
  color: #2c3e50;
}

/* Botão decorativo dentro do texto do tutorial */
.tutorial-decorative-button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  vertical-align: middle;
  margin: 0 4px;
  cursor: default;
  pointer-events: none;
  user-select: none;
}

#tutorialMessageText {
  font-size: 14px;
  line-height: 1.6;
  color: #34495e;
}

#tutorialMessageText p {
  margin: 0 0 12px 0;
}

#tutorialMessageText ul {
  margin: 8px 0;
  padding-left: 20px;
}

#tutorialMessageText li {
  margin: 4px 0;
}

#tutorialMessageText strong {
  color: #2c3e50;
  font-weight: 600;
}

/* Footer */
.tutorial-message-footer {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid #ecf0f1;
}

.tutorial-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tutorial-btn-primary {
  background: #3498db;
  color: white;
  flex: 1;
}

.tutorial-btn-primary:hover {
  background: #2980b9;
}

.tutorial-btn-secondary {
  background: #95a5a6;
  color: white;
}

.tutorial-btn-secondary:hover {
  background: #7f8c8d;
}

.tutorial-btn-secondary:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
  opacity: 0.5;
}

.tutorial-btn-text {
  background: transparent;
  color: #7f8c8d;
  padding: 10px 12px;
}

.tutorial-btn-text:hover {
  color: #2c3e50;
}

/* ========================================
   HIGHLIGHT (destaque de elementos)
   ======================================== */

.tutorial-highlight {
  outline: 5px solid #e74c3c !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 20px rgba(231, 76, 60, 0.8), 0 0 40px rgba(231, 76, 60, 0.4), inset 0 0 0 3px rgba(231, 76, 60, 0.3) !important;
  position: relative !important;
  z-index: 9998 !important;
  animation: tutorial-pulse 1.5s ease-in-out infinite !important;
}

/* Garantir que o highlight funcione com elementos flex/overflow */
.tutorial-highlight.board,
.tutorial-highlight#board {
  outline: 6px solid #e74c3c !important;
  outline-offset: -2px !important;
  border: 3px solid rgba(231, 76, 60, 0.5) !important;
  box-shadow: 0 0 30px rgba(231, 76, 60, 0.9), 0 0 60px rgba(231, 76, 60, 0.5), inset 0 0 0 2px rgba(231, 76, 60, 0.4) !important;
}

@keyframes tutorial-pulse {
  0%, 100% {
    outline-color: #e74c3c;
    outline-width: 5px;
  }
  50% {
    outline-color: #c0392b;
    outline-width: 7px;
  }
}

/* ========================================
   BADGE "Tutorial" no título
   ======================================== */

.tutorial-badge {
  display: inline-block;
  background: #3b82f6;
  color: #fff;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  margin-left: 8px;
  vertical-align: middle;
}

/* ========================================
   DESTAQUE DE AÇÕES
   ======================================== */

.tutorial-action {
  display: inline-block;
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border: 2px solid #f39c12;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 4px 0;
  box-shadow: 0 2px 4px rgba(243, 156, 18, 0.2);
  font-weight: 600;
  color: #2c3e50;
}

/* ========================================
   RESPONSIVO
   ======================================== */

@media (max-width: 768px) {
  .tutorial-message-box {
    bottom: 10px;
    left: 10px;
    right: 10px;
    width: auto;
    max-width: none;
  }
}
