/* Photos, videos and PDFs in chat - Content/js/jr-chat-files.js. Works inside every chat's bubbles: colours
   come from the bubble (currentColor / translucent backgrounds), so "mine" and "theirs" both read well. */
.jcf-img { display: block; width: 260px; max-width: 100%; max-height: 340px; margin: 2px 0; border-radius: 12px; overflow: hidden; background: rgba(127, 127, 127, .14); cursor: zoom-in; line-height: 0; }
.jcf-img img { display: block; width: 100%; height: 100%; max-height: 340px; object-fit: cover; }
.jcf-video { width: 280px; max-width: 100%; margin: 2px 0; border-radius: 12px; overflow: hidden; background: #000; line-height: 0; }
.jcf-video video { display: block; width: 100%; max-height: 360px; background: #000; }
.jcf-file { display: flex; align-items: center; gap: 10px; min-width: 220px; max-width: 300px; margin: 2px 0; padding: 8px 10px; border-radius: 12px; background: rgba(127, 127, 127, .14); color: inherit; }
.jcf-ico { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(220, 38, 38, .14); color: #dc2626; }
.jcf-file.is-gone .jcf-ico { background: rgba(127, 127, 127, .18); color: inherit; opacity: .7; }
.jcf-info { flex: 1; min-width: 0; line-height: 1.25; }
.jcf-info b { display: block; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jcf-info small { display: block; font-size: 11.5px; opacity: .75; }
.jcf-btn { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: inherit !important; text-decoration: none !important; background: rgba(127, 127, 127, .16); transition: background .15s; }
.jcf-btn:hover, .jcf-btn:focus-visible { background: rgba(127, 127, 127, .3); }

/* the attach button (each chat gives it its own round-button class too) */
[data-jcf-ready] svg { display: block; margin: auto; }
.jcf-drop { outline: 3px dashed rgba(79, 70, 229, .6); outline-offset: -6px; }

/* sending */
.jcf-progress { position: fixed; left: 50%; bottom: 24px; z-index: 100000; transform: translate(-50%, 20px); display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 999px; background: #0f172a; color: #fff; font: 600 13px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif; box-shadow: 0 10px 30px rgba(15, 23, 42, .35); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.jcf-progress.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.jcf-progress-bar { width: 90px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.jcf-progress-bar i { display: block; height: 100%; width: 0; background: #818cf8; transition: width .2s; }
.jcf-progress button { border: 0; border-radius: 999px; padding: 6px 12px; background: rgba(255, 255, 255, .14); color: #fff; font: inherit; cursor: pointer; }
.jcf-progress button:hover { background: rgba(255, 255, 255, .26); }

/* photo viewer */
.jcf-lb { position: fixed; inset: 0; z-index: 100001; display: none; align-items: center; justify-content: center; padding: 64px 16px 16px; background: rgba(2, 6, 23, .92); }
.jcf-lb.is-on { display: flex; }
.jcf-lb img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.jcf-lb-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: #fff; }
.jcf-lb-name { flex: 1; min-width: 0; font: 600 14px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jcf-lb-btn { width: 40px; height: 40px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fff !important; cursor: pointer; text-decoration: none !important; }
.jcf-lb-btn:hover, .jcf-lb-btn:focus-visible { background: rgba(255, 255, 255, .25); }
@media (max-width: 575px) { .jcf-img { width: 220px; } .jcf-video { width: 240px; } .jcf-progress { bottom: 84px; } }
