/* Feedback page */
.fb-page { display: flex; flex-direction: column; gap: 20px; padding: 24px 28px 80px; }

.fb-header { display: flex; align-items: center; gap: 14px; }
.fb-header-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(37,99,235,0.10); color: var(--blue);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.fb-header-icon .icon { width: 22px; height: 22px; }
.fb-title { font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin: 0; color: var(--text-1); }
.fb-subtitle { font-size: 13px; color: var(--text-3); margin: 2px 0 0; }

.fb-grid { display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: start; }

/* Controls row */
.fb-controls { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.fb-tabs {
  display: flex; flex: 1; min-width: 0; padding: 3px;
  background: var(--surface-3); border-radius: 8px; gap: 2px;
}
.fb-tab {
  flex: 1; height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 6px; border: 0; background: transparent; cursor: pointer;
  color: var(--text-3); font-size: 13px; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.fb-tab:hover { color: var(--text-1); }
.fb-tab.active { background: var(--surface); color: var(--text-1); box-shadow: 0 1px 2px rgba(0,0,0,0.04); }

.fb-search {
  position: relative; display: flex; align-items: center;
  width: 220px; height: 36px; padding: 0 10px 0 32px;
  background: var(--surface-3); border: 0.5px solid var(--border);
  border-radius: 8px;
}
.fb-search .icon { position: absolute; left: 10px; color: var(--text-4); }
.fb-search input {
  flex: 1; height: 100%; border: 0; background: transparent; outline: none;
  font: inherit; color: var(--text-1);
}
.fb-search input::placeholder { color: var(--text-4); }

.fb-newpost { height: 36px; padding: 0 14px; gap: 6px; flex-shrink: 0; }

/* List */
.fb-list { padding: 0; overflow: hidden; min-height: 320px; }
.fb-row {
  display: flex; gap: 14px; padding: 16px 18px;
  border-bottom: 0.5px solid var(--border);
  cursor: pointer; transition: background 0.15s;
}
.fb-row:last-child { border-bottom: 0; }
.fb-row:hover { background: var(--surface-2); }

.fb-vote {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 44px; min-width: 44px; padding: 6px 0;
  background: var(--surface-3); border: 0.5px solid var(--border); border-radius: 8px;
  color: var(--text-2); cursor: pointer; transition: all 0.15s;
}
.fb-vote span { font-size: 12px; font-weight: 600; }
.fb-vote:hover { border-color: var(--blue); color: var(--blue); }
.fb-vote.voted { background: rgba(37,99,235,0.10); border-color: var(--blue); color: var(--blue); }

.fb-row-body { flex: 1; min-width: 0; }
.fb-row-title { font-size: 14px; font-weight: 600; line-height: 1.35; margin: 0 0 4px; color: var(--text-1); }
.fb-row-content {
  font-size: 12.5px; color: var(--text-3); margin: 0 0 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fb-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fb-author { display: inline-flex; align-items: center; gap: 6px; }
.fb-avatar {
  width: 18px; height: 18px; border-radius: 50%;
  font-size: 9px; font-weight: 600; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.fb-author-name { font-size: 11px; color: var(--text-3); }
.fb-badge {
  font-size: 10px; font-weight: 600; height: 18px; padding: 0 7px;
  border-radius: 4px; border: 0.5px solid; display: inline-flex; align-items: center;
  text-transform: capitalize;
}
.fb-ago { font-size: 10px; color: var(--text-4); margin-left: auto; }

.fb-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 60px 20px; color: var(--text-3); font-size: 13px;
}

/* Sidebar */
.fb-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 16px; }
.fb-side-card { padding: 14px; }
.fb-side-title { font-size: 13px; font-weight: 600; margin: 0 0 10px; color: var(--text-1); }
.fb-board-list { display: flex; flex-direction: column; gap: 2px; }
.fb-board {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: transparent; border: 0; border-radius: 6px;
  font-size: 13px; color: var(--text-3); text-align: left; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.fb-board:hover { background: var(--surface-3); color: var(--text-1); }
.fb-board.active { background: rgba(37,99,235,0.10); color: var(--blue); font-weight: 500; }
.fb-support { background: rgba(37,99,235,0.05); border-color: rgba(37,99,235,0.20); }
.fb-support p { font-size: 12px; color: var(--text-3); line-height: 1.5; margin: 0; }

/* Modal */
.fb-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
  padding: 20px; animation: fb-fade 0.15s ease-out;
}
@keyframes fb-fade { from { opacity: 0; } to { opacity: 1; } }
.fb-modal {
  width: 100%; max-width: 500px; background: var(--surface);
  border: 0.5px solid var(--border); border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  overflow: hidden; animation: fb-pop 0.18s ease-out;
}
@keyframes fb-pop { from { transform: translateY(8px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.fb-modal-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 18px 20px 12px;
}
.fb-modal-header h2 { font-size: 17px; font-weight: 600; margin: 0; color: var(--text-1); }
.fb-modal-header p { font-size: 12px; color: var(--text-3); margin: 4px 0 0; }
.fb-form { padding: 4px 20px 18px; display: flex; flex-direction: column; gap: 14px; }
.fb-field { display: flex; flex-direction: column; gap: 6px; }
.fb-field label { font-size: 12px; font-weight: 500; color: var(--text-2); }
.fb-select, .fb-textarea {
  width: 100%; font: inherit; color: var(--text-1);
  background: var(--surface-2); border: 0.5px solid var(--border); border-radius: 8px;
  padding: 9px 11px; outline: none;
}
.fb-select { height: 36px; }
.fb-textarea { min-height: 100px; resize: vertical; line-height: 1.5; }
.fb-select:focus, .fb-textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }

.fb-attach-row { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-attach-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 160px;
  padding: 5px 6px 5px 10px;
  background: var(--surface-3); border: 0.5px solid var(--border); border-radius: 6px;
  font-size: 11px; color: var(--text-2);
}
.fb-attach-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-attach-chip button {
  width: 18px; height: 18px; border-radius: 4px; border: 0;
  background: transparent; color: var(--text-3); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.fb-attach-chip button:hover { background: var(--surface-4); color: var(--text-1); }
.fb-attach-add {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px;
  background: transparent; border: 0.5px dashed var(--border); border-radius: 6px;
  font-size: 11px; color: var(--text-3); cursor: pointer;
}
.fb-attach-add:hover { border-color: var(--blue); color: var(--blue); }
.fb-hint { font-size: 10px; color: var(--text-4); margin: 2px 0 0; }

.fb-modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding-top: 6px; border-top: 0.5px solid var(--border); margin-top: 4px; padding: 14px 0 0;
}

.link-btn { background: 0; border: 0; color: var(--blue); cursor: pointer; font: inherit; padding: 0; }

/* === Mobile (≤768px) === */
@media (max-width: 768px) {
  .fb-page { padding: 16px 16px 60px; gap: 16px; }

  .fb-header { gap: 12px; }
  .fb-header-icon { width: 38px; height: 38px; border-radius: 10px; }
  .fb-header-icon .icon { width: 18px; height: 18px; }
  .fb-title { font-size: 22px; }
  .fb-subtitle { font-size: 12px; }

  /* Stack the two-column grid → single column, sidebar moves below */
  .fb-grid { grid-template-columns: 1fr; gap: 16px; }
  .fb-side { position: static; }

  /* Controls: tabs + button on row 1, search full-width on row 2 */
  .fb-controls { flex-wrap: wrap; gap: 8px; }
  .fb-tabs { order: 1; flex: 1 1 auto; min-width: 0; }
  .fb-newpost { order: 2; flex-shrink: 0; }
  .fb-search { order: 3; width: 100%; flex-basis: 100%; }
  .fb-newpost span { display: none; }
  .fb-newpost { width: 36px; padding: 0; justify-content: center; }

  /* Tighter row padding so titles + meta fit */
  .fb-row { padding: 14px 14px; gap: 12px; }
  .fb-vote { width: 38px; min-width: 38px; }
  .fb-row-title { font-size: 13.5px; }

  /* Modal: full-width, less padding */
  .fb-modal-overlay { padding: 12px; }
  .fb-modal-header { padding: 16px 16px 10px; }
  .fb-form { padding: 4px 16px 16px; gap: 12px; }
}
