/**
 * 往期活动投稿（前台共用的按钮 / 空相册占位 / 投稿弹窗）
 * 电脑端 public/index.html 与手机端 public/mobile/index.html 同时引入本文件
 * 样式命名统一 alb- / pce- 前缀，避免与两个页面各自的样式冲突
 */

/* ================= 「投稿相册」按钮 ================= */
.past-post-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 14px;
  padding: 7px 15px;
  border: 1px solid var(--line-1, #e8e8e8);
  border-radius: 999px;
  background: #fff;
  color: var(--text-2, #474747);
  font-size: 13px;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  flex: none;
  transition: all 0.2s ease;
}
.past-post-btn .ppb-ico {
  font-size: 14px;
  color: var(--gold-bright, #d9b33a);
  font-weight: 700;
}
.past-post-btn:hover {
  border-color: var(--gold, #d7bf91);
  color: var(--gold-bright, #d9b33a);
  box-shadow: 0 3px 12px rgba(217, 179, 58, 0.18);
  transform: translateY(-1px);
}
.past-post-btn:active { transform: translateY(0); }
/* 后台「页面控件」关掉投稿入口时隐藏（服务端已写进 body class，首屏不会闪） */
body.sec-off-albumUpload .past-post-btn,
body.sec-off-albumUpload .past-card-empty,
body.sec-off-albumUpload .m-past-empty { display: none !important; }

/* 手机端顶栏按钮更紧凑 */
.m-head .past-post-btn { margin-left: 8px; padding: 8px 13px; font-size: 12px; min-height: 34px; }
.m-head .past-post-btn .ppb-ico { font-size: 13px; }

/* ================= 没有相册时的占位卡（点它即可投稿） ================= */
.past-card-empty {
  flex: 1 1 420px;
  min-width: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-style: dashed;
  border-color: #e2d7b8;
  background: linear-gradient(180deg, #fffdf6 0%, #fff 100%);
  min-height: 232px;
  text-align: center;
}
.past-card-empty:hover { border-color: var(--gold, #d7bf91); }
.m-past-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #e6dcc0;
  background: linear-gradient(180deg, #fffdf6 0%, #fff 100%);
  min-height: 168px;
  text-align: center;
}
.pce-in { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 16px; }
.pce-ico { font-size: 26px; line-height: 1; }
.pce-in b { font-size: 15px; color: var(--text-1, #333); }
.pce-tip { font-size: 12.5px; color: var(--text-4, #999); }

/* ================= 相册署名「由 xx 提供」（用户投稿的相册才显示） ================= */
.past-by {
  margin: 0;
  padding: 0 14px 12px;
  font-size: 12px;
  color: var(--text-4, #999);
  display: flex;
  align-items: center;
  gap: 4px;
}
.past-by::before {
  content: '👤';
  font-size: 11px;
}
.m-past .by {
  padding: 5px 10px 8px;
  font-size: 11px;
  color: var(--ink-4, #999);
}
.m-past .by::before { content: '👤 '; }

/* ================= 投稿弹窗 ================= */
body.alb-lock { overflow: hidden; }
.alb-mask {
  position: fixed;
  inset: 0;
  z-index: 4200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(24, 22, 18, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.alb-mask.show { display: flex; animation: albFade 0.22s ease; }
@keyframes albFade { from { opacity: 0; } to { opacity: 1; } }
.alb-dialog {
  width: 620px;
  max-width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  animation: albUp 0.26s ease;
}
@keyframes albUp { from { transform: translateY(14px) scale(0.985); opacity: 0; } to { transform: none; opacity: 1; } }

.alb-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  border-bottom: 1px solid #f0ece2;
  background: linear-gradient(180deg, #fffdf6 0%, #fff 100%);
}
.alb-head-t { flex: 1; font-size: 15.5px; color: var(--text-1, #333); }
.alb-x {
  flex: none;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #999;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.18s;
}
.alb-x:hover { background: #f5f1e6; color: #c0392b; }

.alb-tabs { display: flex; gap: 6px; padding: 10px 18px 0; }
.alb-tabs button {
  position: relative;
  padding: 8px 14px;
  border: 1px solid #eee7d6;
  border-bottom: none;
  border-radius: 9px 9px 0 0;
  background: #faf8f2;
  color: var(--text-3, #666);
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s;
}
.alb-tabs button:hover { color: var(--gold-bright, #d9b33a); }
.alb-tabs button.on { background: #fff; color: var(--text-1, #333); font-weight: 700; box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.03); }
.alb-tab-num {
  display: inline-block;
  min-width: 17px;
  height: 17px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--gold-bright, #d9b33a);
  color: #fff;
  font-size: 11px;
  line-height: 17px;
  text-align: center;
  font-weight: 700;
}

.alb-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 18px 20px; }
.alb-loading { padding: 40px 0; text-align: center; color: #aaa; font-size: 13px; }

/* 未登录 */
.alb-login { padding: 22px 6px 10px; text-align: center; }
.alb-login-ico { font-size: 34px; }
.alb-login b { display: block; margin: 10px 0 6px; font-size: 16px; color: var(--text-1, #333); }
.alb-login p { margin: 0 auto 14px; max-width: 380px; font-size: 13px; line-height: 1.9; color: var(--text-3, #666); }
.alb-login .alb-btn { display: inline-flex; text-decoration: none; }

/* 表单 */
.alb-form { display: flex; flex-direction: column; gap: 13px; }
.alb-editing {
  padding: 9px 12px;
  border-radius: 8px;
  background: #fff8e6;
  border: 1px solid #ffe1a8;
  color: #b07d1a;
  font-size: 12.5px;
  line-height: 1.7;
}
.alb-field { display: flex; flex-direction: column; gap: 6px; }
.alb-field > span { font-size: 13px; color: var(--text-2, #474747); font-weight: 600; }
.alb-field > span i { color: #d9363e; font-style: normal; }
.alb-field > span small { color: #aaa; font-weight: 400; }
.alb-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid #e6e2d8;
  border-radius: 9px;
  background: #fff;
  color: var(--text-1, #333);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.alb-input:focus { outline: none; border-color: var(--gold, #d7bf91); box-shadow: 0 0 0 3px rgba(215, 191, 145, 0.18); }
.alb-area { resize: vertical; min-height: 62px; line-height: 1.7; }

.alb-photos { display: flex; flex-direction: column; gap: 8px; }
.alb-photos-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--text-2, #474747); }
.alb-photos-head i { color: #d9363e; font-style: normal; }
.alb-count { font-size: 12px; font-weight: 400; color: #aaa; }
.alb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 9px; }
.alb-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  overflow: hidden;
  background: #f5f2ea;
  border: 1px solid #eee8da;
}
.alb-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.alb-tile-tag {
  position: absolute;
  left: 5px;
  bottom: 5px;
  padding: 1px 6px;
  border-radius: 7px;
  background: rgba(217, 179, 58, 0.92);
  color: #fff;
  font-size: 10px;
}
.alb-tile-x {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  line-height: 20px;
  cursor: pointer;
  transition: background 0.18s;
}
.alb-tile-x:hover { background: #d9363e; }
.alb-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  aspect-ratio: 1 / 1;
  border: 1px dashed #ded4bb;
  border-radius: 9px;
  background: #fffdf7;
  color: #b9a67a;
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s;
}
.alb-add:hover { border-color: var(--gold, #d7bf91); color: var(--gold-bright, #d9b33a); background: #fffaf0; }
.alb-add-ico { font-size: 20px; line-height: 1; }
.alb-add small { color: #c9c0a8; font-size: 10.5px; }
.alb-tip { margin: 0; font-size: 11.5px; line-height: 1.8; color: #a9a49a; }

.alb-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.alb-btn {
  padding: 9px 18px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.alb-btn.gold { background: linear-gradient(180deg, #ebd298 0%, #dcc69c 100%); border-color: #d7bf91; color: #4a3c14; font-weight: 700; }
.alb-btn.gold:hover { background: linear-gradient(180deg, #fbecc9 0%, #f1e1b9 100%); box-shadow: 0 4px 14px rgba(215, 191, 145, 0.35); }
.alb-btn.ghost { background: #fff; border-color: #e6e2d8; color: var(--text-3, #666); }
.alb-btn.ghost:hover { border-color: #d7bf91; color: var(--gold-bright, #d9b33a); }
.alb-btn:disabled { opacity: 0.62; cursor: not-allowed; box-shadow: none; }

/* 我的投稿列表 */
.alb-list { display: flex; flex-direction: column; gap: 10px; }
.alb-list-head { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: #999; }
.alb-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  border: 1px solid #f0ece2;
  border-radius: 11px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.alb-item:hover { border-color: #ecdfbe; box-shadow: 0 3px 14px rgba(0, 0, 0, 0.04); }
.alb-cover {
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: 9px;
  overflow: hidden;
  background: #f5f2ea;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cfc8b6;
  font-size: 22px;
}
.alb-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.alb-info { flex: 1; min-width: 0; }
.alb-info > b { display: block; font-size: 14px; color: var(--text-1, #333); word-break: break-all; }
.alb-meta { margin: 3px 0 6px; font-size: 11.5px; color: #a9a49a; }
.alb-st { display: inline-block; padding: 2px 9px; border-radius: 9px; font-size: 11.5px; font-weight: 600; }
.alb-st.wait { background: #fff7e6; color: #d46b08; border: 1px solid #ffd591; }
.alb-st.ok { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.alb-st.bad { background: #fff1f0; color: #d9363e; border: 1px solid #ffa39e; }
.alb-note { margin-top: 6px; padding: 6px 9px; border-radius: 7px; font-size: 12px; line-height: 1.7; background: #fff1f0; color: #d9363e; }
.alb-note.ok { background: #f6ffed; color: #389e0d; }
.alb-item-ops { flex: none; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.alb-mini {
  padding: 5px 11px;
  border: 1px solid #e6e2d8;
  border-radius: 8px;
  background: #fff;
  color: var(--text-3, #666);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s;
}
.alb-mini:hover { border-color: #d7bf91; color: var(--gold-bright, #d9b33a); }
.alb-mini.danger:hover { border-color: #ffa39e; color: #d9363e; }
.alb-empty { padding: 32px 10px 26px; text-align: center; color: #a9a49a; }
.alb-empty > span { font-size: 30px; }
.alb-empty b { display: block; margin: 10px 0 6px; font-size: 14.5px; color: var(--text-2, #474747); }
.alb-empty p { margin: 0 0 14px; font-size: 12.5px; }

/* ================= 窄屏：底部弹层 ================= */
@media (max-width: 640px) {
  .alb-mask { padding: 0; align-items: flex-end; }
  .alb-dialog {
    width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    animation: albSheetUp 0.28s ease;
  }
  @keyframes albSheetUp { from { transform: translateY(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }
  .alb-head { padding: 13px 14px; }
  .alb-tabs { padding: 8px 14px 0; }
  .alb-tabs button { padding: 7px 12px; font-size: 13px; }
  .alb-body { padding: 14px 14px 18px; }
  .alb-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 7px; }
  .alb-item { gap: 10px; }
  .alb-cover { width: 62px; height: 62px; }
  .alb-item-ops { flex-direction: row; align-items: flex-end; }
  .alb-actions { position: sticky; bottom: 0; background: #fff; padding: 10px 0 2px; }
  .alb-actions .alb-btn { flex: 1; }
}
