/**
 * Extension detail – PX File Manager animated hero (html/com_content/article/ext-hero/px-file-manager.php, js/px-ext-filemanager.js).
 * Same frame as the PX Adminer hero (css/px-ext-adminer.css): a window with the file tree and the code editor,
 * a Search card and an Upload card overlapping its lower edge. Scoped under .pxfm.
 */
.tp-ext-detail .txd-hero .visual.pxt { background: none; padding: 0; border-radius: 0; display: block; overflow: visible; }

.pxfm {
	--pxfm-navy: var(--tp-navy, #050038);
	--pxfm-green: var(--ds-green, #22c55e);
	--pxfm-ink: var(--ds-green-ink, #0f6b31);
	--pxfm-soft: var(--ds-green-soft, #e6f8ec);
	--pxfm-line: #eef1f5;
	--pxfm-mute: #8a93a6;
	--pxfm-text: #3b4256;
	position: relative; padding: 8px 0 30px; font-size: 12px; line-height: 1.35; color: var(--pxfm-navy);
	font-family: Inter, "SF Pro Text", system-ui, -apple-system, sans-serif; text-align: left;
}
.pxfm *, .pxfm *::before, .pxfm *::after { box-sizing: border-box; }

/* window */
.pxfm-win { position: relative; width: 100%; background: #fff; border-radius: 16px; overflow: hidden;
	box-shadow: 0 0 0 1px rgba(5,0,56,.07), 0 10px 26px rgba(5,0,56,.10); display: grid; grid-template-columns: 31% 1fr; grid-template-rows: auto 1fr; }
/* top strip as in the component: pinned Explorer tab + open file tabs */
.pxfm-bar { grid-column: 1 / -1; display: flex; align-items: stretch; background: #f7f9fb; border-bottom: 1px solid #e3e7ee; white-space: nowrap; overflow: hidden; }
.pxfm-xt, .pxfm-ft { display: flex; align-items: center; gap: 6px; padding: 9px 13px; font-weight: 500; color: #3b4256; border-right: 1px solid #e3e7ee; }
.pxfm-xt i { color: #f5b301; }
.pxfm-ft i { color: #b0b7c5; }
.pxfm-ft em { font-size: 9px; color: #9aa3b5; margin-left: 4px; }
.pxfm-ft.is-on { background: #fff; color: var(--pxfm-navy); box-shadow: inset 0 -2px 0 #2f7de1; }
.pxfm-tools { display: flex; gap: 4px; padding: 0 2px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--pxfm-line); }
.pxfm-tools i { flex: 1; height: 22px; display: flex; align-items: center; justify-content: center; border: 1px solid #dfe3ea; border-radius: 5px; background: #fff; color: #3b4256; font-size: 10px; }
.pxfm-crumb { display: flex; align-items: center; gap: 6px; padding: 10px 12px; color: #3b4256; font-size: 11px; white-space: nowrap; overflow: hidden; border-bottom: 1px solid var(--pxfm-line); }
.pxfm-crumb i { color: #f5b301; }
.pxfm-crumb s { text-decoration: none; color: #b0b7c5; }
.pxfm-crumb b { color: var(--pxfm-navy); font-weight: 600; }
.pxfm-btns { display: flex; gap: 5px; padding: 8px 12px; white-space: nowrap; overflow: hidden; border-bottom: 1px solid var(--pxfm-line); }
.pxfm-btns span { display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border: 1px solid #dfe3ea; border-radius: 5px; color: #3b4256; font-size: 10.5px; font-weight: 500; }
.pxfm-btns i { font-size: 9px; }
.pxfm-btns .is-save { color: #9aa3b5; }
.pxfm-h { display: flex; align-items: center; gap: 6px; font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pxfm-mute); margin: 0 0 6px 6px; }
.pxfm-h b { width: 7px; height: 7px; border-radius: 2px; background: var(--pxfm-green); }
.pxfm-seg { margin-left: auto; display: flex; border: 1px solid #dfe3ea; border-radius: 5px; overflow: hidden; letter-spacing: 0; text-transform: none; font-weight: 600; }
.pxfm-seg u { text-decoration: none; background: #e8f0fe; color: #1d4ed8; padding: 2px 6px; }
.pxfm-seg { color: #3b4256; }
.pxfm-seg em { font-style: normal; padding: 2px 6px; }


/* tree */
.pxfm-side { background: #f7f9fb; border-right: 1px solid var(--pxfm-line); padding: 12px 8px 16px; display: flex; flex-direction: column; gap: 1px; }
.pxfm-f { display: flex; align-items: center; gap: 7px; height: 24px; padding: 0 6px 0 calc(6px + var(--d, 0) * 11px); border-radius: 7px; font-weight: 600; color: var(--pxfm-text); white-space: nowrap; transition: background .25s, color .25s; }
.pxfm-f { font-weight: 500; }
.pxfm-f b { flex: none; width: 8px; font-size: 7px; color: #6b7385; }
.pxfm-f i { flex: none; width: 12px; font-size: 11px; color: #c4cad6; text-align: center; }
.pxfm-f.is-dir i { color: #f5b301; }
.pxfm-f.is-root { font-weight: 700; color: var(--pxfm-navy); background: #e8f0fe; }
.pxfm-f.is-root i { color: #6b7385; }
.pxfm-f.is-on { background: #e8f0fe; color: #1d4ed8; }
/* file-type colours as in the component: code blue, text grey */
.pxfm i.is-code { color: #3b82f6 !important; }
.pxfm i.is-text { color: #8a93a6 !important; }

/* editor */
.pxfm-main { position: relative; min-width: 0; padding-bottom: 82px; }
.pxfm-tabs { display: flex; border-bottom: 1px solid var(--pxfm-line); background: #fafbfc; }
.pxfm-tab { padding: 9px 14px; font-weight: 600; color: var(--pxfm-mute); border-right: 1px solid var(--pxfm-line); white-space: nowrap; }
.pxfm-tab.is-on { color: var(--pxfm-navy); background: #fff; box-shadow: inset 0 -2px 0 var(--pxfm-green); }
.pxfm-code { display: flex; flex-direction: column; padding: 8px 0; font: 500 11.5px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--pxfm-navy); transition: opacity .3s; }
.pxfm-ln { display: flex; align-items: center; height: 21px; padding-right: 10px; white-space: pre; transition: background .25s; }
.pxfm-ln em { flex: none; width: 30px; padding-right: 10px; text-align: right; font-style: normal; color: #b0b7c5; }
.pxfm-code .c { color: #008000; }
.pxfm-code .s { color: #800000; }
.pxfm-code .p { color: #e50000; }
.pxfm-code .n { color: #098658; }
.pxfm-sw { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 3px; background: var(--pxfm-green); transition: background .25s; }
.pxfm-v { color: #0451a5; }
.pxfm-edit.is-edit { background: #f3fcf6; box-shadow: inset 2px 0 0 var(--pxfm-green); }
.pxfm-edit.is-edit .pxfm-v::after { content: ""; display: inline-block; width: 1.5px; height: 1em; margin-left: 1px; vertical-align: -2px; background: var(--pxfm-navy); animation: pxfm-blink 1s steps(1) infinite; }
.pxfm-edit.is-old .pxfm-v { color: #b42318; }
.pxfm-code.is-hidden { opacity: 0; }

.pxfm-toast { position: absolute; left: 50%; top: 116px; transform: translate(-50%, 6px); display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; background: var(--pxfm-navy); color: #fff; font-weight: 700; white-space: nowrap; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; }
.pxfm-toast i { color: var(--pxfm-green); }
.pxfm-toast span { font-weight: 500; color: #b9c1e0; }
.pxfm-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* cards */
.pxfm-cards { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; align-items: start; margin: -64px 18px 0 18px; }
.pxfm-card { background: #fff; border-radius: 14px; padding: 13px 14px 14px; box-shadow: 0 0 0 1px rgba(5,0,56,.06), 0 10px 24px rgba(5,0,56,.13); min-width: 0; }
.pxfm-q { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border: 1.5px solid var(--pxfm-green); border-radius: 8px; color: var(--pxfm-navy); font-weight: 600; margin-bottom: 8px; }
.pxfm-q i { color: var(--pxfm-mute); font-size: 11px; }
.pxfm-q.is-typing .pxfm-qt::after { content: ""; display: inline-block; width: 1.5px; height: 1em; margin-left: 1px; vertical-align: -2px; background: var(--pxfm-navy); animation: pxfm-blink 1s steps(1) infinite; }
.pxfm-hit { display: flex; align-items: center; gap: 7px; height: 26px; padding: 0 6px; border-radius: 7px; color: var(--pxfm-text); white-space: nowrap; font-size: 11px; transition: opacity .25s, background .25s; }
.pxfm-hit i { flex: none; font-size: 10px; }
.pxfm-path { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pxfm-hit b { color: var(--pxfm-navy); font-weight: 500; background: #fde68a; border-radius: 2px; padding: 0 1px; }
.pxfm-hit + .pxfm-hit { margin-top: 2px; }
.pxfm-hit:first-of-type { background: #f7f9fb; }
.pxfm-drop { display: flex; align-items: center; justify-content: center; gap: 7px; height: 44px; padding: 0 10px; white-space: nowrap; overflow: hidden; border: 1.5px dashed #c9d0dc; border-radius: 9px; color: var(--pxfm-mute); font-weight: 600; transition: border-color .25s, background .25s, color .25s; }
.pxfm-drop i { flex: none; }
.pxfm-drop span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pxfm-drop.is-over { border-color: var(--pxfm-green); background: var(--pxfm-soft); color: var(--pxfm-ink); }
.pxfm-done { margin-top: 10px; transition: opacity .25s; }
.pxfm-file { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--pxfm-ink); }
.pxfm-file em { margin-left: auto; font-style: normal; font-size: 10px; color: var(--pxfm-mute); }
.pxfm-prog { height: 5px; margin-top: 7px; border-radius: 9px; background: #eef1f5; overflow: hidden; }
.pxfm-prog span { display: block; height: 100%; width: 100%; background: var(--pxfm-green); border-radius: 9px; transition: width 1s ease-out; }

.pxfm .is-hidden { opacity: 0; }

.pxfm-rp { all: unset; position: absolute; right: 2px; bottom: 6px; cursor: pointer; color: var(--pxfm-mute); font-size: 12px; padding: 4px; }
.pxfm-rp:hover, .pxfm-rp:focus-visible { color: var(--pxfm-ink); }

@keyframes pxfm-blink { 50% { opacity: 0; } }

@media (max-width: 640px) {
	.pxfm { font-size: 11px; }
	.pxfm-btns span:nth-child(n+4) { display: none; }
	.pxfm-win { grid-template-columns: 36% 1fr; }
	.pxfm-f { padding-left: calc(6px + var(--d, 0) * 7px); }
	.pxfm-main { padding-bottom: 16px; }
	.pxfm-code { font-size: 10px; }
	.pxfm-ln em { width: 22px; padding-right: 6px; }
	.pxfm-toast { top: auto; bottom: 12px; }
	.pxfm-cards { grid-template-columns: 1fr; margin: 10px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
	.pxfm *, .pxfm *::after { animation: none !important; transition: none !important; }
}
