/* ═══════════════════════════════════════════════════════════════
 * TIME-AI v1.9 — Bug Report CSS
 * Deploy: /home/time.com.vn/public_html/assets/css/bug-report.css
 *
 * Theo Quy chuẩn nút TIME-AI v4:
 * - ĐỘNG: viền xanh #16A34A + nền cam #FFF3E0 + chữ #E65100
 * - Hover: viền #B84000 + nền #FFE0B0 + chữ #118235
 * ═══════════════════════════════════════════════════════════════ */

/* ─── Floating button — Pill dashed cam ─── */
#bug-report-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
  padding: 10px 20px;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #F57C00;
  background: #FFF8F0;
  border: 1.5px dashed #F57C00;
  border-radius: 24px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(245, 124, 0, 0.12);
  transition: all 0.2s ease;
  user-select: none;
  letter-spacing: 0.2px;
}
#bug-report-fab:hover {
  background: #FFE8CC;
  border-color: #C46300;
  color: #C46300;
  box-shadow: 0 4px 14px rgba(245, 124, 0, 0.22);
  transform: translateY(-1px);
}
#bug-report-fab:active {
  transform: translateY(0);
}

/* ─── Modal overlay ─── */
#bug-report-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  font-family: 'Be Vietnam Pro', sans-serif;
}
.brm-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}
.brm-box {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 640px;
  max-height: 90vh;
  background: #FDF0E2;
  border: 2px solid #F57C00;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── Header ─── */
.brm-header {
  padding: 14px 20px;
  background: linear-gradient(135deg, #FFE0B0 0%, #FFF3E0 100%);
  border-bottom: 1px solid #F57C00;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  color: #92400E;
}
.brm-close {
  background: transparent;
  border: 1px solid #16A34A;
  color: #16A34A;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brm-close:hover {
  background: #FFE0B0;
  color: #B84000;
}

/* ─── Body ─── */
.brm-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.brm-loading {
  text-align: center;
  padding: 40px 20px;
  font-size: 14px;
  color: #92400E;
}

/* ─── Preview ─── */
.brm-preview-wrap {
  margin-bottom: 16px;
}
.brm-preview-label {
  font-size: 12px;
  color: #92400E;
  margin-bottom: 6px;
  font-weight: 500;
}
#brm-preview {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border: 1px solid #F57C00;
  border-radius: 6px;
  background: #fff;
}

/* ─── Note ─── */
.brm-note-wrap {
  margin-bottom: 16px;
}
.brm-note-wrap label {
  display: block;
  font-size: 13px;
  color: #92400E;
  margin-bottom: 6px;
  font-weight: 500;
}
#brm-note {
  width: 100%;
  padding: 10px;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 13px;
  background: #fff;
  border: 1px solid #FCD34D;
  border-radius: 6px;
  resize: vertical;
  min-height: 80px;
  box-sizing: border-box;
}
#brm-note:focus {
  outline: none;
  border-color: #16A34A;
}
.brm-counter {
  font-size: 11px;
  color: #92400E;
  text-align: right;
  margin-top: 4px;
}

/* ─── Actions ─── */
.brm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

/* ─── Success / Error ─── */
.brm-success, .brm-error {
  padding: 24px 20px;
  text-align: center;
  font-size: 14px;
  border-radius: 8px;
}
.brm-success {
  background: #F0FDF4;
  color: #16A34A;
  border: 1px solid #16A34A;
}
.brm-error {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #DC2626;
}

/* ─── Scrollbar mờ (theo Quy chuẩn) ─── */
.brm-body::-webkit-scrollbar { width: 6px; }
.brm-body::-webkit-scrollbar-track { background: transparent; }
.brm-body::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.3); border-radius: 3px; }
.brm-body::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.5); }
.brm-body { scrollbar-width: thin; scrollbar-color: rgba(148,163,184,0.3) transparent; }

/* ─── Responsive mobile ─── */
@media (max-width: 640px) {
  #bug-report-fab {
    bottom: 16px;
    right: 16px;
    padding: 8px 14px;
    font-size: 13px;
  }
  .brm-box {
    width: 95%;
    max-height: 95vh;
  }
}
