/* map-bottom-sheet.css - モバイル用ボトムシートスタイル */

.bottom-sheet {
  position: fixed;
  bottom: 60px; /* タブバーの高さ分 */
  left: 0;
  right: 0;
  background: var(--bg-primary, #ffffff);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 90;
  transform: translateY(calc(100% - 120px));
  transition: transform 0.3s ease-out;
  display: none;
  max-height: 90vh;
}

.bottom-sheet.visible {
  display: block;
}

/* 高さ状態 */
.bottom-sheet.min {
  transform: translateY(calc(100% - 120px));
}

.bottom-sheet.half {
  transform: translateY(50%);
}

.bottom-sheet.full {
  transform: translateY(10%);
}

/* ハンドル */
.bottom-sheet-handle {
  padding: 10px;
  text-align: center;
  cursor: grab;
  touch-action: none;
}

.bottom-sheet-handle:active {
  cursor: grabbing;
}

.bottom-sheet-bar {
  width: 40px;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  margin: 0 auto;
}

/* ヘッダー */
.bottom-sheet-header {
  padding: 0 20px 15px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}

.place-name {
  margin: 0 0 5px 0;
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

.place-meta {
  display: flex;
  gap: 15px;
  font-size: 13px;
  color: #666;
}

.place-category {
  display: flex;
  align-items: center;
  gap: 5px;
}

.place-distance {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* コンテンツ */
.bottom-sheet-content {
  padding: 15px 20px;
  overflow-y: auto;
  max-height: calc(90vh - 200px);
}

/* 最小コンテンツ */
.min-content {
  display: flex;
  gap: 15px;
  align-items: center;
}

.place-rating {
  font-size: 14px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 5px;
}

.place-status {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.place-status.open {
  background: #e8f5e9;
  color: #4caf50;
}

.place-status.closed {
  background: #ffebee;
  color: #f44336;
}

/* 半分コンテンツ */
.half-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.info-group {
  display: flex;
  gap: 15px;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.info-text {
  flex: 1;
  font-size: 14px;
  color: #333;
  text-decoration: none;
}

.info-text:hover {
  text-decoration: underline;
}

.info-highlight {
  padding: 10px;
  background: #fff3e0;
  border-radius: 8px;
  font-size: 13px;
  color: #e65100;
}

/* 全画面コンテンツ */
.full-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* タブ */
.sheet-tabs {
  display: flex;
  border-bottom: 1px solid #f0f0f0;
  margin: 0 -20px 15px;
}

.sheet-tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
}

.sheet-tab.active {
  color: #ff6b35;
  border-bottom-color: #ff6b35;
  font-weight: 500;
}

/* タブコンテンツ */
.sheet-tab-content {
  flex: 1;
  overflow-y: auto;
}

.tab-pane {
  display: none;
}

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

/* 情報タブ */
.info-tab .section {
  margin-bottom: 20px;
}

.info-tab .section:last-child {
  margin-bottom: 0;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row .label {
  font-size: 13px;
  color: #666;
}

.info-row .value {
  font-size: 14px;
  color: #333;
  text-align: right;
  text-decoration: none;
}

.info-row .value:hover {
  text-decoration: underline;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.gallery-image {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

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

.tag {
  padding: 4px 10px;
  background: #f0f0f0;
  border-radius: 4px;
  font-size: 12px;
  color: #666;
}

/* イベントタブ */
.event-card {
  padding: 15px;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  margin-bottom: 10px;
}

.event-time {
  font-size: 12px;
  color: #ff6b35;
  margin-bottom: 5px;
}

.event-title {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 5px;
}

.event-meta {
  font-size: 12px;
  color: #666;
}

/* 投稿タブ */
.post-card {
  padding: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.post-card:last-child {
  border-bottom: none;
}

.post-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.post-author {
  font-size: 12px;
  font-weight: 500;
  color: #ff6b35;
}

.post-time {
  font-size: 12px;
  color: #999;
}

.post-content {
  font-size: 14px;
  color: #333;
  margin-bottom: 10px;
  line-height: 1.5;
}

.post-stats {
  font-size: 12px;
  color: #666;
  display: flex;
  gap: 15px;
}

/* レビュータブ */
.rating-summary {
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 15px;
}

.big-rating {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
}

.review-count {
  font-size: 12px;
  color: #666;
}

.review-card {
  padding: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.review-card:last-child {
  border-bottom: none;
}

.review-rating {
  font-size: 14px;
  margin-bottom: 8px;
}

.review-comment {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
  margin-bottom: 8px;
}

.review-footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #999;
}

/* アクションボタン */
.bottom-sheet-actions {
  display: flex;
  justify-content: space-around;
  padding: 15px 20px;
  border-top: 1px solid #f0f0f0;
  background: var(--bg-primary, #ffffff);
}

.bottom-sheet-actions button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px;
  background: none;
  border: none;
  color: #666;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.bottom-sheet-actions button:hover {
  color: #ff6b35;
}

.bottom-sheet-actions button.active {
  color: #ff6b35;
}

.bottom-sheet-actions button span:first-child {
  font-size: 20px;
}

/* 空メッセージ */
.empty-message {
  padding: 40px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

/* ==========================================================================
   ダークモード対応
   ========================================================================== */

[data-theme='dark'] .bottom-sheet {
  background: var(--bg-primary, #0f1419);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
}

[data-theme='dark'] .bottom-sheet-header {
  border-bottom-color: var(--border-color, #2f3845);
}

[data-theme='dark'] .place-name {
  color: var(--text-primary, #f5f5f5);
}

[data-theme='dark'] .place-meta {
  color: var(--text-secondary, #8899a6);
}

[data-theme='dark'] .place-rating {
  color: var(--text-primary, #f5f5f5);
}

[data-theme='dark'] .info-text {
  color: var(--text-primary, #f5f5f5);
}

[data-theme='dark'] .info-row {
  border-bottom-color: var(--border-color, #2f3845);
}

[data-theme='dark'] .info-row .label {
  color: var(--text-secondary, #8899a6);
}

[data-theme='dark'] .info-row .value {
  color: var(--text-primary, #f5f5f5);
}

[data-theme='dark'] .bottom-sheet-bar {
  background: var(--border-color, #2f3845);
}

[data-theme='dark'] .sheet-tabs {
  border-bottom-color: var(--border-color, #2f3845);
}

[data-theme='dark'] .sheet-tab {
  color: var(--text-secondary, #8899a6);
}

[data-theme='dark'] .info-group {
  border-bottom-color: var(--border-color, #2f3845);
}

[data-theme='dark'] .event-card {
  border-color: var(--border-color, #2f3845);
}

[data-theme='dark'] .event-title {
  color: var(--text-primary, #f5f5f5);
}

[data-theme='dark'] .event-meta {
  color: var(--text-secondary, #8899a6);
}

[data-theme='dark'] .post-card {
  border-bottom-color: var(--border-color, #2f3845);
}

[data-theme='dark'] .post-content {
  color: var(--text-primary, #f5f5f5);
}

[data-theme='dark'] .review-card {
  border-bottom-color: var(--border-color, #2f3845);
}

[data-theme='dark'] .review-comment {
  color: var(--text-primary, #f5f5f5);
}

[data-theme='dark'] .rating-summary {
  background: var(--bg-secondary, #1c2938);
}

[data-theme='dark'] .big-rating {
  color: var(--text-primary, #f5f5f5);
}

[data-theme='dark'] .tag {
  background: var(--bg-secondary, #1c2938);
  color: var(--text-secondary, #8899a6);
}

[data-theme='dark'] .bottom-sheet-actions {
  background: var(--bg-primary, #0f1419);
  border-top-color: var(--border-color, #2f3845);
}

[data-theme='dark'] .bottom-sheet-actions button {
  color: var(--text-secondary, #8899a6);
}

[data-theme='dark'] .place-status.open {
  background: rgba(76, 175, 80, 0.15);
}

[data-theme='dark'] .place-status.closed {
  background: rgba(244, 67, 54, 0.15);
}

/* レスポンシブ調整 */
@media (min-width: 769px) {
  .bottom-sheet {
    display: none !important;
  }
}
