/* =====================================
   場所ジャンル別の釣果 スタイル
   ===================================== */

/* カルーセルパネル ヘッダーカラー */
.carousel3d-panel-header--location {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* 詳細モーダルヘッダー */
.carousel3d-detail-header--location {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* パネル内リスト */
.carousel3d-panel-location-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
}

.carousel3d-location-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.carousel3d-location-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.carousel3d-location-icon svg {
  width: 20px;
  height: 20px;
  color: #10b981;
}

.carousel3d-location-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.carousel3d-location-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1c1e21;
}

.carousel3d-location-meta {
  display: flex;
  gap: 8px;
  font-size: 0.7rem;
  color: #65676b;
}

.carousel3d-location-count {
  color: #10b981;
  font-weight: 600;
}

.carousel3d-location-species {
  color: #8b5cf6;
}

.carousel3d-panel-tap-hint {
  display: block;
  text-align: center;
  font-size: 0.7rem;
  color: #a0a3a8;
  margin-top: 4px;
}

/* =====================================
   詳細モーダルコンテンツ
   ===================================== */

/* モーダル位置を上部固定（データ量に関わらず位置が変わらないように） */
#carousel3d-detail-location-fish {
  align-items: flex-start;
  padding-top: 60px;
}

.location-fish-modal-content {
  max-width: 600px;
}

.location-fish-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(80vh - 60px);
}

/* 場所タブ */
.location-fish-tabs {
  display: flex;
  gap: 8px;
  padding: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #f8fafc;
  border-bottom: 1px solid #e4e6eb;
}

.location-fish-tabs::-webkit-scrollbar {
  display: none;
}

.location-fish-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #65676b;
  background: #ffffff;
  border: 2px solid #e4e6eb;
  border-radius: 24px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.location-fish-tab:hover {
  border-color: #10b981;
  color: #10b981;
}

.location-fish-tab.active {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.location-fish-tab-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.location-fish-tab-icon svg {
  width: 16px;
  height: 16px;
}

.location-fish-tab.active .location-fish-tab-icon svg {
  color: #ffffff;
}

.location-fish-tab-name {
  font-weight: 600;
}

.location-fish-tab-count {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 12px;
}

.location-fish-tab.active .location-fish-tab-count {
  background: rgba(255, 255, 255, 0.2);
}

/* 場所別コンテンツ */
.location-fish-contents {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.location-fish-content {
  display: none;
  padding: 16px;
}

.location-fish-content.active {
  display: block;
}

/* サマリー */
.location-fish-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-radius: 16px;
  margin-bottom: 20px;
}

.location-fish-summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.location-fish-summary-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.location-fish-summary-icon svg {
  width: 28px;
  height: 28px;
  color: #10b981;
}

.location-fish-summary-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.location-fish-summary-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #065f46;
}

.location-fish-summary-meta {
  font-size: 0.75rem;
  color: #047857;
}

.location-fish-summary-stats {
  display: flex;
  gap: 16px;
}

.location-fish-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  background: #ffffff;
  border-radius: 12px;
  min-width: 72px;
  min-height: 52px;
  box-sizing: border-box;
}

.location-fish-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #10b981;
  font-variant-numeric: tabular-nums;
  min-width: 4.5em;
  text-align: center;
  line-height: 1;
}

.location-fish-stat-label {
  font-size: 0.7rem;
  color: #065f46;
  line-height: 1;
  white-space: nowrap;
}

/* クリック可能な種類ボタン */
button.location-fish-stat--clickable {
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  /* ボタンのデフォルトスタイルをリセット */
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

button.location-fish-stat--clickable:hover {
  border-color: #10b981;
  background: #f0fdf4;
}

.location-fish-stat-arrow {
  font-size: 0.5rem;
  margin-left: 3px;
  transition: transform 0.2s ease;
  vertical-align: middle;
}

.location-fish-stat-arrow.rotated {
  transform: rotate(180deg);
}

/* 魚名一覧パネル */
.location-fish-names-panel {
  background: #ffffff;
  border-radius: 16px;
  margin-bottom: 16px;
  overflow: hidden;
  animation: slideDown 0.2s ease;
}

.location-fish-names-panel.hidden {
  display: none;
}

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

.location-fish-names-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-bottom: 1px solid #a7f3d0;
}

