/* ── Layout: nav bar → title → description → one big box → buttons →
   footer. Same recipe (and same pixel values) as Deecliq Data Transfer —
   the project default. ── */
.fnr-fit.fnr-scope {
  display: flex; flex-direction: column; gap: 14px;
  max-width: 1600px; margin: 0 auto;
  padding: 90px 4vw 60px;
}

.fnr-hero { text-align: center; flex-shrink: 0; }
.fnr-hero h1 {
  font-size: 1.5rem !important; font-weight: 800 !important;
  color: var(--brand, #0d9488) !important;
  margin: 0 0 4px !important;
}
#fnrScope .fnr-hero p {
  font-size: .85rem !important; color: var(--txt-2, #64748b) !important;
  margin: 0 !important;
}

#fnrScope .fnr-card {
  max-width: 100% !important; width: 100%;
  padding: 24px 32px !important;
  background: var(--page-bg, #f8fafc) !important;
  border: 1px solid var(--border, #e2e8f0) !important;
  box-shadow: none !important;
  margin: 0 auto !important;
}
.fnr-input-view { display: flex; flex-direction: column; }

.fnr-input-section { display: flex; min-height: 320px; }
.fnr-dropzone {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  padding: 26px 20px;
  border: 2px dashed var(--brand, #0d9488);
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  color: var(--txt, #0f172a);
  background: transparent;
  transition: border-color .2s ease, background .2s ease;
}
.fnr-dropzone:hover, .fnr-dropzone.fnr-dragover {
  border-color: var(--brand-dark, #0f766e);
  background: rgba(13,148,136,.05);
}
.fnr-dropzone i { color: var(--brand, #0d9488); font-size: 2.2rem; }
.fnr-drop-title { font-weight: 700; margin-top: 10px; font-size: .95rem; color: var(--txt, #0f172a); }
.fnr-drop-sub { font-size: .8rem; opacity: .65; margin-top: 4px; color: var(--txt-2, #64748b); }

.fnr-selected-summary {
  margin-top: 14px; padding: 12px 14px;
  border-radius: 10px;
  background: var(--page-bg, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  color: var(--txt, #0f172a);
  font-size: .85rem; font-weight: 600;
  text-align: center;
}

.fnr-chip-list {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px;
  padding: 0; margin: 10px 0 0; max-height: 160px; overflow-y: auto;
}
.fnr-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px 6px 12px;
  border-radius: 999px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  font-size: .8rem; color: var(--txt, #0f172a);
  max-width: 260px;
}
.fnr-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fnr-chip-remove {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--page-bg, #f8fafc); border: none; cursor: pointer;
  color: var(--txt-2, #64748b); font-size: .7rem;
  display: flex; align-items: center; justify-content: center;
}
.fnr-chip-remove:hover { background: var(--brand, #0d9488); color: #fff; }

.fnr-mode-desc { font-size: .8rem; color: var(--txt-2, #64748b); margin: 0; }
.fnr-mode-desc code { background: var(--page-bg, #f8fafc); padding: 1px 5px; border-radius: 5px; }

.fnr-preview-table-wrap { margin-top: 16px; }
.fnr-preview-table {
  list-style: none; padding: 0; margin: 8px 0 0;
  max-height: 200px; overflow-y: auto;
}
.fnr-preview-table li {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; margin: 4px 0;
  background: var(--page-bg, #f8fafc); border-radius: 8px;
  border-left: 3px solid var(--border, #e2e8f0);
  font-size: .82rem; color: var(--txt-2, #64748b);
}
.fnr-preview-table li span:first-child,
.fnr-preview-table li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.fnr-preview-table .fnr-preview-changed { color: var(--brand-dark, #0f766e); font-weight: 600; }

.fnr-error {
  margin-top: 12px; padding: 10px 14px;
  border-radius: 10px;
  background: var(--page-bg, #f8fafc);
  border: 1px dashed var(--brand, #0d9488);
  color: var(--txt, #0f172a); font-size: .85rem;
}

.hidden { display: none !important; }
#fnrScope .controls {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  width: 100%;
}
#fnrScope .controls.hidden { display: none !important; }

#fnrScope #fnrContinueBtn,
#fnrScope #fnrConfirmRenameBtn {
  background: linear-gradient(135deg, var(--brand, #0d9488), var(--brand-dark, #0f766e));
  border: none;
  padding: 13px 26px;
  font-weight: 700;
  font-size: .95rem;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(13,148,136,.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
#fnrScope #fnrContinueBtn:hover,
#fnrScope #fnrConfirmRenameBtn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(13,148,136,.45); }
#fnrScope #fnrContinueBtn:active,
#fnrScope #fnrConfirmRenameBtn:active { transform: translateY(0); }

.fnr-shake { animation: fnrShake .4s ease; }
@keyframes fnrShake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(7px); }
  60%      { transform: translateX(-5px); }
  80%      { transform: translateX(3px); }
}

/* ── Settings popup — opens right after files are selected. ── */
.fnr-modal {
  position: fixed; inset: 0; z-index: 100001;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.fnr-modal.fnr-modal-open { display: flex; }
.fnr-modal-backdrop {
  position: absolute; inset: 0; background: rgba(15,23,42,.6);
  animation: fnrFadeIn .15s ease;
}
.fnr-modal-box {
  position: relative; z-index: 1;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  padding: 28px 30px;
  border-radius: 18px;
  max-width: 560px; width: 100%;
  max-height: 86vh; overflow-y: auto;
  animation: fnrPopIn .2s ease;
  box-shadow: 0 30px 60px rgba(0,0,0,.3);
}
.fnr-modal-box h3 {
  display: flex; align-items: center; gap: 8px;
  color: var(--txt, #0f172a); margin: 0 0 4px; padding-right: 36px;
}
.fnr-modal-box h3 i { color: var(--brand, #0d9488); }
.fnr-modal-sub { font-size: .82rem; color: var(--txt-2, #64748b); margin: 0 0 18px; }
.fnr-modal-x {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--page-bg, #f8fafc); color: var(--txt-2, #64748b); border: 1px solid var(--border, #e2e8f0);
  font-size: 1.1rem; line-height: 1; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.fnr-modal-x:hover { background: var(--brand, #0d9488); color: #fff; border-color: var(--brand, #0d9488); }
@keyframes fnrFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fnrPopIn {
  from { opacity: 0; transform: scale(.92) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .fnr-modal-backdrop, .fnr-modal-box { animation: none; }
  .fnr-shake { animation: none; }
}

.fnr-mode-fields { margin-top: 16px; }
.fnr-options-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.fnr-checkbox-item {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  margin-top: 10px;
  font-size: .85rem; font-weight: 600; color: var(--txt-2, #64748b);
}
.fnr-checkbox-item input { width: 16px; height: 16px; cursor: pointer; }

#fnrPreviewExample { margin-top: 16px; }
#fnrPreviewExample code { font-size: .85rem; color: var(--brand-dark, #0f766e); background: var(--page-bg, #f8fafc); padding: 6px 10px; border-radius: 8px; display: inline-block; }

/* ── Processing: same big animated ring + counter + step indicator used
   across the project's tools. ── */
.fnr-processing { padding: 30px 0; text-align: center; }
.fnr-process-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-bottom: 22px;
}
.fnr-process-step {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700;
  color: var(--txt-2, #64748b);
  opacity: .55;
  transition: opacity .2s ease;
}
.fnr-process-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface, #fff);
  border: 2px solid var(--border, #e2e8f0);
  color: var(--txt-2, #64748b);
  font-size: .9rem;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.fnr-process-line { width: 36px; height: 2px; background: var(--border, #e2e8f0); }
.fnr-process-step.fnr-step-active { opacity: 1; }
.fnr-process-step.fnr-step-active .fnr-process-icon {
  border-color: var(--brand, #0d9488);
  color: var(--brand, #0d9488);
  box-shadow: 0 0 0 4px rgba(13,148,136,.12);
  animation: fnrPulseStep 1.3s ease-in-out infinite;
}
.fnr-process-step.fnr-step-done { opacity: 1; }
.fnr-process-step.fnr-step-done .fnr-process-icon {
  border-color: #16a34a; color: #fff; background: #16a34a;
}
@keyframes fnrPulseStep {
  0%, 100% { box-shadow: 0 0 0 4px rgba(13,148,136,.12); }
  50%      { box-shadow: 0 0 0 8px rgba(13,148,136,.04); }
}
@media (prefers-reduced-motion: reduce) {
  .fnr-process-step.fnr-step-active .fnr-process-icon { animation: none; }
}

.fnr-ring-wrap { position: relative; width: 140px; height: 140px; margin: 0 auto 18px; }
.fnr-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.fnr-ring-track { fill: none; stroke: var(--border, #e2e8f0); stroke-width: 8; }
.fnr-ring-fill {
  fill: none; stroke: var(--brand, #0d9488); stroke-width: 8;
  stroke-linecap: round;
  transition: stroke .2s ease;
  filter: drop-shadow(0 0 6px rgba(13,148,136,.45));
}
.fnr-ring-center {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--txt, #0f172a);
}
.fnr-ring-count { font-size: 2.1rem; line-height: 1; }
.fnr-ring-percent { font-size: 1.1rem; opacity: .7; margin-left: 2px; }
.fnr-progress-text { font-size: .85rem; font-weight: 600; color: var(--txt, #0f172a); }

.fnr-result-icon { text-align: center; font-size: 2.6rem; color: #16a34a; margin-bottom: 6px; }

.fnr-summary {
  background: var(--page-bg, #f8fafc); padding: 12px 16px; border-radius: 10px;
  border: 1px solid var(--border, #e2e8f0); font-weight: 600; color: var(--txt, #0f172a);
  text-align: center; font-size: .88rem; margin-bottom: 14px;
}

.fnr-file-list { list-style: none; max-height: 280px; overflow-y: auto; padding: 0; margin: 0 0 14px; }
.fnr-file-list li {
  padding: 9px 12px; margin: 4px 0; background: var(--page-bg, #f8fafc); border-radius: 8px;
  border-left: 3px solid var(--border, #e2e8f0); font-size: .85rem; color: var(--txt-2, #64748b);
  transition: transform .2s; word-break: break-all;
}
.fnr-file-list li:hover { transform: translateX(3px); }
.fnr-file-list li.fnr-renamed { color: #16a34a; font-weight: 600; border-left-color: #16a34a; }
.fnr-file-arrow { color: var(--brand, #0d9488); font-weight: 700; margin: 0 6px; }

.fnr-autosave { text-align: center; font-size: .8rem; color: var(--txt-2, #64748b); margin-top: 14px; }
.fnr-autosave strong { color: var(--brand, #0d9488); }

/* ── Centered message popup — same pattern used across the project. ── */
.fnr-popup {
  position: fixed; inset: 0; z-index: 100002;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.fnr-popup.fnr-popup-open { display: flex; }
.fnr-popup-backdrop {
  position: absolute; inset: 0; background: rgba(15,23,42,.6);
  animation: fnrPopupFadeIn .15s ease;
}
.fnr-popup-box {
  position: relative; z-index: 1;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  padding: 28px 30px;
  border-radius: 18px;
  max-width: 420px; width: 100%;
  text-align: center;
  animation: fnrPopupPopIn .2s ease;
  box-shadow: 0 30px 60px rgba(0,0,0,.3);
  white-space: pre-line;
}
.fnr-popup-icon { font-size: 2.2rem; margin-bottom: 10px; }
.fnr-popup-box.fnr-popup-info .fnr-popup-icon    { color: var(--brand, #0d9488); }
.fnr-popup-box.fnr-popup-success .fnr-popup-icon { color: #16a34a; }
.fnr-popup-box.fnr-popup-warning .fnr-popup-icon { color: #d97706; }
.fnr-popup-box.fnr-popup-error .fnr-popup-icon    { color: #dc2626; }
.fnr-popup-msg { color: var(--txt, #0f172a); font-size: .92rem; line-height: 1.6; margin-bottom: 18px; text-align: left; }
.fnr-popup-ok { padding: 9px 28px !important; }
@keyframes fnrPopupFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fnrPopupPopIn {
  from { opacity: 0; transform: scale(.9) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .fnr-popup-backdrop, .fnr-popup-box { animation: none; }
}
