/* ── Font Creator Modal ───────────────────────────────────────────────────── */
/* OCR tip box */
.fc-ocr-tip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: .5rem;
  padding: .625rem .875rem;
  font-size: .8125rem;
  color: #1e40af;
  line-height: 1.5;
  margin-bottom: .625rem;
}
.fc-ocr-tip em { font-style: italic; }

/* Missing character hint */
.fc-missing-hint {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: .5rem;
  padding: .5rem .75rem;
  font-size: .75rem;
  color: #92400e;
  margin-top: .5rem;
  line-height: 1.6;
  word-break: break-all;
}

/* Action row below the OCR tab */
.fc-ocr-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: .75rem;
}

/* Danger button */
.fc-btn-danger {
  background: transparent;
  border: 1px solid #fca5a5;
  color: #dc2626;
  font-size: .75rem;
  font-weight: 500;
  padding: .35rem .8rem;
  border-radius: .5rem;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
}
.fc-btn-danger:hover { background: #fef2f2; }

.fc-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.48);
  z-index: 300;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
  opacity: 0; visibility: hidden;
  transition: opacity .2s, visibility .2s;
}
.fc-overlay.open { opacity: 1; visibility: visible; }

.fc-modal {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  width: 100%; max-width: 620px;
  display: flex; flex-direction: column; gap: 1rem;
  padding: 1.5rem;
  margin: auto;
  transform: translateY(12px);
  transition: transform .25s ease;
}
.fc-overlay.open .fc-modal { transform: translateY(0); }

