/* Figma design tokens */
:root {
  --tutorial-text: var(--color-text-primary, #000000);
  --tutorial-text-muted: var(--color-text-secondary, #000000);
  --tutorial-surface: var(--color-surface, #FFFFFF);
  --tutorial-marfil: var(--Color-Marfil, #F0F0F0);
  --tutorial-card-border: rgba(0, 0, 0, 0.07);
  --tutorial-stack-1: #F9F9F9;
  --tutorial-stack-2: #F0F0F0;
  --tutorial-bar-bg: #F3F3F3;
  --tutorial-bar-fill: #4F4F4F;
}

.tutorial-widget {
  padding: 0 16px 24px;
  flex-shrink: 0;
}

.tutorial-separator {
  border-top: 1px solid var(--color-border, #e0e0e0);
  margin-bottom: 24px;
}

.tutorial-section-title {
  font-family: var(--font-body, 'Roboto', sans-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--tutorial-text);
  margin-bottom: 16px;
  line-height: 100%;
}

/* Card stack with two cards behind */
.tutorial-card-stack {
  position: relative;
  margin-bottom: 28px;
  padding-bottom: 10px;
}

.tutorial-card-stack::before,
.tutorial-card-stack::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 0 0 16px 16px;
}

.tutorial-card-stack::before {
  bottom: 3px;
  width: calc(100% - 22px);
  height: 8px;
  background: var(--tutorial-stack-1);
  z-index: 1;
}

.tutorial-card-stack::after {
  bottom: -3px;
  width: calc(100% - 46px);
  height: 8px;
  background: var(--tutorial-stack-2);
  z-index: 0;
}

/* Main card */
.tutorial-card {
  position: relative;
  z-index: 2;
  background: var(--tutorial-surface);
  border: 1px solid var(--tutorial-card-border);
  border-radius: 16px;
  overflow: hidden;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tutorial-card-image {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
  cursor: pointer;
}

.tutorial-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

.tutorial-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tutorial-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

/* Card body */
.tutorial-card-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tutorial-step-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.tutorial-step-label {
  font-family: var(--font-body, 'Roboto', sans-serif);
  font-size: 10px;
  font-weight: 600;
  color: var(--tutorial-text);
  background: var(--tutorial-marfil);
  padding: 4px;
  border-radius: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 100%;
}

.tutorial-step-title {
  font-family: var(--font-body, 'Roboto', sans-serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--tutorial-text);
  line-height: 100%;
  word-break: break-word;
}

.tutorial-step-desc {
  font-family: var(--font-body, 'Roboto', sans-serif);
  font-size: 12px;
  font-weight: 500;
  line-height: 110%;
  color: var(--tutorial-text);
  opacity: 0.7;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tutorial-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tutorial-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body, 'Roboto', sans-serif);
  font-size: 12px;
  font-weight: 500;
  line-height: 100%;
  color: var(--tutorial-text);
  padding: 4px 0;
}

.tutorial-btn--skip { font-weight: 500; }
.tutorial-btn--skip:hover { opacity: 0.7; }
.tutorial-btn--prev { font-weight: 500; }
.tutorial-btn--prev:hover { opacity: 0.7; }
.tutorial-btn--next { font-weight: 500; }
.tutorial-btn--next:hover { opacity: 0.7; }

/* Progress section */
.tutorial-progress {
  margin-top: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tutorial-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tutorial-progress-title {
  font-family: var(--font-body, 'Roboto', sans-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--tutorial-text);
  line-height: 100%;
}

.tutorial-progress-count {
  font-family: var(--font-body, 'Roboto', sans-serif);
  font-size: 12px;
  font-weight: 500;
  color: var(--tutorial-text);
  opacity: 0.5;
  line-height: 100%;
}

.tutorial-progress-bar {
  height: 6px;
  background: var(--tutorial-bar-bg);
  border-radius: 32px;
  overflow: hidden;
}

.tutorial-progress-fill {
  height: 100%;
  background: var(--tutorial-bar-fill);
  border-radius: 32px;
  transition: width 0.3s ease;
}

/* Step list */
.tutorial-step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.tutorial-step-list::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--color-surface, #fff));
  pointer-events: none;
}

.tutorial-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.tutorial-step-number {
  font-family: var(--font-body, 'Roboto', sans-serif);
  font-size: 12px;
  font-weight: 600;
  color: var(--tutorial-text);
  background: var(--tutorial-marfil);
  min-width: 15px;
  height: 18px;
  border-radius: 5px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tutorial-step-name {
  font-family: var(--font-body, 'Roboto', sans-serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--tutorial-text);
  line-height: 100%;
  flex: 1;
}

.tutorial-step-indicator {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.side-nav.collapsed .tutorial-widget {
  display: none;
}

@media (max-width: 768px) {
  .tutorial-widget {
    padding: 0 12px 16px;
  }
}
