/**
 * 🎨 src/styles/timeline-tutorial.css
 * 호스피스 전주기 5단계 타임라인 인터랙티브 튜토리얼 스타일 (REQ-37)
 */

.timeline-tut-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 22000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.timeline-tut-card {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 430px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.32);
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  animation: tutFadeIn 0.25s ease-out;
}

@keyframes tutFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* 5단계 프로그레스 바 */
.tut-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 2px;
}

.tut-progress-bar {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.tut-progress-fill {
  height: 100%;
  background: var(--color-primary, #3E6553);
  transition: width 0.35s ease-in-out;
}

.tut-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
}

.tut-progress-labels span.active {
  color: var(--color-primary, #3E6553);
  font-weight: 800;
}

/* 헤더 및 뱃지 */
.tut-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tut-badge-intro {
  font-size: 11px;
  font-weight: 800;
  color: var(--color-primary, #3E6553);
  background: #e8f5e9;
  padding: 3px 8px;
  border-radius: 6px;
}

.tut-step-badge {
  font-size: 11px;
  font-weight: 800;
  color: #1e3a8a;
  background: #eff6ff;
  padding: 3px 8px;
  border-radius: 6px;
}

.tut-close-btn {
  background: #f1f5f9;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tut-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.tut-desc {
  font-size: 12.5px;
  color: #475569;
  margin: 4px 0 0;
  line-height: 1.45;
}

/* 개요 박스 (Step 0) */
.tut-overview-box {
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tut-overview-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tut-overview-item .tut-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary, #3E6553);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.tut-overview-item strong {
  font-size: 12.5px;
  color: #1e293b;
  display: block;
}

.tut-overview-item p {
  font-size: 11px;
  color: #64748b;
  margin: 1px 0 0;
  line-height: 1.35;
}

/* 혜택 박스 (Step 1) */
.tut-benefit-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 12px;
  margin-top: 8px;
}

.tut-benefit-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #15803d;
  font-weight: 800;
  margin-bottom: 4px;
}

.tut-benefit-box p {
  font-size: 11.5px;
  color: #166534;
  line-height: 1.5;
  margin: 0;
}

/* 샘플 카드 (Step 1) */
.tut-sample-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 14px;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.tut-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tut-sample-tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--color-primary, #3E6553);
  background: #e8f5e9;
  padding: 2px 6px;
  border-radius: 4px;
}

.tut-sample-name {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 3px;
}

.tut-sample-meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.tut-fav-btn {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
}

.tut-heart-icon {
  font-size: 20px;
  line-height: 1;
}

/* 펄스 애니메이션 */
.pulse-target {
  animation: tutPulse 1.6s infinite;
}

@keyframes tutPulse {
  0% { box-shadow: 0 0 0 0 rgba(62, 101, 83, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(62, 101, 83, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 101, 83, 0); }
}

.tut-finger-pulse {
  position: absolute;
  top: -24px;
  right: -8px;
  background: #dc2626;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 9999px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
  animation: bounceFinger 0.8s infinite alternate;
}

@keyframes bounceFinger {
  from { transform: translateY(0); }
  to { transform: translateY(-3px); }
}

.tut-guide-text {
  font-size: 11.5px;
  color: #475569;
  text-align: center;
  margin-top: 8px;
}

/* 수칙 요약 (Step 2) */
.tut-rule-summary {
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tut-rule-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.tut-rule-icon {
  font-size: 16px;
  margin-top: 1px;
}

.tut-rule-item strong {
  font-size: 12px;
  color: #1e293b;
  display: block;
}

.tut-rule-item p {
  font-size: 11px;
  color: #64748b;
  margin: 1px 0 0;
  line-height: 1.35;
}

/* 자동 환승 데모 박스 (Step 3) */
.tut-transfer-demo-box {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  padding: 14px;
  margin-top: 8px;
  text-align: center;
}

.tut-transfer-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.tut-tag-before {
  font-size: 11.5px;
  font-weight: 800;
  color: #b45309;
  background: #fef3c7;
  padding: 4px 8px;
  border-radius: 6px;
}

.tut-tag-after {
  font-size: 11.5px;
  font-weight: 800;
  color: #15803d;
  background: #dcfce7;
  padding: 4px 8px;
  border-radius: 6px;
  animation: tutFadeIn 0.3s ease-out;
}

.tut-transfer-arrow {
  color: #94a3b8;
  font-weight: 800;
}

.tut-input-simul {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: #334155;
}

.tut-mock-badge-num {
  font-size: 13px;
  font-weight: 900;
  color: var(--color-primary, #3E6553);
  background: #e8f5e9;
  padding: 2px 10px;
  border-radius: 9999px;
}

/* 알림 카드 데모 (Step 4) */
.tut-alarm-demo-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
  margin-top: 8px;
}

.tut-alarm-demo-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tut-alarm-chip {
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 800;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 6px;
  border-radius: 4px;
}

.tut-alarm-demo-row p {
  font-size: 11.5px;
  color: #334155;
  margin: 0;
  line-height: 1.4;
}

/* 입원 카드 데모 (Step 5) */
.tut-admit-card-demo {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 14px;
  padding: 14px;
  margin-top: 8px;
}

.tut-admit-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  color: #14532d;
}

.tut-admit-chip {
  font-size: 10.5px;
  font-weight: 800;
  color: #15803d;
  background: #dcfce7;
  padding: 2px 6px;
  border-radius: 4px;
}

.tut-success-dialog {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 12px;
  margin-top: 10px;
  text-align: center;
  animation: tutFadeIn 0.3s ease-out;
}

/* 액션 버튼 */
.tut-mock-action-box {
  margin-top: 10px;
}

.tut-action-btn {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background-color 0.2s ease;
}

.tut-action-btn.primary {
  background: var(--color-primary, #3E6553);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(62, 101, 83, 0.25);
}

.tut-action-btn.success {
  background: #15803d;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(21, 128, 61, 0.25);
}

.tut-footer {
  margin-top: 4px;
}

