/* Feedback board — builds on ../styles.css design tokens. */

/* Solid page background (no gradient band at bottom). */
html,
body.fb-page {
  min-height: 100%;
  background: var(--bg) !important;
  background-image: none !important;
}

.fb-main { padding: 8px 0 64px; min-height: calc(100vh - 80px); }

/* No default mobile tap ripple / blue highlight on controls */
.fb-tab,
.fb-sort-btn,
.fb-status-filter-btn,
.fb-add,
.fb-vote,
.fb-btn,
.fb-delete,
.fb-account .fb-link {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  touch-action: manipulation;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
}
.fb-tab:focus-visible,
.fb-sort-btn:focus-visible,
.fb-status-filter-btn:focus-visible,
.fb-add:focus-visible,
.fb-vote:focus-visible,
.fb-btn:focus-visible,
.fb-delete:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Hero */
.fb-hero {
  margin-top: 12px;
  padding: 32px 36px;
  border-radius: 32px 32px 0 0;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.14), transparent 30%),
    linear-gradient(135deg, #111973, #3545c7 58%, #7257f5);
  box-shadow: none;
}
.fb-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  letter-spacing: -0.02em;
}
.fb-hero p { margin: 0; max-width: 640px; color: rgba(255,255,255,0.86); line-height: 1.5; }

