/* ── PUBLIC FEEDBACK FORM PAGE ──
   訪客的第一個接觸點：整頁接管，不露出工作平台外殼。
   視覺與私人追蹤頁同一家族，但版面以「輸入」為主而非「閱讀」。 */
.feedback-form-page {
  position: fixed;
  inset: 0;
  z-index: 120;
  overflow-y: auto;
  background:
    radial-gradient(circle at 14% 10%, rgba(240, 200, 168, .34), transparent 30%),
    radial-gradient(circle at 88% 16%, rgba(200, 192, 224, .34), transparent 27%),
    var(--bg);
}

.feedback-form-page[hidden],
.feedback-form-state[hidden],
.feedback-form-content[hidden] { display: none; }

body.feedback-form-active { overflow: hidden; }

.feedback-form-shell {
  width: min(640px, 100%);
  margin: 0 auto;
  padding: 28px 22px 64px;
}

/* 導覽：只有品牌，不給訪客工作平台的入口 */
.feedback-form-nav {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
}

.feedback-form-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.feedback-form-brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--brand-mark-bg);
  color: var(--brand-mark-text);
  font-size: 14px;
  font-weight: 700;
}

/* 載入／錯誤狀態 */
.feedback-form-state {
  padding: 56px 24px;
  text-align: center;
}

.feedback-form-state h1 {
  margin-bottom: 9px;
  font-size: 20px;
  font-weight: 700;
}

.feedback-form-state p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.feedback-form-loading-mark,
.feedback-form-error-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: var(--surface-t);
  box-shadow: var(--shadow-sm);
  font-size: 18px;
  font-weight: 700;
}

.feedback-form-error-mark {
  background: rgba(232, 192, 200, .5);
  color: var(--stamp-rejected-text);
}

.feedback-form-home-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--btn-ghost-text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
}

/* 表單本體 */
.feedback-form-content,
.feedback-success {
  padding: 28px 26px 30px;
  border-radius: 24px;
  background: var(--surface-t);
  box-shadow: var(--shadow-md);
}

.feedback-form-header {
  margin-bottom: 24px;
  text-align: center;
}

.feedback-form-icon {
  font-size: 32px;
  line-height: 1;
}

.feedback-form-kicker {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.feedback-form-header h1 {
  margin: 6px 0 8px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.feedback-form-header p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.feedback-form-field {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}

.feedback-form-field label {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.feedback-form-field textarea,
.feedback-form-field input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.7;
  transition: border-color var(--tr), box-shadow var(--tr);
}

.feedback-form-field textarea { resize: vertical; }

.feedback-form-field textarea:focus,
.feedback-form-field input:focus {
  outline: none;
  border-color: var(--pastel-peach);
  box-shadow: 0 0 0 3px rgba(240, 200, 168, .38);
}

.feedback-form-count {
  justify-self: end;
  color: var(--muted);
  font-size: 11px;
}

.feedback-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}

.feedback-form-status {
  min-height: 18px;
  margin-top: 10px;
  color: var(--stamp-reviewing-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  text-align: right;
}

.feedback-form-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

/* 成功頁：連結 + 直接前往追蹤頁 */
.feedback-success { text-align: center; }
.feedback-success[hidden] { display: none; }

.feedback-success-icon {
  font-size: 34px;
  line-height: 1;
}

.feedback-success h1 {
  margin: 12px 0 8px;
  font-size: 21px;
  font-weight: 700;
}

.feedback-success > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.feedback-success-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

@media (max-width: 540px) {
  .feedback-form-shell { padding: 20px 15px 48px; }
  .feedback-form-content,
  .feedback-success { padding: 22px 18px 24px; }
  .feedback-form-header h1 { font-size: 20px; }
  .feedback-form-actions { justify-content: stretch; }
  .feedback-form-actions .primary-btn { width: 100%; }
  .feedback-success-actions .primary-btn { width: 100%; }
}
