/* ============================================================
   EXS — Feedback section
   Builds on /styles.css tokens (Pine Mist). Loaded after styles.css
   and /assets/i18n/i18n.css.
   ============================================================ */

.fb-page { max-width: 680px; margin: 0 auto; padding: clamp(28px, 6vw, 72px) 20px clamp(48px, 8vw, 96px); }

/* top bar: brand + language switcher */
.fb-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.fb-top .nav__brand img { height: 26px; width: auto; }

/* machine-translation notice (shown on non-English pages) */
.fb-mt-notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--signature-soft);
  border: 1px solid color-mix(in srgb, var(--signature) 35%, transparent);
  color: var(--ink);
  border-radius: var(--r-sm);
  padding: 11px 14px; font-size: 0.9rem; line-height: 1.5;
  margin: 0 0 24px;
}
.fb-mt-notice a { color: var(--signature); text-decoration: underline; }
.fb-mt-notice svg { flex: 0 0 auto; margin-top: 2px; color: var(--signature); }

.fb-head { margin-bottom: 24px; }
.fb-title { font-size: clamp(1.7rem, 5vw, 2.3rem); line-height: 1.1; margin: 10px 0 8px; letter-spacing: -0.02em; }
.fb-lead { color: var(--sub); margin: 0; font-size: 1.02rem; }

/* ---------- Selection cards ---------- */
.fb-cards { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .fb-cards { grid-template-columns: 1fr; } }
.fb-cards--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .fb-cards--3 { grid-template-columns: 1fr; } }

.fb-card {
  text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 20px 20px 22px;
  display: flex; flex-direction: column; gap: 7px;
  transition: border-color .25s var(--ease), transform .25s var(--ease), background .25s var(--ease);
}
.fb-card:hover { border-color: var(--signature); transform: translateY(-2px); background: var(--surface-2); }
.fb-card:focus-visible { outline: 2px solid var(--signature); outline-offset: 3px; }
.fb-card__icon { width: 26px; height: 26px; color: var(--signature); }
.fb-card__title { font-weight: 600; font-size: 1.06rem; }
.fb-card__desc { color: var(--sub); font-size: 0.9rem; line-height: 1.45; }

/* ---------- Views ---------- */
.fb-view { display: none; }
.fb-view.is-active { display: block; animation: fb-fade .22s var(--ease); }
@keyframes fb-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.fb-back {
  background: none; border: none; color: var(--signature); cursor: pointer; font: inherit;
  padding: 6px 0; margin-bottom: 12px; display: inline-flex; align-items: center; gap: 6px;
}
.fb-back:hover { text-decoration: underline; }

/* ---------- Form ---------- */
.fb-form {
  display: flex; flex-direction: column; gap: 18px; margin-top: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(20px, 4vw, 30px);
}
.fb-field { display: flex; flex-direction: column; gap: 7px; }
.fb-field > label { font-weight: 600; font-size: 0.94rem; }
.fb-opt { font-weight: 400; color: var(--sub); }
.fb-hint { font-size: 0.82rem; color: var(--sub); margin: 0; }

.fb-input, .fb-textarea, .fb-select {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 11px 13px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.fb-textarea { resize: vertical; min-height: 120px; }
.fb-input:focus, .fb-textarea:focus, .fb-select:focus {
  outline: none; border-color: var(--signature);
  box-shadow: 0 0 0 3px var(--signature-soft);
}
.fb-input[aria-invalid="true"], .fb-textarea[aria-invalid="true"] { border-color: var(--danger); }
.fb-select { appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2386988F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}

.fb-error-msg { color: var(--danger); font-size: 0.82rem; margin: 0; }

/* ---------- Star rating ---------- */
.fb-rating { display: inline-flex; gap: 3px; }
.fb-rating button {
  background: none; border: none; cursor: pointer; padding: 3px; line-height: 0;
  color: var(--line-2); transition: color .12s, transform .12s;
}
.fb-rating button:hover { transform: scale(1.14); }
.fb-rating button[aria-pressed="true"], .fb-rating.is-hovering button.is-lit { color: var(--primary); }
.fb-rating button:focus-visible { outline: 2px solid var(--signature); outline-offset: 2px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.fb-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.fb-btn {
  font: inherit; font-weight: 600; cursor: pointer; border: 1px solid transparent;
  border-radius: 999px; padding: 12px 24px; transition: filter .15s, opacity .15s, background .15s;
}
.fb-btn--primary { background: var(--signature); color: var(--bg); }
.fb-btn--primary:hover { filter: brightness(1.08); }
.fb-btn--primary:disabled { opacity: 0.6; cursor: progress; }
.fb-btn:focus-visible { outline: 2px solid var(--signature); outline-offset: 3px; }

/* ---------- Status ---------- */
.fb-status { border-radius: var(--r-sm); padding: 12px 15px; font-size: 0.92rem; margin: 0; }
.fb-status--error { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); }
[hidden] { display: none !important; }

/* honeypot */
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Success ---------- */
.fb-done { text-align: center; padding: 40px 16px; }
.fb-done svg { color: var(--primary); width: 56px; height: 56px; }
.fb-done h2 { margin: 14px 0 6px; font-size: 1.5rem; }
.fb-done p { color: var(--sub); margin: 0 0 22px; }

.fb-footer { margin-top: 34px; text-align: center; font-size: 0.82rem; color: var(--sub); }
.fb-footer a { color: var(--sub); text-decoration: none; }
.fb-footer a:hover { color: var(--signature); }
