/* RENGANURA_DOCUMENTS_EVIDENCE_OPENAI_V1 */

.rg-evidence-ai {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid #b8cff1;
  border-radius: 16px;
  background: linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
  box-shadow: 0 12px 28px rgba(22, 69, 126, 0.08);
}

.rg-evidence-ai__header,
.rg-evidence-ai__panel-heading,
.rg-evidence-ai__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.rg-evidence-ai__header {
  align-items: flex-start;
  margin-bottom: 20px;
}

.rg-evidence-ai__header h3,
.rg-evidence-ai__panel h4 {
  margin: 0;
}

.rg-evidence-ai__header p {
  margin: 7px 0 0;
  max-width: 760px;
}

.rg-evidence-ai__eyebrow {
  color: #17549a;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rg-evidence-ai__health {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid #b9c9df;
  border-radius: 999px;
  background: #ffffff;
  color: #43566f;
  font-size: 0.82rem;
  font-weight: 700;
}

.rg-evidence-ai__health.is-ready {
  border-color: #80bc97;
  background: #edf9f1;
  color: #176236;
}

.rg-evidence-ai__health.is-error {
  border-color: #dc9c9c;
  background: #fff0f0;
  color: #982f2f;
}

.rg-evidence-ai__matter {
  margin-bottom: 18px;
}

.rg-evidence-ai__matter label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
}

.rg-evidence-ai__matter input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #9db6d6;
  border-radius: 9px;
  background: #ffffff;
}

.rg-evidence-ai__matter small {
  display: block;
  margin-top: 6px;
  color: #586a81;
}

.rg-evidence-ai__upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.rg-evidence-ai__drop {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 116px;
  padding: 22px;
  border: 2px dashed #7da4d5;
  border-radius: 13px;
  background: #ffffff;
  cursor: pointer;
}

.rg-evidence-ai__drop:hover {
  border-color: #245fa8;
  background: #f7fbff;
}

.rg-evidence-ai__drop input {
  margin-top: 10px;
}

.rg-evidence-ai__actions {
  flex-direction: column;
  align-items: stretch;
}

.rg-evidence-ai button {
  min-height: 42px;
  padding: 9px 15px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.rg-evidence-ai button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.rg-evidence-ai__primary {
  border: 1px solid #174f92;
  background: #174f92;
  color: #ffffff;
}

.rg-evidence-ai__secondary {
  border: 1px solid #7f9fc5;
  background: #ffffff;
  color: #174f92;
}

.rg-evidence-ai__danger {
  border: 1px solid #c76f6f;
  background: #fff3f3;
  color: #8b2828;
}

.rg-evidence-ai__status {
  min-height: 24px;
  margin: 15px 0;
  color: #34485f;
  font-weight: 650;
}

.rg-evidence-ai__status.is-error {
  color: #9a2929;
}

.rg-evidence-ai__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.rg-evidence-ai__panel {
  min-width: 0;
  padding: 17px;
  border: 1px solid #c8d8ec;
  border-radius: 12px;
  background: #ffffff;
}

.rg-evidence-ai__panel-heading {
  margin-bottom: 13px;
}

.rg-evidence-ai__panel-heading span {
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e7f0fb;
  color: #174f92;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
}

.rg-evidence-ai__item {
  padding: 14px 0;
  border-top: 1px solid #e2eaf4;
}

.rg-evidence-ai__item:first-child {
  border-top: 0;
}

.rg-evidence-ai__item-title {
  margin: 0 0 5px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.rg-evidence-ai__meta {
  margin: 0 0 9px;
  color: #5a6b80;
  font-size: 0.84rem;
}

.rg-evidence-ai__item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rg-evidence-ai__item-actions button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.82rem;
}

.rg-evidence-ai__finding-text,
.rg-evidence-ai__fact-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.rg-evidence-ai__facts {
  margin-top: 18px;
}

.rg-evidence-ai__empty {
  margin: 0;
  color: #68798d;
  font-style: italic;
}

.rg-evidence-ai__notice {
  margin: 17px 0 0;
  color: #52667d;
  font-size: 0.84rem;
}

@media (max-width: 860px) {
  .rg-evidence-ai__header,
  .rg-evidence-ai__upload {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .rg-evidence-ai__grid {
    grid-template-columns: 1fr;
  }

  .rg-evidence-ai__health {
    align-self: flex-start;
  }
}

/* RENGANURA_LEGACY_DOCUMENT_REFERENCE_RETIREMENT_V1 */

/*
 * The former metadata-only document reference form is retired.
 * Evidence documents are now managed through the unified upload,
 * analysis, findings and confirmation workflow.
 */

#documents label[for="document-name"],
#documents label[for="document-type"],
#documents label[for="document-purpose"],
#documents label:has(#document-name),
#documents label:has(#document-type),
#documents label:has(#document-purpose),
#documents #document-name,
#documents #document-type,
#documents #document-purpose,
#documents #saved-documents {
  display: none !important;
}
