/**
 * 管理画面 ご意見箱タブ スタイル
 */

/* ========================================
   セクションヘッダー
   ======================================== */
.feedback-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.feedback-section .section-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.feedback-section .section-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--admin-text);
}

/* フィルター */
.feedback-section .filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* フィルターラジオボタングループ */
.feedback-section .filter-radio-group {
  display: flex;
  gap: 0.25rem;
}

.feedback-section .filter-radio-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--admin-text);
  background: #ffffff;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.feedback-section .filter-radio-label:hover {
  border-color: var(--admin-primary);
  background: #f0f7ff;
}

.feedback-section .filter-radio-label:has(input:checked) {
  border-color: var(--admin-primary);
  background: #eff6ff;
  color: var(--admin-primary);
}

.feedback-section .filter-radio-label input[type='radio'] {
  display: none;
}

/* フィルターチェックボックス */
.feedback-section .filter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--admin-text);
  cursor: pointer;
}

.feedback-section .filter-checkbox-label input[type='checkbox'] {
  width: 16px;
  height: 16px;
  accent-color: var(--admin-primary);
  cursor: pointer;
}

/* ========================================
   テーブル
   ======================================== */
.feedback-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.feedback-table th,
.feedback-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--admin-border);
}

.feedback-table th {
  background: var(--admin-bg);
  font-weight: 600;
  color: var(--admin-text);
  white-space: nowrap;
}

.feedback-table tbody tr:hover {
  background: #f9fafb;
}

/* ID列 */
.feedback-table td:first-child {
  font-weight: 500;
  color: var(--admin-text-muted);
}

/* カテゴリバッジ */
.feedback-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.feedback-category-badge.bug {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.feedback-category-badge.feature {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.feedback-category-badge.other {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #d1d5db;
}

/* コメントプレビュー */
.feedback-comment-preview {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--admin-text);
}

/* コンテキスト情報 */
.feedback-context {
  font-size: 0.75rem;
  color: var(--admin-text-muted);
}

.feedback-context-item {
  display: block;
}

/* 日時 */
.feedback-datetime {
  font-size: 0.75rem;
  color: var(--admin-text-muted);
  white-space: nowrap;
}

/* 操作ボタン */
.feedback-table .btn-view {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--admin-primary);
  background: transparent;
  color: var(--admin-primary);
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.feedback-table .btn-view:hover {
  background: var(--admin-primary);
  color: #ffffff;
}

/* ステータストグルボタン */
.feedback-table .btn-status-toggle {
  padding: 0.375rem 0.75rem;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #6b7280;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.feedback-table .btn-status-toggle:hover {
  border-color: #9ca3af;
  background: #f3f4f6;
}

.feedback-table .btn-status-toggle.processed {
  background: #dcfce7;
  border-color: #86efac;
  color: #16a34a;
}

.feedback-table .btn-status-toggle.processed:hover {
  background: #bbf7d0;
  border-color: #4ade80;
}

/* 処理済み行の背景 */
.feedback-table tbody tr.processed {
  background: #f3f4f6;
}

.feedback-table tbody tr.processed:hover {
  background: #e5e7eb;
}

/* ========================================
   詳細モーダル
   ======================================== */
#feedback-detail-modal .modal-content {
  max-width: 600px;
}

.feedback-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-border);
}

.feedback-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.feedback-detail-user {
  font-weight: 600;
  font-size: 1rem;
  color: var(--admin-text);
}

.feedback-detail-date {
  font-size: 0.875rem;
  color: var(--admin-text-muted);
}

.feedback-detail-context {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #f3f4f6;
  border-radius: 6px;
}

.feedback-detail-context-item {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.feedback-detail-context-item:last-child {
  margin-bottom: 0;
}

.feedback-detail-context-label {
  color: var(--admin-text-muted);
  min-width: 80px;
}

.feedback-detail-context-value {
  color: var(--admin-text);
  font-weight: 500;
}

.feedback-detail-comment {
  padding: 1rem;
  background: #ffffff;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.6;
  color: var(--admin-text);
  max-height: 300px;
  overflow-y: auto;
}

/* 空状態 */
.feedback-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--admin-text-muted);
}

.feedback-empty-text {
  font-size: 1rem;
}

/* ローディング */
.feedback-table .loading {
  text-align: center;
  padding: 2rem;
  color: var(--admin-text-muted);
}

/* ========================================
   未読バッジ（タブ用）
   ======================================== */
.unread-badge {
  display: none;
  margin-left: 0.375rem;
  padding: 0.125rem 0.375rem;
  min-width: 1.25rem;
  height: 1.25rem;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 9999px;
  line-height: 1;
  text-align: center;
  vertical-align: middle;
}

.unread-badge.show {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ========================================
   未読行スタイル
   ======================================== */
/* 未読行のハイライト */
.feedback-table tbody tr.unread {
  background: #fefce8;
}

.feedback-table tbody tr.unread:hover {
  background: #fef9c3;
}

/* 未読ドット（ID列） */
.unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 0.375rem;
  background: #ef4444;
  border-radius: 50%;
  vertical-align: middle;
}

/* 未読行のIDを太字に */
.feedback-table tbody tr.unread td:first-child {
  font-weight: 600;
  color: var(--admin-text);
}
