diff --git a/kronic-chat/css/borg_shell.css b/kronic-chat/css/borg_shell.css new file mode 100644 index 0000000..1c434fb --- /dev/null +++ b/kronic-chat/css/borg_shell.css @@ -0,0 +1,29 @@ +/* Stage 2 visual shell. Do not re-style existing media cards or player. */ +:root{--borg-rail:170px;--borg-call:58px;--borg-top:60px} +body{background:#0c111a} +.borg-shell{position:fixed;inset:var(--borg-top) 0 0 0;display:flex;z-index:10;pointer-events:none} +.borg-rail{pointer-events:auto;display:flex;flex-direction:column;gap:5px;padding:12px 8px;background:#111a26;border-right:1px solid #2b394b;width:var(--borg-rail);box-sizing:border-box;overflow:auto} +.borg-brand{padding:11px;color:#e5efff;font-weight:800;letter-spacing:1.3px} +.borg-nav{display:flex;gap:10px;align-items:center;text-align:left;background:transparent;color:#c0cfe1;border:0;border-radius:11px;padding:12px 11px;font-size:14px;cursor:pointer;min-height:43px} +.borg-nav:hover,.borg-nav:focus-visible{background:#27374a;color:#fff} +.borg-selected{background:#2c466a;color:#fff} +.borg-rail-spacer{flex:1} +.borg-workspace{min-width:0;flex:1;display:flex;flex-direction:column;padding:12px;pointer-events:auto} +.borg-room-background{border:1px solid #26364b;background:radial-gradient(circle at 65% 30%,#1b2e41,#121d2a 67%);border-radius:17px;flex:1;display:flex;flex-direction:column;min-height:0} +.borg-room-heading{padding:13px 16px;display:flex;gap:15px;align-items:center;justify-content:space-between;color:#e2efff} +#borgChatStatus{font-size:12px;color:#9eafc3} +.borg-avatar-placeholder{margin:auto;text-align:center;color:#c9d7e9;padding:20px;max-width:480px} +.borg-avatar-placeholder h2{font-size:22px;margin:10px 0} +.borg-avatar-placeholder p{font-size:13px;color:#9db0c5} +.borg-avatar-circle{display:grid;place-items:center;width:74px;height:74px;border-radius:50%;background:#314a70;color:#e4edff;margin:auto;font-size:35px} +.borg-call-strip{height:var(--borg-call);min-height:var(--borg-call);display:flex;justify-content:space-between;gap:10px;align-items:center;background:#172434;border:1px solid #2b4059;border-radius:12px;padding:0 15px;margin-top:10px;color:#d1dced} +.borg-notice{font-size:12px;color:#9fb1c5} +.borg-window-wrap{position:fixed;top:calc(var(--borg-top) + 16px);left:calc(var(--borg-rail) + 19px);width:calc(100vw - var(--borg-rail) - 40px);height:calc(100dvh - var(--borg-top) - var(--borg-call) - 52px);z-index:30;background:#111923;border:1px solid #39516e;border-radius:16px;box-shadow:0 20px 65px #0009;display:flex;flex-direction:column;overflow:hidden;resize:both;min-width:320px;min-height:260px} +.borg-window-wrap[hidden]{display:none!important} +.borg-window-header{height:47px;min-height:47px;display:flex;align-items:center;justify-content:space-between;gap:10px;background:#1c2a3b;color:#e8f2ff;padding:0 12px;cursor:grab;touch-action:none;user-select:none} +.borg-window-header:active{cursor:grabbing} +.borg-window-actions{display:flex;gap:6px}.borg-window-actions button{min-width:34px;min-height:34px;border:0;background:#304258;color:white;border-radius:8px;cursor:pointer;font-size:20px} +.borg-window-wrap .page-container{position:relative!important;inset:auto!important;width:auto!important;max-width:none!important;flex:1;overflow:auto!important;min-height:0;margin:0!important;padding:12px!important;box-sizing:border-box} +.borg-window-wrap.borg-max{top:calc(var(--borg-top) + 5px)!important;left:calc(var(--borg-rail) + 5px)!important;width:calc(100vw - var(--borg-rail) - 10px)!important;height:calc(100dvh - var(--borg-top) - var(--borg-call) - 13px)!important;resize:none} +/* The original topbar and player overlay remain untouched. */ +@media(max-width:700px){:root{--borg-rail:57px;--borg-top:55px;--borg-call:52px}.borg-rail{padding:6px 3px}.borg-brand{font-size:13px;padding:11px 4px}.borg-brand span,.borg-nav span{display:none}.borg-nav{justify-content:center;font-size:20px;padding:9px 3px;min-height:45px}.borg-workspace{padding:6px}.borg-room-heading{font-size:12px}.borg-call-strip{padding:0 8px}.borg-notice{font-size:10px;max-width:140px}.borg-window-wrap{left:62px;top:calc(var(--borg-top) + 5px);width:calc(100vw - 67px);height:calc(100dvh - var(--borg-top) - var(--borg-call) - 12px);min-width:0;min-height:150px;resize:none;border-radius:11px}.borg-window-wrap .page-container{padding:6px!important}.borg-window-wrap.borg-max{left:60px!important;width:calc(100vw - 62px)!important}} diff --git a/kronic-chat/css/chat.css b/kronic-chat/css/chat.css new file mode 100644 index 0000000..d35d639 --- /dev/null +++ b/kronic-chat/css/chat.css @@ -0,0 +1,549 @@ +/* Kronic Chat theme aligned with Music Browser / GIPHY */ + +:root { + --chat-bg: #111; + --chat-panel: #181818; + --chat-panel-2: #222; + --chat-workspace: #313338; + --chat-border: #333; + --chat-border-strong: #444; + --chat-border-hover: #555; + --chat-text: #e0e0e0; + --chat-text-strong: #fff; + --chat-text-soft: #ccc; + --chat-text-muted: #aaa; + --chat-blue: #4a90e2; + --chat-blue-hover: #5aa0f0; + --chat-green: #23a559; + --chat-red: #da373c; + --chat-yellow: #f0b232; + --chat-radius-small: 4px; + --chat-radius: 8px; + --chat-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); +} + +*, +*::before, +*::after { + box-sizing: border-box; +} + +html, +body { + width: 100%; + height: 100%; + margin: 0; + padding: 0; + overflow: hidden; + background: var(--chat-bg); + color: var(--chat-text); + font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; +} + +button, +input { + font: inherit; +} + +.chat-container { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + min-width: 0; + min-height: 0; + overflow: hidden; + background: var(--chat-bg); + color: var(--chat-text); +} + +.chat-header { + display: flex; + flex: 0 0 auto; + align-items: center; + justify-content: space-between; + min-height: 48px; + padding: 8px 10px; + background: var(--chat-bg); + border-bottom: 1px solid rgba(255, 255, 255, 0.06); +} + +.chat-header-info { + display: flex; + align-items: center; + min-width: 0; + gap: 9px; +} + +.chat-status-dot { + flex: 0 0 auto; + width: 8px; + height: 8px; + border-radius: 50%; + background: var(--chat-green); + box-shadow: 0 0 7px rgba(35, 165, 89, 0.65); +} + +.chat-title { + margin: 0; + color: var(--chat-text-strong); + font-size: 14px; + font-weight: 700; + line-height: 1.2; +} + +.chat-subtitle { + margin: 2px 0 0; + color: var(--chat-text-muted); + font-size: 10px; + line-height: 1.2; +} + +.chat-messages { + display: flex; + flex: 1 1 auto; + flex-direction: column; + min-width: 0; + min-height: 0; + padding: 10px; + overflow-x: hidden; + overflow-y: auto; + background: var(--chat-workspace); + scroll-behavior: smooth; + scrollbar-color: #1a1b1e transparent; + scrollbar-width: thin; +} + +.chat-messages::-webkit-scrollbar { + width: 8px; +} + +.chat-messages::-webkit-scrollbar-track { + background: transparent; +} + +.chat-messages::-webkit-scrollbar-thumb { + border: 2px solid transparent; + border-radius: 10px; + background: #1a1b1e; + background-clip: padding-box; +} + +.chat-messages::-webkit-scrollbar-thumb:hover { + background: #111214; + background-clip: padding-box; +} + +.chat-empty { + margin: auto; + padding: 24px 18px; + color: var(--chat-text-muted); + font-size: 12px; + text-align: center; +} + +.chat-message { + display: grid; + grid-template-columns: 38px minmax(0, 1fr); + width: 100%; + padding: 8px; + gap: 9px; + border: 1px solid transparent; + border-radius: var(--chat-radius); + background: rgba(24, 24, 24, 0.72); + transition: background 120ms ease, border-color 120ms ease; +} + +.chat-message + .chat-message { + margin-top: 6px; +} + +.chat-message:hover { + border-color: rgba(255, 255, 255, 0.08); + background: #222; +} + +.chat-avatar { + display: grid; + place-items: center; + width: 38px; + height: 38px; + overflow: hidden; + border: 1px solid var(--chat-border-strong); + border-radius: 6px; + background: #222; + color: #fff; + font-size: 12px; + font-weight: 700; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); +} + +.chat-avatar img { + display: block; + width: 100%; + height: 100%; + object-fit: cover; +} + +.chat-message-body { + min-width: 0; +} + +.chat-message-header { + display: flex; + align-items: baseline; + flex-wrap: wrap; + margin-bottom: 3px; + gap: 7px; +} + +.chat-username { + color: var(--chat-text-strong); + font-size: 12px; + font-weight: 700; +} + +.chat-timestamp { + color: var(--chat-text-muted); + font-size: 9px; + white-space: nowrap; +} + +.chat-message-text { + color: #ddd; + font-size: 12.5px; + line-height: 1.45; + overflow-wrap: anywhere; + white-space: pre-wrap; +} + +.chat-message-text a { + color: #7ab7ff; + text-decoration: none; +} + +.chat-message-text a:hover { + text-decoration: underline; +} + +.chat-message.own-message { + border-color: rgba(74, 144, 226, 0.24); + background: rgba(74, 144, 226, 0.08); +} + +.chat-message.own-message:hover { + border-color: rgba(74, 144, 226, 0.42); + background: rgba(74, 144, 226, 0.12); +} + +.chat-message.system-message { + display: block; + margin: 6px 0; + padding: 8px 10px; + border: 1px solid var(--chat-border); + border-radius: var(--chat-radius-small); + background: #181818; + color: var(--chat-text-muted); + font-size: 11px; + font-style: italic; +} + +.chat-message-image, +.chat-gif { + display: block; + width: auto; + max-width: min(420px, 100%); + max-height: 320px; + margin-top: 8px; + object-fit: contain; + border: 1px solid var(--chat-border); + border-radius: var(--chat-radius); + background: #181818; + box-shadow: var(--chat-shadow); +} + +.chat-media-card, +.chat-file-card { + display: flex; + align-items: center; + width: min(420px, 100%); + margin-top: 8px; + padding: 9px; + overflow: hidden; + border: 1px solid var(--chat-border); + border-radius: var(--chat-radius); + background: #181818; + color: #ddd; + gap: 10px; + transition: border-color 120ms ease, background 120ms ease; +} + +.chat-media-card:hover, +.chat-file-card:hover { + border-color: var(--chat-border-hover); + background: #222; +} + +.chat-file-icon { + display: grid; + place-items: center; + flex: 0 0 38px; + width: 38px; + height: 38px; + border: 1px solid var(--chat-border); + border-radius: 5px; + background: #222; + font-size: 18px; +} + +.chat-file-info { + display: flex; + flex-direction: column; + min-width: 0; + gap: 2px; +} + +.chat-file-link { + overflow: hidden; + color: #7ab7ff; + font-size: 12px; + font-weight: 600; + text-decoration: none; + text-overflow: ellipsis; + white-space: nowrap; +} + +.chat-file-link:hover { + text-decoration: underline; +} + +.chat-file-size { + color: var(--chat-text-muted); + font-size: 10px; +} + +.chat-card-title { + overflow: hidden; + color: var(--chat-text-strong); + font-size: 12px; + font-weight: 700; + text-overflow: ellipsis; + white-space: nowrap; +} + +.chat-card-meta { + margin-top: 3px; + color: var(--chat-text-muted); + font-size: 10px; +} + +.chat-card-actions { + display: flex; + flex-wrap: wrap; + margin-top: 7px; + gap: 5px; +} + +.chat-card-button { + padding: 5px 8px; + border: 1px solid #3b82f6; + border-radius: var(--chat-radius-small); + background: #2b6cb0; + color: #fff; + cursor: pointer; + font-size: 11px; + font-weight: 600; + transition: background 120ms ease, border-color 120ms ease; +} + +.chat-card-button:hover { + border-color: var(--chat-blue-hover); + background: #3479c5; +} + +.chat-input-area { + display: flex; + flex: 0 0 auto; + align-items: center; + padding: 9px 10px; + gap: 6px; + border-top: 1px solid rgba(255, 255, 255, 0.06); + background: var(--chat-bg); +} + +.message-input-wrapper { + flex: 1 1 auto; + min-width: 0; + border: 1px solid #555; + border-radius: var(--chat-radius-small); + background: #222; + transition: border-color 120ms ease, box-shadow 120ms ease; +} + +.message-input-wrapper:hover { + border-color: #666; +} + +.message-input-wrapper:focus-within { + border-color: var(--chat-blue); + box-shadow: 0 0 0 1px rgba(74, 144, 226, 0.35); +} + +.message-input { + width: 100%; + height: 36px; + padding: 0 10px; + border: 0; + outline: 0; + background: transparent; + color: #fff; + font-size: 12px; +} + +.message-input::placeholder { + color: #888; +} + +.chat-action-button { + display: inline-flex; + align-items: center; + justify-content: center; + flex: 0 0 auto; + height: 36px; + min-width: 38px; + padding: 0 9px; + border: 1px solid #444; + border-radius: var(--chat-radius-small); + background: #333; + color: #ccc; + cursor: pointer; + font-size: 11px; + font-weight: 700; + white-space: nowrap; + transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 80ms ease; +} + +.chat-action-button:hover:not(:disabled) { + border-color: #555; + background: #3c3c3c; + color: #fff; +} + +.chat-action-button:active:not(:disabled) { + transform: translateY(1px); +} + +.gif-button { + color: #fff; + border-color: #6f42c1; + background: #59359b; +} + +.gif-button:hover:not(:disabled) { + border-color: #8758d3; + background: #6842ad; +} + +.file-button { + background: #333; + color: #ccc; +} + +.send-button { + border-color: var(--chat-blue); + background: var(--chat-blue); + color: #fff; +} + +.send-button:hover:not(:disabled) { + border-color: var(--chat-blue-hover); + background: var(--chat-blue-hover); +} + +.chat-action-button:disabled { + cursor: not-allowed; + opacity: 0.45; +} + +.chat-mention { + padding: 1px 4px; + border-radius: var(--chat-radius-small); + background: rgba(74, 144, 226, 0.2); + color: #9fcaff; + font-weight: 600; +} + +.chat-message.mentioned { + border-color: rgba(240, 178, 50, 0.5); + background: rgba(240, 178, 50, 0.08); +} + +.chat-unread-badge { + display: inline-grid; + place-items: center; + min-width: 18px; + height: 18px; + margin-left: 5px; + padding: 0 5px; + border-radius: 20px; + background: var(--chat-red); + color: #fff; + font-size: 10px; + font-weight: 700; +} + +@media (max-width: 520px) { + .chat-header { + min-height: 44px; + padding: 7px 8px; + } + + .chat-title { + font-size: 13px; + } + + .chat-subtitle { + font-size: 9px; + } + + .chat-messages { + padding: 8px; + } + + .chat-message { + grid-template-columns: 32px minmax(0, 1fr); + padding: 7px; + gap: 7px; + } + + .chat-avatar { + width: 32px; + height: 32px; + font-size: 10px; + } + + .chat-message-text { + font-size: 12px; + } + + .chat-input-area { + padding: 7px; + gap: 5px; + } + + .message-input { + height: 34px; + padding: 0 8px; + } + + .chat-action-button { + height: 34px; + min-width: 34px; + padding: 0 8px; + font-size: 10px; + } + + .send-button { + min-width: 46px; + } +} diff --git a/kronic-chat/css/giphy.css b/kronic-chat/css/giphy.css new file mode 100644 index 0000000..9fbd27d --- /dev/null +++ b/kronic-chat/css/giphy.css @@ -0,0 +1,741 @@ +/* ===================================================== + Global reset + ===================================================== */ + +*, +*::before, +*::after { + box-sizing: border-box; +} + +html, +body { + width: 100%; + height: 100%; + + margin: 0; + padding: 0; + + overflow: hidden; + + background: #111; + color: #e0e0e0; + + font-family: + Arial, + Helvetica, + sans-serif; +} + +button, +input { + font: inherit; +} + + +/* ===================================================== + Main GIPHY browser + ===================================================== */ + +.giphy-browser { + display: flex; + flex-direction: column; + + width: 100%; + height: 100%; + + min-width: 0; + min-height: 0; + + overflow: hidden; + + background: #313338; + color: #dbdee1; +} + + +/* ===================================================== + Header + ===================================================== */ + +.giphy-header { + display: flex; + flex: 0 0 auto; + + align-items: center; + justify-content: space-between; + + min-height: 58px; + padding: 9px 12px; + + border-bottom: + 1px solid rgba(0, 0, 0, 0.35); + + background: #1e1f22; +} + +.giphy-header-info { + display: flex; + align-items: center; + + min-width: 0; + gap: 10px; +} + +.giphy-header-icon { + display: grid; + place-items: center; + + width: 38px; + height: 30px; + + border-radius: 6px; + + background: #5865f2; + color: #fff; + + font-size: 11px; + font-weight: 800; +} + +.giphy-title { + margin: 0; + + color: #f2f3f5; + + font-size: 15px; + font-weight: 700; + line-height: 1.2; +} + +.giphy-subtitle { + margin: 3px 0 0; + + color: #949ba4; + + font-size: 11px; + line-height: 1.2; +} + +.giphy-close-button { + display: grid; + place-items: center; + + width: 30px; + height: 28px; + + padding: 0; + + border: 1px solid #4e5058; + border-radius: 5px; + + background: #2b2d31; + color: #dbdee1; + + cursor: pointer; + + font-size: 18px; + line-height: 1; +} + +.giphy-close-button:hover { + background: #3f4147; + color: #fff; +} + + +/* ===================================================== + Search section + ===================================================== */ + +.giphy-search-section { + flex: 0 0 auto; + + padding: 10px 12px 8px; + + border-bottom: + 1px solid rgba(0, 0, 0, 0.3); + + background: #2b2d31; +} + +.search-row { + display: grid; + + grid-template-columns: + minmax(0, 1fr) + auto; + + gap: 7px; +} + +.giphy-search-input { + width: 100%; + min-width: 0; + height: 38px; + + padding: 0 11px; + + border: 1px solid #4e5058; + border-radius: 6px; + + outline: 0; + + background: #1e1f22; + color: #f2f3f5; + + font-size: 13px; +} + +.giphy-search-input::placeholder { + color: #949ba4; +} + +.giphy-search-input:focus { + border-color: #5865f2; +} + +.giphy-search-button { + height: 38px; + + padding: 0 15px; + + border: 0; + border-radius: 6px; + + background: #5865f2; + color: #fff; + + cursor: pointer; + + font-size: 12px; + font-weight: 700; +} + +.giphy-search-button:hover:not(:disabled) { + background: #4752c4; +} + +.giphy-search-button:disabled { + cursor: not-allowed; + opacity: 0.45; +} + +.giphy-status { + min-height: 18px; + + margin-top: 7px; + + color: #949ba4; + + font-size: 11px; +} + + +/* ===================================================== + Main two-column layout + ===================================================== */ + +.giphy-layout { + display: grid; + + grid-template-columns: + minmax(190px, 230px) + minmax(0, 1fr); + + flex: 1 1 0; + + width: 100%; + height: 0; + + min-width: 0; + min-height: 0; + + overflow: hidden; + + background: #313338; +} + + +/* ===================================================== + History panel + ===================================================== */ + +.giphy-history-panel { + display: flex; + flex-direction: column; + + width: 100%; + + min-width: 0; + min-height: 0; + + overflow: hidden; + + border-right: + 1px solid rgba(0, 0, 0, 0.35); + + background: #2b2d31; +} + +.giphy-history-header { + display: flex; + flex: 0 0 auto; + + align-items: center; + justify-content: space-between; + + min-height: 45px; + padding: 0 10px 0 12px; + + border-bottom: + 1px solid rgba(0, 0, 0, 0.3); + + background: #232428; +} + +.giphy-history-title { + color: #f2f3f5; + + font-size: 13px; + font-weight: 700; +} + +.giphy-history-count { + display: inline-grid; + place-items: center; + + min-width: 21px; + height: 21px; + + margin-left: 5px; + padding: 0 6px; + + border-radius: 20px; + + background: #1e1f22; + color: #b5bac1; + + font-size: 11px; + font-weight: 700; +} + +.giphy-history-clear { + padding: 5px 8px; + + border: 0; + border-radius: 4px; + + background: transparent; + color: #b5bac1; + + cursor: pointer; + + font-size: 11px; +} + +.giphy-history-clear:hover { + background: #3f4147; + color: #fff; +} + +.giphy-history-list { + flex: 1 1 auto; + + min-width: 0; + min-height: 0; + + padding: 8px; + + overflow-x: hidden; + overflow-y: auto; +} + +.giphy-history-empty { + padding: 24px 10px; + + color: #949ba4; + + font-size: 11px; + line-height: 1.5; + text-align: center; +} + +.giphy-history-item { + display: grid; + + grid-template-columns: + 52px + minmax(0, 1fr); + + align-items: center; + gap: 8px; + + margin-bottom: 7px; + padding: 7px; + + overflow: hidden; + + border: 1px solid transparent; + border-radius: 7px; + + background: #232428; +} + +.giphy-history-item:hover { + border-color: + rgba(255, 255, 255, 0.07); + + background: #35373c; +} + +.giphy-history-image { + width: 52px; + height: 52px; + + object-fit: cover; + + border-radius: 5px; + + background: #1e1f22; + + cursor: pointer; +} + +.giphy-history-info { + min-width: 0; +} + +.giphy-history-item-title { + overflow: hidden; + + color: #f2f3f5; + + font-size: 11px; + font-weight: 650; + + text-overflow: ellipsis; + white-space: nowrap; +} + +.giphy-history-meta { + margin-top: 3px; + + color: #949ba4; + + font-size: 9px; +} + +.giphy-history-actions { + display: flex; + + grid-column: 1 / -1; + + justify-content: flex-end; + + gap: 4px; + margin-top: 2px; +} + +.giphy-history-action { + display: grid; + place-items: center; + + min-width: 27px; + height: 25px; + + padding: 0 7px; + + border: 0; + border-radius: 4px; + + background: #1e1f22; + color: #b5bac1; + + cursor: pointer; + + font-size: 11px; +} + +.giphy-history-action:hover { + background: #5865f2; + color: #fff; +} + + +/* ===================================================== + Search results + ===================================================== */ + +.giphy-results { + display: grid; + + grid-template-columns: + repeat( + auto-fill, + minmax(145px, 1fr) + ); + + grid-auto-rows: max-content; + + align-content: start; + align-items: start; + + min-width: 0; + min-height: 0; + + padding: 12px; + + gap: 12px; + + overflow-x: hidden; + overflow-y: auto; + + background: #313338; +} + +.gif-item-wrap { + display: flex; + flex-direction: column; + + min-width: 0; + + padding: 7px; + + overflow: hidden; + + border: 1px solid #3f4147; + border-radius: 8px; + + background: #18191c; +} + +.gif-item-wrap:hover { + border-color: #686b74; + background: #1e1f22; +} + +.giphy-image-button { + display: block; + + width: 100%; + padding: 0; + + overflow: hidden; + + border: 0; + border-radius: 6px; + + background: #111; + + cursor: pointer; +} + +.giphy-result { + display: block; + + width: 100%; + aspect-ratio: 1 / 1; + + object-fit: cover; + + background: #111; +} + +.giphy-result-title { + min-height: 30px; + + margin-top: 7px; + + overflow: hidden; + + color: #f2f3f5; + + font-size: 11px; + line-height: 1.3; + + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; +} + +.giphy-result-actions { + display: grid; + + grid-template-columns: + repeat(2, minmax(0, 1fr)); + + gap: 5px; + margin-top: 7px; +} + +.giphy-action-button { + width: 100%; + min-width: 0; + + padding: 6px 4px; + + border: 0; + border-radius: 4px; + + cursor: pointer; + + overflow: hidden; + + font-size: 10px; + font-weight: 700; + + text-overflow: ellipsis; + white-space: nowrap; +} + +.send-gif-btn { + background: #5865f2; + color: #fff; +} + +.send-gif-btn:hover { + background: #4752c4; +} + +.set-avatar-btn { + background: #4e5058; + color: #dbdee1; +} + +.set-avatar-btn:hover { + background: #686b74; + color: #fff; +} + + +/* ===================================================== + Empty and error states + ===================================================== */ + +.giphy-empty { + grid-column: 1 / -1; + + width: 100%; + margin: auto; + padding: 40px 16px; + + color: #949ba4; + + text-align: center; +} + +.giphy-empty-icon { + display: inline-grid; + place-items: center; + + width: 54px; + height: 40px; + + margin-bottom: 10px; + + border-radius: 7px; + + background: #1e1f22; + color: #b5bac1; + + font-size: 13px; + font-weight: 800; +} + +.giphy-empty-title { + color: #f2f3f5; + + font-size: 14px; + font-weight: 700; +} + +.giphy-empty-text { + margin-top: 5px; + + color: #949ba4; + + font-size: 11px; +} + +.gif-load-error { + opacity: 0.55; +} + + +/* ===================================================== + Scrollbars + ===================================================== */ + +.giphy-history-list, +.giphy-results { + scrollbar-color: #1e1f22 #2b2d31; + scrollbar-width: thin; +} + +.giphy-history-list::-webkit-scrollbar, +.giphy-results::-webkit-scrollbar { + width: 10px; +} + +.giphy-history-list::-webkit-scrollbar-track, +.giphy-results::-webkit-scrollbar-track { + background: #2b2d31; +} + +.giphy-history-list::-webkit-scrollbar-thumb, +.giphy-results::-webkit-scrollbar-thumb { + border: 2px solid #2b2d31; + border-radius: 10px; + + background: #1e1f22; +} + + +/* ===================================================== + Responsive layout + ===================================================== */ + +@media (max-width: 720px) { + .giphy-layout { + grid-template-columns: + 165px + minmax(0, 1fr); + } + + .giphy-results { + grid-template-columns: + repeat( + auto-fill, + minmax(125px, 1fr) + ); + } +} + +@media (max-width: 540px) { + .giphy-layout { + display: flex; + flex-direction: column; + + height: auto; + overflow: auto; + } + + .giphy-history-panel { + flex: 0 0 180px; + + border-right: 0; + border-bottom: + 1px solid rgba(0, 0, 0, 0.35); + } + + .giphy-results { + flex: 1 1 auto; + + grid-template-columns: + repeat( + auto-fill, + minmax(120px, 1fr) + ); + } +} diff --git a/kronic-chat/css/index.css b/kronic-chat/css/index.css new file mode 100644 index 0000000..344a69a --- /dev/null +++ b/kronic-chat/css/index.css @@ -0,0 +1,1932 @@ +:root { + --background-dark: #1e1f22; + --background-main: #313338; + --background-panel: #2b2d31; + --background-input: #1e1f22; + --background-hover: #35373c; + --background-floating: #111214; + + --border-color: #3f4147; + + --text-primary: #f2f3f5; + --text-secondary: #b5bac1; + --text-muted: #949ba4; + + --brand-primary: #5865f2; + --brand-primary-hover: #4752c4; + + --green: #23a559; + --green-hover: #1a8f4c; + + --red: #da373c; + --red-hover: #a1282c; + + --shadow: + 0 8px 24px rgba(0, 0, 0, 0.28); + + --small-shadow: + 0 3px 10px rgba(0, 0, 0, 0.25); + + --radius-small: 5px; + --radius-medium: 8px; + --radius-large: 12px; +} + +* { + box-sizing: border-box; +} + +html, +body { + width: 100%; + height: 100%; + margin: 0; +} + +body { + overflow: hidden; + color: var(--text-primary); + background: var(--background-main); + font-family: + Inter, + system-ui, + -apple-system, + BlinkMacSystemFont, + "Segoe UI", + sans-serif; +} + +button, +input { + font: inherit; +} + +button { + border: 0; +} + +.app-shell { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; +} + +/* Top navigation */ + +.topbar { + position: relative; + z-index: 20; + + display: flex; + align-items: center; + + min-width: 0; + min-height: 64px; + + padding: 10px 18px; + + background: var(--background-dark); + border-bottom: 1px solid rgba(0, 0, 0, 0.35); + box-shadow: var(--small-shadow); +} + +.brand { + display: flex; + flex: 0 0 auto; + + align-items: center; + + min-width: 0; + + gap: 12px; +} + +.brand-icon { + display: grid; + flex: 0 0 auto; + place-items: center; + width: 42px; + height: 42px; + font-size: 14px; + font-weight: 800; + letter-spacing: 0.04em; + color: white; + background: var(--brand-primary); + border-radius: 50%; +} + +.brand-text { + min-width: 0; +} + +.brand-text h1 { + margin: 0; + overflow: hidden; + font-size: 16px; + font-weight: 700; + text-overflow: ellipsis; + white-space: nowrap; +} + +.brand-text span { + display: block; + margin-top: 2px; + overflow: hidden; + color: var(--text-muted); + font-size: 12px; + text-overflow: ellipsis; + white-space: nowrap; +} + +.topbar-tools { + display: flex; + flex: 0 0 auto; + flex-wrap: nowrap; + + align-items: center; + justify-content: flex-end; + + min-width: 0; + + margin-left: auto; + + gap: 8px; + white-space: nowrap; +} + +.icon-button { + position: relative; + + display: inline-flex; + flex: 0 0 auto; + + align-items: center; + justify-content: center; + + min-width: 40px; + min-height: 38px; + + padding: 0 13px; + + color: var(--text-secondary); + background: transparent; + + border-radius: var(--radius-small); + + cursor: pointer; + + transition: + color 150ms ease, + background 150ms ease, + transform 100ms ease; + + gap: 7px; +} + +.icon-button:hover:not(:disabled) { + color: var(--text-primary); + background: var(--background-hover); +} + +.icon-button:active:not(:disabled) { + transform: translateY(1px); +} + +.icon-button:disabled { + cursor: not-allowed; + opacity: 0.45; +} + +.button-icon { + display: inline-flex; + + align-items: center; + justify-content: center; + + min-width: 20px; + + font-size: 14px; + font-weight: 800; + line-height: 1; +} + +.button-label { + font-size: 13px; + font-weight: 600; +} + + +/* Compact topbar icon buttons */ + +.topbar-tools .icon-only-button { + width: 40px; + min-width: 40px; + height: 38px; + min-height: 38px; + + padding: 0; + + gap: 0; +} + +.topbar-tools .icon-only-button .button-icon { + width: 100%; + height: 100%; + + min-width: 0; + + margin: 0; + + font-size: 18px; +} + +.topbar-tools .icon-only-button .button-label { + display: none !important; +} + + +/* Screen-share overlapping-display icon */ + +.screen-share-icon { + position: relative; + + display: inline-block !important; + + width: 23px !important; + height: 18px !important; + min-width: 23px !important; + + font-size: 0 !important; +} + +.screen-share-icon::before, +.screen-share-icon::after { + content: ""; + + position: absolute; + + width: 14px; + height: 10px; + + border: 1.5px solid currentColor; + border-radius: 2px; +} + +.screen-share-icon::before { + top: 1px; + left: 1px; +} + +.screen-share-icon::after { + right: 1px; + bottom: 1px; + + background: var(--background-dark); +} + + +/* Chat unread badge */ + +.chat-unread-count { + position: absolute; + + top: 1px; + right: 1px; + + display: inline-grid; + place-items: center; + + min-width: 16px; + height: 16px; + + padding: 0 4px; + + color: #fff; + background: var(--red); + + border-radius: 999px; + + font-size: 9px; + font-weight: 800; + line-height: 1; +} + +.chat-unread-count[hidden] { + display: none; +} + +/* Main layout */ + +.workspace { + display: flex; + flex: 1; + min-height: 0; +} + +.connection-panel { + display: flex; + flex: 0 0 280px; + flex-direction: column; + justify-content: space-between; + min-width: 240px; + max-width: 340px; + background: var(--background-panel); + border-right: 1px solid rgba(0, 0, 0, 0.25); +} + +.panel-section { + overflow-y: auto; + padding: 20px 16px; +} + +.section-heading { + margin-bottom: 18px; + color: var(--text-secondary); + font-size: 12px; + font-weight: 800; + letter-spacing: 0.05em; + text-transform: uppercase; +} + +.form-group { + margin-bottom: 15px; +} + +.form-group label { + display: block; + margin-bottom: 6px; + color: var(--text-secondary); + font-size: 12px; + font-weight: 700; + text-transform: uppercase; +} + +.form-group input { + width: 100%; + height: 42px; + padding: 0 11px; + color: var(--text-primary); + background: var(--background-input); + border: 1px solid transparent; + border-radius: var(--radius-small); + outline: none; + transition: + border-color 150ms ease, + box-shadow 150ms ease; +} + +.form-group input::placeholder { + color: #70747b; +} + +.form-group input:hover { + border-color: #44474e; +} + +.form-group input:focus { + border-color: var(--brand-primary); + box-shadow: + 0 0 0 2px rgba(88, 101, 242, 0.2); +} + +.connection-actions { + display: grid; + grid-template-columns: 1fr 1fr; + margin-top: 20px; + gap: 8px; +} + +.action-button { + min-height: 40px; + padding: 0 14px; + color: white; + border-radius: var(--radius-small); + cursor: pointer; + font-size: 13px; + font-weight: 700; + transition: + background 150ms ease, + opacity 150ms ease, + transform 100ms ease; +} + +.action-button:active:not(:disabled) { + transform: translateY(1px); +} + +.action-button:disabled { + cursor: not-allowed; + opacity: 0.4; +} + +.primary-button { + grid-column: 1 / -1; + background: var(--brand-primary); +} + +.primary-button:hover:not(:disabled) { + background: var(--brand-primary-hover); +} + +.secondary-button { + background: #4e5058; +} + +.secondary-button:hover:not(:disabled) { + background: #686b74; +} + +.danger-button { + background: var(--red); +} + +.danger-button:hover:not(:disabled) { + background: var(--red-hover); +} + +/* Sidebar connection status */ + +.connection-status { + display: flex; + align-items: center; + min-height: 62px; + padding: 12px 16px; + background: #232428; + border-top: 1px solid rgba(255, 255, 255, 0.03); + gap: 10px; +} + +.status-indicator { + flex: 0 0 auto; + width: 10px; + height: 10px; + background: var(--text-muted); + border-radius: 50%; + box-shadow: + 0 0 0 3px rgba(148, 155, 164, 0.12); +} + +.status-indicator.connected { + background: var(--green); + box-shadow: + 0 0 0 3px rgba(35, 165, 89, 0.16); +} + +.status-indicator.connecting { + background: #f0b232; + box-shadow: + 0 0 0 3px rgba(240, 178, 50, 0.16); +} + +.status-indicator.error { + background: var(--red); + box-shadow: + 0 0 0 3px rgba(218, 55, 60, 0.16); +} + +.status-content { + min-width: 0; +} + +.status-label { + display: block; + color: var(--text-muted); + font-size: 10px; + font-weight: 700; + letter-spacing: 0.04em; + text-transform: uppercase; +} + +.status-bar { + display: block; + margin-top: 2px; + overflow: hidden; + color: var(--text-primary); + font-size: 13px; + font-weight: 600; + text-overflow: ellipsis; + white-space: nowrap; +} + +/* Main participant area */ + +.main-content { + display: flex; + flex: 1; + flex-direction: column; + min-width: 0; + min-height: 0; + background: var(--background-main); +} + +.content-header { + display: flex; + align-items: center; + justify-content: space-between; + min-height: 66px; + padding: 10px 22px; + background: rgba(49, 51, 56, 0.94); + border-bottom: 1px solid rgba(0, 0, 0, 0.25); +} + +.channel-label { + display: block; + margin-bottom: 2px; + color: var(--text-muted); + font-size: 10px; + font-weight: 800; + letter-spacing: 0.08em; +} + +.content-header h2 { + margin: 0; + font-size: 18px; + font-weight: 700; +} + +.room-state { + display: inline-flex; + align-items: center; + padding: 6px 9px; + color: var(--text-secondary); + background: var(--background-panel); + border-radius: 20px; + font-size: 12px; + font-weight: 600; + gap: 7px; +} + +.room-state-dot { + width: 7px; + height: 7px; + background: var(--green); + border-radius: 50%; +} + +.participant-grid { + display: grid; + flex: 1; + grid-template-columns: + repeat(auto-fill, minmax(220px, 1fr)); + align-content: start; + overflow-y: auto; + padding: 20px; + gap: 16px; +} + +/* + These styles should also apply to participant elements created + dynamically by index.js. Adjust the selector if your JavaScript + uses a different class name. +*/ + +.participant, +.participant-card { + position: relative; + min-height: 170px; + overflow: hidden; + background: #25262a; + border: 1px solid rgba(255, 255, 255, 0.04); + border-radius: var(--radius-large); + box-shadow: + 0 3px 10px rgba(0, 0, 0, 0.15); + transition: + border-color 150ms ease, + transform 150ms ease, + box-shadow 150ms ease; +} + +.participant:hover, +.participant-card:hover { + border-color: rgba(255, 255, 255, 0.1); + box-shadow: var(--small-shadow); + transform: translateY(-1px); +} + +.participant video, +.participant-card video { + width: 100%; + height: 100%; + object-fit: cover; +} + +.empty-room-message { + display: flex; + grid-column: 1 / -1; + align-items: center; + justify-content: center; + flex-direction: column; + min-height: 360px; + padding: 30px; + color: var(--text-muted); + text-align: center; +} + +.empty-room-icon { + display: grid; + place-items: center; + width: 76px; + height: 76px; + margin-bottom: 18px; + font-size: 32px; + background: var(--background-panel); + border-radius: 50%; +} + +.empty-room-message h3 { + margin: 0 0 8px; + color: var(--text-primary); + font-size: 18px; +} + +.empty-room-message p { + max-width: 380px; + margin: 0; + line-height: 1.5; +} + +/* Floating tool windows */ + +.tool-frame-wrap, +.shared-media-wrap { + position: fixed; + z-index: 1000; + display: none; + flex-direction: column; + width: min(620px, calc(100vw - 30px)); + height: min(620px, calc(100vh - 90px)); + min-width: 320px; + min-height: 240px; + overflow: hidden; + background: var(--background-panel); + border: 1px solid var(--border-color); + border-radius: var(--radius-large); + box-shadow: var(--shadow); + resize: both; +} + +#musicFrameWrap { + top: 90px; + left: 310px; +} + +#giphyFrameWrap { + top: 110px; + left: 350px; +} + +#chatFrameWrap { + top: 130px; + right: 30px; + width: min(480px, calc(100vw - 30px)); +} + +.tool-frame-header { + display: flex; + flex: 0 0 auto; + align-items: center; + justify-content: space-between; + min-height: 44px; + padding: 0 8px 0 14px; + background: var(--background-dark); + border-bottom: 1px solid rgba(0, 0, 0, 0.35); + cursor: move; + user-select: none; +} + +.tool-frame-title { + display: flex; + align-items: center; + min-width: 0; + color: var(--text-primary); + font-size: 13px; + font-weight: 700; + gap: 8px; +} + +.tool-frame-icon { + display: inline-flex; + align-items: center; + justify-content: center; + min-width: 18px; + color: var(--text-secondary); + font-size: 12px; + font-weight: 800; +} + +.window-close-button { + display: grid; + place-items: center; + width: 32px; + height: 32px; + color: var(--text-secondary); + background: transparent; + border-radius: var(--radius-small); + cursor: pointer; + font-size: 22px; + line-height: 1; + transition: + color 150ms ease, + background 150ms ease; +} + +.window-close-button:hover { + color: white; + background: var(--red); +} + +.tool-frame { + display: block; + flex: 1; + width: 100%; + min-height: 0; + background: var(--background-main); + border: 0; +} + +/* Shared media */ + +.shared-media-wrap { + top: 100px; + left: 50%; + width: min(760px, calc(100vw - 30px)); + height: auto; + max-height: calc(100vh - 130px); + transform: translateX(-50%); + resize: both; +} + +.shared-media-body { + display: flex; + flex: 1; + align-items: center; + justify-content: center; + flex-direction: column; + min-height: 0; + overflow: auto; + padding: 14px; + background: #17181b; +} + +#sharedMediaThumb, +#sharedMediaVideo { + display: none; + max-width: 100%; + max-height: calc(100vh - 220px); + object-fit: contain; + border-radius: var(--radius-medium); +} + +#sharedMediaAudio { + display: none; + width: min(540px, 100%); +} + +.shared-media-error { + color: #ff7b80; + font-size: 13px; + line-height: 1.5; + text-align: center; +} + +.shared-gif { + position: fixed; + z-index: 1100; + right: 20px; + bottom: 20px; + display: none; + max-width: min(420px, calc(100vw - 40px)); + max-height: min(420px, calc(100vh - 100px)); + object-fit: contain; + background: var(--background-floating); + border: 1px solid var(--border-color); + border-radius: var(--radius-large); + box-shadow: var(--shadow); +} + +/* Scrollbars */ + +* { + scrollbar-width: thin; + scrollbar-color: #1a1b1e transparent; +} + +::-webkit-scrollbar { + width: 10px; + height: 10px; +} + +::-webkit-scrollbar-track { + background: transparent; +} + +::-webkit-scrollbar-thumb { + background: #1a1b1e; + border: 3px solid transparent; + border-radius: 10px; + background-clip: padding-box; +} + +::-webkit-scrollbar-thumb:hover { + background: #111214; + border: 3px solid transparent; + background-clip: padding-box; +} + +/* Smaller screens */ + +@media (max-width: 760px) { + body { + overflow: auto; + } + + .app-shell { + min-height: 100%; + height: auto; + } + + .topbar { + align-items: flex-start; + flex-direction: column; + gap: 10px; + } + + .topbar-tools { + width: 100%; + } + + .icon-button { + flex: 1; + } + + .workspace { + flex-direction: column; + } + + .connection-panel { + flex: none; + width: 100%; + max-width: none; + border-right: 0; + border-bottom: 1px solid rgba(0, 0, 0, 0.3); + } + + .connection-status { + display: none; + } + + .main-content { + min-height: 500px; + } + + .participant-grid { + grid-template-columns: 1fr; + } + + .tool-frame-wrap, + .shared-media-wrap { + top: 75px !important; + right: auto !important; + left: 10px !important; + width: calc(100vw - 20px) !important; + height: calc(100vh - 95px) !important; + max-height: none; + transform: none; + resize: none; + } +} +#screenShareFrameWrap { +} + +.screen-share-wrap { + min-width: 420px; + min-height: 300px; +} + +.screen-share-header-actions { + display: flex; + align-items: center; + gap: 8px; +} + +.screen-share-stop-button { + min-height: 30px; + padding: 0 10px; + color: white; + background: var(--red); + border-radius: var(--radius-small); + cursor: pointer; + font-size: 12px; + font-weight: 700; +} + +.screen-share-stop-button:hover { + background: var(--red-hover); +} + +.screen-share-body { + position: relative; + display: flex; + flex: 1; + min-height: 0; + overflow: hidden; + background: #111214; +} + +.screen-share-video-container { + display: flex; + width: 100%; + height: 100%; + min-height: 0; + align-items: center; + justify-content: center; + overflow: hidden; +} + +.screen-share-video { + width: 100%; + height: 100%; + object-fit: contain; + background: #000; +} + +.screen-share-audio { + display: none; +} + +.screen-share-empty { + position: absolute; + inset: 0; + z-index: 1; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + padding: 30px; + color: var(--text-muted); + text-align: center; +} + +.screen-share-empty-icon { + display: grid; + place-items: center; + width: 72px; + height: 72px; + margin-bottom: 16px; + color: var(--text-secondary); + background: var(--background-panel); + border-radius: 50%; + font-size: 30px; +} + +.screen-share-empty h3 { + margin: 0 0 8px; + color: var(--text-primary); +} + +.screen-share-empty p { + max-width: 380px; + margin: 0; + line-height: 1.5; +} + +#screenShareBtn.active { + color: white; + background: var(--red); +} +.room-auth-modal { + position: fixed; + inset: 0; + z-index: 20000; + display: grid; + place-items: center; +} + +.room-auth-modal[hidden] { + display: none; +} + +.room-auth-backdrop { + position: absolute; + inset: 0; + background: rgba(0, 0, 0, 0.72); +} + +.room-auth-dialog { + position: relative; + z-index: 1; + width: min(420px, calc(100vw - 32px)); + background: #161b22; + border: 1px solid #38404a; + border-radius: 10px; + box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55); + overflow: hidden; +} + +.room-auth-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: 14px 16px; + border-bottom: 1px solid #38404a; +} + +.room-auth-header h2 { + margin: 0; + font-size: 18px; +} + +.room-auth-content { + padding: 18px; +} + +.room-auth-actions { + display: flex; + justify-content: flex-end; + gap: 10px; + padding: 14px 18px; + border-top: 1px solid #38404a; +} + +.room-auth-error { + margin-top: 12px; + color: #ff7272; +} + +/* Mic, suppression and spatial audio controls */ +.audio-settings-section { + padding-top: 16px; + border-top: 1px solid rgba(255, 255, 255, 0.04); +} + +.audio-heading { + display: flex; + align-items: baseline; + justify-content: space-between; + gap: 8px; +} + +.settings-saved-note { + color: var(--text-muted); + font-size: 9px; + font-weight: 600; + letter-spacing: 0; + text-transform: none; +} + +.audio-setting-group { + padding: 12px; + margin-bottom: 12px; + background: rgba(30, 31, 34, 0.65); + border: 1px solid rgba(255, 255, 255, 0.045); + border-radius: var(--radius-medium); +} + +.audio-setting-group:last-child { + margin-bottom: 0; +} + +.audio-group-title { + margin-bottom: 11px; + color: var(--text-primary); + font-size: 12px; + font-weight: 800; +} + +.compact-toggle { + display: flex !important; + align-items: center; + min-height: 26px; + margin: 0 0 10px !important; + color: var(--text-secondary) !important; + cursor: pointer; + font-size: 12px !important; + font-weight: 600 !important; + line-height: 1.25; + text-transform: none !important; + gap: 8px; +} + +.compact-toggle input[type="checkbox"] { + flex: 0 0 auto; + width: 15px; + height: 15px; + margin: 0; + padding: 0; + accent-color: var(--brand-primary); +} + +.audio-control { + margin-top: 11px; +} + +.audio-control > label, +.audio-control-label label { + margin: 0; + color: var(--text-secondary); + font-size: 11px; + font-weight: 700; + text-transform: none; +} + +.audio-control-label { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 6px; + gap: 8px; +} + +.audio-value { + flex: 0 0 auto; + color: var(--text-primary); + font-size: 10px; + font-variant-numeric: tabular-nums; + font-weight: 700; +} + +.audio-control input[type="range"] { + width: 100%; + height: 18px; + padding: 0; + background: transparent; + border: 0; + accent-color: var(--brand-primary); +} + +.range-ends, +.voice-meter-labels { + display: flex; + justify-content: space-between; + margin-top: 2px; + color: var(--text-muted); + font-size: 9px; + line-height: 1.2; + gap: 8px; +} + +.range-ends span:last-child, +.voice-meter-labels span:last-child { + text-align: right; +} + +.audio-select { + width: 100%; + min-height: 36px; + padding: 0 9px; + margin-top: 6px; + color: var(--text-primary); + background: var(--background-input); + border: 1px solid var(--border-color); + border-radius: var(--radius-small); + outline: none; + font-size: 11px; +} + +.audio-select:focus { + border-color: var(--brand-primary); + box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.2); +} + +.audio-select:disabled { + opacity: 0.45; +} + +.control-help { + margin-top: 6px; + color: var(--text-muted); + font-size: 9px; + line-height: 1.35; +} + +.restart-hint { + padding-top: 8px; + border-top: 1px solid rgba(255, 255, 255, 0.04); +} + +.voice-meter-wrap { + margin-top: 10px; +} + +.voice-meter-labels { + align-items: end; +} + +.voice-meter-labels span:nth-child(2) { + color: var(--text-secondary); + font-variant-numeric: tabular-nums; + text-align: center; +} + +.voice-meter { + position: relative; + height: 8px; + margin-top: 5px; + overflow: visible; + background: #111214; + border-radius: 999px; +} + +.voice-meter-fill { + width: 0; + height: 100%; + background: var(--green); + border-radius: inherit; + transition: width 70ms linear; +} + +.voice-threshold-marker { + position: absolute; + top: -3px; + width: 2px; + height: 14px; + background: #f0b232; + border-radius: 1px; + transform: translateX(-1px); +} + +.audio-advanced { + margin-top: 9px; + border-top: 1px solid rgba(255, 255, 255, 0.05); +} + +.audio-advanced summary { + padding: 9px 0 2px; + color: var(--text-secondary); + cursor: pointer; + font-size: 10px; + font-weight: 700; + user-select: none; +} + +.audio-advanced summary:hover { + color: var(--text-primary); +} + +.advanced-content { + padding-top: 3px; +} + +.audio-advanced [hidden] { + display: none !important; +} + +.audio-apply-button { + width: 100%; + min-height: 34px; + margin-top: 10px; + color: var(--text-primary); + background: #3a3d44; + border: 1px solid rgba(255, 255, 255, 0.06); + border-radius: var(--radius-small); + cursor: pointer; + font-size: 11px; + font-weight: 700; +} + +.audio-apply-button:hover:not(:disabled) { + background: #464951; +} + +.audio-apply-button:disabled { + cursor: default; + opacity: 0.65; +} + +/* Mobile interaction helpers */ +.mobile-menu-button, +.mobile-sidebar-backdrop { + display: none; +} + +@media (max-width: 760px) { + html, + body { + height: 100%; + min-height: 100%; + overflow: hidden; + overscroll-behavior: none; + } + + body { + padding-top: env(safe-area-inset-top, 0px); + padding-bottom: env(safe-area-inset-bottom, 0px); + } + + .app-shell { + height: 100dvh; + min-height: 0; + } + + .topbar { + flex: 0 0 auto; + align-items: center; + flex-direction: row; + min-height: 56px; + padding: 7px 8px; + gap: 6px; + } + + .brand { + flex: 0 1 auto; + gap: 7px; + } + + .brand-icon { + width: 36px; + height: 36px; + font-size: 11px; + } + + .brand-text h1 { + max-width: 120px; + font-size: 14px; + } + + .brand-text span { + display: none; + } + + .topbar-tools { + flex: 1 1 auto; + + justify-content: flex-end; + + width: auto; + min-width: 0; + + margin-left: auto; + + gap: 2px; + } + + .icon-button { + flex: 0 0 42px; + + width: 42px; + min-width: 42px; + min-height: 42px; + + padding: 0; + + border-radius: 8px; + } + + .topbar-tools .icon-only-button { + width: 42px; + min-width: 42px; + height: 42px; + min-height: 42px; + } + + .icon-button .button-label { + display: none; + } + + .button-icon { + min-width: 0; + font-size: 16px; + } + + .mobile-menu-button { + display: inline-flex; + } + + .mobile-menu-button .button-label { + display: none; + } + + .workspace { + position: relative; + flex: 1; + flex-direction: row; + min-height: 0; + overflow: hidden; + } + + .connection-panel { + position: fixed; + z-index: 950; + top: calc(56px + env(safe-area-inset-top, 0px)); + bottom: env(safe-area-inset-bottom, 0px); + left: 0; + display: flex; + width: min(92vw, 390px); + max-width: 390px; + min-width: 0; + overflow-y: auto; + overscroll-behavior: contain; + border-right: 1px solid rgba(0, 0, 0, 0.45); + border-bottom: 0; + box-shadow: 12px 0 32px rgba(0, 0, 0, 0.36); + transform: translateX(-105%); + transition: transform 180ms ease; + -webkit-overflow-scrolling: touch; + } + + body.mobile-sidebar-open .connection-panel { + transform: translateX(0); + } + + .mobile-sidebar-backdrop { + position: fixed; + z-index: 940; + inset: calc(56px + env(safe-area-inset-top, 0px)) 0 env(safe-area-inset-bottom, 0px) 0; + width: auto; + height: auto; + padding: 0; + background: rgba(0, 0, 0, 0.52); + border: 0; + opacity: 0; + pointer-events: none; + transition: opacity 180ms ease; + } + + body.mobile-sidebar-open .mobile-sidebar-backdrop { + display: block; + opacity: 1; + pointer-events: auto; + } + + .panel-section { + flex: 0 0 auto; + overflow: visible; + padding: 16px 14px; + } + + .panel-section + .panel-section { + border-top: 1px solid rgba(255, 255, 255, 0.04); + } + + .section-heading { + margin-bottom: 14px; + } + + .form-group input, + .audio-select, + .action-button, + .audio-apply-button { + min-height: 46px; + font-size: 16px; + } + + .form-group input { + height: 46px; + } + + .connection-actions { + gap: 10px; + } + + .action-button { + padding: 0 12px; + } + + .compact-toggle { + min-height: 44px; + padding-top: 7px; + padding-bottom: 7px; + } + + .compact-toggle input[type="checkbox"] { + width: 20px; + height: 20px; + flex: 0 0 20px; + } + + .audio-control input[type="range"] { + width: 100%; + min-height: 34px; + margin: 4px 0; + } + + .audio-control input[type="range"]::-webkit-slider-thumb { + width: 24px; + height: 24px; + } + + .audio-control input[type="range"]::-moz-range-thumb { + width: 24px; + height: 24px; + } + + .range-ends { + font-size: 10px; + line-height: 1.25; + } + + .audio-advanced summary { + min-height: 44px; + display: flex; + align-items: center; + } + + .connection-status { + position: sticky; + bottom: 0; + display: flex; + flex: 0 0 auto; + min-height: 56px; + z-index: 2; + } + + .main-content { + width: 100%; + min-height: 0; + } + + .content-header { + min-height: 52px; + padding: 8px 12px; + } + + .content-header h2 { + font-size: 16px; + } + + .participant-grid { + grid-template-columns: 1fr; + align-content: start; + padding: 10px; + gap: 10px; + -webkit-overflow-scrolling: touch; + } + + .participant, + .participant-card { + min-height: 140px; + border-radius: 10px; + } + + .empty-room-message { + min-height: 260px; + padding: 20px; + } + + .tool-frame-wrap, + .shared-media-wrap, + .screen-share-wrap { + top: calc(56px + env(safe-area-inset-top, 0px)) !important; + right: 0 !important; + bottom: env(safe-area-inset-bottom, 0px) !important; + left: 0 !important; + width: 100vw !important; + height: auto !important; + max-width: none !important; + max-height: none !important; + min-width: 0 !important; + min-height: 0 !important; + border-width: 0 !important; + border-radius: 0 !important; + transform: none !important; + resize: none !important; + } + + .tool-frame-header { + min-height: 50px; + cursor: default; + } + + .window-close-button { + width: 42px; + height: 42px; + } + + .shared-gif { + right: 10px; + bottom: calc(10px + env(safe-area-inset-bottom, 0px)); + max-width: calc(100vw - 20px); + max-height: 45dvh; + } +} + +@media (max-width: 430px) { + .brand-text h1 { + max-width: 96px; + font-size: 13px; + } + + .brand-icon { + width: 34px; + height: 34px; + } + + .icon-button { + flex-basis: 39px; + width: 39px; + min-height: 40px; + } + + .connection-panel { + width: min(94vw, 390px); + } + + .room-state { + padding: 5px 8px; + font-size: 11px; + } +} + + +/* Preserve live iframe/media pipelines while a managed window is minimized. + * Unlike display:none, this keeps the DOM subtree mounted and its media state intact. */ +.tool-frame-wrap.window-minimized, +.shared-media-wrap.window-minimized, +.screen-share-wrap.window-minimized { + visibility: hidden !important; + opacity: 0 !important; + pointer-events: none !important; +} + +/* Window manager + unread chat notification */ +.window-taskbar { + display: flex; + flex: 1 1 auto; + + align-items: center; + justify-content: center; + + min-width: 0; + + padding: 0 10px; + + overflow: hidden; + + gap: 6px; +} +.window-task-tab { + display: inline-flex; + align-items: center; + max-width: 150px; + min-height: 32px; + padding: 0 10px; + color: var(--text-secondary); + background: var(--background-panel); + border: 1px solid rgba(255,255,255,.07); + border-radius: 7px; + cursor: pointer; + font-size: 11px; + font-weight: 700; + gap: 6px; +} +.window-task-tab span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.window-task-tab:hover { color: var(--text-primary); background: var(--background-hover); } +.window-manager-actions { display: flex; align-items: center; margin-left: auto; gap: 4px; } +.window-control-button { + display: grid; place-items: center; width: 32px; height: 30px; padding: 0; + color: var(--text-secondary); background: transparent; border-radius: 5px; cursor: pointer; + font-size: 18px; line-height: 1; +} +.window-control-button:hover { color: white; background: var(--background-hover); } +.window-resize-handle, .participant-resize-handle { + position: absolute; z-index: 20; right: 0; bottom: 0; width: 24px; height: 24px; + cursor: nwse-resize; touch-action: none; +} +.window-resize-handle::after, .participant-resize-handle::after { + content: ''; position: absolute; right: 5px; bottom: 5px; width: 10px; height: 10px; + border-right: 2px solid rgba(255,255,255,.65); border-bottom: 2px solid rgba(255,255,255,.65); +} +.participant-resize-handle { width: 30px; height: 30px; } +.window-maximized { + top: 64px !important; right: 0 !important; bottom: 0 !important; left: 0 !important; + width: 100vw !important; height: calc(100vh - 64px) !important; + max-width: none !important; max-height: none !important; min-width: 0 !important; min-height: 0 !important; + transform: none !important; resize: none !important; border-radius: 0 !important; +} +.icon-button.chat-alert { + color: #fff; + background: rgba(35, 165, 89, .28); + animation: chatPulseGreen 900ms ease-in-out infinite alternate; +} +@keyframes chatPulseGreen { + from { box-shadow: 0 0 0 0 rgba(35,165,89,.25), 0 0 5px rgba(35,165,89,.25); } + to { box-shadow: 0 0 0 3px rgba(35,165,89,.16), 0 0 16px rgba(35,165,89,.85); } +} +.audio-collapsible { padding: 0; } +.audio-collapsible > summary.audio-group-title { + display: flex; align-items: center; min-height: 42px; margin: 0; padding: 0 12px; + cursor: pointer; list-style: none; +} +.audio-collapsible > summary.audio-group-title::-webkit-details-marker { display: none; } +.audio-collapsible > summary.audio-group-title::after { content: '▸'; margin-left: auto; color: var(--text-muted); } +.audio-collapsible[open] > summary.audio-group-title::after { content: '▾'; } +.audio-collapsible[open] > summary.audio-group-title { border-bottom: 1px solid rgba(255,255,255,.045); } +.audio-collapsible > :not(summary) { margin-left: 12px; margin-right: 12px; } +.audio-collapsible > :last-child { margin-bottom: 12px; } + +@media (max-width: 760px) { + .window-taskbar { + order: 3; + flex: 1 1 100%; + + justify-content: flex-start; + + width: 100%; + + padding: 2px 0 0; + + overflow-x: auto; + } + + .window-taskbar:empty { + display: none; + } + + .topbar { + flex-wrap: wrap; + } + .window-task-tab { flex: 0 0 auto; min-height: 30px; } + .window-maximized { + top: calc(56px + env(safe-area-inset-top, 0px)) !important; + height: calc(100dvh - 56px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important; + } + /* Normal mobile windows are sizeable instead of being permanently forced full-screen. */ + .tool-frame-wrap:not(.window-maximized), + .shared-media-wrap:not(.window-maximized), + .screen-share-wrap:not(.window-maximized) { + top: calc(72px + env(safe-area-inset-top, 0px)) !important; + right: auto !important; + bottom: auto !important; + left: 8px !important; + width: calc(100vw - 16px) !important; + height: min(68dvh, 620px) !important; + min-width: 0 !important; + min-height: 220px !important; + border-width: 1px !important; + border-radius: 10px !important; + } + .shared-media-wrap:not(.window-maximized) { height: min(56dvh, 520px) !important; } + .window-resize-handle { width: 34px; height: 34px; } +} +.account-label{align-self:center;color:#9fe5b5;font-size:12px;font-weight:700;padding:0 4px}.account-logout{opacity:.8}@media(max-width:700px){.account-label{display:none}.account-logout .button-label{font-size:10px}} + + +/* ========================================================= + 2026-10-31 Android-style desktop polish + ========================================================= */ + +/* Narrower, cleaner connection sidebar. */ +@media (min-width: 761px) { + .connection-panel { + flex: 0 0 228px; + min-width: 218px; + max-width: 244px; + border-right: 1px solid rgba(255,255,255,.045); + box-shadow: 8px 0 30px rgba(0,0,0,.12); + } + + .panel-section { + padding: 16px 12px; + } + + .section-heading { + margin-bottom: 14px; + } + + .form-group { + margin-bottom: 13px; + } + + .form-group input { + height: 42px; + padding: 0 12px; + border-radius: 12px; + background: #202126; + border-color: rgba(255,255,255,.055); + } + + .connection-actions { + margin-top: 16px; + gap: 8px; + } + + .action-button { + min-height: 42px; + border-radius: 12px; + } + + .connection-status { + margin: 10px; + min-height: 58px; + padding: 10px 12px; + border: 1px solid rgba(255,255,255,.055); + border-radius: 14px; + background: #202126; + } +} + +/* Participant cards: softer Android-style "bubble" tile. */ +.participant-card, +.octagon.participant-card { + border-radius: 22px !important; + clip-path: none !important; + overflow: hidden; + border: 1px solid rgba(72, 205, 190, .20); + background: #202227; + box-shadow: + 0 10px 28px rgba(0, 0, 0, .26), + inset 0 1px 0 rgba(255,255,255,.035); +} + +.participant-card:hover { + border-color: rgba(72, 205, 190, .42); + box-shadow: + 0 12px 32px rgba(0,0,0,.30), + 0 0 0 1px rgba(72,205,190,.08); +} + +.participant-card.speaking { + border-color: rgba(35, 210, 135, .75); + box-shadow: + 0 0 0 2px rgba(35,210,135,.13), + 0 12px 32px rgba(0,0,0,.30); +} + +.participant-card > .avatar, +.participant-card > .avatar-fallback { + border-radius: inherit; +} + +.participant-card .name-overlay, +.participant-card .stats-overlay { + left: 10px; + right: auto; + width: auto; + max-width: calc(100% - 20px); + padding: 4px 8px; + border-radius: 999px; + background: rgba(20, 22, 26, .72); + backdrop-filter: blur(8px); + -webkit-backdrop-filter: blur(8px); + text-shadow: 0 1px 2px rgba(0,0,0,.75); +} + +.participant-card .name-overlay { + top: 8px; +} + +.participant-card .stats-overlay { + top: 34px; + font-size: 11px; +} + +/* Chat notification: flash the top icon only, no numeric badge. */ +.chat-unread-count { + display: none !important; +} + +#chatToolButton.chat-notification-pulse { + animation: kronic-chat-pulse 1s ease-in-out infinite; + border-color: rgba(48, 220, 175, .75); +} + +@keyframes kronic-chat-pulse { + 0%, 100% { + box-shadow: + 0 0 0 0 rgba(48,220,175,0), + inset 0 0 0 1px rgba(48,220,175,.10); + transform: translateY(0); + } + + 50% { + box-shadow: + 0 0 0 6px rgba(48,220,175,.10), + 0 0 18px rgba(48,220,175,.45), + inset 0 0 0 1px rgba(48,220,175,.28); + transform: translateY(-1px); + } +} + +/* Wider desktop media browser so thumbnails + action icons have room. */ +@media (min-width: 900px) { + #musicFrameWrap { + width: min(980px, calc(100vw - 285px)); + height: min(690px, calc(100vh - 110px)); + min-width: 760px; + min-height: 480px; + left: 260px; + top: 86px; + border-radius: 18px; + } + + #musicFrameWrap .tool-frame-header { + min-height: 48px; + padding-left: 16px; + padding-right: 10px; + } + + #chatFrameWrap { + border-radius: 18px; + } +} + +/* Touch-friendly top toolbar. */ +.icon-only-button { + border-radius: 13px; +} + +.topbar-tools { + gap: 8px; +} + diff --git a/kronic-chat/css/music-browser.css b/kronic-chat/css/music-browser.css new file mode 100644 index 0000000..98c375d --- /dev/null +++ b/kronic-chat/css/music-browser.css @@ -0,0 +1,1157 @@ +*, +*::before, +*::after { + box-sizing: border-box; +} + +html, +body { + width: 100%; + height: 100%; + + margin: 0; + padding: 0; + + overflow: hidden; + + background: #111; + color: #e0e0e0; + + font-family: sans-serif; +} + +button, +input { + font: inherit; +} + + +/* ===================================================== + Main media browser + ===================================================== */ + +.music-browser { + display: flex; + flex-direction: column; + + width: 100%; + height: 100%; + + min-width: 0; + min-height: 0; + + padding: 10px; + + overflow: hidden; + + background: #111; + color: #e0e0e0; +} + +.music-browser-header { + display: flex; + flex: 0 0 auto; + + align-items: center; + justify-content: space-between; + + min-width: 0; + margin-bottom: 8px; + + color: #fff; +} + +#musicBrowserTitle { + min-width: 0; + margin: 0; + + overflow: hidden; + + color: #fff; + + text-overflow: ellipsis; + white-space: nowrap; +} + +#musicBrowserClose { + flex: 0 0 auto; + + width: 30px; + height: 28px; + + padding: 0; + + border: 1px solid #555; + border-radius: 4px; + + background: #222; + color: #fff; + + cursor: pointer; + + font-size: 18px; +} + +#musicBrowserClose:hover { + background: #333; +} + + +/* ===================================================== + Breadcrumb, search and status + ===================================================== */ + +.music-breadcrumb { + flex: 0 0 auto; + + min-height: 20px; + margin-bottom: 6px; + + overflow: hidden; + + color: #ccc; + + font-size: 13px; + + text-overflow: ellipsis; + white-space: nowrap; +} + +.music-breadcrumb:empty { + display: none; +} + +.music-breadcrumb .back, +.music-breadcrumb .crumb { + color: #7ab7ff; + cursor: pointer; +} + +.music-search { + flex: 0 0 auto; + + width: 100%; + + margin-bottom: 8px; + padding: 9px 10px; + + border: 1px solid #555; + border-radius: 5px; + + background: #222; + color: #fff; +} + +.music-search:focus { + border-color: #4a90e2; + outline: none; +} + +.music-search::placeholder { + color: #888; +} + +.music-status { + flex: 0 0 auto; + + min-height: 18px; + margin-bottom: 7px; + + overflow: hidden; + + color: #aaa; + + font-size: 12px; + + text-overflow: ellipsis; + white-space: nowrap; +} + +.music-status:empty { + min-height: 0; + margin-bottom: 0; +} + + +/* ===================================================== + Main three-column layout + History + browser + queue remain visible much longer. + ===================================================== */ + +.music-browser-layout { + display: grid; + + grid-template-columns: + clamp(125px, 18vw, 205px) + minmax(0, 1fr) + clamp(135px, 20vw, 220px); + + flex: 1 1 0; + + width: 100%; + height: 0; + + min-width: 0; + min-height: 0; + + overflow: hidden; + + border-top: + 1px solid rgba(255, 255, 255, 0.06); + + background: #313338; +} + + +/* ===================================================== + Centre browser column + ===================================================== */ + +.browser-main-column { + display: flex; + flex-direction: column; + + width: 100%; + + min-width: 0; + min-height: 0; + + overflow: hidden; + + background: #313338; +} + +#list { + display: grid; + + grid-template-columns: + repeat( + auto-fill, + minmax(min(165px, 100%), 1fr) + ); + + grid-auto-rows: max-content; + + align-content: start; + align-items: start; + + width: 100%; + height: 100%; + + min-width: 0; + min-height: 0; + + margin: 0; + padding: 10px; + + overflow-x: hidden; + overflow-y: auto; + + gap: 10px; +} + + +/* ===================================================== + Invidious media cards + ===================================================== */ + +.row { + display: grid; + + grid-template-rows: + auto + auto + auto; + + width: 100%; + min-width: 0; + min-height: 0; + + padding: 8px; + + overflow: hidden; + + border: 1px solid #333; + border-radius: 8px; + + background: #181818; + color: #ddd; + + cursor: default; +} + +.row:hover { + border-color: #555; + background: #202020; +} + +.row.clickable { + cursor: pointer; +} + +.row.clickable:hover { + border-color: #666; + background: #252525; +} + +.thumb { + display: block; + + width: 100%; + height: auto; + + aspect-ratio: 16 / 9; + + margin: 0 0 8px; + + object-fit: cover; + + border-radius: 6px; + + background: #222; +} + +.info { + min-width: 0; +} + +.title { + display: -webkit-box; + + min-width: 0; + + overflow: hidden; + + color: #fff; + + font-size: 13px; + line-height: 1.25; + + text-align: left; + + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; +} + +.meta { + display: -webkit-box; + + min-width: 0; + + margin-top: 4px; + + overflow: hidden; + + color: #aaa; + + font-size: 11px; + line-height: 1.25; + + text-align: left; + + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; +} + + +/* ===================================================== + Media card actions + ===================================================== */ + +.action { + display: grid !important; + + grid-template-columns: + repeat( + 2, + minmax(0, 1fr) + ); + + width: 100%; + + gap: 5px; + + margin-top: 8px; +} + +.send-btn { + display: block !important; + + width: 100%; + min-width: 0; + + padding: 6px 4px; + + overflow: hidden; + + border: 1px solid #3b82f6; + border-radius: 4px; + + background: #2b6cb0; + color: #fff; + + cursor: pointer; + + font-size: 11px; + + text-align: center; + text-overflow: ellipsis; + + white-space: nowrap; +} + +.send-btn:hover:not(:disabled) { + background: #3479c5; +} + +.send-btn:disabled { + cursor: not-allowed; + opacity: 0.5; +} + +.queue-btn { + border-color: #686b74; + background: #4e5058; + color: #dbdee1; +} + +.queue-btn:hover:not(:disabled) { + background: #686b74; +} + +.empty { + grid-column: 1 / -1; + + width: 100%; + + padding: 36px 12px; + + color: #aaa; + + text-align: center; +} + + +/* ===================================================== + History and queue panels + ===================================================== */ + +.media-side-panel { + display: flex; + flex-direction: column; + + width: 100%; + + min-width: 0; + min-height: 0; + + overflow: hidden; + + background: #2b2d31; +} + +.history-panel { + border-right: + 1px solid rgba(0, 0, 0, 0.3); +} + +.queue-panel { + border-left: + 1px solid rgba(0, 0, 0, 0.3); +} + +.side-panel-header { + display: flex; + flex: 0 0 auto; + + align-items: center; + justify-content: space-between; + + min-width: 0; + min-height: 42px; + + padding: 0 8px; + + border-bottom: + 1px solid rgba(0, 0, 0, 0.3); + + background: #232428; + + gap: 4px; +} + +.side-panel-title { + min-width: 0; + + overflow: hidden; + + color: #f2f3f5; + + font-size: 12px; + font-weight: 700; + + text-overflow: ellipsis; + white-space: nowrap; +} + +.side-panel-count { + display: inline-grid; + + place-items: center; + + flex: 0 0 auto; + + min-width: 19px; + height: 19px; + + margin-left: 3px; + padding: 0 5px; + + border-radius: 20px; + + background: #1e1f22; + color: #b5bac1; + + font-size: 10px; + font-weight: 700; +} + +.side-panel-clear { + flex: 0 0 auto; + + padding: 4px 6px; + + border: 0; + border-radius: 4px; + + background: transparent; + color: #b5bac1; + + cursor: pointer; + + font-size: 10px; +} + +.side-panel-clear:hover { + background: #3f4147; + color: #f2f3f5; +} + +.side-panel-list { + flex: 1 1 auto; + + min-width: 0; + min-height: 0; + + padding: 6px; + + overflow-x: hidden; + overflow-y: auto; +} + +.side-panel-empty { + padding: 20px 8px; + + color: #949ba4; + + font-size: 11px; + line-height: 1.4; + + text-align: center; +} + + +/* ===================================================== + Queue controls + ===================================================== */ + +.queue-play-next { + flex: 0 0 auto; + + margin: 7px 7px 2px; + padding: 8px 8px; + + overflow: hidden; + + border: 0; + border-radius: 5px; + + background: #5865f2; + color: #fff; + + cursor: pointer; + + font-size: 11px; + font-weight: 700; + + text-overflow: ellipsis; + white-space: nowrap; +} + +.queue-play-next:hover:not(:disabled) { + background: #4752c4; +} + +.queue-play-next:disabled { + cursor: not-allowed; + opacity: 0.4; +} + + +/* ===================================================== + History and queue entries + ===================================================== */ + +.side-media-item { + display: grid; + + grid-template-columns: + 36px + minmax(0, 1fr); + + align-items: center; + + min-width: 0; + + gap: 6px; + + margin-bottom: 6px; + padding: 6px; + + overflow: hidden; + + border: 1px solid transparent; + border-radius: 6px; + + background: #232428; +} + +.side-media-item:hover { + border-color: + rgba(255, 255, 255, 0.06); + + background: #35373c; +} + +.queue-item { + grid-template-columns: + 15px + 32px + minmax(0, 1fr); +} + +.queue-position { + overflow: hidden; + + color: #949ba4; + + font-family: monospace; + font-size: 10px; + + text-align: center; +} + +.side-media-thumb { + width: 36px; + height: 36px; + + object-fit: cover; + + border-radius: 5px; + + background: #1e1f22; +} + +.queue-item .side-media-thumb { + width: 32px; + height: 32px; +} + +.side-media-info { + min-width: 0; +} + +.side-media-title { + overflow: hidden; + + color: #f2f3f5; + + font-size: 10px; + font-weight: 650; + + text-overflow: ellipsis; + white-space: nowrap; +} + +.side-media-meta { + margin-top: 2px; + + overflow: hidden; + + color: #949ba4; + + font-size: 8px; + + text-overflow: ellipsis; + white-space: nowrap; +} + +.side-media-actions { + display: flex; + + grid-column: 1 / -1; + + justify-content: flex-end; + + min-width: 0; + + gap: 3px; + margin-top: 3px; +} + +.queue-actions { + grid-column: 2 / -1; +} + +.side-action-button { + display: grid; + + place-items: center; + + min-width: 24px; + height: 23px; + + padding: 0 5px; + + border: 0; + border-radius: 4px; + + background: #1e1f22; + color: #b5bac1; + + cursor: pointer; + + font-size: 11px; +} + +.side-action-button:hover:not(:disabled) { + background: #5865f2; + color: #fff; +} + +.side-action-button:disabled { + cursor: not-allowed; + opacity: 0.25; +} + + +/* ===================================================== + Scrollbars + ===================================================== */ + +#list, +.side-panel-list { + scrollbar-width: thin; + scrollbar-color: #555 #232428; +} + +#list::-webkit-scrollbar, +.side-panel-list::-webkit-scrollbar { + width: 8px; +} + +#list::-webkit-scrollbar-track, +.side-panel-list::-webkit-scrollbar-track { + background: #232428; +} + +#list::-webkit-scrollbar-thumb, +.side-panel-list::-webkit-scrollbar-thumb { + border-radius: 10px; + background: #555; +} + + +/* ===================================================== + Responsive scaling + ===================================================== */ + +/* + Medium tool-window sizes: + keep History and Queue visible, make the centre cards denser. +*/ +@media (max-width: 900px) { + .music-browser { + padding: 8px; + } + + .music-browser-layout { + grid-template-columns: + clamp(120px, 20vw, 165px) + minmax(0, 1fr) + clamp(125px, 21vw, 175px); + } + + #list { + grid-template-columns: + repeat( + auto-fill, + minmax(min(145px, 100%), 1fr) + ); + + padding: 8px; + + gap: 8px; + } + + .row { + padding: 7px; + } + + .title { + font-size: 12px; + } + + .meta { + font-size: 10px; + } + + .send-btn { + padding: 5px 3px; + font-size: 10px; + } +} + + +/* + Normal compact floating-window size. + This is the important mode: + - History remains visible + - Queue remains visible + - result thumbnails disappear + - result cards become title/meta/buttons + - side panel thumbnails disappear too +*/ +@media (max-width: 720px) { + .music-browser { + padding: 7px; + } + + .music-browser-layout { + grid-template-columns: + minmax(105px, 0.75fr) + minmax(170px, 1.6fr) + minmax(115px, 0.85fr); + } + + #list { + display: flex; + flex-direction: column; + + padding: 7px; + + gap: 6px; + } + + .row { + display: block; + + padding: 7px; + + border-radius: 6px; + } + + .thumb { + display: none; + } + + .title { + -webkit-line-clamp: 2; + + font-size: 11px; + line-height: 1.2; + } + + .meta { + margin-top: 3px; + + font-size: 9px; + + -webkit-line-clamp: 1; + } + + .action { + gap: 4px; + + margin-top: 6px; + } + + .send-btn { + padding: 5px 2px; + + font-size: 9px; + } + + .side-panel-header { + min-height: 38px; + + padding: 0 6px; + } + + .side-panel-title { + font-size: 10px; + } + + .side-panel-count { + min-width: 17px; + height: 17px; + + padding: 0 4px; + + font-size: 9px; + } + + .side-panel-clear { + padding: 3px 4px; + + font-size: 9px; + } + + .side-panel-list { + padding: 5px; + } + + .side-media-item, + .queue-item { + display: block; + + padding: 5px; + } + + .side-media-thumb, + .queue-item .side-media-thumb, + .queue-position { + display: none; + } + + .side-media-title { + font-size: 9px; + line-height: 1.25; + + white-space: normal; + + display: -webkit-box; + + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + } + + .side-media-meta { + font-size: 8px; + } + + .side-media-actions, + .queue-actions { + grid-column: auto; + + justify-content: flex-start; + + margin-top: 4px; + } + + .side-action-button { + min-width: 22px; + height: 21px; + + padding: 0 4px; + + font-size: 10px; + } + + .queue-play-next { + margin: 6px 5px 2px; + padding: 7px 5px; + + font-size: 9px; + } +} + + +/* + Extra-narrow windows: + still preserve all three columns, but squeeze the side panels hard. +*/ +@media (max-width: 560px) { + .music-browser-header { + margin-bottom: 5px; + } + + #musicBrowserTitle { + font-size: 15px; + } + + .music-breadcrumb { + font-size: 11px; + } + + .music-search { + margin-bottom: 6px; + padding: 7px 8px; + + font-size: 12px; + } + + .music-status { + font-size: 10px; + } + + .music-browser-layout { + grid-template-columns: + minmax(86px, 0.7fr) + minmax(145px, 1.5fr) + minmax(92px, 0.75fr); + } + + #list { + padding: 5px; + gap: 5px; + } + + .row { + padding: 6px; + } + + .title { + font-size: 10px; + } + + .meta { + display: none; + } + + .action { + grid-template-columns: + 1fr; + + gap: 3px; + } + + .send-btn { + min-height: 24px; + + padding: 4px 2px; + + font-size: 8px; + } + + .side-panel-header { + display: grid; + + grid-template-columns: + minmax(0, 1fr) + auto; + + align-content: center; + + min-height: 36px; + + gap: 2px; + } + + .side-panel-count { + display: none; + } + + .side-panel-clear { + padding: 2px 3px; + + font-size: 8px; + } + + .side-panel-title { + font-size: 9px; + } + + .side-panel-empty { + padding: 14px 4px; + + font-size: 9px; + } + + .side-media-title { + font-size: 8px; + } + + .side-media-meta { + display: none; + } + + .side-media-actions, + .queue-actions { + gap: 2px; + } + + .side-action-button { + min-width: 20px; + height: 20px; + + padding: 0 3px; + + font-size: 9px; + } + + .queue-play-next { + padding: 6px 3px; + + font-size: 8px; + } +} + + +/* + Phone-size only: + preserve usability rather than forcing impossibly tiny 3 columns. +*/ +@media (max-width: 420px) { + .music-browser { + overflow-y: auto; + } + + .music-browser-layout { + display: flex; + flex-direction: column; + + flex: 0 0 auto; + + height: auto; + + overflow: visible; + } + + .history-panel, + .queue-panel, + .browser-main-column { + flex: 0 0 auto; + } + + .history-panel { + max-height: 180px; + + border-right: 0; + border-bottom: + 1px solid rgba(0, 0, 0, 0.3); + } + + .browser-main-column { + min-height: 360px; + } + + .queue-panel { + min-height: 220px; + + border-top: + 1px solid rgba(0, 0, 0, 0.3); + + border-left: 0; + } +}