/* Template Upload Wizard */

.tmpl-wizard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.tmpl-wizard-overlay.visible { opacity: 1; }

.tmpl-wizard {
  background: #111118;
  border: 1px solid #2a2a3a;
  border-radius: 16px;
  width: 95%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s;
}
.tmpl-wizard-overlay.visible .tmpl-wizard { transform: translateY(0); }

/* Header */
.tmpl-wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #1e1e2e;
}
.tmpl-wizard-title { font-size: 16px; font-weight: 700; color: #e0e0e8; }
.tmpl-wizard-close {
  background: none; border: none; color: #555; font-size: 24px;
  cursor: pointer; padding: 0 4px; line-height: 1;
}
.tmpl-wizard-close:hover { color: #fff; }

/* Progress */
.tmpl-wizard-progress { padding: 12px 20px 0; }
.tmpl-progress-bar {
  height: 3px; background: #1e1e2e; border-radius: 2px; overflow: hidden;
}
.tmpl-progress-fill {
  height: 100%; background: linear-gradient(90deg, #00e5ff, #7c4dff);
  transition: width 0.3s; width: 25%;
}
.tmpl-progress-steps {
  display: flex; justify-content: space-between; padding: 8px 0 0;
}
.tmpl-step-label {
  font-size: 11px; color: #444; font-weight: 500;
  letter-spacing: 0.5px; transition: color 0.2s;
}
.tmpl-step-label.active { color: #00e5ff; }
.tmpl-step-label.done { color: #555; }

/* Body */
.tmpl-wizard-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  min-height: 300px;
}
.tmpl-step-content h3 { font-size: 18px; font-weight: 600; margin-bottom: 4px; color: #e0e0e8; }
.tmpl-step-desc { font-size: 13px; color: #666; margin-bottom: 20px; line-height: 1.5; }

/* Footer */
.tmpl-wizard-footer {
  display: flex; align-items: center; padding: 12px 20px;
  border-top: 1px solid #1e1e2e;
}

/* Buttons */
.tmpl-btn {
  padding: 10px 20px; border-radius: 8px; border: none;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.tmpl-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.tmpl-btn-back { background: #1e1e2e; color: #888; }
.tmpl-btn-back:hover { background: #2a2a3a; }
.tmpl-btn-next { background: #2a2a3a; color: #e0e0e8; }
.tmpl-btn-next:hover:not(:disabled) { background: #3a3a4a; }
.tmpl-btn-publish {
  background: linear-gradient(135deg, #00e5ff, #7c4dff) !important;
  color: #000 !important;
}
.tmpl-btn-done {
  background: linear-gradient(135deg, #00e5ff, #7c4dff);
  color: #000; margin-top: 16px;
}

/* Drop zones */
.tmpl-als-drop, .tmpl-samples-drop {
  border: 2px dashed #2a2a3a; border-radius: 12px; padding: 40px 20px;
  text-align: center; cursor: pointer; transition: all 0.2s;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.tmpl-als-drop:hover, .tmpl-samples-drop:hover,
.tmpl-als-drop.drag-over, .tmpl-samples-drop.drag-over {
  border-color: #00e5ff; background: rgba(0,229,255,0.03);
}
.tmpl-als-loaded { border-color: #22c55e; border-style: solid; }
.tmpl-drop-icon { font-size: 32px; }
.tmpl-drop-text { font-size: 14px; color: #888; }
.tmpl-drop-hint { font-size: 12px; color: #444; }

/* Form */
.tmpl-form { display: flex; flex-direction: column; gap: 16px; }
.tmpl-label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; font-weight: 600; color: #888;
}
.tmpl-label-hint { font-weight: 400; color: #555; }
.tmpl-input, .tmpl-textarea, .tmpl-select {
  background: #0a0a12; border: 1px solid #2a2a3a; border-radius: 8px;
  padding: 10px 12px; color: #e0e0e8; font-size: 14px;
  font-family: inherit; transition: border-color 0.2s;
}
.tmpl-input:focus, .tmpl-textarea:focus, .tmpl-select:focus {
  outline: none; border-color: #00e5ff;
}
.tmpl-textarea { resize: vertical; min-height: 80px; }
.tmpl-select { cursor: pointer; }
.tmpl-select option { background: #111118; }

/* Auto tags */
.tmpl-auto-tags {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-top: 16px; padding: 12px; background: #0a0a12;
  border-radius: 8px; border: 1px solid #1e1e2e;
}
.tmpl-auto-label { font-size: 12px; color: #555; font-weight: 600; }
.tmpl-tag {
  background: #1e1e2e; color: #888; padding: 3px 8px;
  border-radius: 4px; font-size: 11px; font-family: 'JetBrains Mono', monospace;
}

/* Samples */
.tmpl-sample-summary {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: #0a0a12; border-radius: 8px;
  margin: 12px 0 8px; font-size: 13px; color: #888;
}
.tmpl-clear-samples {
  margin-left: auto; background: none; border: none;
  color: #555; cursor: pointer; font-size: 14px;
}
.tmpl-clear-samples:hover { color: #ff5555; }

.tmpl-sample-grid {
  display: flex; flex-direction: column; gap: 2px;
  max-height: 200px; overflow-y: auto;
}
.tmpl-sample-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; font-size: 12px; border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}
.tmpl-sample-item:hover { background: #1a1a26; }
.tmpl-sample-name { color: #b0b0c0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tmpl-sample-size { color: #444; }
.tmpl-sample-remove { background: none; border: none; color: #444; cursor: pointer; font-size: 12px; }
.tmpl-sample-remove:hover { color: #ff5555; }

.tmpl-detected-samples { margin-top: 16px; }
.tmpl-detected-samples summary { font-size: 13px; color: #666; cursor: pointer; }
.tmpl-detected-list { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 0; }
.tmpl-sample-tag {
  font-size: 11px; padding: 2px 6px; border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
}
.tmpl-sample-tag.matched { background: rgba(34,197,94,0.15); color: #22c55e; }
.tmpl-sample-tag.missing { background: rgba(255,85,85,0.1); color: #ff5555; }

/* Pricing */
.tmpl-price-options {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
}
.tmpl-price-btn {
  padding: 10px 20px; background: #1e1e2e; border: 2px solid #2a2a3a;
  border-radius: 8px; color: #888; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.tmpl-price-btn:hover { border-color: #444; }
.tmpl-price-btn.active {
  border-color: #00e5ff; color: #00e5ff; background: rgba(0,229,255,0.08);
}
.tmpl-price-custom {
  display: flex; align-items: center; gap: 4px;
  color: #666; font-size: 16px; font-weight: 700;
}
.tmpl-price-input { width: 80px; text-align: center; font-weight: 700; font-size: 16px; }

/* Publish preview */
.tmpl-publish-preview h4 { font-size: 13px; color: #555; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.tmpl-preview-card {
  background: #0a0a12; border: 1px solid #2a2a3a; border-radius: 12px; padding: 16px;
}
.tmpl-preview-title { font-size: 16px; font-weight: 700; color: #e0e0e8; margin-bottom: 6px; }
.tmpl-preview-meta { font-size: 12px; color: #666; font-family: 'JetBrains Mono', monospace; margin-bottom: 8px; }
.tmpl-preview-includes { font-size: 13px; color: #888; margin-bottom: 8px; }
.tmpl-preview-price {
  font-size: 24px; font-weight: 800; color: #00e5ff;
  background: linear-gradient(135deg, #00e5ff, #7c4dff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* Success */
.tmpl-success { text-align: center; padding: 40px 20px; }
.tmpl-success-icon { font-size: 48px; margin-bottom: 12px; }
.tmpl-success h3 { font-size: 24px; margin-bottom: 8px; }
.tmpl-success p { color: #888; font-size: 14px; }
.tmpl-success-details {
  display: flex; justify-content: center; gap: 16px; margin: 16px 0;
  font-size: 13px; color: #666;
}
.tmpl-success-note { font-size: 12px; color: #444; font-style: italic; margin-top: 12px; }

/* Scrollbar */
.tmpl-wizard-body::-webkit-scrollbar { width: 6px; }
.tmpl-wizard-body::-webkit-scrollbar-track { background: transparent; }
.tmpl-wizard-body::-webkit-scrollbar-thumb { background: #2a2a3a; border-radius: 3px; }
