/* Design Style Finder Pro - UI Components */

/* Tone Navigation */
.tone-nav {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  overflow-x: auto;
  margin-bottom: 24px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.tone-nav::-webkit-scrollbar { display: none; }

.tone-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 100px;
  background: white;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.tone-btn:hover {
  border-color: #6366f1;
  color: #4f46e5;
  background: #eef2ff;
}

.tone-btn.active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: white;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.tone-btn .emoji { font-size: 16px; }

/* Style Grid */
.style-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin-bottom: 32px;
}

/* Style Card */
.style-card {
  position: relative;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
}

.style-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  border-color: #c7d2fe;
}

.style-card.selected {
  border: 2px solid #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
  transform: translateY(-4px);
}

/* プレビューエリアの高さ調整 */
.style-preview {
  height: 160px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-color: var(--bg, #f9fafb); /* フォールバック */
}

/* プレビュー内の要素のスケーリング（カードサイズに合わせて調整） */
.style-preview > * {
  transform-origin: center;
  /* transform: scale(0.9); 必要に応じて */
}

.style-info {
  padding: 16px;
  border-top: 1px solid #f3f4f6;
  background: white;
}

.style-name {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 2px;
}

.style-name-jp {
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 8px;
  display: block;
}

.style-desc {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.style-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.style-tag {
  font-size: 10px;
  padding: 2px 8px;
  background: #f3f4f6;
  border-radius: 100px;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

/* Selected Style Footer Panel */
.selected-panel {
  position: sticky;
  bottom: 20px;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px 24px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
  animation: slideUp 0.3s ease-out;
}

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

.selected-info h3 {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
}
.selected-info p {
  font-size: 12px;
  color: #6b7280;
}

.yaml-preview-box {
  margin-top: 12px;
  background: #1f2937;
  color: #f3f4f6;
  padding: 12px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 11px;
  max-height: 100px;
  overflow-y: auto;
  white-space: pre-wrap;
}
