@import url("/layout-module/css/keywords.css");

.test-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: 20px 0;
  padding: 14px;
  border: 1px solid rgba(28, 37, 43, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.test-progress-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  max-width: 100%;
  margin: 8px 0 12px;
}

.test-processing-timer,
.test-current-document {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(28, 37, 43, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: rgba(28, 37, 43, 0.76);
  font-size: 0.86rem;
  font-weight: 800;
}

.test-processing-timer strong,
.test-current-document strong {
  color: #111820;
}

.test-current-document {
  flex: 1 1 340px;
  min-width: 220px;
  width: auto;
  justify-content: flex-start;
}

.test-current-document strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.test-external-lookup-status {
  width: fit-content;
  max-width: 100%;
  margin: -4px 0 12px;
  padding: 5px 9px;
  border: 1px solid rgba(31, 93, 71, 0.24);
  border-radius: 8px;
  background: rgba(238, 248, 241, 0.82);
  color: #174533;
  font-size: 0.86rem;
  font-weight: 800;
}

.test-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(28, 37, 43, 0.16);
  border-top-color: #111820;
  border-radius: 50%;
}

.test-processing-timer.is-running .test-spinner {
  animation: test-spin 0.8s linear infinite;
}

.test-processing-timer.is-done .test-spinner {
  border-color: #5ca66c;
  border-top-color: #5ca66c;
}

@keyframes test-spin {
  to {
    transform: rotate(360deg);
  }
}

.test-field,
.test-fieldset {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.test-field-wide {
  min-width: 0;
}

.test-form select {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(28, 37, 43, 0.14);
  border-radius: 8px;
  background: #fff;
}

.test-fieldset {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(28, 37, 43, 0.12);
  border-radius: 8px;
}

.test-fieldset legend {
  padding: 0 4px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.test-fieldset label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 10px;
  font-size: 0.86rem;
}

.test-fieldset input[type="checkbox"],
.test-fieldset input[type="radio"] {
  width: 13px;
  height: 13px;
  min-width: 13px;
  min-height: 13px;
  margin: 0;
  padding: 0;
  flex: 0 0 13px;
}

.test-slot-fieldset {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, max-content));
  gap: 10px 18px;
  align-items: center;
}

.test-slot-fieldset legend {
  width: 100%;
  grid-column: 1 / -1;
}

.test-slot-option {
  min-height: 18px;
  margin-right: 0;
  white-space: nowrap;
}

.test-confidence-filter {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto repeat(4, max-content);
  align-items: center;
  gap: 8px 14px;
  min-height: 22px;
  padding-top: 4px;
  border-top: 1px solid rgba(28, 37, 43, 0.08);
}

.test-confidence-filter > span {
  font-size: 0.78rem;
  font-weight: 900;
  color: rgba(28, 37, 43, 0.68);
}

.test-confidence-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 18px;
  margin-right: 0;
  white-space: nowrap;
}

.test-conf-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(28, 37, 43, 0.14);
}

.test-conf-dot.test-conf-high {
  background: #bfe8ca;
  border-color: #5ca66c;
}

.test-conf-dot.test-conf-medium {
  background: #f2b66f;
  border-color: #c47b22;
}

.test-conf-dot.test-conf-low {
  background: #f4df7e;
  border-color: #c2a82d;
}

.test-conf-dot.test-conf-critical {
  background: #e56f68;
  border-color: #b93b35;
}

.test-form button {
  min-height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.test-results-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(28, 37, 43, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.test-results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.test-results-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.test-results-head span,
.test-meta-row {
  color: rgba(28, 37, 43, 0.68);
  font-size: 0.86rem;
}

.test-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.test-table-wrap {
  overflow: auto;
}

.test-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.test-table th,
.test-table td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(28, 37, 43, 0.10);
  text-align: left;
  vertical-align: top;
}

.test-table th {
  position: sticky;
  top: 0;
  background: #fff;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.test-pdf-group-row th {
  position: static;
  padding: 10px 12px;
  border-top: 2px solid rgba(28, 37, 43, 0.20);
  border-bottom: 1px solid rgba(28, 37, 43, 0.14);
  background: #e7eaed;
  color: #111820;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.test-pdf-group-row {
  cursor: pointer;
}

.test-pdf-group-row:hover th,
.test-pdf-group-row:focus th {
  background: #d6dbe0;
  color: #05090d;
}

.test-conf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid rgba(28, 37, 43, 0.10);
  font-weight: 800;
  color: #182026;
}

.test-conf-high {
  background: #bfe8ca;
  border-color: #5ca66c;
}

.test-conf-medium {
  background: #f2b66f;
  border-color: #c47b22;
}

.test-conf-low {
  background: #f4df7e;
  border-color: #c2a82d;
}

.test-conf-critical {
  background: #e56f68;
  border-color: #b93b35;
  color: #fff;
}

.test-empty-cell {
  color: rgba(28, 37, 43, 0.58);
  text-align: center;
}

.test-th-valid {
  width: 28px;
  min-width: 28px;
  padding: 7px 4px;
}

.test-addr-valid-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #5ca66c;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.test-error {
  padding: 10px 12px;
  border: 1px solid rgba(184, 67, 56, 0.26);
  border-radius: 8px;
  background: rgba(184, 67, 56, 0.10);
  color: #8f2418;
  font-weight: 800;
}

@media (max-width: 900px) {
  .test-progress-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .test-current-document {
    width: 100%;
  }

  .test-form {
    grid-template-columns: 1fr;
  }

  .test-slot-fieldset {
    grid-column: auto;
  }
}
