/* AlertGrid Object History Force Fix v3 */

.ag-object-history-force-overlay {
  position: fixed;
  inset: 0;
  z-index: 16000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, .42);
}

.ag-object-history-force-overlay.active {
  display: flex;
}

.ag-object-history-force-card {
  position: relative;
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 70px);
  overflow: auto;
  padding: 22px;
  border-radius: 18px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .38);
}

.ag-object-history-force-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}

.ag-history-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.ag-history-title-row h2 {
  margin: 0 0 6px 0;
  font-size: 22px;
  font-weight: 900;
}

.ag-history-title-row h3 {
  margin: 0;
  font-size: 18px;
  color: #334155;
}

.ag-history-title-row span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  font-weight: 900;
}

.ag-history-object-info-force {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 14px;
}

.ag-history-force-list {
  display: grid;
  gap: 8px;
}

.ag-history-force-row {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.ag-history-force-row b {
  display: block;
  font-size: 15px;
}

.ag-history-force-row span {
  display: block;
  color: #475569;
  margin-top: 4px;
}

.ag-history-force-row small {
  color: #64748b;
  text-align: right;
}

.ag-history-force-empty {
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  color: #64748b;
  background: #f8fafc;
}

.ag-sev-critical,
.ag-sev-alarm {
  border-color: #fecaca;
  background: #fff1f2;
}

.ag-sev-warning {
  border-color: #fde68a;
  background: #fffbeb;
}

@media (max-width: 720px) {
  .ag-history-object-info-force,
  .ag-history-force-row {
    grid-template-columns: 1fr;
  }

  .ag-history-force-row small {
    text-align: left;
  }
}