.location-fish-names-header h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #065f46;
}

.location-fish-names-header h4 i {
  margin-right: 8px;
  color: #10b981;
}

.location-fish-names-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 50%;
  color: #10b981;
  cursor: pointer;
  transition: background 0.2s ease;
}

.location-fish-names-close:hover {
  background: rgba(16, 185, 129, 0.2);
}

.location-fish-names-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
  max-height: 200px;
  overflow-y: auto;
}

.location-fish-names-tag {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 20px;
  transition: all 0.2s ease;
}

.location-fish-names-tag:hover {
  background: #d1fae5;
  border-color: #10b981;
}

/* 魚リスト */
.location-fish-list {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
}

.location-fish-list-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1c1e21;
  background: #f8fafc;
  border-bottom: 1px solid #e4e6eb;
}

.location-fish-list-title i {
  color: #10b981;
}

.location-fish-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f2f5;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}

.location-fish-item:hover {
  background: #f8fafc;
}

.location-fish-item:last-child {
  border-bottom: none;
}

.location-fish-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 8px;
  flex-shrink: 0;
}

.location-fish-item:nth-child(2) .location-fish-rank {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.location-fish-item:nth-child(3) .location-fish-rank {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.location-fish-image {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f0f2f5;
}

.location-fish-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.location-fish-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a0a3a8;
}

.location-fish-image-placeholder i {
  font-size: 1.2rem;
}

.location-fish-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.location-fish-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1c1e21;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-fish-details {
  font-size: 0.75rem;
  color: #65676b;
}

.location-fish-size {
  color: #10b981;
}

.location-fish-weight {
  color: #8b5cf6;
  margin-left: 8px;
}

.location-fish-count-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 60px;
}

.location-fish-count {
  font-size: 0.85rem;
  font-weight: 700;
  color: #10b981;
}

.location-fish-bar {
  height: 4px;
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  border-radius: 2px;
  min-width: 8px;
  max-width: 60px;
}

/* 空状態 */
.location-fish-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #65676b;
  text-align: center;
}

.location-fish-empty i {
  font-size: 3rem;
  color: #d8dadf;
  margin-bottom: 16px;
}

.location-fish-empty p {
  font-size: 1rem;
  margin: 0;
}

.location-fish-empty-hint {
  font-size: 0.85rem;
  color: #a0a3a8;
  margin-top: 8px;
}

.location-fish-empty-list {
  padding: 24px;
  text-align: center;
  color: #65676b;
  font-size: 0.9rem;
}

/* =====================================
   レスポンシブ対応
   ===================================== */

@media (max-width: 480px) {
  #carousel3d-detail-location-fish {
    padding-top: 40px;
  }

  .location-fish-modal-content {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 16px 16px 0 0;
  }

  .location-fish-body {
    max-height: calc(90vh - 56px);
  }

  .location-fish-tabs {
    padding: 12px;
    gap: 6px;
  }

  .location-fish-tab {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .location-fish-tab-icon {
    width: 18px;
    height: 18px;
  }

  .location-fish-tab-icon svg {
    width: 14px;
    height: 14px;
  }

  .location-fish-content.active {
    padding: 12px;
  }

  .location-fish-summary {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
  }

  .location-fish-summary-item {
    justify-content: flex-start;
  }

  .location-fish-summary-icon {
    width: 40px;
    height: 40px;
  }

  .location-fish-summary-icon svg {
    width: 24px;
    height: 24px;
  }

  .location-fish-summary-stats {
    justify-content: center;
  }

  .location-fish-item {
    padding: 10px 12px;
    gap: 10px;
  }

  .location-fish-image {
    width: 44px;
    height: 44px;
  }

  .location-fish-name {
    font-size: 0.9rem;
  }

  /* カルーセルパネル内のリスト調整 */
  .carousel3d-panel-location-list {
    padding: 6px;
    gap: 6px;
  }

  .carousel3d-location-item {
    padding: 6px 8px;
    gap: 8px;
  }

  .carousel3d-location-icon {
    width: 24px;
    height: 24px;
  }

  .carousel3d-location-icon svg {
    width: 16px;
    height: 16px;
  }

  .carousel3d-location-name {
    font-size: 0.8rem;
  }

  .carousel3d-location-meta {
    font-size: 0.65rem;
  }
}
