/* wine-list.css: ワインリストページ専用のスタイル */

.wine-container { max-width: 760px; }

.wine-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.wine-tab {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.wine-tab.active { background: var(--primary); color: white; }

.wine-tab-panel { display: none; }
.wine-tab-panel.active { display: block; }

/* ---------- メニュー(ページめくり) ---------- */

.book-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 0 24px 0;
}

.wine-book {
  width: 100%;
  max-width: 560px;
  height: 560px;
  margin: 0 auto;
  position: relative;
}

.wine-book-inner {
  width: 100%;
  height: 100%;
}

.book-nav {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: white;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.book-nav:hover { background: var(--primary-dark); }

.page {
  position: relative;
  background:
    radial-gradient(circle at 18% 25%, rgba(120, 100, 70, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 82% 75%, rgba(120, 100, 70, 0.05) 0%, transparent 42%),
    radial-gradient(circle at 55% 15%, rgba(120, 100, 70, 0.035) 0%, transparent 35%),
    linear-gradient(180deg, #fffdf9 0%, var(--bg) 100%);
  border: none;
  box-shadow: inset 0 0 0 1px rgba(180, 160, 130, 0.18);
  overflow: hidden;
}

/* 綴じ目側をやや暗くして、紙が少したわんでいるような柔らかさを出す */
.page::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  pointer-events: none;
}

.page.--right { border-radius: 3px 16px 16px 3px; }
.page.--right::before { left: 0; background: linear-gradient(90deg, rgba(90, 70, 40, 0.08), transparent); }

.page.--left { border-radius: 16px 3px 3px 16px; }
.page.--left::before { right: 0; background: linear-gradient(270deg, rgba(90, 70, 40, 0.08), transparent); }

.page-cover {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

/* 表紙の背景動画(赤ワインをスワリングする手元)。読み込み中/再生できない
   環境ではposter画像(静止写真)がそのまま表示される。 */
.page.page-cover .cover-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
}

.page-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(40, 8, 8, 0.6) 0%, rgba(50, 12, 12, 0.4) 45%, rgba(70, 18, 18, 0.78) 100%);
  z-index: 1;
}

.cover-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.cover-content h2 { margin: 0 0 8px 0; font-size: 1.6rem; }
.cover-content p { margin: 0; opacity: 0.9; letter-spacing: 0.05em; }

.page-content {
  height: 100%;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
}

.page-header {
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--primary-dark);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.wine-page-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  overflow-y: auto;
}

.wine-page-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}

.wine-name-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.wine-name { font-weight: bold; font-size: 0.95rem; }
.wine-price { font-size: 0.9rem; color: var(--primary-dark); white-space: nowrap; }
.wine-sub-line { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

/* ---------- 取り込み ---------- */

.import-panel { border: 1px solid #e0c9a6; background: #fffaf0; }
.import-buttons { flex-wrap: wrap; }
.import-status { font-size: 0.85rem; font-weight: bold; color: var(--primary-dark); min-height: 1.2em; }

.import-review { margin-top: 14px; }
.import-review h3 { margin: 0 0 6px 0; font-size: 1rem; }

.lens-steps { padding-left: 1.2em; margin: 0 0 12px 0; }
.lens-steps li { margin-bottom: 6px; }

.import-review-table-wrap {
  overflow-x: auto;
  margin-bottom: 12px;
}

.import-review-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.import-review-table th {
  text-align: left;
  padding: 6px 4px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.import-review-table td {
  padding: 4px;
  border-bottom: 1px solid var(--border);
}

.import-review-table input,
.import-review-table select {
  padding: 6px;
  font-size: 0.85rem;
  min-width: 70px;
}

.import-review-table input[type=checkbox] { width: auto; min-width: 0; }
.import-review-table .review-name,
.import-review-table .review-producer { min-width: 120px; }

.wine-card .detail-buttons { margin-top: 0; }

/* ---------- 空き瓶の写真から削除 ---------- */

.empty-bottle-panel { border: 1px solid #f0c9c7; background: #fff6f5; }

.empty-bottle-candidates {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.empty-bottle-candidate {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: normal;
  padding: 8px 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.empty-bottle-candidate input[type=radio] { width: auto; }

@media (max-width: 480px) {
  .wine-book { height: 480px; }
  .cover-content h2 { font-size: 1.3rem; }
}

/* ---------- 全画面表示 ---------- */

.fullscreen-toggle-btn {
  margin-left: 10px;
  padding: 4px 12px;
  border: 1px solid var(--primary);
  border-radius: 14px;
  background: white;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
}

.fullscreen-exit-btn { display: none; }

body.fullscreen-menu-mode {
  overflow: hidden;
}

body.fullscreen-menu-mode .app-header,
body.fullscreen-menu-mode .wine-tabs,
body.fullscreen-menu-mode .data-explain {
  display: none;
}

body.fullscreen-menu-mode .wine-container {
  max-width: none;
  padding: 0;
  margin: 0;
}

body.fullscreen-menu-mode #tab-menu {
  display: block !important;
}

body.fullscreen-menu-mode .book-wrap {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  padding: 0;
  gap: 0;
}

body.fullscreen-menu-mode .wine-book {
  width: 100%;
  max-width: 100vw;
  height: 100vh;
  margin: 0;
}

body.fullscreen-menu-mode .book-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
  width: 52px;
  height: 52px;
  font-size: 1.6rem;
  opacity: 0.85;
}

body.fullscreen-menu-mode .book-prev { left: 12px; }
body.fullscreen-menu-mode .book-next { right: 12px; }

body.fullscreen-menu-mode .fullscreen-exit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1002;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.35);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
}
