/* ============================================================
 * 样式商店 / 我的样式编辑器 / 后台样式审核 共用样式
 * 页面：store.html、account.html（🎨 我的样式 tab）、admin.html（🎨 样式审核 tab）
 * ============================================================ */

/* ---------- 类型切换（与 admin 的 content-type-switch 同款） ---------- */
.style-type-switch { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.style-type-switch .type-btn { padding: 8px 18px; border: 1px solid #e2e8f0; border-radius: 20px; background: #fff; color: #4a5568; font-size: 14px; cursor: pointer; transition: all .15s; }
.style-type-switch .type-btn.active { background: #5a67d8; border-color: #5a67d8; color: #fff; }

/* ---------- 样式编辑器（左表单右预览） ---------- */
.style-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 720px) { .style-editor { grid-template-columns: 1fr; } }
.style-form .form-group { margin-bottom: 10px; }
.style-form label { display: block; font-size: 13px; color: #4a5568; margin-bottom: 4px; }
.style-form input[type="color"] { width: 100%; height: 36px; padding: 2px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; cursor: pointer; }
.style-form input[type="range"] { width: 100%; }
.style-form select { width: 100%; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 14px; background: #fff; }

/* 预览小窗 */
.style-preview { border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; min-height: 180px; display: flex; flex-direction: column; }
.sp-preview-title { font-size: 12px; color: #a0aec0; padding: 8px 12px; border-bottom: 1px dashed #e2e8f0; background: #fafbfc; }
.sp-stage { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.sp-mock-header { height: 26px; border-radius: 6px; }
.sp-mock-node { border: 2px solid; border-radius: 8px; padding: 8px 12px; font-size: 13px; font-weight: 600; align-self: center; min-width: 90px; text-align: center; }
.sp-mock-text { font-size: 12px; text-align: center; }
.sp-bubble-row { display: flex; }
.sp-bubble-row.mine { justify-content: flex-end; }
.sp-bubble { max-width: 70%; padding: 8px 12px; font-size: 13px; line-height: 1.5; }
.sp-font-sample { font-size: 18px; text-align: center; line-height: 1.8; }
.sp-font-sub { font-size: 13px; text-align: center; color: #718096; }

.style-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 4px; }

/* ---------- 商店卡片网格 ---------- */
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.style-card { border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px; background: #fff; display: flex; flex-direction: column; gap: 8px; transition: box-shadow .15s; }
.style-card:hover { box-shadow: 0 4px 14px rgba(90,103,216,.12); }
.sc-swatches { display: flex; gap: 6px; height: 44px; }
.sc-swatch { flex: 1; border-radius: 8px; border: 1px solid rgba(0,0,0,.06); }
.sc-font-glyph { height: 44px; display: flex; align-items: center; justify-content: center; font-size: 26px; background: #f7f9fc; border-radius: 8px; color: #4a5568; }
.sc-name { font-weight: 600; font-size: 15px; color: #2d3748; }
.sc-meta { font-size: 12px; color: #718096; display: flex; justify-content: space-between; }
.sc-price { font-size: 13px; font-weight: 600; }
.sc-price.free { color: #38a169; }
.sc-price.paid { color: #dd6b20; }
.sc-price .orig { text-decoration: line-through; color: #a0aec0; font-weight: 400; margin-right: 4px; }
.sc-price .member-tag { color: #b7791f; background: #fffaf0; border: 1px solid #feebc8; border-radius: 4px; padding: 0 4px; font-size: 11px; margin-left: 4px; }
.sc-actions { display: flex; gap: 8px; margin-top: auto; }
.sc-actions .btn, .sc-actions .btn.secondary { flex: 1; padding: 7px 0; font-size: 13px; }
/* 移除已获取样式（危险操作，红系；商店「我的」+ 个人中心「我的样式」共用） */
.sc-actions .sc-remove { flex: 0 0 auto; padding: 7px 12px; font-size: 13px; border: none; border-radius: 8px; background: #fff5f5; color: #e53e3e; cursor: pointer; }
.sc-actions .sc-remove:hover { background: #fed7d7; }
.sc-actions .sc-remove:disabled { opacity: .5; cursor: not-allowed; }

/* 状态徽标（我的提交 / 后台审核） */
.style-status { display: inline-block; font-size: 12px; border-radius: 4px; padding: 1px 8px; }
.style-status.pending { background: #fffaf0; color: #b7791f; border: 1px solid #feebc8; }
.style-status.approved { background: #f0fff4; color: #276749; border: 1px solid #c6f6d5; }
.style-status.rejected { background: #fff5f5; color: #c53030; border: 1px solid #fed7d7; }
.style-review-note { font-size: 12px; color: #c53030; margin-top: 4px; }

/* 后台审核卡片的 config 预览 */
.sc-config { font-family: Consolas, monospace; font-size: 11px; color: #4a5568; background: #f7fafc; border: 1px solid #edf2f7; border-radius: 6px; padding: 6px 8px; word-break: break-all; max-height: 72px; overflow: auto; }

.store-hint { color: #718096; font-size: 12px; margin-top: 10px; }
.store-hint a { color: #5a67d8; text-decoration: none; }

/* ---------- store.html 轻提示 / 加载更多（account.css 同款，避免商店页再引 account.css） ---------- */
.acc-toast { position: fixed; top: 24px; left: 50%; transform: translateX(-50%) translateY(-8px); background: rgba(45,55,72,.95); color: #fff; padding: 10px 22px; border-radius: 20px; font-size: 14px; z-index: 99999; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; max-width: 80vw; }
.acc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.history-more { text-align: center; margin-top: 14px; }
.btn-more { padding: 8px 28px; border: 1px solid #e2e8f0; border-radius: 20px; background: #fff; color: #4a5568; font-size: 13px; cursor: pointer; }
.btn-more:hover { border-color: #5a67d8; color: #5a67d8; }
