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

.bfr-hero { text-align: center; flex-shrink: 0; }
.bfr-hero h1 {
  font-size: 1.5rem !important; font-weight: 800 !important;
  color: var(--brand, #ec4899) !important;
  margin: 0 0 4px !important;
}
#bfrScope .bfr-hero p {
  font-size: .85rem !important; color: var(--txt-2, #64748b) !important;
  margin: 0 !important;
}
#bfrScope .bfr-hero code { background: var(--page-bg, #f8fafc); padding: 2px 6px; border-radius: 6px; }

#bfrScope .bfr-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;
}
.bfr-input-view { display: flex; flex-direction: column; }

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

.bfr-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;
}

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

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

#bfrScope #bfrRenameBtn,
#bfrScope #bfrConfirmRenameBtn {
  background: linear-gradient(135deg, var(--brand, #ec4899), var(--brand-dark, #be185d));
  border: none;
  padding: 13px 26px;
  font-weight: 700;
  font-size: .95rem;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(236,72,153,.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
#bfrScope #bfrRenameBtn:hover,
#bfrScope #bfrConfirmRenameBtn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(236,72,153,.45); }
#bfrScope #bfrRenameBtn:active,
#bfrScope #bfrConfirmRenameBtn:active { transform: translateY(0); }

.bfr-shake { animation: bfrShake .4s ease; }
@keyframes bfrShake {
  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 a folder/files are selected. ── */
.bfr-modal {
  position: fixed; inset: 0; z-index: 100001;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.bfr-modal.bfr-modal-open { display: flex; }
.bfr-modal-backdrop {
  position: absolute; inset: 0; background: rgba(15,23,42,.6);
  animation: bfrFadeIn .15s ease;
}
.bfr-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: bfrPopIn .2s ease;
  box-shadow: 0 30px 60px rgba(0,0,0,.3);
}
.bfr-modal-box h3 {
  display: flex; align-items: center; gap: 8px;
  color: var(--txt, #0f172a); margin: 0 0 4px; padding-right: 36px;
}
.bfr-modal-box h3 i { color: var(--brand, #ec4899); }
.bfr-modal-sub { font-size: .82rem; color: var(--txt-2, #64748b); margin: 0 0 18px; }
.bfr-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;
}
.bfr-modal-x:hover { background: var(--brand, #ec4899); color: #fff; border-color: var(--brand, #ec4899); }
@keyframes bfrFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bfrPopIn {
  from { opacity: 0; transform: scale(.92) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .bfr-modal-backdrop, .bfr-modal-box { animation: none; }
  .bfr-shake { animation: none; }
}

.bfr-checkbox-group { display: flex; gap: 12px; flex-wrap: wrap; }
.bfr-checkbox-item {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 9px 14px; border-radius: 10px; background: var(--page-bg, #f8fafc);
  border: 1px solid var(--border, #e2e8f0); font-size: .85rem; font-weight: 600; color: var(--txt-2, #64748b);
  transition: background .2s, border-color .2s;
}
.bfr-checkbox-item:hover { background: rgba(236,72,153,.08); border-color: var(--brand, #ec4899); }
.bfr-checkbox-item input { width: 16px; height: 16px; cursor: pointer; }

.bfr-options-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

#bfrPreviewExample code { font-size: .85rem; color: var(--brand-dark, #be185d); 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. ── */
.bfr-processing { padding: 30px 0; text-align: center; }
.bfr-process-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-bottom: 22px;
}
.bfr-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;
}
.bfr-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;
}
.bfr-process-line { width: 36px; height: 2px; background: var(--border, #e2e8f0); }
.bfr-process-step.bfr-step-active { opacity: 1; }
.bfr-process-step.bfr-step-active .bfr-process-icon {
  border-color: var(--brand, #ec4899);
  color: var(--brand, #ec4899);
  box-shadow: 0 0 0 4px rgba(236,72,153,.12);
  animation: bfrPulseStep 1.3s ease-in-out infinite;
}
.bfr-process-step.bfr-step-done { opacity: 1; }
.bfr-process-step.bfr-step-done .bfr-process-icon {
  border-color: #16a34a; color: #fff; background: #16a34a;
}
@keyframes bfrPulseStep {
  0%, 100% { box-shadow: 0 0 0 4px rgba(236,72,153,.12); }
  50%      { box-shadow: 0 0 0 8px rgba(236,72,153,.04); }
}
@media (prefers-reduced-motion: reduce) {
  .bfr-process-step.bfr-step-active .bfr-process-icon { animation: none; }
}

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

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

.bfr-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;
}

.bfr-file-list { list-style: none; max-height: 280px; overflow-y: auto; padding: 0; margin: 0 0 14px; }
.bfr-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;
}
.bfr-file-list li:hover { transform: translateX(3px); }
.bfr-file-list li.bfr-renamed { color: #16a34a; font-weight: 600; border-left-color: #16a34a; }
.bfr-file-arrow { color: var(--brand, #ec4899); font-weight: 700; margin: 0 6px; }
.bfr-unchanged-tag { color: var(--txt-2, #64748b); opacity: .7; }

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

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