/* ================================================================
   B.OCR Web - Interactive Process Simulator & Animation Stylesheet
   ================================================================ */

.sim-container {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Simulator Control Header */
.sim-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
  gap: 10px;
  flex-wrap: wrap;
}

.sim-step-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sim-step-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sim-step-btn:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

.sim-step-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.sim-step-btn-num {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

.sim-step-btn.active .sim-step-btn-num {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.sim-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sim-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sim-btn-action:hover {
  background: var(--surface-subtle);
  border-color: var(--border-hover);
}

.sim-btn-action.sim-btn-play {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent-border);
}

.sim-btn-action.sim-btn-play:hover {
  background: var(--accent);
  color: #ffffff;
}

/* Simulator Animated Stage */
.sim-stage {
  min-height: 240px;
  max-height: 320px;
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Grid background pattern */
.sim-stage::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: linear-gradient(var(--grid-line, rgba(0,0,0,0.03)) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid-line, rgba(0,0,0,0.03)) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

/* Stage Frame Elements */
.sim-stage-content {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
  z-index: 2;
}

/* Dropzone Simulation Visual */
.sim-box-dropzone {
  width: 100%;
  border: 2px dashed var(--accent-border);
  background: var(--accent-dim);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  animation: simPulse 2s infinite ease-in-out;
}

@keyframes simPulse {
  0%, 100% { border-color: var(--accent-border); }
  50% { border-color: var(--accent); }
}

/* Document Item Simulation Card */
.sim-doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: simCardEnter 0.4s ease-out;
}

@keyframes simCardEnter {
  from { transform: translateY(16px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.sim-doc-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--surface-muted);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.sim-doc-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sim-doc-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
}

.sim-doc-meta {
  font-size: 10px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* Laser Scanner Beam for OCR & Parsing */
.sim-laser-scanner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #3b82f6;
  box-shadow: 0 0 12px #3b82f6, 0 0 24px #3b82f6;
  animation: simLaserSweep 2.2s infinite alternate ease-in-out;
  z-index: 10;
}

@keyframes simLaserSweep {
  0% { top: 8%; opacity: 0.8; }
  100% { top: 92%; opacity: 1; }
}

/* OCR Text Bounding Box Highlight */
.sim-ocr-bbox {
  border: 1.5px solid var(--accent);
  background: rgba(59, 130, 246, 0.15);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  animation: simBBoxPop 0.3s ease-out;
}

@keyframes simBBoxPop {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Match Connection Line (Gabungin BPJS) */
.sim-match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

.sim-match-connector {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.sim-match-line {
  width: 100%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--success), var(--success) 6px, transparent 6px, transparent 10px);
  animation: simDashMove 1s infinite linear;
}

@keyframes simDashMove {
  from { background-position: 0 0; }
  to { background-position: 20px 0; }
}

.sim-match-badge {
  font-size: 10px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--success);
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
}

/* Size Shrink Gauge (Compression) */
.sim-compress-meter {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px 18px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.sim-meter-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  background: var(--success);
  padding: 6px 12px;
  border-radius: 6px;
  animation: simScalePunch 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes simScalePunch {
  0% { transform: scale(0.6); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Bottom Explanatory Caption */
.sim-caption-bar {
  padding: 10px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sim-caption-text {
  font-size: 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-caption-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  animation: simDotPulse 1.2s infinite;
}

@keyframes simDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
}

.sim-progress-track {
  width: 120px;
  height: 4px;
  background: var(--surface-muted);
  border-radius: 2px;
  overflow: hidden;
}

.sim-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.2s ease;
}

@media (max-width: 768px) {
  .sim-controls-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .sim-match-row {
    flex-direction: column;
  }
}

/* ================================================================
   Specialized Visuals for Split PDF, Word/PDF Converters, & Compress
   ================================================================ */

/* Page Thumbnail Grid (Split PDF Biasa) */
.sim-page-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 480px;
}

.sim-page-thumb {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 58px;
  position: relative;
  transition: all 0.2s ease;
}

.sim-page-thumb.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.sim-page-thumb.skipped {
  opacity: 0.45;
  border-style: dashed;
  background: var(--surface-muted);
}

.sim-page-lines {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2.5px;
}

.sim-page-line {
  height: 2.5px;
  background: var(--border);
  border-radius: 1px;
  width: 100%;
}

.sim-page-thumb.active .sim-page-line {
  background: var(--accent);
  opacity: 0.5;
}

.sim-page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}

.sim-page-thumb.active .sim-page-footer {
  color: var(--accent);
}

.sim-page-thumb.skipped .sim-page-footer {
  color: var(--text-subtle);
}

/* Word & PDF Icon Badges */
.sim-badge-word {
  background: #185abd !important;
  color: #ffffff !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 800;
  font-size: 15px;
  border-color: #0f489d !important;
  box-shadow: 0 2px 6px rgba(24, 90, 189, 0.35);
}

.sim-badge-pdf {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 12px;
}

/* Conversion Transformation Flow */
.sim-transform-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 520px;
}

.sim-transform-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  animation: simArrowPulse 1.4s infinite ease-in-out;
}

@keyframes simArrowPulse {
  0%, 100% { transform: translateX(0); opacity: 0.8; }
  50% { transform: translateX(4px); opacity: 1; }
}

/* Extracted text simulation line */
.sim-text-extract-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  width: 100%;
}

