/* event-feedback.css —— 事件页留言/纠错组件样式（依赖 tokens.css 变量）*/

.fb-section {
  width: 100%;
  margin-top: 60px;
  padding: 32px 0;
  border-top: 1px solid var(--c-line);
}

/* 事件详情页：留言组件宽度与文章内容对齐（720px） */
body[data-page="event-landing"] .fb-section {
  max-width: 720px;
  margin-inline: auto;
}

.fb-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--c-line);
  margin-bottom: 24px;
}

.fb-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  font-size: 0.95rem;
  color: var(--c-muted);
  cursor: pointer;
  position: relative;
  font-family: var(--font-sans);
  transition: color 0.2s;
}

.fb-tab:hover { color: var(--c-text); }

.fb-tab--active {
  color: var(--c-accent);
  font-weight: 600;
}

.fb-tab--active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--c-accent);
  border-radius: 1px;
}

.fb-panel { display: none; }
.fb-panel--active { display: block; animation: fb-fade 0.25s ease; }

@keyframes fb-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- 留言列表 --- */
.fb-comments {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
  max-height: 320px;
  overflow-y: auto;
}

.fb-comment {
  padding: 14px 18px;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-line);
  border-radius: 10px;
  transition: border-color 0.2s;
}

.fb-comment:hover { border-color: rgba(184, 145, 47, 0.3); }

.fb-comment__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.fb-comment__nick {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--c-accent);
  font-family: var(--font-serif);
}

.fb-comment__time {
  font-size: 0.72rem;
  color: var(--c-muted);
}

.fb-comment__body {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--c-text);
}

.fb-empty {
  padding: 32px;
  text-align: center;
  color: var(--c-muted);
  font-size: 0.85rem;
  background: var(--c-bg-alt);
  border-radius: 10px;
  border: 1px dashed var(--c-line);
}

/* --- 表单 --- */
.fb-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.fb-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.fb-form input,
.fb-form select,
.fb-form textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--c-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.fb-form textarea { resize: vertical; }

.fb-form input:focus,
.fb-form select:focus,
.fb-form textarea:focus {
  border-color: var(--c-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(184, 145, 47, 0.1);
}

.fb-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.fb-hint {
  font-size: 0.75rem;
  color: var(--c-muted);
}

.fb-submit {
  padding: 10px 28px;
  background: var(--c-accent);
  color: var(--c-on-accent);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.fb-submit:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(184, 145, 47, 0.35);
}

.fb-submit:disabled { opacity: 0.55; cursor: not-allowed; }

/* --- 纠错面板 --- */
.fb-correction-info {
  padding: 14px 18px;
  background: rgba(184, 145, 47, 0.08);
  border-left: 3px solid var(--c-accent);
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  color: var(--c-muted);
  margin-bottom: 20px;
}

.fb-correction-info p { margin: 0; }

/* --- Toast --- */
.fb-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: 10px;
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.2);
  font-size: 0.85rem;
  z-index: 300;
  opacity: 0;
  transition: all 0.25s;
  pointer-events: none;
}

.fb-toast--ok { border-left: 3px solid var(--c-type-eco); }
.fb-toast--err { border-left: 3px solid var(--c-type-war); color: var(--c-type-war); }

.fb-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
  .fb-form-row { grid-template-columns: 1fr; }
  .fb-tabs { flex-wrap: wrap; }
  .fb-tab { padding: 8px 16px; font-size: 0.85rem; }
}

/* ---------- 站点级反馈（关于本站） ----------
   组件嵌在 .about-section 正文段落之间，不是事件页的独立尾部区块：
   收紧上下留白、限制行宽，保持与页面正文对齐。 */
.fb-section--site {
  max-width: 760px;
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 24px 0 8px;
}

.fb-section--site .fb-tabs { margin-bottom: 18px; }

@media (max-width: 600px) {
  .fb-section--site { margin-top: 16px; margin-bottom: 16px; padding-top: 16px; }
}
