/* public/css/incident.css
   ★ Phase M-5: 사건 앨범 + 상세 + 제보 모달 스타일 */

/* ===== 사건 앨범 그리드 ===== */
.incident-album {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 30px;
}

.incident-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  cursor: pointer;
}

.incident-card:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(122, 31, 43, 0.12);
  transform: translateY(-3px);
}

.incident-card-thumb {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #3a0d14, #7a1f2b);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.incident-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.incident-card-thumb .placeholder {
  font-size: 60px;
  color: rgba(255, 255, 255, 0.6);
}

.incident-card-thumb .category-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  backdrop-filter: blur(4px);
}

.incident-card-body {
  padding: 18px 20px;
}

.incident-card-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.4;
}

.incident-card-summary {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
  min-height: 44px;
}

.incident-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-3);
}

.incident-card-meta .date {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

.incident-card-meta .more {
  color: var(--brand);
  font-weight: 600;
}

/* ===== 사건 상세 ===== */
.incident-detail-hero {
  background: linear-gradient(135deg, #1f0608 0%, #3a0d14 50%, #5a141d 100%);
  color: #fff;
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}

.incident-detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(184, 147, 90, 0.1) 0%, transparent 50%);
}

.incident-detail-hero .container { position: relative; z-index: 2; }

.incident-detail-hero .eyebrow {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(184, 147, 90, 0.2);
  color: #d4b888;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.incident-detail-hero h1 {
  font-family: 'Noto Serif KR', serif;
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 14px;
  line-height: 1.3;
}

.incident-detail-hero .meta-line {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.incident-detail-hero .meta-line span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.incident-content-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 36px 42px;
  margin: -30px auto 30px;
  max-width: 880px;
  position: relative;
  z-index: 3;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.incident-content-wrap h2,
.incident-content-wrap h3 {
  font-family: 'Noto Serif KR', serif;
  color: var(--brand);
  margin-top: 1.5em;
  margin-bottom: 0.6em;
}
.incident-content-wrap h2 { font-size: 22px; }
.incident-content-wrap h3 { font-size: 18px; }
.incident-content-wrap p {
  font-size: 15px;
  color: var(--text-1, #2a2a2a);
  line-height: 1.85;
  margin-bottom: 1em;
}
.incident-content-wrap ul,
.incident-content-wrap ol {
  margin: 1em 0 1em 1.5em;
  color: var(--text-1, #2a2a2a);
}
.incident-content-wrap ul li,
.incident-content-wrap ol li {
  margin-bottom: 0.5em;
  line-height: 1.85;
}
.incident-content-wrap blockquote {
  border-left: 4px solid var(--brand);
  background: #f9fafb;
  padding: 14px 20px;
  margin: 1.5em 0;
  color: var(--text-2);
  font-style: italic;
}
.incident-content-wrap img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1em 0;
}

.incident-cta-box {
  background: linear-gradient(135deg, #fef9f5 0%, #fff 100%);
  border: 2px solid var(--brand);
  border-radius: 12px;
  padding: 28px 32px;
  margin-top: 30px;
  text-align: center;
}

.incident-cta-box h3 {
  font-family: 'Noto Serif KR', serif;
  font-size: 20px;
  color: var(--brand);
  margin: 0 0 8px;
}

.incident-cta-box p {
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.7;
  margin: 0 0 18px;
}

.incident-cta-box .cta-btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.incident-cta-box .cta-btn:hover {
  background: #5a1620;
}

/* ===== 제보 모달 ===== */
#incidentReportModal {
  display: none !important;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  align-items: flex-start;
  justify-content: center;
  padding: 30px 16px;
  overflow-y: auto;
}
#incidentReportModal.show { display: flex !important; }

#incidentReportModal .ir-modal {
  background: #fff;
  border-radius: 12px;
  max-width: 760px;
  width: 100%;
  margin: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

#incidentReportModal .ir-header {
  padding: 18px 24px;
  background: linear-gradient(135deg, #3a0d14, #7a1f2b);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#incidentReportModal .ir-header h3 {
  margin: 0;
  font-family: 'Noto Serif KR', serif;
  font-size: 17px;
}

#incidentReportModal .ir-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}

#incidentReportModal .ir-body {
  padding: 24px 28px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

#incidentReportModal .ir-body .fg label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}

#incidentReportModal .ir-body .fg .hint {
  font-weight: 400;
  color: var(--text-3);
  font-size: 11.5px;
}

#incidentReportModal .ir-body input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  margin-bottom: 16px;
}

#incidentReportModal .ir-body input[type="text"]:focus {
  outline: none;
  border-color: var(--brand);
}

#incidentReportModal .ir-body .checkbox-line {
  margin: 14px 0;
}

#incidentReportModal .ir-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}

#incidentReportModal .ir-actions button {
  padding: 11px 24px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

#incidentReportModal .ir-actions .btn-cancel {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--line);
}

#incidentReportModal .ir-actions .btn-submit {
  background: var(--brand);
  color: #fff;
}

#incidentReportModal .ir-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== AI 분석 결과 화면 ===== */
.ir-ai-result {
  padding: 4px;
}

.ir-ai-severity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 16px;
}
.ir-ai-severity.critical { background: #fee2e2; border: 2px solid #ef4444; }
.ir-ai-severity.high { background: #ffedd5; border: 2px solid #f97316; }
.ir-ai-severity.medium { background: #fef3c7; border: 1px solid #f59e0b; }
.ir-ai-severity.low { background: #dbeafe; border: 1px solid #3b82f6; }

.ir-ai-severity .icon { font-size: 28px; }
.ir-ai-severity .label { font-size: 11px; font-weight: 600; color: var(--text-3); letter-spacing: 0.5px; margin-bottom: 2px; }
.ir-ai-severity .level { font-size: 16px; font-weight: 700; }

.ir-ai-block {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 14px;
}
.ir-ai-block .b-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ir-ai-block .b-content {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.7;
}

.ir-ai-decision {
  background: linear-gradient(135deg, #fef9f5, #fff);
  border: 2px solid var(--brand);
  border-radius: 10px;
  padding: 18px 20px;
  margin-top: 18px;
}
.ir-ai-decision h4 {
  font-family: 'Noto Serif KR', serif;
  font-size: 15px;
  color: var(--brand);
  margin: 0 0 6px;
}
.ir-ai-decision p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
  margin: 0 0 14px;
}
.ir-ai-decision .decision-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ir-ai-decision .decision-buttons button {
  flex: 1;
  min-width: 200px;
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.ir-ai-decision .btn-siren {
  background: var(--brand);
  color: #fff;
}
.ir-ai-decision .btn-siren:hover { background: #5a1620; }
.ir-ai-decision .btn-ai-only {
  background: #fff;
  color: var(--text-2);
  border: 1px solid var(--line);
}
.ir-ai-decision .btn-ai-only:hover { background: #f3f4f6; }

/* ===== 빈 상태 ===== */
.incident-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-3);
}
.incident-empty .icon {
  font-size: 48px;
  margin-bottom: 14px;
  opacity: 0.5;
}
.incident-empty .title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
}
.incident-empty .desc {
  font-size: 13px;
  line-height: 1.7;
}

/* ===== 반응형 ===== */
@media (max-width: 900px) {
  .incident-album { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .incident-album { grid-template-columns: 1fr; }
  .incident-detail-hero { padding: 40px 0; }
  .incident-detail-hero h1 { font-size: 26px; }
  .incident-content-wrap { padding: 24px; margin: -20px 16px 20px; }
  #incidentReportModal .ir-body { padding: 18px; }
  .ir-ai-decision .decision-buttons button { min-width: auto; }
}