diff --git a/kronic-chat/css/login.css b/kronic-chat/css/login.css new file mode 100644 index 0000000..05b5d30 --- /dev/null +++ b/kronic-chat/css/login.css @@ -0,0 +1,4 @@ +*{box-sizing:border-box}body{margin:0;min-height:100dvh;background:#202124;color:#e8eaed;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;display:grid;place-items:center}.auth-shell{width:min(92vw,440px)}.auth-card{background:#292b2f;border:1px solid #3b3e44;border-radius:14px;padding:24px;box-shadow:0 18px 50px #0008}.brand{display:flex;gap:14px;align-items:center;margin-bottom:20px}.logo{width:48px;height:48px;border-radius:50%;background:#5865f2;display:grid;place-items:center;font-weight:900}.brand h1{font-size:20px;margin:0}.brand p{margin:4px 0 0;color:#9aa0a6}.tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:16px 0}.tabs button,form button{border:1px solid #4a4d54;background:#35383e;color:#ddd;padding:11px;border-radius:8px;font:inherit}.tabs button.active,form button{background:#5865f2;color:#fff;border-color:#6f7aff}label{display:grid;gap:6px;margin:13px 0;color:#b8bcc4;font-size:13px}input{width:100%;padding:12px;border:1px solid #444850;border-radius:7px;background:#1f2023;color:#fff;font:inherit}form button{width:100%;margin-top:8px;cursor:pointer}.hint,.message{font-size:12px;color:#9aa0a6;line-height:1.5}.message{min-height:20px;margin-top:12px}.message.error{color:#ff8c8c}.message.ok{color:#62d68b} + +.auth-switch {display:flex;justify-content:flex-end;margin:10px 0;} +.auth-switch button {border:none;background:none;color:#9db4ff;text-decoration:underline;cursor:pointer;font:inherit;} diff --git a/kronic-chat/css/room-admin.css b/kronic-chat/css/room-admin.css new file mode 100644 index 0000000..e3bbd9f --- /dev/null +++ b/kronic-chat/css/room-admin.css @@ -0,0 +1,58 @@ +/* Uses the existing draggable, resizable window manager. */ +.room-admin-wrap {width:min(780px,94vw);height:min(640px,83vh);min-width:310px;min-height:270px;} +.room-admin-body {flex:1;min-height:0;overflow:auto;padding:15px;color:#e8ecf3;background:#252b35;box-sizing:border-box;font:14px/1.5 system-ui,sans-serif;} +.room-admin-toolbar {display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:9px;} +.room-admin-body select,.room-admin-body input {background:#151d29;color:#f1f4f8;border:1px solid #607189;border-radius:6px;padding:7px;min-width:0;box-sizing:border-box;} +.room-admin-body button {color:#fff;background:#354c69;border:1px solid #6981a2;border-radius:6px;padding:7px 10px;cursor:pointer;} +.room-admin-body button:hover {background:#496688;} +.room-admin-body button:disabled {opacity:.45;cursor:not-allowed;} +.room-admin-body h3 {font-size:15px;margin:0 0 5px;} +.room-admin-note {color:#b7c0ce;font-size:12px;margin:0 0 12px;} +.room-admin-status {min-height:22px;overflow-wrap:anywhere;color:#f3cc83;} +.room-admin-columns {display:grid;grid-template-columns:1fr 1fr;gap:18px;} +.room-admin-columns section {min-width:0;} +.room-admin-row {display:flex;align-items:center;justify-content:space-between;gap:7px;padding:9px 3px;border-bottom:1px solid #4c5362;} +.room-admin-row > div:first-child {min-width:0;overflow-wrap:anywhere;} +.room-admin-row small {color:#b9c4d4;display:block;} +.room-admin-row select {max-width:110px;} +.room-admin-row button {white-space:nowrap;} +.room-admin-actions {display:flex;flex-wrap:wrap;gap:5px;align-items:center;} +.room-admin-fields {display:flex;flex-direction:column;align-items:flex-start;gap:10px;margin-bottom:14px;} +.room-admin-fields label {display:flex;align-items:center;gap:7px;} +#roomInviteResult {background:#1d2633;padding:10px;border-radius:7px;margin:8px 0;} +#roomInviteResult label {display:block;} +#roomInviteLink {display:block;width:100%;margin:5px 0;} +.room-admin-muted {font-size:12px;color:#adb9ca;} +@media(max-width:650px) { + .room-admin-wrap {width:100vw!important;height:100dvh!important;inset:0!important;max-height:none!important;border-radius:0!important;transform:none!important;} + .room-admin-columns {grid-template-columns:1fr;} + .room-admin-body {padding:12px;} +} + +#roomAdminButton[hidden] {display:none!important;} + +.room-admin-media {margin:8px 0;padding:8px;border:1px solid #475569;border-radius:6px;max-width:100%;} +.room-admin-media summary {cursor:pointer;font-weight:600;} +.room-admin-media label {display:inline-flex;align-items:center;gap:5px;margin:6px 12px 6px 0;font-size:12px;} +.room-admin-media input {width:auto;} +.room-admin-media button {display:block;margin-top:8px;} + +/* Room members are stacked cards, never one unbreakable horizontal button row. */ +.room-admin-wrap {width:min(1120px,96vw);height:min(670px,86vh);} +.room-admin-columns {grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:24px;} +.room-admin-member {display:grid;grid-template-columns:110px minmax(0,1fr);align-items:start;gap:8px 12px;} +.room-admin-member-name {min-width:0;overflow-wrap:anywhere;line-height:1.35;} +.room-admin-member-name strong {display:block;word-break:break-word;} +.room-admin-member .room-admin-actions {min-width:0;display:flex;flex-wrap:wrap;justify-content:flex-start;gap:6px;} +.room-admin-member .room-admin-actions select {max-width:none;width:112px;} +.room-admin-member-extras {grid-column:2;display:flex;gap:8px;flex-wrap:wrap;align-items:flex-start;min-width:0;} +.room-admin-member-extras .room-admin-media {margin:0;max-width:100%;} +.room-admin-member-extras .room-admin-media[open] {flex:1 1 250px;} +@media(max-width:850px) { + .room-admin-columns {grid-template-columns:1fr;} + .room-admin-member {grid-template-columns:minmax(75px,105px) minmax(0,1fr);} +} +@media(max-width:440px) { + .room-admin-member {grid-template-columns:1fr;} + .room-admin-member-extras {grid-column:1;} +} diff --git a/kronic-chat/css/room-layout.css b/kronic-chat/css/room-layout.css new file mode 100644 index 0000000..332c75b --- /dev/null +++ b/kronic-chat/css/room-layout.css @@ -0,0 +1,223 @@ +/* Kronic room layout — controls keep their existing IDs and JS listeners. */ +.workspace {min-height:0;position:relative} +.connection-panel {display:none!important} +.kronic-voice-top {display:flex;align-items:center;gap:9px;justify-content:center;min-width:0;max-width:62%;margin:0 auto} +.kronic-voice-top .panel-section {display:flex;align-items:center;gap:9px;padding:0;overflow:visible;min-width:0} +.kronic-voice-top .section-heading,.kronic-voice-top .form-group label {display:none} +.kronic-voice-top .form-group {margin:0;min-width:70px;max-width:135px} +.kronic-voice-top .form-group input {width:100%;padding:7px 8px;min-height:34px} +.kronic-voice-top .connection-actions {display:flex;gap:5px} +.kronic-voice-top .connection-actions button {padding:6px 10px;min-height:34px;white-space:nowrap} +.kronic-audio-popover {position:fixed!important;z-index:1000!important;right:12px;bottom:10px;top:auto!important;left:auto!important;width:min(370px,calc(100vw - 24px));max-height:min(76vh,650px);overflow-y:auto;display:none!important;flex-direction:column;background:var(--background-panel);box-shadow:0 22px 60px #0009;border:1px solid #57687e;border-radius:14px} +.kronic-audio-popover.kronic-open {display:flex!important} +.kronic-audio-popover .panel-section {flex:0 0 auto} +.kronic-audio-popover .connection-status {margin:10px} +.main-content {flex:1!important;width:100%;min-width:0} +.participant-card {position:relative;overflow:hidden} +.participant-card > img.avatar,.participant-card > .avatar {width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;inset:0;position:absolute;object-fit:cover!important;object-position:center!important;} +.participant-card > .avatar-fallback {width:100%;height:100%;} +.participant-card .name-overlay {top:auto!important;bottom:36px!important;max-width:calc(100% - 20px)!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} +.participant-card .stats-overlay {top:auto!important;bottom:8px!important} +@media(max-width:820px){.kronic-voice-top {max-width:100%;flex:1;gap:4px}.kronic-voice-top .panel-section{gap:4px}.kronic-voice-top .form-group{max-width:85px}.kronic-voice-top .connection-actions button{padding:5px 6px;font-size:11px}.brand-text{display:none}} + +#mobileAudioMenuBtn {display:none!important;} + +/* Compact embedded Chat: only one Kronic identity in the parent topbar. */ +.app-shell > .topbar {min-height:43px!important;height:43px!important;padding:3px 12px!important;gap:8px!important;} +.app-shell > .topbar .brand {display:none!important;} +.app-shell > .topbar .topbar-tools {gap:7px!important;} +.app-shell > .topbar .window-taskbar {min-height:0!important;} +.workspace {height:calc(100% - 43px)!important;} +.main-content .content-header {min-height:39px!important;padding:5px 14px!important;} +.main-content .content-header h2 {font-size:16px!important;margin:0!important;} +.main-content .channel-label {display:none!important;} +.kronic-voice-top .connection-actions #muteBtn, +.kronic-voice-top .connection-actions #leaveBtn {display:none!important;} +.kronic-voice-top {max-width:80%!important;margin:0!important;} +.kronic-parked-sidebar {display:none!important;} +.kronic-audio-popup {position:fixed!important;z-index:1500!important;bottom:7px;left:12px;width:min(385px,calc(100vw - 24px));max-height:min(78vh,700px);overflow:auto;background:#25272c;color:#e9edf4;border:1px solid #51657e;border-radius:13px;padding:13px;box-shadow:0 18px 45px #0009;} +.kronic-audio-popup[hidden] {display:none!important;} +.kronic-audio-popup .audio-setting-group {display:block!important;margin:20px 0 0;} +.kronic-audio-popup .audio-setting-group > summary {font-size:14px;font-weight:bold;} +.kronic-audio-popup .kronic-audio-close {position:absolute;right:10px;top:8px;border:1px solid #536177;border-radius:7px;background:#354052;color:#fff;font-size:18px;padding:2px 10px;cursor:pointer;} +@media(max-width:730px){.kronic-voice-top {max-width:100%!important}.app-shell > .topbar {padding:3px 6px!important}.main-content .content-header{padding:3px 8px!important}} + +/* Preserve chat real estate: compact voice row, no duplicated top controls. */ +.app-shell > .topbar {min-height:40px!important;height:40px!important;} +.workspace {height:calc(100% - 40px)!important;} +.kronic-voice-top .connection-actions #muteBtn, +.kronic-voice-top .connection-actions #leaveBtn {display:none!important;} +.main-content .content-header {min-height:34px!important;padding:4px 12px!important;} +.kronic-audio-popup {max-height:min(76vh,640px);box-sizing:border-box;} +.kronic-audio-popup .audio-setting-group {width:100%;} +@media(max-width:700px){ + .kronic-voice-top .form-group {max-width:90px;} + .kronic-audio-popup {left:5px;width:calc(100vw - 10px);bottom:4px;max-height:70vh;} +} + +/* Keep participant art and overlay labels inside a narrower embedded Chat viewport. */ +.participant-grid {min-width:0!important;max-width:100%!important; box-sizing:border-box!important; + grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr))!important; + padding:clamp(6px,1.8vw,16px)!important; gap:clamp(6px,1.3vw,14px)!important;} +.participant-card,.octagon.participant-card { + box-sizing:border-box!important; max-width:100%!important; min-width:0!important; + min-height:140px; overflow:hidden!important; +} +.participant-card .name-overlay,.participant-card .stats-overlay { + box-sizing:border-box!important; left:8px!important; right:8px!important; + width:auto!important; max-width:calc(100% - 16px)!important; + overflow:hidden!important; text-overflow:ellipsis!important; + white-space:nowrap!important; font-size:clamp(10px,1.5vw,14px)!important; + line-height:1.35!important; +} +.participant-card .name-overlay {bottom:34px!important;} +.participant-card .stats-overlay {bottom:6px!important;font-size:clamp(9px,1vw,11px)!important;} +.participant-card .volume-overlay {max-width:calc(100% - 16px)!important;box-sizing:border-box!important;overflow:hidden!important;} +.participant-card .volume-overlay input {max-width:100%!important;min-width:0!important;} +.participant-card .participant-resize-handle {display:block!important;z-index:35!important;cursor:nwse-resize!important;} + +/* Keep Join Voice on the same line while the room is resized to half width. */ +.app-shell > .topbar {display:flex!important;flex-wrap:nowrap!important;align-items:center!important;overflow:visible!important;} +.kronic-voice-top {display:flex!important;flex:0 1 auto!important;width:auto!important;max-width:100%!important;min-width:0!important;flex-wrap:nowrap!important;align-items:center!important;gap:6px!important;} +.kronic-voice-top .panel-section,.kronic-voice-top .connection-actions {display:flex!important;flex-wrap:nowrap!important;align-items:center!important;min-width:0;} +.kronic-voice-top .connection-actions {flex:0 0 auto!important;} +.kronic-voice-top .form-group {flex:0 1 125px!important;min-width:0!important;} +.kronic-voice-top .form-group input {min-width:0!important;max-width:100%!important;} +.kronic-voice-top .connection-actions button {white-space:nowrap!important;min-height:32px!important;} +.app-shell > .topbar .topbar-tools {flex:0 0 auto!important;white-space:nowrap!important;} +@media(max-width:600px){ + .kronic-voice-top {gap:3px!important;} + .kronic-voice-top .panel-section {gap:3px!important;} + .kronic-voice-top .connection-actions button {font-size:11px!important;padding:5px!important;} + .kronic-voice-top .form-group {flex:0 1 75px!important;} +} + + +/* Per-listener LiveKit volume controls. The participant renderer already + creates and wires .volume-overlay for remote participants only. Keep it + above the GIF/image layer and within the resizable card's boundaries. */ +.octagon.participant-card, +.participant-card { + isolation: isolate; +} +.participant-card > .avatar, +.participant-card > .avatar-fallback { + z-index: 0 !important; +} +.participant-card .name-overlay { + position: absolute !important; + top: 7px !important; + bottom: auto !important; + z-index: 5 !important; + pointer-events: none; +} +.participant-card .stats-overlay { + position: absolute !important; + top: 31px !important; + bottom: auto !important; + z-index: 5 !important; + pointer-events: none; +} +.participant-card .volume-overlay { + position: absolute !important; + display: flex !important; + visibility: visible !important; + opacity: 1 !important; + flex-direction: column !important; + align-items: stretch !important; + gap: 3px !important; + left: 8px !important; + right: 8px !important; + bottom: 9px !important; + top: auto !important; + width: auto !important; + max-width: calc(100% - 16px) !important; + min-width: 0 !important; + padding: 7px 9px !important; + box-sizing: border-box !important; + border-radius: 9px !important; + background: rgba(14,17,24,.87) !important; + color: #f2f5fa !important; + z-index: 20 !important; + pointer-events: auto !important; + overflow: visible !important; +} +.participant-card .volume-overlay span { + display: block !important; + font-size: 11px !important; + line-height: 1.25 !important; + color: #edf2f9 !important; +} +.participant-card .volume-overlay input[type="range"] { + display: block !important; + appearance: auto !important; + -webkit-appearance: auto !important; + width: 100% !important; + max-width: 100% !important; + min-width: 0 !important; + height: 22px !important; + margin: 0 !important; + padding: 0 !important; + cursor: pointer !important; + accent-color: #5e9efa !important; + opacity: 1 !important; + pointer-events: auto !important; + touch-action: pan-x; +} +.participant-card .volume-overlay input[type="range"]:focus-visible { + outline: 2px solid #b4d5ff !important; + outline-offset: 2px; +} +@media (max-width: 650px) { + .participant-card .volume-overlay {padding: 5px 7px !important;bottom: 6px !important;} + .participant-card .volume-overlay input[type="range"] {height: 26px !important;} +} + +/* Consolidated voice badge alignment + always accessible remote participant gain. */ +.app-shell > .topbar {align-items:center!important;min-height:42px!important;height:42px!important;} +.kronic-voice-top {align-self:center!important;align-items:center!important;transform:none!important;line-height:1!important;} +.kronic-voice-top .connection-actions {align-self:center!important;align-items:center!important;} +.kronic-voice-top .connection-actions #joinBtn, +.kronic-voice-top .connection-actions #connectBtn, +.kronic-voice-top .connection-actions button {vertical-align:middle!important;align-self:center!important;margin-top:0!important;margin-bottom:0!important;} +.workspace {height:calc(100% - 42px)!important;} +.participant-card .volume-overlay {z-index:55!important;display:flex!important;opacity:1!important;visibility:visible!important;bottom:8px!important;left:8px!important;right:8px!important;min-height:47px!important;} +.participant-card .volume-overlay input[type=range] {display:block!important;width:100%!important;pointer-events:auto!important;} +.participant-card .name-overlay {bottom:86px!important;top:auto!important;} +.participant-card .stats-overlay {bottom:61px!important;top:auto!important;} +@media(max-width:700px){ + .kronic-voice-top {flex-wrap:nowrap!important;overflow:visible!important;} + .kronic-voice-top .form-group {max-width:80px!important;} + .app-shell > .topbar {overflow:visible!important;} + .topbar-tools {flex:0 0 auto!important;} +} + +/* Phone-sized embedded room: voice and tools wrap inside the header, never behind it. */ +@media (max-width:700px) { + .app-shell > .topbar { + display:flex!important;flex-wrap:wrap!important;align-content:center!important; + align-items:center!important;justify-content:space-between!important; + width:100%!important;height:auto!important;min-height:90px!important; + padding:7px 8px!important;gap:6px!important;overflow:visible!important; + box-sizing:border-box!important; + } + .kronic-voice-top { + order:1!important;display:flex!important;flex:1 1 100%!important;width:100%!important; + max-width:100%!important;min-width:0!important;margin:0!important; + flex-wrap:nowrap!important;justify-content:space-between!important;gap:5px!important; + } + .kronic-voice-top .panel-section {flex:1 1 0!important;min-width:0!important;max-width:none!important;} + .kronic-voice-top .form-group {flex:1 1 0!important;min-width:0!important;max-width:none!important;} + .kronic-voice-top .form-group input {width:100%!important;min-width:0!important;max-width:100%!important;font-size:12px!important;min-height:40px!important;box-sizing:border-box!important;} + .kronic-voice-top .connection-actions {flex:0 0 auto!important;min-width:0!important;} + .kronic-voice-top .connection-actions button {min-height:40px!important;font-size:12px!important;padding:6px 9px!important;} + .app-shell > .topbar .topbar-tools {order:2!important;flex:0 0 auto!important;gap:7px!important;align-items:center!important;margin-left:auto!important;} + .app-shell > .topbar .topbar-tools .icon-button {min-width:40px!important;min-height:38px!important;} + .app-shell > .topbar .window-taskbar {order:3!important;min-width:0!important;max-width:100%!important;} + .workspace {height:auto!important;min-height:0!important;flex:1 1 auto!important;} + .main-content,.participant-grid {min-width:0!important;} +} + +/* Avatars may be dragged anywhere: do not clip them at the grid edge. */ +.participant-grid{overflow:visible!important} +.main-content{overflow:visible} diff --git a/kronic-chat/css/screenshare.css b/kronic-chat/css/screenshare.css new file mode 100644 index 0000000..42c8e79 --- /dev/null +++ b/kronic-chat/css/screenshare.css @@ -0,0 +1,248 @@ +/* ===================================================== + Modern Screen-Share Overlay & Popup Window + ===================================================== */ + +/* Outer wrapper for the tool window */ +#screenShareFrameWrap { + display: none; /* Controlled via showToolWindow / hideToolWindow */ + position: fixed; + inset: 0; + z-index: 1000; + + align-items: center; + justify-content: center; + + background: rgba(11, 12, 15, 0.75); + backdrop-filter: blur(8px); + -webkit-backdrop-filter: blur(8px); + + animation: screenShareFadeIn 200ms cubic-bezier(0.16, 1, 0.3, 1) forwards; +} + +/* Modal Content Box */ +.screen-share-modal { + display: flex; + flex-direction: column; + + width: min(92vw, 1280px); + height: min(88vh, 820px); + + overflow: hidden; + + border: 1px solid rgba(255, 255, 255, 0.08); + border-radius: 12px; + + background: #1e1f22; + box-shadow: + 0 24px 48px rgba(0, 0, 0, 0.5), + 0 0 0 1px rgba(255, 255, 255, 0.04) inset; +} + +/* Header */ +.screen-share-header { + display: flex; + align-items: center; + justify-content: space-between; + + height: 52px; + padding: 0 16px; + + border-bottom: 1px solid rgba(255, 255, 255, 0.06); + background: #2b2d31; +} + +.screen-share-title-area { + display: flex; + align-items: center; + gap: 10px; + min-width: 0; +} + +.screen-share-live-badge { + display: inline-flex; + align-items: center; + gap: 6px; + + padding: 3px 8px; + + border-radius: 4px; + + background: rgba(237, 66, 69, 0.15); + color: #ed4245; + + font-size: 11px; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 0.5px; +} + +.screen-share-live-dot { + width: 6px; + height: 6px; + border-radius: 50%; + background: #ed4245; + box-shadow: 0 0 6px #ed4245; + animation: screenSharePulse 2s infinite; +} + +#screenShareTitle { + margin: 0; + color: #f2f3f5; + font-size: 14px; + font-weight: 600; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.screen-share-close-btn { + display: grid; + place-items: center; + + width: 32px; + height: 32px; + + border: 0; + border-radius: 6px; + + background: transparent; + color: #949ba4; + + cursor: pointer; + transition: background 120ms ease, color 120ms ease; +} + +.screen-share-close-btn:hover { + background: rgba(255, 255, 255, 0.08); + color: #fff; +} + + +/* Video Stage Area */ +.screen-share-stage { + position: relative; + display: grid; + place-items: center; + + flex: 1 1 auto; + min-width: 0; + min-height: 0; + + background: #0f1012; + overflow: hidden; +} + +/* Attached Video Element */ +.screen-share-video { + width: 100%; + height: 100%; + object-fit: contain; + background: #000; +} + +/* Empty State / Placeholder */ +.screen-share-empty-state { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + + gap: 12px; + padding: 24px; + + color: #949ba4; + text-align: center; +} + +.screen-share-empty-icon { + font-size: 40px; + opacity: 0.6; +} + +.screen-share-empty-text { + font-size: 13.5px; + font-weight: 500; +} + + +/* Footer Controls Bar */ +.screen-share-footer { + display: flex; + align-items: center; + justify-content: flex-end; + + gap: 10px; + height: 60px; + padding: 0 16px; + + border-top: 1px solid rgba(255, 255, 255, 0.06); + background: #2b2d31; +} + +.screen-share-control-btn { + display: inline-flex; + align-items: center; + justify-content: center; + + height: 38px; + padding: 0 16px; + + border: 1px solid rgba(255, 255, 255, 0.08); + border-radius: 6px; + + background: #383a40; + color: #dbdee1; + + cursor: pointer; + font-size: 13px; + font-weight: 600; + + transition: background 120ms ease, border-color 120ms ease, color 120ms ease; +} + +.screen-share-control-btn:hover { + background: #4e5058; + color: #fff; + border-color: rgba(255, 255, 255, 0.15); +} + +.screen-share-control-btn.danger { + background: #ed4245; + border-color: transparent; + color: #fff; +} + +.screen-share-control-btn.danger:hover { + background: #c9383b; +} + + +/* ===================================================== + Animations + ===================================================== */ + +@keyframes screenShareFadeIn { + from { + opacity: 0; + transform: scale(0.98); + } + to { + opacity: 1; + transform: scale(1); + } +} + +@keyframes screenSharePulse { + 0% { + transform: scale(0.95); + box-shadow: 0 0 0 0 rgba(237, 66, 69, 0.7); + } + 70% { + transform: scale(1); + box-shadow: 0 0 0 6px rgba(237, 66, 69, 0); + } + 100% { + transform: scale(0.95); + box-shadow: 0 0 0 0 rgba(237, 66, 69, 0); + } +} \ No newline at end of file diff --git a/kronic-chat/css/topbar-audio.css b/kronic-chat/css/topbar-audio.css new file mode 100644 index 0000000..b99136f --- /dev/null +++ b/kronic-chat/css/topbar-audio.css @@ -0,0 +1,170 @@ +/* ===================================================== + Topbar audio dropdowns + Place after the Music/GIF buttons. + ===================================================== */ + +.topbar-audio-controls { + position: relative; + + display: flex; + flex: 0 0 auto; + + align-items: center; + + /* requested visual gap from Music/GIF */ + margin-left: 48px; + + gap: 6px; +} + +.topbar-audio-menu { + position: relative; + + flex: 0 0 auto; +} + +.topbar-audio-menu > summary { + list-style: none; +} + +.topbar-audio-menu > summary::-webkit-details-marker { + display: none; +} + +.topbar-audio-trigger { + width: 40px; + min-width: 40px; + height: 38px; + min-height: 38px; + + padding: 0; +} + +.topbar-audio-menu[open] > .topbar-audio-trigger { + color: #fff; + + background: + var(--background-hover); +} + +.topbar-audio-dropdown { + position: absolute; + + z-index: 5000; + + top: calc(100% + 10px); + right: 0; + + width: 310px; + max-height: min(70vh, 620px); + + padding: 12px; + + overflow-x: hidden; + overflow-y: auto; + + background: + var(--background-dark); + + border: + 1px solid var(--border-color); + + border-radius: + var(--radius-medium); + + box-shadow: + 0 14px 36px rgba(0, 0, 0, 0.5); +} + +.topbar-audio-dropdown-title { + margin-bottom: 12px; + + color: + var(--text-primary); + + font-size: 12px; + font-weight: 800; + + letter-spacing: 0.05em; + + text-transform: uppercase; +} + +/* Reuse the existing audio control styling without sidebar card chrome */ +.topbar-audio-dropdown .compact-toggle { + margin-bottom: 12px !important; +} + +.topbar-audio-dropdown .audio-control { + margin-top: 12px; +} + +.topbar-audio-dropdown .audio-advanced { + margin-top: 10px; +} + +.topbar-audio-dropdown .audio-apply-button { + margin-top: 12px; +} + +/* Keep the three dropdown buttons visually grouped */ +.topbar-audio-controls + .icon-button { + margin-left: 10px; +} + + +/* ===================================================== + Topbar dropdown placement on smaller screens + ===================================================== */ + +@media (max-width: 1000px) { + .topbar-audio-controls { + margin-left: 24px; + + gap: 3px; + } + + .topbar-audio-trigger { + width: 38px; + min-width: 38px; + } + + .topbar-audio-dropdown { + width: min(300px, calc(100vw - 24px)); + } +} + +@media (max-width: 760px) { + .topbar-audio-controls { + order: 3; + + flex: 1 1 100%; + + justify-content: flex-end; + + width: 100%; + + margin-left: 0; + margin-top: 3px; + + padding-right: 2px; + } + + .topbar-audio-dropdown { + position: fixed; + + top: calc(58px + env(safe-area-inset-top, 0px)); + right: 8px; + + width: + min(330px, calc(100vw - 16px)); + + max-height: + calc( + 100dvh + - 76px + - env(safe-area-inset-top, 0px) + - env(safe-area-inset-bottom, 0px) + ); + } +} \ No newline at end of file