/* Contract-check specific styles */

/* Compact drop zone after a file is selected (still allows replacing) */
.drop-zone.compact {
  padding: 16px 24px;
}
.drop-zone.compact .drop-icon,
.drop-zone.compact .drop-text,
.drop-zone.compact .drop-or,
.drop-zone.compact .drop-formats {
  display: none;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  margin: 12px 0 24px;
  background: var(--card);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-primary);
  position: sticky;
  top: 64px;       /* sits just below the sticky header */
  z-index: 10;
  box-shadow: var(--shadow-card);
}
.file-info svg { color: var(--primary); flex-shrink: 0; }
.file-info-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.file-info-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-info-hint {
  font-size: 12px;
  color: var(--text-tertiary);
}
.file-info .btn-link { flex-shrink: 0; }
.file-info .btn { flex-shrink: 0; }

@media (max-width: 640px) {
  .file-info { flex-wrap: wrap; }
  .file-info-text { flex-basis: 100%; }
}
.btn-link {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}
.btn-link:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }

.run-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border-default);
  flex-wrap: wrap;
}
.btn-lg {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
}
.run-hint {
  font-size: 13px;
  color: var(--text-tertiary);
}


.checklist-panel {
  background: var(--card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 24px;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}
.panel-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.panel-actions { display: flex; gap: 6px; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

.checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  margin-bottom: 14px;
}
@media (max-width: 720px) {
  .checklist { grid-template-columns: 1fr; }
}
.checklist-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}
.checklist-item:hover { background: var(--bg-tertiary); }
.checklist-item input[type=checkbox] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}
.checklist-item-body { flex: 1; min-width: 0; }
.checklist-item-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.35;
}
.checklist-item-hint {
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-top: 2px;
  line-height: 1.4;
}
.checklist-item.custom .checklist-item-label::after {
  content: " vlastní";
  font-size: 10px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 6px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.checklist-remove {
  background: transparent;
  border: none;
  color: var(--text-quaternary);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  align-self: center;
}
.checklist-remove:hover { color: #dc2626; }

.add-item-row {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border-default);
  padding-top: 14px;
}
.add-item-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-default);
  background: var(--bg-primary);
  color: var(--text-primary);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
}
.add-item-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.processing-sub {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 8px auto 0;
  max-width: 480px;
}

/* Results */
.overall-card {
  background: var(--card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin: 16px 0 22px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.risk-badge {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.risk-low    { background: rgba(34, 197, 94, 0.12); color: #15803d; }
.risk-medium { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.risk-high   { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
.overall-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}
.ocr-notice {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid #f59e0b;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.findings {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.finding {
  background: var(--card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  border-left: 4px solid var(--border-default);
}
.finding.status-ok      { border-left-color: #22c55e; }
.finding.status-warning { border-left-color: #f59e0b; }
.finding.status-problem { border-left-color: #ef4444; }
.finding.status-missing { border-left-color: #94a3b8; }

.finding-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.finding-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}
.status-ok .finding-status      { background: rgba(34,197,94,0.14); color: #15803d; }
.status-warning .finding-status { background: rgba(245,158,11,0.16); color: #b45309; }
.status-problem .finding-status { background: rgba(239,68,68,0.14); color: #b91c1c; }
.status-missing .finding-status { background: rgba(148,163,184,0.20); color: #475569; }

.finding-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.finding-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 4px 0 0;
}
.finding-excerpts {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.excerpt {
  font-size: 12.5px;
  background: var(--bg-tertiary);
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid var(--border-strong);
}
.excerpt-text {
  color: var(--text-primary);
  font-style: italic;
}
.excerpt-comment {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-tertiary);
}
.excerpt-page {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
  border-radius: 999px;
  font-style: normal;
  vertical-align: 1px;
}

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 10px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--text-tertiary);
  text-decoration: none; border: 0.5px solid var(--border-default);
  background: var(--bg-primary); flex-shrink: 0;
  transition: color .15s, border-color .15s, background .15s;
}
.back-link:hover {
  color: var(--primary); border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, var(--bg-primary));
}
.back-link svg { opacity: 0.8; }
@media (max-width: 640px) {
  .back-link span { display: none; }
  .back-link { padding: 6px; }
}
