/* TREND BRIEF — 공통 컴포넌트 스타일 (모달, 댓글, 쪽지) */

/* ===== MODAL ===== */
.tb-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.tb-modal {
  background: #fff;
  border-radius: 8px;
  padding: 36px 32px;
  max-width: 440px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  max-height: 90vh;
  overflow-y: auto;
}
.tb-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
}
.tb-modal-close:hover { color: #333; }
.tb-modal-tabs {
  display: flex;
  border-bottom: 2px solid #eee;
  margin-bottom: 24px;
}
.tb-tab {
  flex: 1;
  padding: 10px 0;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 700;
  color: #999;
  cursor: pointer;
  transition: color 0.2s;
}
.tb-tab.active { color: #E63946; border-bottom: 2px solid #E63946; margin-bottom: -2px; }
.tb-form { animation: fadeIn 0.2s; }
.tb-field { margin-bottom: 16px; }
.tb-field label { display: block; font-size: 12px; font-weight: 700; color: #555; margin-bottom: 6px; letter-spacing: 0.5px; }
.tb-field input, .tb-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.tb-field input:focus, .tb-field textarea:focus { border-color: #E63946; }
.tb-row { display: flex; gap: 8px; }
.tb-row input { flex: 1; }
.tb-btn-sm {
  padding: 10px 16px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.tb-btn-sm:hover { background: #555; }
.tb-btn-primary {
  width: 100%;
  padding: 12px;
  background: #E63946;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}
.tb-btn-primary:hover { background: #c5303c; }
.tb-msg { margin-top: 12px; font-size: 13px; color: #E63946; text-align: center; min-height: 20px; }
.tb-timer { font-size: 12px; color: #E63946; font-weight: 600; margin-top: 4px; display: block; }

/* ===== AUTH UI (header) ===== */
.tb-btn-login {
  padding: 6px 16px;
  background: #E63946;
  color: #fff;
  border: none;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.5px;
}
.tb-btn-login:hover { background: #c5303c; }
.tb-user-badge {
  font-size: 12px;
  color: #fff;
  font-weight: 600;
  margin-right: 8px;
}
.tb-btn-logout {
  padding: 4px 12px;
  background: transparent;
  color: #999;
  border: 1px solid #555;
  border-radius: 3px;
  font-size: 10px;
  cursor: pointer;
}
.tb-btn-logout:hover { color: #fff; border-color: #999; }

/* ===== COMMENTS ===== */
.tb-comments-section {
  padding: 36px 48px;
  border-top: 3px solid #E63946;
  background: #fafafa;
}
.tb-comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.tb-comments-header h3 {
  font-size: 18px;
  font-weight: 900;
  color: #0a0a0a;
}
.tb-comment-input {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 24px;
}
.tb-comment-input-user {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
}
.tb-comment-input textarea {
  width: 100%;
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 70px;
  outline: none;
}
.tb-comment-input textarea:focus { border-color: #E63946; }
.tb-comment-input-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.tb-char-count { font-size: 11px; color: #999; }
.tb-btn-submit {
  padding: 8px 20px;
  background: #E63946;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.tb-btn-submit:hover { background: #c5303c; }
.tb-btn-cancel {
  padding: 8px 16px;
  background: #eee;
  color: #666;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}
.tb-comment-notice { font-size: 11px; color: #999; margin-top: 8px; text-align: center; }
.tb-comment-login-prompt {
  text-align: center;
  padding: 24px;
  background: #fff;
  border: 1px dashed #ddd;
  border-radius: 6px;
  margin-bottom: 24px;
}
.tb-comment-login-prompt p { font-size: 14px; color: #666; }
.tb-comment-login-prompt a { color: #E63946; font-weight: 700; text-decoration: none; }
.tb-no-comments { text-align: center; color: #999; padding: 40px 0; font-size: 14px; }

.tb-comment-list {}
.tb-comment {
  padding: 18px 0;
  border-bottom: 1px solid #eee;
}
.tb-comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.tb-comment-author { font-size: 13px; font-weight: 700; color: #333; }
.tb-comment-time { font-size: 11px; color: #999; }
.tb-comment-body { font-size: 14px; color: #444; line-height: 1.7; word-break: keep-all; }
.tb-comment.tb-deleted .tb-comment-body { color: #bbb; }
.tb-comment-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.tb-btn-reply, .tb-btn-edit, .tb-btn-delete {
  background: none;
  border: none;
  font-size: 11px;
  color: #999;
  cursor: pointer;
  padding: 2px 0;
}
.tb-btn-reply:hover { color: #E63946; }
.tb-btn-edit:hover { color: #4361ee; }
.tb-btn-delete:hover { color: #E63946; }
.tb-replies {
  margin-left: 28px;
  border-left: 2px solid #eee;
  padding-left: 18px;
}

/* ===== MESSAGE MODAL ===== */
.tb-msg-modal-content {}
.tb-msg-title { font-size: 18px; font-weight: 900; color: #0a0a0a; margin-bottom: 4px; }
.tb-msg-reporter-id { font-size: 12px; color: #999; margin-bottom: 20px; }

/* ===== REPORTER PROFILE CARD ===== */
.tb-reporter-card {
  display: flex;
  gap: 18px;
  padding: 24px;
  background: #f8f8f8;
  border-radius: 6px;
  margin-top: 28px;
  align-items: flex-start;
}
.tb-reporter-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #ddd;
}
.tb-reporter-info { flex: 1; }
.tb-reporter-name { font-size: 16px; font-weight: 900; color: #0a0a0a; }
.tb-reporter-id-link {
  font-size: 12px;
  color: #4361ee;
  text-decoration: none;
  cursor: pointer;
}
.tb-reporter-id-link:hover { text-decoration: underline; }
.tb-reporter-title { font-size: 12px; color: #777; margin-top: 2px; }
.tb-reporter-cat {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 2px;
  color: #fff;
  margin-top: 6px;
}
.tb-reporter-bio { font-size: 12px; color: #666; margin-top: 8px; line-height: 1.6; }
.tb-reporter-actions { display: flex; gap: 10px; margin-top: 12px; }
.tb-reporter-actions button {
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
}
.tb-reporter-actions button:hover { border-color: #E63946; color: #E63946; }
.tb-reporter-actions button.primary { background: #E63946; color: #fff; border-color: #E63946; }
.tb-reporter-actions button.primary:hover { background: #c5303c; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .tb-modal { padding: 24px 20px; margin: 10px; }
  .tb-comments-section { padding: 24px 20px; }
  .tb-reporter-card { flex-direction: column; align-items: center; text-align: center; }
  .tb-reporter-actions { justify-content: center; }
}
