/* The chat page, in the look of the old chat: dark slate panel, grey search box, green rows,
   light conversation area with blue (mine) and grey (theirs) bubbles. */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #485563; font: 14px/20px "Lato", Arial, sans-serif; color: #fff; }
.cc { position: relative; max-width: 480px; height: 100%; margin: 0 auto; display: flex; flex-direction: column; background-image: linear-gradient(60deg, #29323c 0%, #485563 100%); box-shadow: inset 0 0 30px rgba(0, 0, 0, .8); overflow: hidden; }

/* top bar: green user icon + own name (list) or contact name (conversation) */
.cc-bar { position: relative; display: flex; align-items: center; gap: 8px; height: 42px; flex: none; padding: 0 12px; }
.cc-who { width: 22px; height: 22px; flex: none; fill: #008000; margin-left: 3px; }
.cc-title { font-size: 14px; color: #a9a9a9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc.in-room .cc-who { display: none; }
.cc.in-room .cc-title { font-size: 16px; color: #008000; }
.cc-back { border: 0; background: none; font-size: 34px; line-height: 1; color: #9acd32; padding: 0 6px 6px; cursor: pointer; }
.cc-back[hidden], .cc-list[hidden], .cc-room[hidden] { display: none; }
.cc.in-room .cc-bar { background: #f2f5f8; border-bottom: 2px solid #fff; height: 50px; }

/* search */
.cc-list { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cc-search { position: relative; flex: none; height: 35px; box-shadow: inset 0 0 3px rgba(0, 0, 0, .5); }
.cc-search input { position: absolute; top: 5px; left: 10px; width: calc(100% - 90px); height: 25px; padding: 0 28px 0 7px; border: 0; border-radius: 5px; background: #6a6c75; color: #fff; font: 400 13px Arial; outline: none; }
.cc-search input::placeholder { color: #92959e; opacity: 1; }
.cc-clear { position: absolute; top: 5px; left: calc(100% - 118px); width: 25px; height: 25px; border: 0; background: none; color: #808080; font-size: 13px; cursor: pointer; }
.cc-clear:hover { color: #ccc; }
.cc-lens { position: absolute; top: 6px; left: calc(100% - 76px); width: 22px; height: 22px; fill: none; stroke: #6a6c75; stroke-width: 2; stroke-linecap: round; }

/* people */
.cc-people { flex: 1; overflow-y: auto; margin-top: 6px; background: url(/chat/background1.png); user-select: none; }
.cc-person { position: relative; height: 44px; padding: 0 12px 0 30px; border-bottom: 1px solid #808080; border-top-left-radius: 4px; border-bottom-left-radius: 10px; cursor: pointer; color: #fff; display: flex; flex-direction: column; justify-content: center; font-size: 15px; }
.cc-person:hover { background-color: rgba(255, 255, 255, .1); }
.cc-person::before { content: ""; position: absolute; left: 10px; top: 17px; width: 10px; height: 10px; border-radius: 50%; background: #86bb71; }
.cc-person.unread { background-color: #3f9b4f; }
.cc-person.unread::before { background: #fff; }
.cc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 20px; padding-right: 36px; }
.cc-tag { margin-left: 6px; font-size: 11px; color: #cfe8c3; border: 1px solid #86bb71; border-radius: 8px; padding: 0 6px; }
.cc-last { font-size: 12px; line-height: 16px; color: #a9a9a9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 80%; }
.cc-person.unread .cc-last { color: #e6f4e0; }
.cc-badge { position: absolute; right: 10px; top: 11px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #fff; color: #1f6b30; font-weight: 700; font-size: 12px; display: grid; place-items: center; }

/* conversation */
.cc-room { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #f2f5f8; }
.cc-msgs { flex: 1; overflow-y: auto; padding: 14px 18px; background: #f2f5f8 url(/chat/background1.png); display: flex; flex-direction: column; color: #000; }
.cc-msg { width: 85%; margin-top: 3px; padding: 5px 10px; font-size: 16px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; background: #d3d3d3; border-bottom: 1px solid #808080; border-radius: 7px; border-top-left-radius: 0; align-self: flex-start; }
.cc-msg.mine { background: #add8e6; border-radius: 7px; border-top-right-radius: 0; align-self: flex-end; }
.cc-msg time { display: block; margin-top: 2px; font-size: 12px; line-height: 14px; color: #555; }
.cc-form { display: flex; align-items: flex-end; flex: none; padding: 5px; background: #f2f5f8; border-top: 2px solid #fff; }
.cc-form textarea { flex: 1; min-width: 0; height: 40px; margin-right: 5px; padding: 9px 10px; resize: none; border: 1px solid #808080; border-radius: 10px; font: 1em "Lato", Arial, sans-serif; color: #000; outline: none; }
.cc-form #send { flex: none; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 1px solid #808080; border-radius: 6px; background: #9acd32; color: #000; font-weight: 700; font-size: 14px; cursor: pointer; }
.cc-form #send:disabled { opacity: .5; }
.cc-icon { flex: none; width: 30px; height: 40px; margin-right: 4px; padding: 0; border: 0; background: none; color: #666; cursor: pointer; }
.cc-camera { background: url(/chat/camera.png) center / 24px 24px no-repeat; }
.cc-preview { display: flex; align-items: flex-start; gap: 6px; flex: none; padding: 6px 10px; background: #e6ebf0; border-top: 1px solid #fff; }
.cc-preview[hidden] { display: none; }
.cc-preview img { display: block; max-height: 110px; max-width: 70%; border-radius: 6px; border: 1px solid #808080; }
.cc-preview button { flex: none; width: 22px; height: 22px; border: 0; border-radius: 50%; background: #808080; color: #fff; font-size: 11px; cursor: pointer; }
.cc-photo { display: block; max-width: 100%; max-height: 260px; margin: 2px 0; border-radius: 5px; cursor: zoom-in; }
.cc-zoom { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(0, 0, 0, .85); cursor: zoom-out; }
.cc-zoom img { max-width: 96%; max-height: 96%; }

.cc-note { padding: 28px 20px; text-align: center; color: #cfd6dd; font-size: 15px; }
.cc-note:empty { display: none; }
.cc-empty { padding: 26px 16px; text-align: center; color: #a9a9a9; font-size: 14px; }
.cc-msgs .cc-empty { color: #667; }

/* support desk: the player's profile and the help actions */
.cc-info-btn { margin-left: auto; width: 28px; height: 28px; border: 2px solid #008000; border-radius: 50%; background: none; color: #008000; font: 700 15px Arial; cursor: pointer; }
.cc-info-btn[hidden], .cc-desk[hidden] { display: none; }
.cc-desk { position: absolute; top: 50px; left: 0; right: 0; bottom: 0; z-index: 5; overflow-y: auto; padding: 14px 16px; background: #f2f5f8; color: #000; }
.cc-desk h3 { margin: 0 0 8px; font-size: 16px; color: #1f6b30; }
.cc-desk .row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid #d3d3d3; }
.cc-desk .row span:first-child { color: #555; }
.cc-desk .tk { font-size: 13px; padding: 4px 0; border-bottom: 1px solid #e3e3e3; display: flex; justify-content: space-between; gap: 8px; }
.cc-desk .acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.cc-desk button { height: 36px; padding: 0 14px; border: 1px solid #808080; border-radius: 6px; background: #9acd32; font-weight: 700; cursor: pointer; }
.cc-desk button.warn { background: #e8a0a0; }
.cc-desk .got { margin-top: 10px; padding: 10px; background: #fff; border: 1px dashed #808080; border-radius: 6px; font-size: 16px; user-select: all; }
