/* Universal File Viewer — matches the Deecliq Data Transfer shape exactly. */
.ufv-fit.ufv-scope {
  display: flex; flex-direction: column; gap: 14px;
  max-width: 1600px; margin: 0 auto;
  padding: 90px 4vw 60px;
}

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

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

.ufv-input-section { display: flex; min-height: 280px; }
.ufv-scope .ufv-dropzone {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  padding: 26px 20px;
  border: 2px dashed var(--brand, #8b5cf6);
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  color: var(--txt, #0f172a);
  background: transparent;
  transition: border-color .2s ease, background .2s ease;
}
.ufv-scope .ufv-dropzone:hover,
.ufv-scope .ufv-dropzone.ufv-dragover {
  border-color: var(--brand-dark, #7c3aed);
  background: rgba(139,92,246,.05);
}
.ufv-scope .ufv-dropzone i {
  color: var(--brand, #8b5cf6);
  font-size: 2.2rem;
  display: inline-block;
  animation: ufvIconFloat 2.4s ease-in-out infinite;
}
@keyframes ufvIconFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  .ufv-scope .ufv-dropzone i { animation: none; }
}
.ufv-drop-title { font-weight: 700; margin-top: 10px; font-size: .95rem; color: var(--txt, #0f172a); }
.ufv-drop-sub { font-size: .8rem; opacity: .65; margin-top: 4px; color: var(--txt-2, #64748b); }

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

/* ── Viewer ── */
.ufv-viewer-view { display: flex; flex-direction: column; gap: 12px; }
.ufv-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  background: var(--surface, #fff); border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px; padding: 10px 14px;
}
.ufv-file-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ufv-file-info i { font-size: 1.3rem; color: var(--brand, #8b5cf6); flex-shrink: 0; }
.ufv-file-name { font-weight: 700; font-size: .88rem; color: var(--txt, #0f172a); word-break: break-all; }
.ufv-file-meta { font-size: .76rem; color: var(--txt-2, #64748b); }
.ufv-toolbar-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ufv-tb-btn {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--page-bg, #f8fafc); border: 1px solid var(--border, #e2e8f0);
  color: var(--txt, #0f172a); cursor: pointer; font-size: .9rem;
  transition: background .15s ease, color .15s ease;
}
.ufv-tb-btn:hover { background: var(--brand, #8b5cf6); color: #fff; border-color: var(--brand, #8b5cf6); }
.ufv-tb-close:hover { background: var(--red, #ef4444); border-color: var(--red, #ef4444); }

.ufv-content {
  background: var(--surface, #fff); border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px; padding: 16px;
  min-height: 420px; max-height: 70vh; overflow: auto;
}

/* ── Fullscreen — reuses the SAME content element via a class toggle,
   instead of cloning everything into a duplicate overlay. ── */
.ufv-viewer-view.ufv-fullscreen {
  position: fixed; inset: 0; z-index: 100001;
  background: var(--page-bg, #f8fafc);
  padding: 14px; margin: 0; max-width: none;
  display: flex; flex-direction: column;
}
.ufv-viewer-view.ufv-fullscreen .ufv-content { flex: 1; max-height: none; }

.ufv-media-content { text-align: center; }
.ufv-media-content img { max-width: 100%; border-radius: 8px; }
.ufv-media-content video, .ufv-media-content audio { max-width: 100%; }
.ufv-media-hint { margin-top: 10px; font-size: .8rem; color: var(--txt-2, #64748b); }

.ufv-pdf-frame, .ufv-html-frame { width: 100%; height: 65vh; border: none; border-radius: 8px; background: #fff; }
.ufv-fullscreen .ufv-pdf-frame, .ufv-fullscreen .ufv-html-frame { height: 100%; }

.ufv-mode-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; font-size: .82rem; color: var(--txt-2, #64748b); font-weight: 600;
}
.ufv-mode-toggle {
  background: var(--page-bg, #f8fafc); border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: .8rem; font-weight: 700;
  color: var(--brand, #8b5cf6);
}
.ufv-mode-toggle:hover { background: rgba(139,92,246,.1); }

.ufv-text-pre {
  font-family: 'SFMono-Regular', Consolas, monospace; font-size: .82rem; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; color: var(--txt, #0f172a);
}
.ufv-textarea {
  width: 100%; min-height: 360px; resize: vertical;
  border: 1px solid var(--border, #e2e8f0); border-radius: 8px;
  background: var(--page-bg, #f8fafc); color: var(--txt, #0f172a);
  font-family: 'SFMono-Regular', Consolas, monospace; font-size: .82rem; line-height: 1.6;
  padding: 12px;
}

.ufv-json-key { color: #9333ea; font-weight: 600; }
.ufv-json-string { color: #16a34a; }
.ufv-json-number { color: #2563eb; }
.ufv-json-boolean { color: #ea580c; font-weight: 600; }
.ufv-json-null { color: #94a3b8; font-style: italic; }

.ufv-csv-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.ufv-csv-table th, .ufv-csv-table td {
  border: 1px solid var(--border, #e2e8f0); padding: 6px 10px; text-align: left;
}
.ufv-csv-table th { background: var(--page-bg, #f8fafc); font-weight: 700; }
.ufv-csv-note { margin-top: 8px; font-size: .78rem; color: var(--txt-2, #64748b); text-align: center; }

.ufv-docx-content { color: var(--txt, #0f172a); line-height: 1.7; }
.ufv-docx-content img { max-width: 100%; }
.ufv-docx-content table { border-collapse: collapse; width: 100%; margin: 10px 0; }
.ufv-docx-content table td, .ufv-docx-content table th { border: 1px solid var(--border, #e2e8f0); padding: 6px 10px; }

.ufv-sheet-title {
  font-size: .9rem; font-weight: 700; color: var(--brand, #8b5cf6);
  margin: 18px 0 8px; padding-top: 14px; border-top: 1px solid var(--border, #e2e8f0);
}
.ufv-sheet-title:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.ufv-slide {
  border: 1px solid var(--border, #e2e8f0); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 12px; background: var(--page-bg, #f8fafc);
}
.ufv-slide-num { font-size: .76rem; font-weight: 700; color: var(--txt-2, #64748b); text-transform: uppercase; margin-bottom: 8px; }
.ufv-slide p { margin: 0 0 6px; color: var(--txt, #0f172a); }

.ufv-unsupported { text-align: center; padding: 40px 20px; color: var(--txt-2, #64748b); }
.ufv-unsupported i { font-size: 3rem; margin-bottom: 14px; color: var(--border, #cbd5e1); }
.ufv-unsupported-details {
  margin-top: 16px; padding: 14px; border-radius: 8px; text-align: left;
  background: var(--page-bg, #f8fafc); border: 1px solid var(--border, #e2e8f0);
  font-size: .82rem; color: var(--txt, #0f172a); display: inline-block;
}

.hidden { display: none !important; }
