/* ==========================================================================
   Indictment Builder — съставяне на обвинение по ЗДвП
   ========================================================================== */

.indict-disclaimer {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 auto 20px;
  max-width: 1100px;
  padding: 14px 18px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-left: 5px solid #f59e0b;
  border-radius: 8px;
  color: #78350f;
  font-size: 0.88rem;
  line-height: 1.5;
}

.indict-disclaimer svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #d97706;
}

.indict-grid-section {
  padding: 0 0 var(--space-3xl) !important;
}

/* ---- Step card ---- */
.indict-step {
  margin-bottom: 24px;
  padding: 24px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.indict-step__head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed #e5e7eb;
}

.indict-step__num {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-accent-gold, #c9a961), #b8944a);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(201, 169, 97, 0.4);
}

.indict-step__head h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1d1729;
}

.indict-step__head p {
  margin: 0;
  font-size: 0.88rem;
  color: #6b7280;
}

/* ---- Step 1: Input textareas ---- */
.indict-fields {
  display: grid;
  gap: 14px;
}

.indict-field label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.92rem;
  color: #1f2937;
}

.indict-field__icon {
  font-size: 1.1rem;
}

.indict-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.55;
  resize: vertical;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.indict-field textarea:focus {
  outline: none;
  border-color: var(--color-accent-gold, #c9a961);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.15);
}

/* ---- Step 2: Checkboxes ---- */
.indict-checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.indict-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.indict-check:hover {
  background: #fff;
  border-color: var(--color-accent-gold, #c9a961);
}

.indict-check input {
  accent-color: var(--color-accent-gold, #c9a961);
  cursor: pointer;
}

.indict-check input:checked + span {
  color: #1d1729;
  font-weight: 600;
}

.indict-check:has(input:checked) {
  background: #fff8e6;
  border-color: var(--color-accent-gold, #c9a961);
}

/* ---- Step 3: Articles ---- */
.indict-articles {
  display: grid;
  gap: 10px;
}

.indict-article {
  padding: 12px 14px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-left-width: 4px;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.indict-article--zdvp { border-left-color: #3b82f6; }
.indict-article--nk { border-left-color: #dc2626; }

.indict-article__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.indict-article__head strong {
  font-size: 0.92rem;
  color: #1d1729;
  font-family: 'JetBrains Mono', Menlo, Consolas, monospace;
}

.indict-article__badge {
  padding: 2px 8px;
  background: #3b82f6;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 10px;
  letter-spacing: 0.04em;
}

.indict-article--nk .indict-article__badge { background: #dc2626; }

.indict-article__score {
  font-size: 0.7rem;
  color: #6b7280;
  background: #fff;
  padding: 2px 6px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
}

.indict-article__toggle {
  margin-left: auto;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 0.78rem;
  color: #4b5563;
  cursor: pointer;
}

.indict-article__toggle input { accent-color: var(--color-accent-gold, #c9a961); }

.indict-article__text {
  color: #374151;
  padding-left: 2px;
}

/* ---- Step 4: Output ---- */
.indict-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.btn-secondary {
  background: #fff;
  color: #374151;
  border: 1.5px solid #e5e7eb;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-secondary:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #9ca3af;
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.indict-output {
  padding: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  min-height: 100px;
}

.indict-output__pre {
  margin: 0;
  font-family: 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: #1f2937;
}

.indict-empty {
  margin: 0;
  text-align: center;
  color: #9ca3af;
  font-size: 0.88rem;
  padding: 20px;
}

/* ---- Mobile ---- */
@media (max-width: 640px) {
  .indict-step { padding: 16px; }
  .indict-step__num { width: 32px; height: 32px; font-size: 1rem; }
  .indict-checks { grid-template-columns: 1fr 1fr; }
}
