/* Report Pug: the same floating bug-report pug and chat as MT-Hub */
/* "Report Pug": floating bug report button, computers only */
.bug-pug { position: fixed; right: 18px; bottom: 18px; z-index: 900; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bug-pug-btn { background: none; border: 0; padding: 0; cursor: pointer; filter: drop-shadow(0 6px 12px rgba(0,0,0,.45)); transition: transform .15s ease; }
.bug-pug-btn:hover { transform: translateY(-3px) rotate(-3deg); }
.bug-pug-btn:focus-visible { outline: 3px solid var(--blue, #249bd3); outline-offset: 4px; border-radius: 50%; }
.bug-pug-btn img { display: block; width: 84px; height: 84px; }
.bug-pug-btn { display: flex; flex-direction: column; align-items: center; }
.bug-pug-sign { position: relative; display: block; background: #ffffff; color: #13202e; font-size: 12px; font-weight: 800; letter-spacing: .02em;
  padding: 4px 9px; border-radius: 7px; border: 2px solid #e0b866; white-space: nowrap; margin-bottom: 7px; transform: rotate(-4deg); }
.bug-pug-sign::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 3px; height: 8px; margin-left: -1px; background: #a07a3a; border-radius: 2px; }
.bug-pug-box { width: 300px; background: #ffffff; color: #13202e; border-radius: 14px; padding: 14px; box-shadow: 0 14px 34px -10px rgba(0,0,0,.6); }
.bug-pug-box label { display: block; font-size: 16px; margin-bottom: 8px; color: #13202e; }
.bug-pug-box textarea { width: 100%; background: #f4f6f8; color: #13202e; border: 1px solid #cfd8e1; border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 15px; resize: vertical; }
.bug-pug-msg { min-height: 1.2em; margin: 6px 0; font-size: 14px; }
.bug-pug-msg.is-ok { color: #12573a; }
.bug-pug-msg.is-error { color: #962015; }
@media (max-width: 900px), (hover: none) { .bug-pug { display: none; } }

.chat{display:flex;flex-direction:column;gap:10px;max-height:60vh;overflow-y:auto;padding:6px 2px 10px;margin-bottom:12px}
.chat-msg{max-width:78%;padding:9px 12px;border-radius:12px;background:var(--soft, #f0f6f7);border:1px solid var(--line, #dbe5ea)}
.chat-msg.mine{align-self:flex-end;background:rgba(47,155,217,.16);border-color:rgba(47,155,217,.4)}
.chat-msg.theirs{align-self:flex-start}
.chat-meta{font-size:12px;color:var(--muted, #607180);margin-bottom:3px}
.chat-body{white-space:normal;overflow-wrap:anywhere}
.chat-reply{display:flex;gap:8px;align-items:flex-end}
.chat-reply textarea{flex:1}
@media (max-width:640px){.chat-msg{max-width:92%}.chat-reply{flex-direction:column;align-items:stretch}}
.dot-new{display:inline-block;width:9px;height:9px;border-radius:50%;background:#d93a3a;vertical-align:middle}
.bug-pug-btn{position:relative}
.bug-pug-dot[hidden]{display:none}
.bug-pug-dot{position:absolute;top:30px;right:-4px;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#d93a3a;color:#fff;font-size:12px;font-weight:700;line-height:20px;text-align:center;pointer-events:none}
.bug-pug-new{margin:0 0 8px;font-weight:600}
.bug-pug-link{margin:8px 0 0;text-align:center;font-size:13.5px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

.bug-pug-box { width: 340px; }
.bug-pug.is-staff .bug-pug-sign { border-color: #7fc3ec; }
.pug-head { display: flex; align-items: center; gap: 8px; margin: -2px 0 10px; }
.pug-title { flex: 1; font-weight: 800; font-size: 15px; color: #13202e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pug-back { background: #eef2f6; border: 0; border-radius: 8px; width: 30px; height: 28px; cursor: pointer; font-size: 16px; color: #13202e; }
.pug-all { font-size: 13px; color: #1f6fa8; }
.pug-sub { font-size: 12.5px; color: #5b6b7b; margin: -6px 0 8px; }
.pug-msgs { display: flex; flex-direction: column; gap: 8px; max-height: 300px; min-height: 80px; overflow-y: auto; padding: 4px 2px 8px; margin-bottom: 8px; border-bottom: 1px solid #e3e9ef; }
.bug-pug-box .chat-msg { max-width: 86%; background: #f1f4f7; border-color: #dde4ea; color: #13202e; padding: 7px 10px; border-radius: 12px; }
.bug-pug-box .chat-msg.mine { background: #d9eefa; border-color: #b6dcf2; }
.bug-pug-box .chat-meta { color: #5b6b7b; font-size: 11.5px; }
.bug-pug-box .chat-body { font-size: 14px; }
.pug-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pug-link { background: none; border: 0; padding: 0; color: #1f6fa8; text-decoration: underline; cursor: pointer; font: inherit; font-size: 13.5px; }
.pug-view[hidden] { display: none; }
#pugList { max-height: 380px; overflow-y: auto; }
.pug-newq { margin-bottom: 10px; }
.pug-empty { color: #5b6b7b; font-size: 14px; margin: 4px 0; }
.pug-item { display: block; width: 100%; text-align: left; background: #f6f8fa; border: 1px solid #e1e7ed; border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; cursor: pointer; color: #13202e; font: inherit; }
.pug-item:hover { background: #eef4f9; }
.pug-item.is-unread { border-color: #2f9bd9; background: #eaf5fc; }
.pug-item-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.pug-item-label { font-size: 11.5px; color: #5b6b7b; white-space: nowrap; }
.pug-item.is-unread .pug-item-label { color: #1f6fa8; font-weight: 700; }
.pug-item-sub { font-size: 12px; color: #5b6b7b; }
.pug-item-snip { font-size: 12.5px; color: #3c4a58; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Screenshots and delete in conversations */
.chat-msg { position: relative; }
.chat-img { display: block; margin-top: 6px; }
.chat-img img { display: block; max-width: 100%; max-height: 220px; border-radius: 8px; border: 1px solid var(--line, #dbe5ea); background: #fff; }
.bug-pug-box .chat-img img { max-height: 160px; border-color: #d4dde6; }
.chat-del { background: none; border: 0; color: #c0392b; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; padding: 0 0 0 6px; text-decoration: underline; }
.chat-del:hover, .chat-del:focus-visible { color: #a02a1d; }
.chat-attach { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 18px; flex: 0 0 auto; }
.chat-attach input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.chat-attach:hover { background: rgba(127,127,127,.15); }
.chat-attach:focus-within { outline: 2px solid #2f9bd9; }
.pug-preview { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.pug-preview[hidden] { display: none; }
.pug-preview img { max-height: 70px; max-width: 140px; border-radius: 6px; border: 1px solid #d4dde6; }
.pug-tip { margin: 6px 0 0; font-size: 12px; color: #5b6b7b; }
.pug-actions > span { display: inline-flex; align-items: center; gap: 4px; }

@media print { #bugPug, .bug-pug { display: none !important; } }
