/* ConstructNav v0.18.0 — reviewed drawing-to-procurement extraction */
.cn-extraction-dialog {
  width: min(1480px, 96vw);
  max-width: none;
  height: min(900px, 94vh);
  max-height: 94vh;
  padding: 0;
  overflow: hidden;
}

.cn-extraction-dialog::backdrop {
  background: rgba(12, 25, 32, .66);
}

.cn-extraction-dialog-head {
  align-items: flex-start;
}

.cn-extraction-dialog-head strong,
.cn-extraction-dialog-head small {
  display: block;
}

.cn-extraction-dialog-head small {
  margin-top: 4px;
  color: var(--muted, #65727a);
}

.cn-extraction-dialog-body {
  height: calc(100% - 126px);
  overflow: auto;
}

.cn-extraction-source {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(160px, auto);
  gap: 10px 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #d8e0e4;
  border-radius: 10px;
  background: #f7f9fa;
}

.cn-extraction-source p {
  margin: 4px 0 0;
  color: var(--muted, #65727a);
}

.cn-extraction-file {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.cn-extraction-file input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.cn-extraction-source-actions {
  display: flex;
  gap: 8px;
  grid-column: 1 / -1;
  flex-wrap: wrap;
}

.cn-extraction-safety {
  grid-column: 1 / -1;
  padding-top: 8px;
  border-top: 1px solid #d8e0e4;
  font-size: 12px;
}

.cn-extraction-status {
  min-height: 24px;
  margin: 12px 0;
  color: #2f6579;
  font-weight: 600;
}

.cn-extraction-status.is-error {
  color: #9f2d25;
}

.cn-extraction-review header h3,
.cn-extraction-review header p {
  margin: 0 0 6px;
}

.cn-extraction-conflicts {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid #e4b56d;
  border-radius: 8px;
  background: #fff8e9;
}

.cn-extraction-review .table-wrap {
  overflow: auto;
  border: 1px solid #d8e0e4;
  border-radius: 8px;
}

.cn-extraction-review table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.cn-extraction-review th,
.cn-extraction-review td {
  padding: 9px;
  border-bottom: 1px solid #e1e6e9;
  text-align: left;
  vertical-align: top;
}

.cn-extraction-review th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #edf2f4;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.cn-extraction-review input,
.cn-extraction-review select {
  width: 100%;
  min-width: 100px;
}

.cn-extraction-review td:nth-child(3) input + input {
  margin-top: 6px;
}

.cn-extraction-review small {
  display: block;
  margin-top: 5px;
  color: var(--muted, #65727a);
  line-height: 1.35;
}

.cn-extraction-dialog-foot {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cn-extraction-dialog-foot [data-cn-extraction-progress] {
  margin-right: auto;
  color: var(--muted, #65727a);
  font-size: 12px;
}

@media (max-width: 760px) {
  .cn-extraction-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .cn-extraction-source {
    grid-template-columns: 1fr;
  }

  .cn-extraction-source-actions,
  .cn-extraction-safety {
    grid-column: 1;
  }

  .cn-extraction-dialog-foot {
    flex-wrap: wrap;
  }

  .cn-extraction-dialog-foot [data-cn-extraction-progress] {
    width: 100%;
  }
}
