/* Chat · attach a listing (saved / mine) bottom sheet + listing message card */
.mr-cv-attach-btn svg { width:21px; height:21px; stroke-width:2; fill:none; stroke:currentColor; }
.mr-cv-attach-btn:disabled { opacity:.45; }

.mr-att { position:fixed; inset:0; z-index:200; display:flex; align-items:flex-end; justify-content:center; pointer-events:none; }
.mr-att-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.55); opacity:0; transition:opacity .22s ease; pointer-events:auto; }
.mr-att.is-open .mr-att-backdrop { opacity:1; }
.mr-att-panel {
  position:relative; width:100%; max-width:520px; max-height:82dvh; display:flex; flex-direction:column; pointer-events:auto;
  padding:10px 14px calc(18px + env(safe-area-inset-bottom,0px)); border-radius:32px 32px 0 0; color:#fff;
  background:#0c0c0e;
  box-shadow:0 -12px 40px rgba(0,0,0,.5);
  transform:translateY(100%); transition:transform .3s cubic-bezier(.2,.85,.25,1); font-family:inherit;
}
.mr-att.is-open .mr-att-panel { transform:translateY(0); }
.mr-att-grab { display:block; width:38px; height:5px; margin:0 auto 14px; border-radius:99px; background:rgba(255,255,255,.22); }
.mr-att-seg { display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:4px; border-radius:999px; background:#17171a; border:0; }
.mr-att-seg button { height:44px; display:flex; align-items:center; justify-content:center; gap:7px; border:0; border-radius:999px; background:transparent; color:rgba(255,255,255,.62); font:inherit; font-size:14px; font-weight:750; cursor:pointer; transition:background .2s,color .2s; }
.mr-att-seg button em { font-style:normal; font-size:11.5px; min-width:20px; height:20px; padding:0 6px; display:inline-grid; place-items:center; border-radius:99px; background:rgba(255,255,255,.12); }
.mr-att-seg button.is-active { background:rgba(255,255,255,.95); color:#14101a; box-shadow:0 4px 14px rgba(0,0,0,.35); }
.mr-att-seg button.is-active em { background:rgba(20,16,26,.1); }
.mr-att-body { flex:1; min-height:0; overflow-y:auto; margin:14px -4px 0; padding:0 4px; overscroll-behavior:contain; scrollbar-width:none; }
.mr-att-body::-webkit-scrollbar { display:none; }
.mr-att-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding-bottom:6px; }
.mr-att-tile { position:relative; aspect-ratio:1/1.08; padding:0; overflow:hidden; border:0; border-radius:28px; background:#1a1a1d; color:#fff; cursor:pointer; text-align:start; transition:transform .15s ease; -webkit-tap-highlight-color:transparent; }
.mr-att-tile:active { transform:scale(.97); }
.mr-att-tile img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.mr-att-ph { position:absolute; inset:0; display:grid; place-items:center; color:rgba(255,255,255,.4); }
.mr-att-ph .mr-chat-car-thumb { width:60%; height:auto; background:none; }
.mr-att-tile::after { content:""; position:absolute; inset:0; background:linear-gradient(to top,rgba(0,0,0,.88) 0%,rgba(0,0,0,.35) 42%,transparent 70%); pointer-events:none; }
.mr-att-cap { position:absolute; z-index:1; left:0; right:0; bottom:0; display:flex; flex-direction:column; gap:2px; padding:0 15px 14px; }
.mr-att-cap b { font-size:14.5px; font-weight:800; line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; text-shadow:0 1px 8px rgba(0,0,0,.5); }
.mr-att-cap small { font-size:12px; font-weight:600; color:rgba(255,255,255,.72); }
.mr-att-empty { padding:46px 20px; text-align:center; }
.mr-att-empty b { display:block; font-size:15px; font-weight:800; }
.mr-att-empty p { margin:6px 0 0; font-size:12.5px; line-height:1.8; color:rgba(255,255,255,.58); }

/* message that carries a listing */
.mr-cv-att { position:relative; width:min(62%,240px); aspect-ratio:1/1.08; padding:0; overflow:hidden; border:0; border-radius:26px; background:#1a1a1d; color:#fff; cursor:pointer; text-align:start; }
.mr-cv-row.is-mine .mr-cv-att { box-shadow:0 0 0 2px var(--cv-out); }
.mr-cv-att img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.mr-cv-att-ph { position:absolute; inset:0; display:grid; place-items:center; color:rgba(255,255,255,.4); }
.mr-cv-att::after { content:""; position:absolute; inset:0; background:linear-gradient(to top,rgba(0,0,0,.88),rgba(0,0,0,.2) 55%,transparent 75%); pointer-events:none; }
.mr-cv-att-info { position:absolute; z-index:1; left:0; right:0; bottom:0; display:flex; flex-direction:column; gap:2px; padding:0 14px 12px; }
.mr-cv-att-info b { font-size:14px; font-weight:800; line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.mr-cv-att-info small { font-size:11.5px; font-weight:600; color:rgba(255,255,255,.75); }
@media (prefers-reduced-motion:reduce) { .mr-att-panel,.mr-att-backdrop { transition:none; } }

/* Reply to a message */
.mr-cv-row { touch-action:pan-y; }
.mr-cv-row > .mr-cv-bubble, .mr-cv-row > .mr-cv-att { transform:translateX(var(--sw,0px)); transition:transform .2s ease; }
.mr-cv-row.is-swiping > .mr-cv-bubble, .mr-cv-row.is-swiping > .mr-cv-att { transition:none; }
.mr-cv-row { position:relative; }
.mr-cv-row::before { content:""; position:absolute; top:50%; width:30px; height:30px; margin-top:-15px; border-radius:50%; opacity:0; transform:scale(.6); transition:opacity .15s, transform .15s; pointer-events:none;
  background:rgba(255,255,255,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 8 5 12.5 10 17'/%3E%3Cpath d='M5 12.5h8a6 6 0 0 1 6 6'/%3E%3C/svg%3E") center/16px no-repeat; }
.mr-cv-row.is-swiping::before { opacity:.7; }
.mr-cv-row.is-armed::before { opacity:1; transform:scale(1); }
.mr-cv-row.is-mine::before { right:4px; }
.mr-cv-row.is-theirs::before { left:4px; }
.mr-cv-row.is-flash .mr-cv-bubble, .mr-cv-row.is-flash .mr-cv-att { animation:mrCvFlash 1.2s ease; }
@keyframes mrCvFlash { 0%,60% { filter:brightness(1.55); } 100% { filter:none; } }
.mr-cv-quote { display:flex; flex-direction:column; gap:1px; margin:0 0 6px; padding:4px 10px; border-inline-start:3px solid rgba(255,255,255,.55); border-radius:6px; background:rgba(0,0,0,.18); cursor:pointer; }
.mr-cv-quote b { font-size:11.5px; font-weight:800; opacity:.9; }
.mr-cv-quote small { font-size:12px; line-height:1.6; font-weight:600; opacity:.75; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.mr-cv-replybar { display:flex; align-items:center; gap:10px; padding:8px 12px; border-radius:18px; background:#17171a; border:1px solid rgba(255,255,255,.07); }
.mr-cv-replybar[hidden] { display:none; }
.mr-cv-replybar-line { align-self:stretch; width:3px; border-radius:3px; background:var(--cv-out,#2a8cff); }
.mr-cv-replybar-txt { flex:1; min-width:0; display:flex; flex-direction:column; text-align:start; }
.mr-cv-replybar-txt b { font-size:12px; font-weight:800; color:#e8e8ec; }
.mr-cv-replybar-txt small { font-size:12px; color:#9a9aa1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mr-cv-replybar-x { flex:0 0 auto; width:28px; height:28px; display:grid; place-items:center; border:0; border-radius:50%; background:#2a2a2d; color:#e8e8ec; cursor:pointer; }
.mr-cv-replybar-x svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; }

/* Space around listing cards in the chat */
.mr-cv-row:has(> .mr-cv-att) { margin:10px 0; }
.mr-cv-row.has-tail:has(> .mr-cv-att) { margin-bottom:14px; }
