/* Nút góp ý + hộp thoại. Dùng biến màu của app nếu có, có giá trị dự phòng để
   không phụ thuộc theme. */
#fb-nut {
  position: fixed; right: 20px; bottom: 20px; z-index: 9998;
  display: flex; align-items: center; gap: 8px;
  padding: 11px 17px; border: 0; border-radius: 999px;
  background: var(--accent, #2563eb); color: #fff;
  font: 600 14px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
  transition: transform .15s ease, box-shadow .15s ease;
}
#fb-nut:hover { transform: translateY(-2px); box-shadow: 0 7px 20px rgba(0, 0, 0, .28); }
#fb-nut:active { transform: translateY(0); }

.fb-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15, 23, 42, .55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.fb-box {
  width: min(560px, 100%); max-height: 90vh; overflow: auto;
  background: var(--card, #fff); color: var(--text, #0f172a);
  border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}
.fb-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; border-bottom: 1px solid var(--border, #e2e8f0);
}
.fb-head h3 { margin: 0; font-size: 16px; }
.fb-x {
  border: 0; background: transparent; font-size: 26px; line-height: 1;
  color: var(--muted, #64748b); cursor: pointer; padding: 0 4px;
}
.fb-body { padding: 16px 18px 18px; }
.fb-text {
  width: 100%; box-sizing: border-box; padding: 11px 12px;
  border: 1px solid var(--border, #cbd5e1); border-radius: 9px;
  background: var(--bg, #fff); color: inherit;
  font: 14px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; resize: vertical;
}
.fb-text:focus { outline: 2px solid var(--accent, #2563eb); outline-offset: -1px; }

.fb-grid { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 11px; align-items: center; }
.fb-thumb { position: relative; width: 78px; height: 78px; }
.fb-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--border, #e2e8f0);
}
.fb-thumb button {
  position: absolute; top: -7px; right: -7px; width: 22px; height: 22px;
  border: 0; border-radius: 50%; background: #ef4444; color: #fff;
  font-size: 15px; line-height: 1; cursor: pointer;
}
.fb-dem { font-size: 12px; color: var(--muted, #64748b); }

.fb-loi {
  display: none; margin-top: 10px; padding: 9px 11px;
  background: #fef2f2; color: #b91c1c; border-radius: 8px; font-size: 13px;
}
.fb-foot { display: flex; align-items: center; gap: 10px; margin-top: 15px; }
.fb-hint { font-size: 12px; color: var(--muted, #64748b); flex: 1; }
.fb-primary {
  padding: 9px 18px; border: 0; border-radius: 8px;
  background: var(--accent, #2563eb); color: #fff;
  font: 600 14px system-ui, sans-serif; cursor: pointer;
}
.fb-primary:disabled { opacity: .6; cursor: default; }
.fb-ghost {
  padding: 8px 13px; border: 1px solid var(--border, #cbd5e1); border-radius: 8px;
  background: transparent; color: inherit; font: 14px system-ui, sans-serif; cursor: pointer;
}
.fb-xong { padding: 34px 24px; text-align: center; }
.fb-xong h3 { margin: 14px 0 6px; }
.fb-xong p { margin: 0 0 12px; color: var(--muted, #64748b); font-size: 14px; }
.fb-xong code {
  display: inline-block; margin-bottom: 18px; padding: 5px 10px;
  background: var(--bg2, #f1f5f9); border-radius: 6px; font-size: 12px;
}
.fb-tick {
  width: 54px; height: 54px; margin: 0 auto; border-radius: 50%;
  background: #dcfce7; color: #16a34a;
  font-size: 30px; line-height: 54px;
}
@media (max-width: 520px) {
  #fb-nut span { display: none; }
  #fb-nut { padding: 13px; }
}

/* Chọn loại góp ý */
.fb-nhan {
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  color: var(--muted, #64748b); margin-bottom: 7px;
}
.fb-loai { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.fb-loai-nut {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 11px 6px; border: 1.5px solid var(--border, #e2e8f0); border-radius: 10px;
  background: transparent; color: inherit; cursor: pointer;
  font: 500 12px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif; text-align: center;
  transition: border-color .12s ease, background .12s ease;
}
.fb-loai-nut:hover { border-color: var(--accent, #2563eb); }
.fb-loai-nut.chon {
  border-color: var(--accent, #2563eb); background: #eef2ff; color: #3730a3; font-weight: 600;
}
.fb-loai-icon { font-size: 19px; line-height: 1; }
.fb-giai-thich {
  margin: 9px 0 11px; padding: 8px 11px; border-radius: 8px; font-size: 12.5px;
  background: var(--bg2, #f1f5f9); color: var(--muted, #475569);
}
.fb-giai-thich.tu-duyet { background: #ecfdf5; color: #047857; }
@media (max-width: 460px) {
  .fb-loai { grid-template-columns: 1fr; }
  .fb-loai-nut { flex-direction: row; justify-content: flex-start; padding: 9px 12px; }
}
