/* ══════════════════════════════════════════
   相簿頁面樣式
   ══════════════════════════════════════════ */

/* ── 行程選單 ── */
.mem-trip-row {
  padding: 16px 16px 0;
}

.mem-trip-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--c-border);
  background: var(--c-bg-elevated);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--c-text);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A8078' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.mem-trip-select:focus { outline: none; border-color: var(--c-green); }

/* ── 空狀態 ── */
.mem-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 20px;
  gap: 12px;
  color: var(--c-text-hint);
}
.mem-empty-icon { color: var(--c-text-hint); }
.mem-empty-text { font-size: 14px; color: var(--c-text-sub); }

/* ── 相簿內容 ── */
.mem-content {
  padding: 12px 0 0;
}

/* ── Tab 切換 ── */
.mem-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1.5px solid var(--c-border-soft);
  margin: 0 16px 16px;
}

.mem-tab {
  flex: 1;
  padding: 10px 0;
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--c-text-sub);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.mem-tab.active {
  color: var(--c-green);
  border-bottom-color: var(--c-green);
  font-weight: 500;
}

/* ── 日期 / 景點分組 ── */
.mem-day-group {
  margin-bottom: 24px;
}

.mem-day-heading {
  padding: 0 16px 8px;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--c-text);
  border-bottom: 1px solid var(--c-border-soft);
  margin-bottom: 10px;
}

.mem-stop-group {
  margin-bottom: 12px;
}

.mem-stop-heading {
  padding: 0 16px 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--c-text-sub);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ── 照片格 ── */
.mem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 0 16px;
  margin-bottom: 4px;
}

@media (min-width: 480px) {
  .mem-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .mem-grid { grid-template-columns: repeat(3, 1fr); }
}

.mem-cell {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--c-bg-input);
}

.mem-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.mem-cell:hover .mem-img { transform: scale(1.04); }

.mem-cell-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 10px 6px;
  font-size: 11px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 空面板 */
.mem-panel-empty {
  text-align: center;
  padding: 40px 20px;
  font-size: 13px;
  color: var(--c-text-hint);
}

/* ── Lightbox ── */
.mem-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.mem-lightbox.active { display: flex; }

.mem-lb-img {
  max-width: 92vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
}

.mem-lb-caption {
  margin-top: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  font-family: var(--font-sans);
}

.mem-lb-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
}
.mem-lb-close:hover { opacity: 1; }

.mem-lb-prev,
.mem-lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.mem-lb-prev { left: 16px; }
.mem-lb-next { right: 16px; }
.mem-lb-prev:hover,
.mem-lb-next:hover { background: rgba(255,255,255,0.25); }