/* Header */
.fc-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.fc-title { font-size: 1.1rem; font-weight: 700; color: #111; letter-spacing: -.02em; }
.fc-subtitle { font-size: .8125rem; color: #6b7280; margin-top: .125rem; }
.fc-close {
  background: none; border: none; color: #9ca3af; cursor: pointer;
  padding: .25rem; border-radius: .375rem; display: flex; align-items: center;
  transition: background .15s, color .15s;
}
.fc-close:hover { background: #f3f4f6; color: #374151; }

/* Progress */
.fc-progress-wrap { display: flex; align-items: center; gap: .75rem; }
.fc-progress-track { flex: 1; height: 5px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.fc-progress-fill { height: 100%; background: var(--color-primary, #3b82f6); border-radius: 999px; width: 0; transition: width .3s ease; }
.fc-progress-label { font-size: .75rem; color: #9ca3af; white-space: nowrap; }

/* Tabs */
.fc-tabs { display: flex; gap: .375rem; border-bottom: 1px solid #e5e7eb; padding-bottom: 0; margin-bottom: .25rem; }
.fc-tab-btn {
  display: inline-flex; align-items: center; gap: .375rem;
  font-size: .8125rem; font-weight: 500; color: #6b7280;
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: .5rem .75rem; cursor: pointer; font-family: inherit;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}
.fc-tab-btn.active { color: var(--color-primary, #3b82f6); border-bottom-color: var(--color-primary, #3b82f6); }
.fc-tab-btn:hover:not(.active) { color: #374151; }

/* Upload tab — step list */
.fc-steps { display: flex; flex-direction: column; gap: 1rem; }
.fc-step { display: flex; gap: .875rem; }
.fc-step-num {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--color-primary, #3b82f6); color: #fff;
  font-size: .75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: .125rem;
}
.fc-step-title { font-size: .875rem; font-weight: 600; color: #111; }
.fc-step-desc  { font-size: .8rem; color: #6b7280; margin-top: .2rem; line-height: 1.45; }

/* Drop zone */
.fc-drop-zone {
  margin-top: .625rem;
  border: 1.5px dashed #d1d5db;
  border-radius: .625rem;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: .375rem;
  color: #9ca3af; font-size: .8125rem;
  transition: border-color .15s, background .15s;
}
.fc-drop-zone:hover, .fc-drop-zone.fc-drop--over {
  border-color: var(--color-primary, #3b82f6);
  background: #eff6ff; color: var(--color-primary, #3b82f6);
}
.fc-drop-zone small { font-size: .7rem; color: #c4c9d4; }

/* Photo preview */
.fc-photo-preview {
  width: 100%; max-height: 180px; object-fit: contain;
  border: 1px solid #e5e7eb; border-radius: .5rem;
  margin-top: .625rem; display: block;
}

/* Upload status */
.fc-upload-status {
  margin-top: .5rem; font-size: .8125rem; padding: .5rem .75rem;
  border-radius: .5rem; line-height: 1.45;
}
.fc-upload-status--loading { background: #fefce8; color: #92400e; }
.fc-upload-status--success { background: #f0fdf4; color: #065f46; }
.fc-upload-status--error   { background: #fef2f2; color: #991b1b; }

/* Download / outline button */
.fc-btn-outline {
  display: inline-flex; align-items: center; gap: .375rem;
  font-size: .8125rem; font-weight: 500;
  color: var(--color-primary, #3b82f6);
  border: 1px solid var(--color-primary, #3b82f6);
  border-radius: .5rem; padding: .4rem .9rem;
  background: transparent; cursor: pointer; font-family: inherit;
  transition: background .15s, color .15s;
  margin-top: .5rem;
}
.fc-btn-outline:hover { background: var(--color-primary, #3b82f6); color: #fff; }

/* Draw tab — character grid */
.fc-grid {
  display: flex; flex-direction: column; gap: 1.125rem;
  max-height: 52vh; overflow-y: auto; padding-right: .25rem;
}
.fc-grid::-webkit-scrollbar { width: 4px; }
.fc-grid::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.fc-group-label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #9ca3af; margin-bottom: .375rem; }
.fc-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.fc-cell { display: flex; flex-direction: column; align-items: center; gap: .1rem; position: relative; }
.fc-char-label { font-size: .6rem; color: #9ca3af; font-weight: 600; }
.fc-canvas { display: block; border: 1.5px solid #e5e7eb; border-radius: .375rem; background: #f9fafb; cursor: crosshair; touch-action: none; transition: border-color .15s; }
.fc-canvas:hover { border-color: var(--color-primary, #3b82f6); }
.fc-cell--filled .fc-canvas { border-color: #059669; background: #f0fdf4; }
.fc-clear-btn {
  position: absolute; top: 12px; right: -6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #9ca3af; color: #fff; border: none;
  font-size: 10px; line-height: 14px; text-align: center;
  cursor: pointer; display: none; padding: 0;
}
.fc-eraser-btn {
  position: absolute; top: 12px; right: 10px;
  width: 14px; height: 14px; border-radius: 3px;
  background: #e5e7eb; color: #6b7280; border: 1px solid #d1d5db;
  font-size: 9px; line-height: 12px; text-align: center;
  cursor: pointer; display: none; padding: 0;
  transition: background 0.15s, color 0.15s;
}
.fc-cell--filled .fc-eraser-btn, .fc-cell:hover .fc-eraser-btn { display: block; }
.fc-eraser-btn:hover { background: #d1d5db; }
.fc-eraser-btn--active { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.fc-cell--filled .fc-clear-btn, .fc-cell:hover .fc-clear-btn { display: block; }
.fc-clear-btn:hover { background: #dc2626; }

/* Footer (draw tab) */
.fc-footer { display: flex; justify-content: flex-end; gap: .625rem; padding-top: .75rem; border-top: 1px solid #f3f4f6; }
.fc-btn-ghost {
  background: transparent; border: 1px solid #d1d5db; color: #6b7280;
  font-size: .875rem; font-weight: 500; padding: .45rem .9rem;
  border-radius: .5rem; cursor: pointer; font-family: inherit;
  transition: background .15s;
}
.fc-btn-ghost:hover { background: #f9fafb; }
.fc-btn-primary {
  background: var(--color-primary, #3b82f6); color: #fff;
  font-size: .875rem; font-weight: 600; padding: .45rem 1.1rem;
  border-radius: .5rem; border: none; cursor: pointer; font-family: inherit;
  transition: background .15s;
}
.fc-btn-primary:hover { background: var(--color-primary-dark, #2563eb); }
.fc-btn-primary:disabled { opacity: .6; cursor: not-allowed; }

/* Trigger button in Custom Style card */
.create-font-btn {
  display: inline-flex; align-items: center; gap: .375rem;
  font-size: .8125rem; font-weight: 500;
  color: var(--color-primary, #3b82f6);
  background: transparent; border: 1px solid var(--color-primary, #3b82f6);
  border-radius: .5rem; padding: .375rem .875rem;
  cursor: pointer; font-family: inherit;
  transition: background .15s, color .15s; margin-top: .625rem;
}
.create-font-btn:hover { background: var(--color-primary, #3b82f6); color: #fff; }
