/* YasGod per-item analytics splash (photos + videos) */
.yg-ia-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(6, 10, 18, 0.72);
  backdrop-filter: blur(4px);
}
.yg-ia-modal {
  width: min(720px, 100%);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #111827;
  color: #f3f4f6;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}
.yg-ia-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.yg-ia-head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
}
.yg-ia-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #9ca3af;
}
.yg-ia-close {
  border: 0;
  background: transparent;
  color: #e5e7eb;
  font-size: 18px;
  cursor: pointer;
  border-radius: 999px;
  padding: 6px 10px;
}
.yg-ia-close:hover { background: rgba(255,255,255,0.08); }
.yg-ia-body {
  overflow: auto;
  padding: 16px 18px 22px;
}
.yg-ia-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 640px) {
  .yg-ia-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .yg-ia-grid-3 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.yg-ia-stat {
  border-radius: 16px;
  background: #1f2937;
  padding: 14px;
}
.yg-ia-stat.bordered {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.yg-ia-stat b {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
}
.yg-ia-stat span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: #9ca3af;
}
.yg-ia-stat small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #6b7280;
  font-weight: 400;
}
.yg-ia-chart {
  margin-top: 16px;
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.18), transparent);
}
.yg-ia-chart-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 8px;
}
.yg-ia-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 112px;
}
.yg-ia-bar-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.yg-ia-bar-col i {
  display: block;
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: rgba(34, 211, 238, 0.75);
  min-height: 6%;
}
.yg-ia-bar-col em,
.yg-ia-xlabels span {
  font-style: normal;
  font-size: 9px;
  color: #9ca3af;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yg-ia-xlabels {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.yg-ia-xlabels span { flex: 1; text-align: center; }
.yg-ia-section { margin-top: 18px; }
.yg-ia-section h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
}
.yg-ia-section .hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: #9ca3af;
}
#yg-ia-map {
  height: 300px;
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0b1220;
  z-index: 1;
}
.yg-ia-selected {
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1f2937;
  padding: 10px 12px;
  font-size: 13px;
}
.yg-ia-list {
  max-height: 260px;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.yg-ia-row {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: inherit;
  padding: 10px 12px;
  cursor: pointer;
}
.yg-ia-row:last-child { border-bottom: 0; }
.yg-ia-row:hover,
.yg-ia-row.active { background: rgba(34, 211, 238, 0.1); }
.yg-ia-ipbadge {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #374151;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.yg-ia-row strong { display: block; font-size: 13px; }
.yg-ia-row .meta {
  font-size: 12px;
  color: #9ca3af;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.yg-ia-row .tag { font-size: 12px; color: #9ca3af; }
.yg-ia-analytics-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  border: 0;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  color: #061018;
  background: rgba(34, 211, 238, 0.92);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  display: none;
}
body.yg-gallery-owner .yg-ia-analytics-btn,
body.yg-disaster-owner .yg-ia-analytics-btn,
body.yg-is-owner .yg-ia-analytics-btn {
  display: inline-flex;
}
.yg-photo-card,
.yg-disaster-card {
  position: relative;
}
.yg-ia-empty { color: #9ca3af; font-size: 14px; padding: 8px 0; }
.yg-ia-err { color: #f87171; font-size: 13px; margin-bottom: 8px; }
