/* Chat links (Work-ID 20261019-chat-links-93f2): the base look of the link menus, the Pokémon chip in a chat line and the card it opens, for every screen (the desktop gets the gothic version in
   ui/theme/gothic-chat.css, which loads later). AGENTS.md "Absolute UI hover geometry": a chip, a menu row and the card's close button keep their authored box in idle, hover, focus and pressed;
   a state only repaints a colour or an inset shadow. */
.chat-mon-chip{box-sizing:border-box;display:inline-flex;align-items:center;gap:4px;max-width:100%;height:23px;margin:0 2px;padding:0 6px 0 2px;border:1px solid #2c3853;border-radius:3px;background:#1c263c;color:#f5c76b;font:700 12px/15px Arial,sans-serif;vertical-align:middle;white-space:nowrap;overflow:hidden;cursor:pointer}
.chat-mon-chip:hover,.chat-mon-chip:focus-visible,.chat-mon-chip.open{border-color:#f5c76b;background:#222d48;outline:none}
.chat-mon-icon{flex:0 0 20px;width:20px;height:20px;background-repeat:no-repeat;background-size:200% 100%;background-position:0 0;image-rendering:pixelated}
.chat-mon-name{min-width:0;overflow:hidden;text-overflow:ellipsis}
.chat-mon-level{flex:0 0 auto;color:#d8c08a;font-size:11px;font-weight:700}
/* the menus inside the chat's link popover */
.chat-link-cats{display:grid;grid-template-columns:1fr;gap:4px;flex:0 0 auto}
.chat-link-cat{box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;height:36px;padding:0 8px;text-align:left}
.chat-link-cat:disabled{opacity:.5;cursor:default}
.chat-link-cat-icon{flex:0 0 20px;text-align:center}
.chat-link-cat-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-link-cat-count{flex:0 0 auto;font-variant-numeric:tabular-nums}
.chat-link-bar{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.chat-link-bar .chat-popover-title{flex:1 1 auto;min-width:0}
.chat-link-back{box-sizing:border-box;flex:0 0 auto;height:27px;padding:0 8px}
.chat-link-search{box-sizing:border-box;flex:0 0 auto;width:100%;height:27px;padding:3px 6px}
.chat-link-holder{display:flex;flex-direction:column;gap:4px;min-height:0;flex:1 1 auto;overflow:hidden}
.chat-link-list.mons{grid-template-columns:1fr}
.chat-link-item-name{display:block;flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-link-item-meta{flex:0 0 auto;font-size:11px;opacity:.85;white-space:nowrap}
.chat-link-item .pc-icon{flex:0 0 25px;width:25px;height:25px;background-repeat:no-repeat;background-size:200% 100%;background-position:0 0;image-rendering:pixelated}
.chat-link-item .pc-icon-wrap{flex:0 0 25px;width:25px;height:25px;position:relative}
.chat-link-item .pc-icon-fallback{flex:0 0 25px;width:25px;height:25px;object-fit:contain}
/* the Pokémon card: left of the chat rail on a desktop (the position is set by chat_links.js), a bottom sheet on a phone */
.chat-mon-card{position:fixed;left:var(--cmc-x,8px);top:var(--cmc-y,8px);z-index:950;box-sizing:border-box;width:300px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);overflow-x:hidden;overflow-y:auto;padding:12px;border:1px solid #2c3853;border-radius:6px;background:#141b2b;color:#e5e2dd;font:400 12px/16px Arial,sans-serif;box-shadow:0 12px 36px #0d111ccc}
.chat-mon-card:focus{outline:none}
.cmc-head{display:grid;grid-template-columns:76px minmax(0,1fr) 22px;gap:10px;align-items:center}
.cmc-art{display:grid;place-items:center;width:76px;height:76px;border-radius:4px;background:#192135}
.cmc-art img{max-width:68px;max-height:68px;image-rendering:pixelated}
.cmc-title{display:grid;gap:3px;min-width:0}
.cmc-name{font:700 16px/20px Arial,sans-serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cmc-gender{margin-left:6px}.cmc-gender.male{color:#6aa8ff}.cmc-gender.female{color:#ff7aa8}
.cmc-level{color:#f5c76b;font-weight:700}
.cmc-types{display:flex;flex-wrap:wrap;gap:4px}
.cmc-type{padding:0 6px;border-radius:3px;background:var(--type-color,#888);color:#fff;font:700 11px/16px Arial,sans-serif;text-shadow:0 1px 0 #0d111c88}
.cmc-close{box-sizing:border-box;align-self:start;width:22px;height:22px;padding:0;border:1px solid #2c3853;border-radius:3px;background:#192135;color:#e5e2dd;cursor:pointer;position:relative}
.cmc-close::before{content:"";position:absolute;left:5px;top:5px;width:10px;height:10px;background:linear-gradient(45deg,transparent 41%,currentColor 41% 59%,transparent 59%),linear-gradient(-45deg,transparent 41%,currentColor 41% 59%,transparent 59%)}
.cmc-facts{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 10px;margin:10px 0 0}
.cmc-facts dt{color:#f5c76b;font-weight:700}.cmc-facts dd{margin:0;min-width:0}
.cmc-item{display:inline-flex;align-items:center;gap:5px}
.cmc-up{color:#7ee08a}.cmc-down{color:#ff8a8a}
.cmc-section{margin:10px 0 4px;color:#f5c76b;font:700 11px/14px Arial,sans-serif;letter-spacing:.08em;text-transform:uppercase}
.cmc-moves{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:0;padding:0;list-style:none}
.cmc-move{display:flex;align-items:center;gap:5px;min-width:0;padding:2px 6px;border-radius:3px;background:#192135}
.cmc-dot{flex:0 0 8px;width:8px;height:8px;border-radius:50%;background:var(--type-color,#888)}
.cmc-move-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cmc-move small{flex:0 0 auto;color:#bba98a;font-size:10px}
.cmc-none{margin:0;color:#9d8d78}
.cmc-stats{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}
.cmc-stats th,.cmc-stats td{padding:2px 4px;text-align:right}.cmc-stats th:first-child,.cmc-stats tbody th{text-align:left;font-weight:700}
.cmc-stats thead th{color:#bba98a;font-size:10px;font-weight:700}
.cmc-stats th.up{color:#7ee08a}.cmc-stats th.down{color:#ff8a8a}
.cmc-iv.perfect{color:#7ee08a;font-weight:700}.cmc-iv.high{color:#c8e87a}.cmc-iv.mid{color:#e5e2dd}.cmc-iv.low{color:#9d8d78}
.cmc-foot{margin:6px 0 0;color:#bba98a}
body.mobile-web .chat-mon-card{left:8px!important;right:8px;top:auto!important;bottom:8px;width:auto;max-height:72vh}
/* a phone is wide and short: the card's blocks run in two columns so nothing needs a scroll */
body.mobile-web .chat-mon-card{column-count:2;column-gap:16px}
body.mobile-web .chat-mon-card :is(.cmc-head,.cmc-facts,.cmc-moves,.cmc-stats){break-inside:avoid}
body.mobile-web .chat-mon-card .cmc-section{break-after:avoid}
