/* apxfx: styles for the device-audit fixes (PRSXA + Pearl AI). Prefix apxfx-. Uses the existing --pxs-* / --app-* colours. */

/* ---------- "Your file is ready" (phones and tablets) */
.apxfx-dl{position:fixed;inset:0;z-index:2147483000;display:flex;align-items:flex-end;justify-content:center;background:rgba(8,12,24,.42);opacity:0;transition:opacity .16s ease}
.apxfx-dl.is-in{opacity:1}
.apxfx-dl-box{width:100%;max-width:520px;margin:0 auto;padding:16px 16px calc(16px + env(safe-area-inset-bottom));border-radius:18px 18px 0 0;background:var(--pxs-panel,#fff);color:var(--pxs-text,#0f172a);border:1px solid var(--pxs-line-hi,rgba(15,23,42,.14));border-bottom:0;box-shadow:0 -18px 50px rgba(5,10,24,.28);transform:translateY(16px);transition:transform .18s ease;font-family:var(--pxs-font,Inter,system-ui,sans-serif)}
.apxfx-dl.is-in .apxfx-dl-box{transform:none}
.apxfx-dl-h{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.apxfx-dl-ic{flex:none;display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:var(--pxs-acc-soft,rgba(49,97,232,.1));color:var(--pxs-acc,#3161E8)}
.apxfx-dl-tt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.apxfx-dl-tt b{font-size:16px;font-weight:650}
.apxfx-dl-tt span{font-size:13px;color:var(--pxs-dim,#57617a);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.apxfx-dl-x{flex:none;display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:12px;background:transparent;color:var(--pxs-dim,#57617a);cursor:pointer}
.apxfx-dl-x:hover{background:var(--pxs-hover,rgba(15,23,42,.05))}
.apxfx-dl-a{display:flex;flex-direction:column;gap:8px}
.apxfx-dl-b{min-height:48px;width:100%;justify-content:flex-start;padding:0 16px;font-size:15px}
.apxfx-dl-st{min-height:0;margin-top:10px;font-size:13px;line-height:1.45;display:flex;gap:6px;align-items:flex-start}
.apxfx-dl-st:empty{display:none}
.apxfx-dl-st svg{flex:none;margin-top:1px}
.apxfx-dl-st.is-ok{color:var(--pxs-dim,#57617a)}.apxfx-dl-st.is-ok svg{color:var(--pxs-good,#1f9d55)}
.apxfx-dl-st.is-bad{color:var(--pxs-bad,#d0453a);font-weight:600}
@media (min-width:700px){.apxfx-dl{align-items:center}.apxfx-dl-box{border-radius:18px;border-bottom:1px solid var(--pxs-line-hi,rgba(15,23,42,.14));padding-bottom:16px}}
@media (prefers-reduced-motion:reduce){.apxfx-dl,.apxfx-dl-box{transition:none}}

/* ---------- Data Studio: Close file, "Closed … Undo", answer inside the Ask panel */
.apxfx-closef{display:none;align-items:center;gap:4px;margin-top:2px;padding:2px 8px 2px 6px;min-height:26px;border:1px solid var(--pxs-line,rgba(15,23,42,.1));border-radius:999px;background:transparent;color:var(--pxs-dim,#57617a);font:inherit;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap;width:max-content}
.apxfx-closef:hover{color:var(--pxs-text,#0f172a);background:var(--pxs-hover,rgba(15,23,42,.05))}
.apxfx-closef:focus-visible{outline:2px solid var(--pxs-acc,#3161E8);outline-offset:2px}
.apxda-has .apxfx-closef{display:inline-flex}
.apxfx-closed{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:center;margin:0 0 12px;padding:8px 12px;border-radius:12px;background:var(--pxs-acc-soft,rgba(49,97,232,.08));font-size:13px;color:var(--pxs-text,#0f172a)}
.apxfx-closed>svg{color:var(--pxs-good,#1f9d55)}
.apxfx-closed b{font-weight:650;word-break:break-word}
.apxfx-ans{display:flex;flex-direction:column;gap:8px;padding:12px;border:1px solid var(--pxs-line,rgba(15,23,42,.1));border-radius:12px;background:var(--pxs-side,rgba(15,23,42,.02))}
.apxfx-ans-h{display:flex;flex-direction:column;gap:2px}
.apxfx-ans-st{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:650}
.apxfx-ans[data-st="done"] .apxfx-ans-st svg,.apxfx-ans[data-st="lost"] .apxfx-ans-st svg{color:var(--pxs-good,#1f9d55)}
.apxfx-ans[data-st="bad"] .apxfx-ans-st{color:var(--pxs-bad,#d0453a)}
.apxfx-ans-q{font-size:12.5px;color:var(--pxs-dim,#57617a);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.apxfx-ans-b{max-height:min(46vh,420px);overflow:auto;font-size:14px;line-height:1.55;overscroll-behavior:contain}
.apxfx-ans-b>:first-child{margin-top:0}.apxfx-ans-b>:last-child{margin-bottom:0}
.apxfx-ans-b table{border-collapse:collapse;font-size:13px}.apxfx-ans-b th,.apxfx-ans-b td{border:1px solid var(--pxs-line,rgba(15,23,42,.12));padding:4px 8px}
.apxfx-ans-wait{margin:0;color:var(--pxs-dim,#57617a)}
.apxfx-ans-a{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.apxfx-ans-a [hidden]{display:none}
.apxfx-spin{width:13px;height:13px;border-radius:50%;border:2px solid currentColor;border-right-color:transparent;display:inline-block;animation:apxfxSpin .8s linear infinite;color:var(--pxs-acc,#3161E8)}
@keyframes apxfxSpin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.apxfx-spin{animation-duration:2.4s}}
@media (max-width:640px){.apxfx-ans-a .pxs-btn{min-height:44px;flex:1}.apxfx-closef{min-height:30px}}

/* ---------- Email draft card: a wrong address is red on every screen (phones included) */
.apxdc-mail .apxdc-mf.has-err input.apxdc-mi,.apxdc-mail .apxdc-mf.has-err input.apxdc-mi:focus{border:1.5px solid var(--apxdc-err,#d0453a)!important;box-shadow:0 0 0 3px rgba(208,69,58,.14)!important;color:var(--apxdc-err,#d0453a)!important;-webkit-text-fill-color:var(--apxdc-err,#d0453a)}
.apxdc-mail .apxdc-mf.has-err>label{color:var(--apxdc-err,#d0453a)}

/* ---------- slides: a sideways swipe is not taken by the page scroll */
.pdk .pdk-view,.apxdk-stage{touch-action:pan-y pinch-zoom}
.pdk-pres{touch-action:pan-y pinch-zoom}

/* ---------- Code Studio: the new file / new folder / rename row in the FILES panel is as compact as the file rows */
.pcs-ov .pcs-newrow{padding:2px 8px 6px}
.pcs-ov .pcs-newrow .pcs-nhint{font-size:11.5px!important;line-height:1.35!important;margin:0 0 4px 2px!important;color:var(--pcs-dim,#64748b)!important}
.pcs-ov .pcs-newrow .pcs-nform{gap:4px!important;min-width:0}
.pcs-ov .pcs-newrow .pcs-in{height:28px;padding:0 8px;border-radius:7px;font-size:13.5px!important;line-height:26px}
.pcs-ov .pcs-newrow [data-nact="ok"]{height:28px!important;min-height:28px!important;padding:0 10px!important;border-radius:7px;font-size:12.5px;font-weight:500;gap:0}
.pcs-ov .pcs-newrow [data-nact="x"]{width:24px;height:24px;border-radius:6px}
.pcs-ov .pcs-newrow [data-nact="x"] svg{width:14px;height:14px}
.pcs-ov .pcs-newrow .pcs-ferr{margin:4px 2px 0;font-size:12px;line-height:1.4}
.pcs-ov .pcs-newrow .pcs-in.is-bad{border-color:var(--pcs-err,#d92d20)}
@media (pointer:coarse),(max-width:640px){ /* phones: 16px text so the page does not zoom, rows as tall as the phone file rows */
  .pcs-ov .pcs-newrow .pcs-in{height:36px;font-size:16px!important;line-height:34px} /* fx12-n1: compact on phones (typed text stays 16px) */
  .pcs-ov .pcs-newrow [data-nact="ok"]{height:34px!important;min-height:34px!important;min-width:0!important;padding:0 11px!important;font-size:13px!important;font-weight:600}
  .pcs-ov .pcs-newrow [data-nact="x"]{width:34px;height:34px;min-width:34px;min-height:34px}
  .pcs-ov .pcs-newrow [data-nact="x"] svg{width:16px;height:16px}
}

/* ---------- waiting for a stopped answer to end before sending (above the message box) */
.apxfx-hold{display:flex;align-items:center;gap:8px;margin:0 0 6px;padding:7px 12px;border-radius:12px;border:1px solid var(--pxs-line,rgba(15,23,42,.1));background:var(--pxs-panel,#fff);color:var(--pxs-dim,#57617a);font-size:13px;line-height:1.4}
.apxfx-hold[hidden]{display:none}
.apxfx-hold-t{flex:1;min-width:0}
.apxfx-hold-b{flex:none;min-height:32px;padding:0 12px;border-radius:9px;border:1px solid var(--pxs-line-hi,rgba(15,23,42,.18));background:transparent;color:var(--pxs-text,#0f172a);font:inherit;font-weight:600;cursor:pointer}
.apxfx-hold-b[hidden]{display:none}
@media (pointer:coarse){.apxfx-hold-b{min-height:40px}}
