/* 食材タブのスタイル */

.recipe-tab-wrapper {
  width: 100%;
}

.recipe-tab {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  background-color: #f9fafb;
  border-radius: 0.5rem;
  padding: 0.5rem;
  gap: 0.25rem;
}

.ingredient-tab-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  border-radius: 0.375rem;
  min-width: 80px;
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  background-color: transparent;
  border: 1px solid transparent;
}

.ingredient-tab-link:hover {
  background-color: white;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.ingredient-tab-link.active {
  background-color: white;
  color: #111827;
  font-weight: 600;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  border-color: #e5e7eb;
}

.ingredient-tab-link svg {
  margin-bottom: 0.25rem;
  flex-shrink: 0;
}

.tab-area {
  padding-top: 2rem;
  background-color: white;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-top: 1rem;
  border: 1px solid #e5e7eb;
}

.tab-area.hidden {
  display: none;
}

.tab-area.active {
  display: block;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .recipe-tab {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    padding: 1rem;
  }
  
  .ingredient-tab-link {
    min-width: auto;
    padding: 0.75rem 0.25rem;
    font-size: 0.6rem;
  }
  
  .ingredient-tab-link svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-bottom: 0.25rem;
  }
}

@media (max-width: 480px) {
  .recipe-tab {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .ingredient-tab-link {
    padding: 1rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .ingredient-tab-link svg {
    width: 1.5rem;
    height: 1.5rem;
  }
}

/* アニメーション効果 */
.tab-area {
  animation: fadeIn 0.3s ease-in-out;
}

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

/* タブコンテンツ内のスタイル */
.tab-area h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.tab-area ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tab-area li {
  font-size: 0.75rem;
  color: #6b7280;
  padding: 0.125rem 0;
  cursor: pointer;
  transition: color 0.2s ease-in-out;
}

.tab-area li:hover {
  color: #374151;
  text-decoration: underline;
}