/**
 * 3M CCC ナレッジ検索システム - カスタムスタイル
 */

/* Phase 1: アニメーション */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.3s ease-out;
}

/* Phase 1: 行数制限 */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ローディングスピナー */
.loading-spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Phase 1: プログレスバー遷移効果 */
#upload-progress-bar {
  transition: width 0.3s ease-out, background-color 0.3s ease-out;
}

/* Phase 1: モーダルのスムーズな表示 */
#favorites-modal {
  animation: fade-in 0.2s ease-out;
}

/* Phase 1: カスタムスクロールバー */
#favorites-preview::-webkit-scrollbar,
#history-list::-webkit-scrollbar {
  width: 6px;
}

#favorites-preview::-webkit-scrollbar-track,
#history-list::-webkit-scrollbar-track {
  background: transparent;
}

#favorites-preview::-webkit-scrollbar-thumb {
  background: #fbbf24;
  border-radius: 3px;
}

#history-list::-webkit-scrollbar-thumb {
  background: #9ca3af;
  border-radius: 3px;
}

#favorites-preview::-webkit-scrollbar-thumb:hover {
  background: #f59e0b;
}

#history-list::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* ツールチップアニメーション */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.2s ease-out;
}

/* ツールチップトリガーのホバー効果 */
.tooltip-trigger {
  cursor: help;
  transition: all 0.2s ease;
}

.tooltip-trigger:hover {
  transform: scale(1.1);
}

/* デモモード用の脈動アニメーション */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.animate-pulse-slow {
  animation: pulse 2s ease-in-out infinite;
}
