/* Custom styles for SongSSAM */

#drop-zone.dragover {
  border-color: #FF7564;
  background-color: #FEE5E1;
}

.step.active .step-icon {
  background-color: #FF7564;
  color: #fff;
  animation: pulse 1.5s infinite;
}

.step.done .step-icon {
  background-color: #E25F4F;
  color: #fff;
}

.step.done .step-icon::after {
  content: '\2713';
}

.step.done .step-icon span,
.step.done .step-icon {
  font-size: 0;
}

.step.done .step-icon::after {
  font-size: 14px;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 117, 100, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(255, 117, 100, 0); }
}

/* Animated striped progress bar */
#progress-bar {
  background-color: #FF7564;
  background-image: linear-gradient(
    -45deg,
    rgba(255,255,255,0.2) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255,255,255,0.2) 50%,
    rgba(255,255,255,0.2) 75%,
    transparent 75%,
    transparent
  );
  background-size: 24px 24px;
  animation: progress-stripe 0.8s linear infinite;
}

#progress-bar.complete {
  background-color: #E25F4F;
  background-image: none;
  animation: none;
}

@keyframes progress-stripe {
  0% { background-position: 24px 0; }
  100% { background-position: 0 0; }
}

.tab-btn.active {
  color: #E25F4F;
  border-bottom-color: #E25F4F;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.file-item .file-name {
  font-size: 14px;
  color: #374151;
}

.file-item .file-size {
  font-size: 12px;
  color: #9ca3af;
}

.file-item .remove-btn {
  color: #ef4444;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
}

.file-item .remove-btn:hover {
  color: #b91c1c;
}

/* Preview content container */
.preview-container {
  height: 600px;
  overflow-y: auto;
}

/* Tab horizontal scroll */
.tab-scroll {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tab-scroll::-webkit-scrollbar {
  display: none;
}

/* ─── Mobile responsive ─── */
@media (max-width: 640px) {
  .preview-container {
    height: auto;
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
  }
  /* Force all content inside preview to fit mobile width */
  .preview-container .page {
    width: 100% !important;
    max-width: 100% !important;
    padding: 2mm 2mm !important;
    min-height: auto !important;
    font-size: 8.5pt !important;
    box-shadow: none !important;
    overflow-x: hidden !important;
    word-break: break-word !important;
  }
  .preview-container table {
    width: 100% !important;
    table-layout: fixed !important;
    font-size: 8pt !important;
  }
  .preview-container .header-bar {
    flex-wrap: nowrap !important;
    gap: 2px !important;
    padding: 3px 4px !important;
    align-items: center !important;
  }
  .preview-container .lesson-badge {
    width: 26px !important;
    height: 26px !important;
    font-size: 5.5pt !important;
    flex-shrink: 0 !important;
  }
  .preview-container .title-bar {
    font-size: 7pt !important;
    padding: 1px 4px !important;
    white-space: nowrap !important;
  }
  .preview-container .workbook-badge,
  .preview-container .section-badge {
    font-size: 5.5pt !important;
    padding: 1px 3px !important;
    white-space: nowrap !important;
  }
  .preview-container .curriculum-badge {
    font-size: 5.5pt !important;
    padding: 1px 4px !important;
    white-space: nowrap !important;
    margin-left: auto !important;
  }
  .preview-container .exam-header {
    flex-wrap: wrap !important;
  }
  .preview-container .exam-round {
    font-size: 20pt !important;
  }
  .preview-container .two-col {
    flex-direction: column !important;
  }
  .preview-container .test-cols {
    flex-direction: column !important;
  }
  .preview-container .questions-grid {
    column-count: 1 !important;
  }
  .preview-container .answer-list {
    column-count: 1 !important;
  }
  .file-item .file-name {
    font-size: 13px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