/* Toolbar: tabs + sort + add */
.fb-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 24px 0 18px;
}
.fb-tabs { display: inline-flex; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 4px; gap: 4px; }
.fb-tab {
  border: none; background: transparent; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--muted);
  padding: 9px 18px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; gap: 7px; transition: background-color .15s ease, color .15s ease;
}
.fb-tab[aria-selected="true"] { background: var(--primary); color: #fff; }
.fb-tab:active:not([aria-selected="true"]) { background: var(--primary-light); color: var(--primary); }
.fb-tab .fb-tab-count { font-size: .8em; opacity: .7; }

/* Status filter row: filter pills (left) + sort toggle (right) */
.fb-status-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.fb-status-filters { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.fb-status-filter-btn {
  border: none; background: transparent; cursor: pointer; font: inherit; font-weight: 600;
  font-size: .85rem; color: var(--muted); padding: 6px 10px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; gap: 6px; transition: background-color .15s ease, color .15s ease;
}
.fb-status-filter-btn::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
}
.fb-status-filter-all::before { display: none; }
.fb-status-filter-all { padding-right: 12px; }
.fb-status-filter-btn.is-open::before { background: #4048b3; }
.fb-status-filter-btn.is-under_review::before { background: #e08a2e; }
.fb-status-filter-btn.is-planned::before { background: #1d6fa5; }
.fb-status-filter-btn.is-in_progress::before { background: #8b5cf6; }
.fb-status-filter-btn.is-done::before { background: #1f9254; }
.fb-status-filter-btn.is-declined::before { background: #9a5b5b; }
.fb-status-filter-btn:hover { background: var(--surface-soft); color: var(--text); }
.fb-status-filter-btn[aria-pressed="true"] { background: var(--surface-soft); color: var(--text); }

.fb-sort { display: inline-flex; gap: 4px; margin-left: auto; }
.fb-sort-btn {
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  font: inherit; font-weight: 600; color: var(--muted);
  padding: 8px 14px; border-radius: var(--radius-pill); transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.fb-sort-btn[aria-pressed="true"] { background: var(--primary-light); color: var(--primary); border-color: var(--primary-light); }
.fb-sort-btn:active:not([aria-pressed="true"]) { background: var(--surface-soft); }

.fb-add {
  border: none; cursor: pointer; font: inherit; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  min-height: 48px; padding: 11px 22px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 20px rgba(123, 97, 255, 0.28); transition: transform .12s ease, filter .12s ease;
}
.fb-add:hover { filter: brightness(1.05); transform: translateY(-1px); }
.fb-add:active { transform: translateY(0); filter: brightness(0.98); }
.fb-add svg { width: 18px; height: 18px; }

/* List */
.fb-list { display: flex; flex-direction: column; gap: 12px; }

.fb-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 20px;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.fb-card:hover { transform: translateY(-2px); border-color: #cfd5f7; box-shadow: 0 18px 40px rgba(31,41,130,.1); }

/* Vote button */
.fb-vote {
  flex: 0 0 auto; width: 58px; min-height: 60px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1px solid var(--border); background: var(--surface-soft); cursor: pointer;
  border-radius: var(--radius-md); color: var(--primary); font: inherit; transition: all .15s ease;
}
.fb-vote:hover { border-color: var(--primary); background: var(--primary-light); }
.fb-vote[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.fb-vote svg { width: 16px; height: 16px; }
.fb-vote .fb-vote-num { font-weight: 800; font-size: 1.05rem; }

.fb-card-main { flex: 1 1 auto; min-width: 0; }
.fb-card-title { margin: 0 0 4px; font-size: 1.06rem; font-weight: 700; color: var(--text); word-wrap: break-word; }
.fb-card-body { margin: 0 0 10px; color: var(--muted); line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.fb-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .82rem; color: var(--muted); }
.fb-chip {
  font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-pill);
  text-transform: uppercase; letter-spacing: .02em;
}
.fb-chip.is-open { background: #eef1ff; color: #4048b3; }
.fb-chip.is-under_review { background: #fdf0df; color: #b5651b; }
.fb-chip.is-planned { background: #fff3df; color: #b5791b; }
.fb-chip.is-in_progress { background: #e4f4ff; color: #1d6fa5; }
.fb-chip.is-done { background: #e4f8ec; color: #1f9254; }
.fb-chip.is-declined { background: #f3e9e9; color: #9a5b5b; }
.fb-status-select {
  border: none; cursor: pointer; appearance: none; font-family: inherit;
  padding-right: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236f7294' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
}
.fb-author { font-weight: 600; color: var(--text); }
.fb-delete { margin-left: auto; border: none; background: transparent; cursor: pointer; color: var(--muted); padding: 4px; border-radius: 8px; }
.fb-delete:hover { color: #c0392b; background: #f7ecec; }
.fb-delete svg { width: 16px; height: 16px; display: block; }

.fb-empty, .fb-loading {
  text-align: center; color: var(--muted); padding: 48px 16px;
  background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius-lg);
}

/* Sign-in banner */
.fb-banner {
  margin: 0 0 16px; padding: 14px 18px; border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: var(--accent-soft); color: #6b46c1; border: 1px solid #e4d6ff; border-top: 0;
  font-weight: 600; display: none;
  box-shadow: 0 18px 38px rgba(25,35,138,.1);
}
.fb-banner.is-visible { display: block; }

.fb-account { font-size: .85rem; color: var(--muted); display: none; align-items: center; gap: 10px; }
.fb-account.is-visible { display: flex; }
.fb-account[hidden] { display: none !important; }
.fb-account .fb-link { color: var(--primary); cursor: pointer; font-weight: 600; }
.fb-account .fb-link:hover { text-decoration: underline; }

/* Modal */
.fb-modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  background: rgba(31, 34, 64, 0.5); padding: 16px; z-index: 50; }
.fb-modal.is-open { display: flex; }
.fb-modal-card { width: min(520px, 100%); background: var(--surface); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow); max-height: 92vh; overflow: auto; }
.fb-modal-card h2 { margin: 0 0 16px; font-size: 1.3rem; }
.fb-field { margin-bottom: 14px; }
.fb-field label { display: block; font-weight: 600; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.fb-field input, .fb-field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface-soft);
  border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 14px; resize: vertical;
}
.fb-field input:focus, .fb-field textarea:focus { outline: none; border-color: var(--primary); background: #fff; }
.fb-field textarea { min-height: 110px; }
.fb-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.fb-btn { font: inherit; font-weight: 700; cursor: pointer; padding: 11px 22px; border-radius: var(--radius-pill); border: 1px solid transparent; }
.fb-btn-primary { background: var(--primary); color: #fff; }
.fb-btn-primary:hover { background: var(--primary-dark); }
.fb-btn-primary:disabled { opacity: .6; cursor: default; }
.fb-btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.fb-btn-ghost:hover { background: var(--surface-soft); }
.fb-form-error { color: #c0392b; font-size: .85rem; margin: 0 0 10px; min-height: 1em; }

/* Toast */
.fb-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff; padding: 13px 22px; border-radius: var(--radius-pill);
  font-weight: 600; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 60;
  max-width: calc(100% - 32px);
}
.fb-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.fb-toast.is-error { background: #c0392b; }

@media (max-width: 560px) {
  .fb-hero { padding: 26px 22px; }
  .fb-card { padding: 16px; gap: 12px; }
  .fb-sort { margin-left: 0; }
  .fb-toolbar { gap: 10px; }
  .fb-add { width: 100%; justify-content: center; order: 5; }
}
