ultimatepos/Modules/Communication/Resources/views/layouts/styles.blade.php

368 lines
9.9 KiB
PHP

<style>
.comm-page { margin-top: 4px; }
/* Communication SPA fills admin content without page scroll */
body.matdash-theme .admin-content:has(.comm-page-chat),
body.matdash-theme .admin-content:has(.chat-shell) {
display: flex;
flex-direction: column;
min-height: 0;
overflow: hidden;
max-height: calc(100vh - var(--md-topbar-height, 72px) - 48px);
padding-bottom: 8px;
}
section.content.comm-page-chat {
flex: 1 1 auto;
min-height: 0;
display: flex;
flex-direction: column;
margin-top: 0;
padding: 0 !important;
}
#comm-app.comm-app-root {
flex: 1 1 auto;
min-height: 0;
display: flex;
flex-direction: column;
overflow: hidden;
}
.comm-card {
border: 1px solid #e7ecf3;
border-radius: 14px;
background: #fff;
box-shadow: 0 8px 24px rgba(27, 39, 51, 0.06);
overflow: hidden;
}
.comm-card-header {
padding: 16px 18px;
border-bottom: 1px solid #eef2f7;
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
flex-wrap: wrap;
}
.comm-card-title {
font-size: 16px;
font-weight: 600;
color: #1e2b37;
margin: 0;
}
.comm-btn {
border: none;
border-radius: 10px;
padding: 8px 14px;
font-weight: 600;
transition: all 0.2s ease;
}
.comm-btn-primary {
color: #fff;
background: linear-gradient(90deg, #4f7cff 0%, #5ea6ff 100%);
}
.comm-btn-primary:hover { opacity: 0.92; color: #fff; }
.comm-btn-ghost {
background: #eef2f8;
color: #4a5b6f;
}
.comm-btn-ghost:hover { background: #dde6f7; color: #243447; }
.comm-btn-danger { background: #ffe8e8; color: #c0392b; }
.comm-btn-success { background: #e8f8ef; color: #1e8449; }
.comm-input {
border: 1px solid #dde5ef;
border-radius: 10px;
padding: 9px 12px;
width: 100%;
outline: none;
}
.comm-input:focus { border-color: #4f7cff; box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.15); }
.comm-chip {
display: inline-block;
border-radius: 999px;
padding: 4px 10px;
font-size: 12px;
font-weight: 600;
}
.comm-chip-active { background: #e8f8ef; color: #1e8449; }
.comm-chip-scheduled { background: #fff4e5; color: #b86b00; }
.comm-chip-ended { background: #f1f3f6; color: #6b7a8c; }
.comm-empty {
text-align: center;
padding: 48px 20px;
color: #7b8a9a;
}
.comm-empty i { font-size: 42px; margin-bottom: 12px; color: #c5d0de; }
.comm-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.comm-tab {
border: none;
border-radius: 999px;
padding: 7px 14px;
background: #eef2f8;
color: #4a5b6f;
font-weight: 600;
}
.comm-tab.active {
background: linear-gradient(90deg, #4f7cff 0%, #5ea6ff 100%);
color: #fff;
}
.comm-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
background: linear-gradient(135deg, #4f7cff, #7aa7ff);
color: #fff;
display: inline-flex;
align-items: center;
justify-content: center;
font-weight: 700;
position: relative;
flex-shrink: 0;
}
.comm-avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.comm-online-dot {
position: absolute;
bottom: 0;
right: 0;
width: 10px;
height: 10px;
border-radius: 50%;
background: #2ecc71;
border: 2px solid #fff;
}
.comm-badge {
background: #4f7cff;
color: #fff;
border-radius: 999px;
padding: 2px 8px;
font-size: 11px;
font-weight: 700;
}
/* Chat layout */
.chat-shell {
display: flex;
flex-direction: row;
gap: 16px;
align-items: stretch;
flex: 1 1 auto;
min-height: 0;
width: 100%;
height: calc(100vh - var(--md-topbar-height, 72px) - 210px);
max-height: calc(100vh - var(--md-topbar-height, 72px) - 210px);
overflow: hidden;
}
.chat-sidebar {
width: 300px;
flex: 0 0 300px;
min-width: 260px;
max-width: min(34%, 360px);
display: flex;
flex-direction: column;
min-height: 0;
}
.chat-sidebar .comm-card {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
}
#room-list {
flex: 1;
min-height: 0;
overflow-y: auto;
padding: 8px 10px 14px;
}
.chat-main {
flex: 1 1 0;
min-width: 0;
display: flex;
flex-direction: column;
min-height: 0;
}
.chat-main .comm-card,
.chat-panel {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
height: 100%;
}
.chat-panel-header {
flex-shrink: 0;
}
.chat-body {
flex: 1 1 auto;
min-height: 0;
display: flex;
flex-direction: column;
overflow: hidden;
position: relative;
}
.chat-typing-line {
flex-shrink: 0;
min-height: 0;
max-height: 0;
overflow: hidden;
padding: 0 18px;
font-size: 12px;
color: #6b7a8c;
transition: max-height 0.15s ease, padding 0.15s ease;
}
.chat-typing-line.visible {
max-height: 28px;
padding: 4px 18px;
}
#chat-box {
flex: 1 1 auto;
min-height: 0;
overflow-y: auto;
overflow-x: hidden;
padding: 16px 18px;
background: #f8fafc;
overscroll-behavior: contain;
}
.chat-composer {
flex-shrink: 0;
padding: 14px 18px;
border-top: 1px solid #eef2f7;
background: #fff;
}
.chat-composer-form {
display: flex;
gap: 10px;
align-items: center;
}
.chat-composer-form .comm-input,
.chat-composer-input {
flex: 1;
margin: 0;
min-height: 42px;
max-height: 120px;
resize: none;
line-height: 1.45;
font-family: inherit;
}
.chat-composer-form .comm-btn {
flex-shrink: 0;
min-width: 48px;
height: 42px;
display: inline-flex;
align-items: center;
justify-content: center;
}
.room-item {
cursor: pointer;
border: 1px solid #eef2f7;
border-radius: 12px;
padding: 10px 12px;
margin-bottom: 8px;
background: #fff;
transition: border-color 0.15s, background 0.15s;
}
.room-item:hover { border-color: #c5d5f7; background: #f8fbff; }
.room-item.active { background: #eef4ff; border-color: #4f7cff; }
.room-item-inner { display: flex; gap: 10px; align-items: center; }
.room-item-body { flex: 1; min-width: 0; }
.room-item-top, .room-item-bottom {
display: flex;
justify-content: space-between;
gap: 8px;
align-items: center;
}
.room-item-top { margin-bottom: 2px; }
.room-item-name {
font-weight: 600;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.room-item-preview {
color: #6b7a8c;
font-size: 12px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
}
.chat-msg {
display: flex;
margin-bottom: 10px;
}
.chat-msg.mine { justify-content: flex-end; }
.chat-msg.other { justify-content: flex-start; }
html[dir="rtl"] .chat-msg.mine { justify-content: flex-start; }
html[dir="rtl"] .chat-msg.other { justify-content: flex-end; }
.chat-bubble {
max-width: min(75%, 520px);
border-radius: 14px;
padding: 10px 14px;
word-break: break-word;
}
.chat-msg.mine .chat-bubble {
background: linear-gradient(135deg, #4f7cff, #5ea6ff);
color: #fff;
}
.chat-msg.other .chat-bubble {
background: #fff;
color: #1e2b37;
border: 1px solid #e7ecf3;
}
.chat-bubble-name {
font-size: 12px;
font-weight: 700;
margin-bottom: 4px;
opacity: 0.9;
}
.chat-msg.mine .chat-bubble-name {
color: rgba(255, 255, 255, 0.95);
}
.chat-msg.other .chat-bubble-name {
color: #4f7cff;
}
.chat-bubble-body {
white-space: pre-wrap;
}
.chat-bubble-time {
font-size: 11px;
opacity: 0.7;
margin-top: 4px;
}
.chat-msg.mine .chat-bubble-time { text-align: left; }
.chat-msg.other .chat-bubble-time { text-align: right; }
html[dir="rtl"] .chat-msg.mine .chat-bubble-time { text-align: right; }
html[dir="rtl"] .chat-msg.other .chat-bubble-time { text-align: left; }
.chat-header-tools {
display: flex;
gap: 8px;
align-items: center;
}
.chat-header-tools .comm-input { max-width: 200px; margin: 0; }
.chat-back-btn {
display: none;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border: none;
border-radius: 10px;
background: #eef2f8;
color: #4a5b6f;
cursor: pointer;
flex-shrink: 0;
}
html[dir="rtl"] .chat-back-btn { margin-left: 8px; }
html[dir="ltr"] .chat-back-btn { margin-right: 8px; }
@media (max-width: 767px) {
.chat-shell { gap: 0; }
.chat-sidebar {
width: 100%;
flex: 1 1 auto;
max-width: none;
min-width: 0;
}
.chat-main { display: none; }
.chat-shell.room-open .chat-sidebar { display: none; }
.chat-shell.room-open .chat-main { display: flex; }
.chat-back-btn { display: inline-flex !important; }
}
</style>