/* Tutorial Styles */

/* Controles de expansão/colapso */
.tutorial-tree-controls {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tree-control-btn {
  padding: 0.5rem 1rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  color: var(--text-color);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tree-control-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

.tree-control-btn i {
  font-size: 0.875rem;
}

.tutorial-navigation {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.tutorial-nav-btn {
  padding: 1rem 2rem;
  background: var(--surface-color);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  color: var(--text-color);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tutorial-nav-btn i {
  font-size: 1.2rem;
}

.tutorial-nav-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tutorial-nav-btn.active {
  background: var(--primary-color);
  border-color: var(--bg-color);
  color: white;
  box-shadow: var(--shadow-lg);
}

.tutorial-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tutorial-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tutorial-intro {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  margin-bottom: 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.tutorial-intro h2 {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tutorial-intro i {
  font-size: 2.5rem;
}

.tutorial-intro p {
  margin: 0;
  font-size: 1.1rem;
  opacity: 0.95;
}

.tutorial-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tutorial-section {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.tutorial-section:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tutorial-section-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--transition-normal);
}

.tutorial-section-header:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.tutorial-number {
  background: rgba(255, 255, 255, 0.2);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
}

.tutorial-section-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.tutorial-section-content {
  padding: 2rem;
  background: white;
  line-height: 1.8;
}

.tutorial-section-content p {
  margin-bottom: 1rem;
  color: var(--text-color);
}

.tutorial-section-content strong {
  color: var(--primary-color);
  font-weight: 600;
}

.tutorial-section-content ul,
.tutorial-section-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.tutorial-section-content li {
  margin: 0.75rem 0;
  color: var(--text-secondary);
}

.tutorial-section-content ul ul,
.tutorial-section-content ol ul {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.tutorial-tip,
.tutorial-warning {
  padding: 10px 10px;
  border-radius: var(--border-radius-md);
  margin: 1rem 0;
  display: flow;
  gap: 10px;
  align-items: flex-start;
  border-left: 4px solid var(--border-color);
}

.tutorial-tip {
  background: #e9ecef;
  border-color: #ffc107;
  color: #856404;
}

.tutorial-tip i {
  font-size: 1.5rem;
  color: #ffc107;
  margin-top: 0.2rem;
}

.tutorial-warning {
  background: #d1ecf1;
  border-color: #0c5460;
  color: #0c5460;
}

.tutorial-warning i {
  font-size: 1.5rem;
  color: #17a2b8;
  margin-top: 0.2rem;
}

.tutorial-tip strong,
.tutorial-warning strong {
  color: inherit;
  display: block;
  margin-bottom: 0.25rem;
}

.tutorial-help-section {
  background: var(--surface-color);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  margin-top: 3rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.tutorial-help-section h2 {
  color: var(--primary-color);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.help-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.help-card {
  background: white;
  padding: 20px 0;
  border-radius: var(--border-radius-lg);
  border: 2px solid var(--border-color);
  transition: all var(--transition-normal);
}

.help-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.help-card i {
  font-size: 25px;
  color: var(--primary-color);
  margin-bottom: 0;
}

.help-card h3 {
  margin: 1rem 0 0.5rem 0;
  color: var(--primary-color);
}

.help-card p {
  margin: 0;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 1.1rem;
}

/* Responsividade */
@media (max-width: 768px) {
  .tutorial-navigation {
    flex-direction: column;
    gap: 0.75rem;
  }

  .tutorial-nav-btn {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.5rem;
  }

  .tutorial-intro {
    padding: 1.5rem;
  }

  .tutorial-intro h2 {
    font-size: 1.5rem;
    flex-direction: column;
    gap: 0.75rem;
  }

  .tutorial-intro p {
    font-size: 1rem;
  }

  .tutorial-section-header {
    padding: 1rem;
  }

  .tutorial-number {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.25rem;
  }

  .tutorial-section-header h3 {
    font-size: 1.1rem;
  }

  .tutorial-section-content {
    padding: 1.5rem;
  }

  .tutorial-section-content ul,
  .tutorial-section-content ol {
    padding-left: 1.5rem;
  }

  .help-cards {
    grid-template-columns: 1fr;
  }
}

/* Estrutura em Árvore Hierárquica */
.tutorial-tree {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 5px;
  box-shadow: var(--shadow-sm);
}

.tree-item {
  position: relative;
  margin-left: 0;
}

.tree-item-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  margin-bottom: 0.5rem;
  position: relative;
}

.tree-item-header:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
}

.tree-toggle {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 0.75rem;
  transition: all var(--transition-normal);
}

.tree-item.expanded .tree-toggle {
  background: var(--primary-dark);
  transform: rotate(90deg);
}

.tree-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  border-radius: var(--border-radius-md);
  flex-shrink: 0;
  font-size: 1rem;
}

.tree-title {
  flex: 1;
  font-weight: 600;
  color: var(--text-color);
  font-size: 1rem;
}

.tree-children {
  margin-left: 5px;
  padding-left: 5px;
  border-left: 2px solid var(--border-color);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

.tree-item.expanded > .tree-children {
  max-height: none;
  opacity: 1;
  margin-bottom: 0.5rem;
}

.tree-content {
  padding: 1.5rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  margin-bottom: 0.5rem;
  line-height: 1.8;
  box-shadow: var(--shadow-sm);
}

.tree-content p {
  margin-bottom: 1rem;
  color: var(--text-color);
}

.tree-content strong {
  color: var(--primary-color);
  font-weight: 600;
}

.tree-content ul,
.tree-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.tree-content li {
  margin: 0.75rem 0;
  color: var(--text-secondary);
}

/* Níveis de indentação */
.tree-children .tree-item {
  margin-left: 0;
}

.tree-children .tree-children {
  margin-left: 5px;
  padding-left: 5px;
}

.tree-children .tree-children .tree-children {
  margin-left: 1.25rem;
  padding-left: 0.5rem;
  border-left-width: 1px;
}

/* Dark Theme */
[data-theme="dark"] .tutorial-section {
  background: var(--surface-color);
  border-color: var(--border-color);
}

[data-theme="dark"] .tutorial-section-content {
  background: var(--surface-color);
}

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

[data-theme="dark"] .tutorial-tip {
  background: rgba(255, 193, 7, 0.1);
  color: #ffc107;
}

[data-theme="dark"] .tutorial-warning {
  background: rgba(23, 162, 184, 0.1);
  color: #17a2b8;
}

[data-theme="dark"] .tutorial-tree {
  background: var(--surface-color);
  border-color: var(--border-color);
}

[data-theme="dark"] .tree-item-header {
  background: var(--surface-color);
  border-color: var(--border-color);
}

[data-theme="dark"] .tree-content {
  background: var(--surface-color);
  border-color: var(--border-color);
}

