/* -----------------------------------------------------
      GLOBAL WRAPPER
------------------------------------------------------ */
#blade-scanner {
  max-width: 950px;
  margin: 0 auto;
  padding: 20px;
  font-family: "Inter", Arial, sans-serif;
  color: #1e293b;
}

/* Title */
.scanner-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 25px;
  color: #0f172a;
}
.scanner-title i {
  color: #2563eb;
  margin-right: 8px;
}

/* -----------------------------------------------------
      UPLOAD ZONE
------------------------------------------------------ */
#blade-upload-zone {
  border: 2px dashed #2563eb;
  padding: 25px;
  text-align: center;
  margin-bottom: 18px;
  border-radius: 10px;
  background: #eff6ff;
  transition: all 0.25s;
}
#blade-upload-zone:hover {
  background: #dbeafe;
  border-color: #1d4ed8;
}
#blade-upload-zone.drag-active {
  background: #bfdbfe;
  border-color: #1e40af;
  transform: scale(1.015);
}

.upload-icon {
  font-size: 30px;
  color: #1d4ed8;
}
.upload-text {
  margin: 8px 0 20px;
  font-size: 15px;
  color: #475569;
}

.upload-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* -----------------------------------------------------
      BUTTONS
------------------------------------------------------ */
.btn-primary,
.btn-secondary,
.btn-scan,
.btn-small,
.hire-btn,
.limit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: none;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  transition: all .25s ease;
  text-decoration: none;
}

/* Upload main button */
.btn-primary {
  background: #2563eb;
  color: white;
}
.btn-primary:hover {
  background: #1e40af;
}

/* Paste button */
.btn-secondary {
  background: #64748b;
  color: white;
}
.btn-secondary:hover {
  background: #475569;
}

/* Scan button */
.btn-scan {
  width: 100%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  font-size: 17px;
  padding: 14px;
  margin-bottom: 8px;
}
.btn-scan:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

/* Small buttons */
.btn-small {
  background: #334155;
  color: white;
  padding: 8px 14px;
}
.btn-small:hover {
  background: #1e293b;
}

/* Hire button */
.hire-btn {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
  padding: 14px 28px;
  font-size: 18px;
}
.hire-btn:hover {
  background: linear-gradient(135deg, #b91c1c, #7f1d1d);
}

/* Limit CTA button */
.limit-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  margin-top: 12px;
  font-size: 16px;
  padding: 12px 24px;
  border-radius: 8px;
}
.limit-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
}

/* -----------------------------------------------------
      TEXTAREA
------------------------------------------------------ */
#blade-input {
  width: 100%;
  min-height: 200px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  outline: none;
  resize: vertical;
  font-size: 15px;
  transition: all .2s;
}
#blade-input:focus {
  border-color: #2563eb;
  background: #f8fafc;
}

/* Locked state */
.textarea-locked {
  background: #f1f5f9 !important;
  cursor: not-allowed !important;
  border-color: #94a3b8;
}

/* -----------------------------------------------------
      STATUS
------------------------------------------------------ */
#blade-status {
  margin: 12px 0;
  font-style: italic;
  color: #475569;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #93c5fd;
  border-top: 3px solid #2563eb;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* -----------------------------------------------------
      CARDS
------------------------------------------------------ */
.card {
  background: white;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 18px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(15,23,42,.05);
}

.card h3 {
  margin-top: 0;
  font-size: 19px;
  font-weight: 600;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card h3 i {
  color: #2563eb;
}

/* -----------------------------------------------------
      TRIPLE BOX
------------------------------------------------------ */
.triple-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.triple-item {
  flex: 1;
  padding: 15px;
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
  border: 1px solid #e2e8f0;
}
.score-icon {
  font-size: 30px;
  color: #2563eb;
}
.score-badge {
  font-size: 18px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-block;
  margin-top: 8px;
  background: #e2e8f0;
  color: #0f172a;
}

/* -----------------------------------------------------
      SCROLL BOXES
------------------------------------------------------ */
.scroll-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  max-height: 220px;
  overflow-y: auto;
  font-size: 14px;
}
.scroll-box::-webkit-scrollbar {
  width: 8px;
}
.scroll-box::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.scroll-box::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* -----------------------------------------------------
      AI BADGES
------------------------------------------------------ */
.ai-badge {
  padding: 6px 10px;
  font-weight: 700;
  border-radius: 6px;
  color: white;
}
.ai-safe {
  background: #10b981;
}
.ai-warning {
  background: #f59e0b;
}
.ai-danger {
  background: #ef4444;
}

/* -----------------------------------------------------
      FLAGGED ITEMS
------------------------------------------------------ */
.flag-term {
  background: #fef3c7;
  padding: 4px 6px;
  border-radius: 6px;
  color: #92400e;
}
.flag-punct {
  background: #fee2e2;
  padding: 4px 6px;
  border-radius: 6px;
  color: #991b1b;
}

/* -----------------------------------------------------
      SENTENCE RISK TABLE
------------------------------------------------------ */
#blade-sentence-risk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
#blade-sentence-risk-table th,
#blade-sentence-risk-table td {
  padding: 10px;
  border-bottom: 1px solid #e2e8f0;
}
#blade-sentence-risk-table th {
  background: #f1f5f9;
  font-weight: 700;
}

.risk-badge {
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 700;
}
.risk-low {
  background: #bbf7d0;
  color: #166534;
}
.risk-mid {
  background: #fef9c3;
  color: #854d0e;
}
.risk-high {
  background: #fecaca;
  color: #991b1b;
}

/* -----------------------------------------------------
      HIRE EDITOR CTA CARD
------------------------------------------------------ */
.hire-card {
  text-align: center;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1px solid #fdba74;
  padding: 25px;
  border-radius: 14px;
  margin-top: 30px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.hire-card h3 i {
  color: #dc2626;
}
.hire-card p {
  font-size: 15px;
  color: #7c2d12;
  margin-bottom: 12px;
}

/* -----------------------------------------------------
      LIMIT REACHED BOX
------------------------------------------------------ */
#limit-box {
  background: linear-gradient(135deg, #ffe4e6, #fecdd3);
  border: 1px solid #fda4af;
  padding: 20px;
  border-radius: 12px;
  margin-top: 20px;
  color: #831843;
  text-align: center;
}
#limit-box h4 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
}
.limit-note {
  font-size: 14px;
  color: #9d174d;
}
.limit-punch {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #831843;
}

/* -----------------------------------------------------
      RESPONSIVE
------------------------------------------------------ */
@media (max-width: 700px) {
  .triple-card {
    flex-direction: column;
  }
  .upload-actions {
    flex-direction: column;
  }
  .btn-scan {
    font-size: 16px;
  }
}
