/* ==========================================================================
   PulseChat — Client Portal Chat Styles
   Toggle-only chat widget for the CRM client area.
   Neutral, professional palette — no admin blue.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Client Theme Variables
   -------------------------------------------------------------------------- */
:root {
    --pcc-primary:         #4a5568;
    --pcc-primary-hover:   #3d4758;
    --pcc-primary-light:   rgba(74, 85, 104, .10);
    --pcc-accent:          #667eea;
    --pcc-accent-light:    rgba(102, 126, 234, .10);
    --pcc-bg:              #ffffff;
    --pcc-bg-alt:          #f7f8fa;
    --pcc-border:          #e2e8f0;
    --pcc-text:            #2d3748;
    --pcc-text-secondary:  #718096;
    --pcc-text-muted:      #65758a;
    --pcc-timestamp:       #65758a;
    --pcc-status-online:   #27ae60;
    --pcc-status-away:     #f39c12;
    --pcc-status-busy:     #e74c3c;
    --pcc-status-offline:  #95a5a6;
    --pcc-sent-bg:         #0066cc;
    --pcc-sent-color:      #ffffff;
    --pcc-recv-bg:         #e4e6eb;
    --pcc-recv-color:      #1a1a1a;
    --pcc-danger:          #e53e3e;
    --pcc-success:         #38a169;
    --pcc-radius:          12px;
    --pcc-radius-sm:       6px;
    --pcc-radius-full:     9999px;
    --pcc-shadow:          0 10px 30px rgba(0, 0, 0, .12), 0 4px 10px rgba(0, 0, 0, .06);
    --pcc-shadow-sm:       0 2px 8px rgba(0, 0, 0, .08);
    --pcc-transition:      .2s ease;
    --pcc-font:            -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   Toggle Button (Client)
   -------------------------------------------------------------------------- */
.pulsechat-client-toggle,
.pcc-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10100;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    background: var(--pcc-primary);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(74, 85, 104, .3),
                0 2px 6px rgba(0, 0, 0, .08);
    -webkit-transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease;
    transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease;
    outline: none;
    line-height: 1;
    padding: 0;
}
.pulsechat-client-toggle:hover,
.pcc-toggle-btn:hover {
    -webkit-transform: scale(1.08);
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(74, 85, 104, .4),
                0 3px 8px rgba(0, 0, 0, .1);
}
.pulsechat-client-toggle:active,
.pcc-toggle-btn:active {
    -webkit-transform: scale(.96);
    transform: scale(.96);
}
.pulsechat-client-toggle.open .icon-chat,
.pcc-toggle-btn.open .icon-chat { display: none; }
.pulsechat-client-toggle.open .icon-close,
.pcc-toggle-btn.open .icon-close { display: inline-flex; }
.pulsechat-client-toggle .icon-close,
.pcc-toggle-btn .icon-close { display: none; }

/* Center icon inside toggle */
.pcc-toggle-btn i {
    font-size: 22px;
    line-height: 1;
}

/* Pulse on new message */
.pulsechat-client-toggle.has-new,
.pcc-toggle-btn.has-new {
    -webkit-animation: pccPulse 1.5s infinite;
    animation: pccPulse 1.5s infinite;
}

@-webkit-keyframes pccPulse {
    0%   { box-shadow: 0 0 0 0 rgba(74, 85, 104, .4); }
    100% { box-shadow: 0 0 0 14px rgba(74, 85, 104, 0); }
}
@keyframes pccPulse {
    0%   { box-shadow: 0 0 0 0 rgba(74, 85, 104, .4); }
    100% { box-shadow: 0 0 0 14px rgba(74, 85, 104, 0); }
}

/* Client Toggle Badge */
.pulsechat-client-toggle .toggle-badge,
.pcc-toggle-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: var(--pcc-danger);
    border-radius: var(--pcc-radius-full);
    border: 2px solid #fff;
    pointer-events: none;
}
.pulsechat-client-toggle .toggle-badge:empty,
.pcc-toggle-badge.hidden {
    display: none;
}

/* --------------------------------------------------------------------------
   Client Chat Panel
   -------------------------------------------------------------------------- */
.pulsechat-client-panel,
.pcc-panel {
    position: fixed;
    bottom: 86px;
    right: 20px;
    z-index: 10200;
    width: 340px;
    height: 460px;
    background: var(--pcc-bg);
    border-radius: var(--pcc-radius);
    box-shadow: var(--pcc-shadow);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -ms-flex-direction: column;
    flex-direction: column;
    overflow: hidden;
    font-family: var(--pcc-font);
    font-size: 14px;
}
.pcc-panel.hidden {
    display: none !important;
}
.pulsechat-client-panel.open,
.pcc-panel:not(.hidden) {
    opacity: 1;
    visibility: visible;
    -webkit-transform: translateY(0) scale(1);
    transform: translateY(0) scale(1);
}

/* Panel — "Conversations" list view */
.pulsechat-client-panel .client-view-list,
.pulsechat-client-panel .client-view-chat {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.pulsechat-client-panel .client-view-chat {
    display: none;
}
.pulsechat-client-panel.in-chat .client-view-list {
    display: none;
}
.pulsechat-client-panel.in-chat .client-view-chat {
    display: flex;
}

/* --------------------------------------------------------------------------
   Client Panel Header
   -------------------------------------------------------------------------- */
.pulsechat-client-panel .client-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--pcc-primary);
    color: #fff;
}
.pulsechat-client-panel .client-header h4 {
    flex: 1;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}
.pulsechat-client-panel .client-header .back-btn,
.pulsechat-client-panel .client-header .close-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    -webkit-transition: background-color var(--pcc-transition);
    transition: background-color var(--pcc-transition);
}
.pulsechat-client-panel .client-header .back-btn:hover,
.pulsechat-client-panel .client-header .close-btn:hover {
    background: rgba(255, 255, 255, .25);
}
.pulsechat-client-panel .client-header .back-btn {
    display: none;
}
.pulsechat-client-panel.in-chat .client-header .back-btn {
    display: inline-flex;
}

/* --------------------------------------------------------------------------
   Client Staff List
   -------------------------------------------------------------------------- */
.pulsechat-client-panel .client-staff-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 0;
}
.pulsechat-client-panel .staff-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    -webkit-transition: background-color var(--pcc-transition);
    transition: background-color var(--pcc-transition);
}
.pulsechat-client-panel .staff-item:hover {
    background: var(--pcc-bg-alt);
}
.pulsechat-client-panel .staff-item .pulsechat-avatar {
    width: 36px;
    height: 36px;
    font-size: 13px;
    background: var(--pcc-accent-light);
    color: var(--pcc-accent);
}
.pulsechat-client-panel .staff-item .staff-info {
    flex: 1;
    min-width: 0;
}
.pulsechat-client-panel .staff-item .staff-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--pcc-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pulsechat-client-panel .staff-item .staff-role {
    font-size: 11px;
    color: var(--pcc-text-muted);
    margin-top: 1px;
}
.pulsechat-client-panel .staff-item .staff-preview {
    font-size: 11px;
    color: var(--pcc-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}
.pulsechat-client-panel .staff-item .staff-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}
.pulsechat-client-panel .staff-item .staff-time {
    font-size: 10px;
    color: var(--pcc-text-muted);
}
.pulsechat-client-panel .staff-item .pulsechat-unread-badge {
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--pcc-danger);
}

/* Online indicator on staff avatar */
.pulsechat-client-panel .staff-item .pulsechat-status-dot {
    border-color: var(--pcc-bg);
}

/* --------------------------------------------------------------------------
   Client Chat View
   -------------------------------------------------------------------------- */

/* Chat Header (inside chat) */
.pulsechat-client-panel .client-chat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--pcc-border);
    background: var(--pcc-bg);
}
.pulsechat-client-panel .client-chat-header .chat-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--pcc-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pulsechat-client-panel .client-chat-header .chat-status {
    font-size: 11px;
    color: var(--pcc-text-muted);
}

/* Client Messages Area */
.pulsechat-client-panel .client-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px;
    background: var(--pcc-bg-alt);
}
.pulsechat-client-panel .client-messages .client-msg {
    display: flex;
    margin-bottom: 6px;
    -webkit-animation: pcFadeIn .15s ease;
    animation: pcFadeIn .15s ease;
}
.pulsechat-client-panel .client-messages .client-msg.sent {
    justify-content: flex-end;
}
.pulsechat-client-panel .client-messages .client-msg .msg-bubble {
    max-width: 80%;
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.4;
    border-radius: 14px;
    word-wrap: break-word;
}
.pulsechat-client-panel .client-messages .client-msg.sent .msg-bubble {
    background: var(--pcc-sent-bg);
    color: var(--pcc-sent-color);
    border-bottom-right-radius: 4px;
}
.pulsechat-client-panel .client-messages .client-msg.received .msg-bubble {
    background: var(--pcc-recv-bg);
    color: var(--pcc-recv-color);
    border-bottom-left-radius: 4px;
}
.pulsechat-client-panel .client-messages .client-msg .msg-time {
    font-size: 10px;
    color: var(--pcc-text-muted);
    margin-top: 2px;
}
.pulsechat-client-panel .client-messages .client-msg.sent .msg-time {
    text-align: right;
}

/* Typing indicator inside client chat */
.pulsechat-client-panel .client-messages .pulsechat-typing {
    background: var(--pcc-recv-bg);
    padding: 6px 10px;
    border-radius: 14px;
}

/* --------------------------------------------------------------------------
   Client Chat Input
   -------------------------------------------------------------------------- */
.pulsechat-client-panel .client-input {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-top: 1px solid var(--pcc-border);
    background: var(--pcc-bg);
}
.pulsechat-client-panel .client-input input {
    flex: 1;
    border: 1px solid var(--pcc-border);
    border-radius: var(--pcc-radius-full);
    padding: 8px 14px;
    font-size: 13px;
    color: var(--pcc-text);
    background: var(--pcc-bg);
    outline: none;
    -webkit-transition: border-color var(--pcc-transition), box-shadow var(--pcc-transition);
    transition: border-color var(--pcc-transition), box-shadow var(--pcc-transition);
}
.pulsechat-client-panel .client-input input:focus {
    border-color: var(--pcc-accent);
    box-shadow: 0 0 0 3px var(--pcc-accent-light);
}
.pulsechat-client-panel .client-input input::-webkit-input-placeholder { color: var(--pcc-text-muted); }
.pulsechat-client-panel .client-input input::-moz-placeholder          { color: var(--pcc-text-muted); }
.pulsechat-client-panel .client-input input:-ms-input-placeholder      { color: var(--pcc-text-muted); }
.pulsechat-client-panel .client-input input::placeholder                { color: var(--pcc-text-muted); }

.pulsechat-client-panel .client-input .attach-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--pcc-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    -webkit-transition: color var(--pcc-transition), background-color var(--pcc-transition);
    transition: color var(--pcc-transition), background-color var(--pcc-transition);
}
.pulsechat-client-panel .client-input .attach-btn:hover {
    color: var(--pcc-accent);
    background: var(--pcc-accent-light);
}
.pulsechat-client-panel .client-input .send-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--pcc-primary);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    -webkit-transition: background-color var(--pcc-transition), transform var(--pcc-transition);
    transition: background-color var(--pcc-transition), transform var(--pcc-transition);
}
.pulsechat-client-panel .client-input .send-btn:hover {
    background: var(--pcc-primary-hover);
    -webkit-transform: scale(1.05);
    transform: scale(1.05);
}
.pulsechat-client-panel .client-input .send-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
    -webkit-transform: none;
    transform: none;
}

/* --------------------------------------------------------------------------
   Client No-Messages / Loader
   -------------------------------------------------------------------------- */
.pulsechat-client-panel .client-no-messages {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 24px;
    color: var(--pcc-text-muted);
    text-align: center;
}
.pulsechat-client-panel .client-no-messages i {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: .35;
}
.pulsechat-client-panel .client-no-messages p {
    margin: 0;
    font-size: 13px;
}

.pulsechat-client-panel .client-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.pulsechat-client-panel .client-loader::after {
    content: "";
    width: 24px;
    height: 24px;
    border: 2px solid var(--pcc-accent-light);
    border-top-color: var(--pcc-accent);
    border-radius: 50%;
    -webkit-animation: pcSpin .7s linear infinite;
    animation: pcSpin .7s linear infinite;
}

/* --------------------------------------------------------------------------
   Client System Message
   -------------------------------------------------------------------------- */
.pulsechat-client-panel .client-system-msg {
    text-align: center;
    padding: 8px 12px;
}
.pulsechat-client-panel .client-system-msg span {
    display: inline-block;
    padding: 3px 12px;
    font-size: 11px;
    color: var(--pcc-text-muted);
    background: rgba(0, 0, 0, .03);
    border-radius: var(--pcc-radius-full);
}

/* --------------------------------------------------------------------------
   Client Scrollbar
   -------------------------------------------------------------------------- */
.pulsechat-client-panel .client-messages::-webkit-scrollbar,
.pulsechat-client-panel .client-staff-list::-webkit-scrollbar {
    width: 5px;
}
.pulsechat-client-panel .client-messages::-webkit-scrollbar-track,
.pulsechat-client-panel .client-staff-list::-webkit-scrollbar-track {
    background: transparent;
}
.pulsechat-client-panel .client-messages::-webkit-scrollbar-thumb,
.pulsechat-client-panel .client-staff-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, .12);
    border-radius: 3px;
}
.pulsechat-client-panel .client-messages::-webkit-scrollbar-thumb:hover,
.pulsechat-client-panel .client-staff-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, .2);
}
.pulsechat-client-panel .client-messages,
.pulsechat-client-panel .client-staff-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, .12) transparent;
}

/* --------------------------------------------------------------------------
   Client Mini Chat Windows (alternative to panel)
   -------------------------------------------------------------------------- */
.pulsechat-client-mini-chats {
    position: fixed;
    bottom: 0;
    right: 86px;
    z-index: 10300;
    display: flex;
    flex-direction: row-reverse;
    gap: 8px;
    align-items: flex-end;
    pointer-events: none;
}
.pulsechat-client-mini-chats > * {
    pointer-events: auto;
}
.pulsechat-client-mini-chat {
    width: 280px;
    height: 380px;
    background: var(--pcc-bg);
    border-radius: var(--pcc-radius) var(--pcc-radius) 0 0;
    box-shadow: var(--pcc-shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    -webkit-animation: pcSlideInUp .3s ease;
    animation: pcSlideInUp .3s ease;
}
.pulsechat-client-mini-chat.minimized {
    height: 42px;
}
.pulsechat-client-mini-chat.minimized .client-messages,
.pulsechat-client-mini-chat.minimized .client-input {
    display: none;
}

/* Client mini-chat header */
.pulsechat-client-mini-chat .mini-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    min-height: 42px;
    background: var(--pcc-primary);
    color: #fff;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.pulsechat-client-mini-chat .mini-header .mini-name {
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pulsechat-client-mini-chat .mini-header .mini-actions button {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    -webkit-transition: background-color .2s;
    transition: background-color .2s;
}
.pulsechat-client-mini-chat .mini-header .mini-actions button:hover {
    background: rgba(255, 255, 255, .3);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .pulsechat-client-toggle {
        bottom: 14px;
        right: 14px;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    .pulsechat-client-panel {
        bottom: 74px;
        right: 6px;
        left: 6px;
        width: auto;
        height: 65vh;
        max-height: 460px;
    }
    .pulsechat-client-mini-chats {
        right: 6px;
        left: 6px;
        flex-direction: column;
        align-items: stretch;
    }
    .pulsechat-client-mini-chat {
        width: 100%;
    }
}

/* ==========================================================================
   JS-injected widget elements (pcc-* namespace)
   ========================================================================== */

/* Panel header */
.pcc-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--pcc-primary);
    color: #fff;
}
.pcc-panel-title {
    flex: 1;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pcc-panel-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.pcc-header-btn,
.pcc-panel-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background-color var(--pcc-transition);
}
.pcc-header-btn:hover,
.pcc-panel-close:hover {
    background: rgba(255, 255, 255, .25);
}

/* Search */
.pcc-search {
    padding: 8px 12px;
    border-bottom: 1px solid var(--pcc-border);
    background: var(--pcc-bg);
}
.pcc-search-input {
    width: 100%;
    border: 1px solid var(--pcc-border) !important;
    border-radius: var(--pcc-radius-full);
    padding: 7px 12px;
    font-size: 13px;
    color: var(--pcc-text) !important;
    background-color: var(--pcc-bg-alt) !important;
    outline: none;
    transition: border-color var(--pcc-transition), box-shadow var(--pcc-transition);
    box-sizing: border-box;
}
.pcc-search-input:focus {
    border-color: var(--pcc-accent) !important;
    box-shadow: 0 0 0 3px var(--pcc-accent-light) !important;
}

/* Staff list */
.pcc-staff-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 0;
}
.pcc-staff-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background-color var(--pcc-transition);
}
.pcc-staff-item:hover {
    background: var(--pcc-bg-alt);
}
.pcc-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.pcc-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.pcc-avatar-wrap.pcc-avatar-fallback,
.pcc-mini-avatar-wrap.pcc-avatar-fallback {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dfe3e8;
}
.pcc-mini-avatar-wrap.pcc-avatar-fallback {
    width: 32px;
    height: 32px;
}
.pcc-avatar-initials {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #5c6670;
    background: #dfe3e8;
    text-transform: uppercase;
    line-height: 1;
    user-select: none;
}
.pcc-mini-avatar-wrap .pcc-avatar-initials {
    width: 32px;
    height: 32px;
    font-size: 12px;
}
.pcc-presence {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--pcc-bg);
}
.pcc-presence.online { background: var(--pcc-status-online); }
.pcc-presence.away   { background: var(--pcc-status-away); }
.pcc-presence.busy,
.pcc-presence.dnd    { background: var(--pcc-status-busy); }
.pcc-presence.offline { background: var(--pcc-status-offline); }
.pcc-staff-info { flex: 1; min-width: 0; }
.pcc-staff-name {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--pcc-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pcc-staff-role {
    display: block;
    font-size: 11px;
    color: var(--pcc-text-secondary);
}
.pcc-staff-status {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
}
.pcc-staff-status[data-status="online"] { color: var(--pcc-status-online); }
.pcc-staff-status[data-status="away"] { color: var(--pcc-status-away); }
.pcc-staff-status[data-status="busy"],
.pcc-staff-status[data-status="dnd"] { color: var(--pcc-status-busy); }
.pcc-staff-status[data-status="offline"] { color: var(--pcc-status-offline); }
.pcc-unread-badge {
    background: var(--pcc-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: var(--pcc-radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    box-sizing: border-box;
}
.pcc-empty {
    padding: 24px;
    text-align: center;
    color: var(--pcc-text-muted);
    font-size: 13px;
}

/* Mini windows container */
.pcc-mini-windows {
    position: fixed;
    bottom: 0;
    right: 86px;
    z-index: 10300;
    display: flex;
    flex-direction: row-reverse;
    gap: 8px;
    align-items: flex-end;
    pointer-events: none;
}
.pcc-mini-windows > * { pointer-events: auto; }

/* Single mini window */
.pcc-mini-window {
    width: 300px;
    height: 380px;
    background: var(--pcc-bg);
    border-radius: var(--pcc-radius) var(--pcc-radius) 0 0;
    box-shadow: var(--pcc-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: pcSlideInUp .3s ease;
}
.pcc-mini-window.minimized { height: 42px; overflow: hidden; }
.pcc-mini-window.minimized .pcc-mini-body { display: none; }

/* Mini window header */
.pcc-mini-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    min-height: 42px;
    background: var(--pcc-primary);
    color: #fff;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}
.pcc-mini-header-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pcc-mini-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.pcc-mini-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.pcc-mini-header-text {
    flex: 1;
    min-width: 0;
}
.pcc-mini-name {
    display: block;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.pcc-mini-status {
    display: block;
    font-size: 10px;
    opacity: .8;
    line-height: 1.3;
}
.pcc-mini-header-actions { display: flex; gap: 4px; flex-shrink: 0; }
.pcc-mini-close,
.pcc-mini-minimize {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: background-color .2s;
}
.pcc-mini-close:hover,
.pcc-mini-minimize:hover {
    background: rgba(255, 255, 255, .3);
}

/* Mini chat body — flex column to stack messages area + footer */
.pcc-mini-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--pcc-bg-alt);
    min-height: 0;
}

/* Messages area — scrolls, flex column for align-self to work */
.pcc-mini-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,.12) transparent;
}
.pcc-mini-messages::-webkit-scrollbar { width: 5px; }
.pcc-mini-messages::-webkit-scrollbar-track { background: transparent; }
.pcc-mini-messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,.12); border-radius: 3px; }
.pcc-mini-messages::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.2); }

/* Empty state */
.pcc-mini-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: var(--pcc-text-muted);
    font-size: 13px;
    text-align: center;
    padding: 20px;
}

/* Loading spinner */
.pcc-mini-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--pcc-text-muted);
}

/* Typing indicator */
.pcc-mini-typing {
    padding: 4px 10px;
    font-size: 11px;
    color: var(--pcc-text-muted);
    flex-shrink: 0;
}
.pcc-mini-typing.hidden { display: none; }

/* Mini chat footer — attach, audio, input, send */
.pcc-mini-footer {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    padding: 8px 10px;
    border-top: 1px solid var(--pcc-border);
    background: var(--pcc-bg);
    flex-shrink: 0;
}

/* Textarea input */
textarea.pcc-mini-input {
    flex: 1;
    border: 1px solid var(--pcc-border);
    border-radius: var(--pcc-radius-sm);
    padding: 6px 10px;
    font-size: 12px;
    font-family: var(--pcc-font);
    color: var(--pcc-text);
    background: var(--pcc-bg);
    resize: none;
    outline: none;
    min-height: 30px;
    max-height: 60px;
    line-height: 1.4;
    transition: border-color var(--pcc-transition);
    box-sizing: border-box;
}
textarea.pcc-mini-input:focus {
    border-color: var(--pcc-accent);
    box-shadow: 0 0 0 2px var(--pcc-accent-light);
}
textarea.pcc-mini-input::placeholder { color: var(--pcc-text-muted); }

/* Footer action buttons */
.pcc-mini-attach-btn,
.pcc-mini-audio-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--pcc-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    transition: color var(--pcc-transition), background-color var(--pcc-transition);
    padding: 0;
}
.pcc-mini-attach-btn:hover,
.pcc-mini-audio-btn:hover {
    color: var(--pcc-accent);
    background: var(--pcc-accent-light);
}
.pcc-mini-file-input.hidden { display: none; }

.pcc-mini-send-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--pcc-sent-bg);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: background-color .2s;
    padding: 0;
}
.pcc-mini-send-btn:hover { background: color-mix(in srgb, var(--pcc-sent-bg) 86%, #000 14%); }

/* Presence dot (in mini window header) */
.pcc-mini-presence {
    position: absolute;
    bottom: 0; right: 0;
    width: 8px; height: 8px;
    border-radius: 50%;
}
.pcc-mini-presence.online { background: var(--pcc-status-online); }
.pcc-mini-presence.away { background: var(--pcc-status-away); }
.pcc-mini-presence.busy,
.pcc-mini-presence.dnd { background: var(--pcc-status-busy); }
.pcc-mini-presence.offline { background: var(--pcc-status-offline); }

/* Legacy compat: .pcc-mini-msg (if used) */
.pcc-mini-msg { display: flex; margin-bottom: 4px; }
.pcc-mini-msg.sent { justify-content: flex-end; }
.pcc-mini-msg .pcc-msg-bubble {
    max-width: 80%;
    padding: 7px 10px;
    font-size: 12px;
    line-height: 1.4;
    border-radius: 12px;
    word-wrap: break-word;
}
.pcc-mini-msg.sent .pcc-msg-bubble {
    background: var(--pcc-sent-bg);
    color: var(--pcc-sent-color);
    border-bottom-right-radius: 4px;
}
.pcc-mini-msg.received .pcc-msg-bubble {
    background: var(--pcc-recv-bg);
    color: var(--pcc-recv-color);
    border-bottom-left-radius: 4px;
}

/* --------------------------------------------------------------------------
   Message Display Styles (pcc-msg class)
   -------------------------------------------------------------------------- */
.pcc-msg {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    max-width: 75%;
    position: relative;
}

.pcc-msg-sent {
    align-self: flex-end;
    align-items: flex-end;
}

.pcc-msg-received {
    align-self: flex-start;
    align-items: flex-start;
}

.pcc-msg-sender {
    font-size: 11px;
    color: var(--pcc-text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}

.pcc-msg-body {
    padding: 10px 14px;
    border-radius: 12px;
    word-wrap: break-word;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
    max-width: 100%;
    font-size: 13px;
    line-height: 1.5;
}

.pcc-msg-sent .pcc-msg-body {
    background: var(--pcc-sent-bg, #0084ff);
    color: var(--pcc-sent-color, #fff);
    border-bottom-right-radius: 4px;
}

.pcc-msg-received .pcc-msg-body {
    background: var(--pcc-recv-bg, #e4e6eb);
    color: var(--pcc-recv-color, #050505);
    border-bottom-left-radius: 4px;
}

/* Reply quote inside message bubble */
.pcc-reply-reference {
    display: flex;
    flex-direction: column;
    padding: 6px 10px;
    margin-bottom: 6px;
    border-left: 3px solid var(--pcc-brand, #0084ff);
    background: rgba(0, 0, 0, .05);
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 12px;
}
.pcc-msg-sent .pcc-reply-reference {
    background: rgba(255, 255, 255, .12);
    border-left-color: rgba(255, 255, 255, .5);
}
.pcc-msg-received .pcc-reply-reference {
    background: rgba(0, 0, 0, .06);
}
.pcc-reply-sender {
    font-weight: 600;
    margin-bottom: 1px;
}
.pcc-reply-text {
    opacity: .75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pcc-msg-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 10px;
    color: var(--pcc-text-muted);
}

.pcc-msg-time {
    font-size: 10px;
    color: var(--pcc-timestamp) !important;
    margin-left: auto;
}

/* Message status icons */
.pcc-msg-sent-icon,
.pcc-msg-seen {
    font-size: 10px;
    margin-left: 2px;
}

.pcc-checks-pair.pcc-msg-delivered {
    font-size: 10px;
    margin-left: 2px;
}

.pcc-msg-sent-icon { color: var(--pcc-text-muted); }
.pcc-msg-delivered,
.pcc-checks-pair.pcc-msg-delivered { color: var(--pcc-text-muted); }
.pcc-msg-seen { color: var(--pcc-success, #00a400); }

/* --------------------------------------------------------------------------
   Platform Theme Bridge (app.podcator.local)
   Keep widget native to platform light/dark themes
   -------------------------------------------------------------------------- */
body.crm-pulsechat-platform {
    --pcc-header-bg: var(--color-bg-secondary, #181f2c);
    --pcc-header-color: var(--color-text-primary, #ffffff);
    --pcc-header-btn-bg: rgba(255, 255, 255, .15);
    --pcc-header-btn-bg-hover: rgba(255, 255, 255, .25);
    --pcc-primary: var(--color-bg-elevated, #20283a);
    --pcc-primary-hover: color-mix(in srgb, var(--color-bg-elevated, #20283a) 88%, #ffffff 12%);
    --pcc-accent: var(--nz-main-color, #0aac96);
    --pcc-accent-light: color-mix(in srgb, var(--nz-main-color, #0aac96) 18%, transparent);
    --pcc-bg: var(--color-bg-secondary, #181f2c);
    --pcc-bg-alt: var(--color-bg-primary, #1d2435);
    --pcc-border: var(--color-border, #252c3b);
    --pcc-text: var(--color-text-primary, #ffffff);
    --pcc-text-secondary: var(--color-text-secondary, #98aaba);
    --pcc-text-muted: var(--color-text-muted, #747884);
    --pcc-timestamp: var(--color-text-muted, #747884);
    --pcc-sent-bg: color-mix(in srgb, var(--nz-main-color, #0aac96) 75%, #000 25%);
    --pcc-sent-color: #ffffff;
    --pcc-recv-bg: color-mix(in srgb, var(--color-bg-elevated, #20283a) 82%, #ffffff 18%);
    --pcc-recv-color: var(--color-text-primary, #ffffff);
    --pcc-danger: var(--color-error, #dd175a);
    --pcc-success: var(--color-success, #29c368);
    --pcc-shadow: 0 16px 36px rgba(2, 6, 5, .45), 0 4px 14px rgba(2, 6, 5, .35);
    --pcc-platform-ring: color-mix(in srgb, var(--pcc-accent, #0aac96) 62%, transparent);
    --pcc-platform-ring-glow: color-mix(in srgb, var(--pcc-accent, #0aac96) 24%, transparent);
}

body.crm-pulsechat-platform[nz-theme="light"] {
    --pcc-header-bg: #d3dce2;
    --pcc-header-color: #36383e;
    --pcc-header-btn-bg: rgba(15, 23, 42, .08);
    --pcc-header-btn-bg-hover: rgba(15, 23, 42, .14);
    --pcc-primary: #4a5568;
    --pcc-primary-hover: #3d4758;
    --pcc-accent: var(--nz-main-color, #0aac96);
    --pcc-accent-light: color-mix(in srgb, var(--nz-main-color, #0aac96) 14%, transparent);
    --pcc-bg: #ffffff;
    --pcc-bg-alt: #f8fafc;
    --pcc-border: rgba(15, 23, 42, .12);
    --pcc-text: #1e293b;
    --pcc-text-secondary: #64748b;
    --pcc-text-muted: #64748b;
    --pcc-timestamp: #64748b;
    --pcc-sent-bg: color-mix(in srgb, var(--nz-main-color, #0aac96) 88%, #ffffff 12%);
    --pcc-sent-color: #ffffff;
    --pcc-recv-bg: #eef2f7;
    --pcc-recv-color: #1e293b;
    --pcc-danger: #e53e3e;
    --pcc-success: #2e9f61;
    --pcc-shadow: 0 10px 28px rgba(15, 23, 42, .16), 0 4px 10px rgba(15, 23, 42, .1);
    --pcc-platform-ring: color-mix(in srgb, var(--pcc-accent, #0aac96) 78%, #ffffff 22%);
    --pcc-platform-ring-glow: color-mix(in srgb, var(--pcc-accent, #0aac96) 30%, transparent);
}

/* Toast notifications — match platform dark/light theme */
body.crm-pulsechat-platform #pulsechat-toast-container,
.crm-pulsechat-mobile #pulsechat-toast-container {
    bottom: 72px;
    right: 16px;
    max-width: min(360px, calc(100vw - 32px));
}
body.crm-pulsechat-platform .pc-toast,
.crm-pulsechat-mobile .pc-toast {
    background: var(--pcc-bg-alt, #1d2435);
    border: 1px solid var(--pcc-border, #252c3b);
    border-left: 4px solid var(--pcc-accent, #0aac96);
    border-radius: 10px;
    box-shadow: var(--pcc-shadow, 0 16px 36px rgba(2, 6, 5, .45), 0 4px 14px rgba(2, 6, 5, .35));
    min-width: 280px;
}
body.crm-pulsechat-platform .pc-toast:hover,
.crm-pulsechat-mobile .pc-toast:hover {
    box-shadow: var(--pcc-shadow), 0 0 0 1px color-mix(in srgb, var(--pcc-accent, #0aac96) 22%, transparent);
}
body.crm-pulsechat-platform .pc-toast-title,
.crm-pulsechat-mobile .pc-toast-title {
    color: var(--pcc-text, #ffffff);
}
body.crm-pulsechat-platform .pc-toast-body,
.crm-pulsechat-mobile .pc-toast-body {
    color: var(--pcc-text-secondary, #98aaba);
}
body.crm-pulsechat-platform .pc-toast-close,
.crm-pulsechat-mobile .pc-toast-close {
    color: var(--pcc-text-muted, #747884);
}
body.crm-pulsechat-platform .pc-toast-close:hover,
.crm-pulsechat-mobile .pc-toast-close:hover {
    color: var(--pcc-text, #ffffff);
}
body.crm-pulsechat-platform .pc-toast-avatar-placeholder,
.crm-pulsechat-mobile .pc-toast-avatar-placeholder {
    background: var(--pcc-accent-light, color-mix(in srgb, var(--pcc-accent, #0aac96) 18%, transparent));
    color: var(--pcc-accent, #0aac96);
}
body[nz-theme="light"] .crm-pulsechat-mobile .pc-toast {
    background: var(--pcc-bg-alt, #f8fafc);
    border-color: var(--pcc-border, rgba(15, 23, 42, .12));
    box-shadow: var(--pcc-shadow, 0 10px 28px rgba(15, 23, 42, .16), 0 4px 10px rgba(15, 23, 42, .1));
}
body[nz-theme="light"] .crm-pulsechat-mobile .pc-toast-title {
    color: var(--pcc-text, #1e293b);
}
body[nz-theme="light"] .crm-pulsechat-mobile .pc-toast-body {
    color: var(--pcc-text-secondary, #64748b);
}
body[nz-theme="light"] .crm-pulsechat-mobile .pc-toast-close {
    color: var(--pcc-text-muted, #64748b);
}
body[nz-theme="light"] .crm-pulsechat-mobile .pc-toast-close:hover {
    color: var(--pcc-text, #1e293b);
}

body.crm-pulsechat-platform .pcc-panel,
.crm-pulsechat-mobile .pcc-panel {
    border: 2px solid var(--pcc-platform-ring, color-mix(in srgb, var(--pcc-accent, #0aac96) 62%, transparent));
    box-shadow: var(--pcc-shadow), 0 0 0 1px color-mix(in srgb, var(--pcc-accent, #0aac96) 14%, transparent), 0 0 20px var(--pcc-platform-ring-glow, color-mix(in srgb, var(--pcc-accent, #0aac96) 22%, transparent));
}
body.crm-pulsechat-platform .pcc-mini-window,
.crm-pulsechat-mobile .pcc-mini-window {
    border: 2px solid var(--pcc-platform-ring, color-mix(in srgb, var(--pcc-accent, #0aac96) 62%, transparent));
    box-shadow: var(--pcc-shadow), 0 0 0 1px color-mix(in srgb, var(--pcc-accent, #0aac96) 14%, transparent), 0 0 20px var(--pcc-platform-ring-glow, color-mix(in srgb, var(--pcc-accent, #0aac96) 22%, transparent));
}

body.crm-pulsechat-platform .pcc-staff-item:hover {
    background: color-mix(in srgb, var(--pcc-accent) 10%, transparent);
}

body.crm-pulsechat-platform .pcc-panel-header,
body.crm-pulsechat-platform .pcc-mini-header {
    background: var(--pcc-header-bg);
    color: var(--pcc-header-color);
}
body.crm-pulsechat-platform .pcc-panel-title,
body.crm-pulsechat-platform .pcc-mini-name {
    color: var(--pcc-header-color);
}
body.crm-pulsechat-platform .pcc-header-btn,
body.crm-pulsechat-platform .pcc-panel-close {
    color: var(--pcc-header-color);
    background: var(--pcc-header-btn-bg);
}
body.crm-pulsechat-platform .pcc-mini-close,
body.crm-pulsechat-platform .pcc-mini-minimize,
body.crm-pulsechat-platform .pcc-mini-pin {
    color: var(--pcc-header-color);
    background: transparent;
}
body.crm-pulsechat-platform .pcc-header-btn:hover,
body.crm-pulsechat-platform .pcc-panel-close:hover {
    background: var(--pcc-header-btn-bg-hover);
}
body.crm-pulsechat-platform .pcc-mini-close:hover,
body.crm-pulsechat-platform .pcc-mini-minimize:hover,
body.crm-pulsechat-platform .pcc-mini-pin:hover {
    background: transparent;
    opacity: 1;
}
body.crm-pulsechat-platform .pcc-mini-pin.is-pinned {
    color: var(--pcc-accent, #0aac96);
}
body.crm-pulsechat-platform .pcc-mini-status {
    color: var(--pcc-text-secondary);
    opacity: 1;
}
body.crm-pulsechat-platform .pcc-toggle-btn:not(.pcc-footer-chat-btn) {
    background: var(--pcc-header-bg);
    color: var(--pcc-header-color);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .14), 0 2px 6px rgba(0, 0, 0, .06);
}
body.crm-pulsechat-platform .pcc-toggle-btn:not(.pcc-footer-chat-btn):hover {
    box-shadow: 0 6px 20px rgba(15, 23, 42, .18), 0 3px 8px rgba(0, 0, 0, .08);
}
body.crm-pulsechat-platform[nz-theme="light"] .pcc-toggle-btn:not(.pcc-footer-chat-btn) {
    border: 1px solid rgba(15, 23, 42, .1);
}

@media screen and (min-width: 769px) {
    body.crm-pulsechat-platform footer .nz-footer-right-side {
        display: flex;
        align-items: center;
        flex: 1 1 auto;
        min-width: 0;
        justify-content: flex-end;
        overflow: hidden;
        gap: 6px;
    }
    body.crm-pulsechat-platform footer .nz-footer-right-side > .nz-current-time {
        flex-shrink: 0;
        white-space: nowrap;
    }
    body.crm-pulsechat-platform footer .nz-footer-right-side:has(.pcc-mini-tab:nth-child(4)) > .nz-current-time,
    body.crm-pulsechat-platform footer .nz-footer-right-side:has(.pcc-mini-tab:nth-child(5)) > .nz-current-time {
        font-size: 12px;
    }
    body.crm-pulsechat-platform .pcc-footer-trigger {
        display: flex;
        position: relative;
        height: 100%;
        width: auto;
        color: #fff;
    }
    body.crm-pulsechat-platform[nz-theme="light"] .pcc-footer-trigger {
        color: #5c5f6b;
    }
    body.crm-pulsechat-platform .pcc-footer-chat-btn {
        position: relative;
        bottom: auto;
        right: auto;
        width: auto;
        height: 100%;
        min-width: 0;
        margin: 0 8px 0 0;
        padding: 0;
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        flex-direction: row;
        justify-content: flex-start;
        font-size: 14px;
        font-weight: 400;
        z-index: 1;
        flex-shrink: 0;
        color: inherit;
        cursor: pointer;
    }
    body.crm-pulsechat-platform .pcc-footer-chat-btn:hover,
    body.crm-pulsechat-platform .pcc-footer-chat-btn:active {
        transform: none;
        box-shadow: none;
        opacity: .85;
    }
    body.crm-pulsechat-platform .pcc-footer-chat-iconwrap {
        display: flex;
        position: relative;
        margin-right: 10px;
        width: 25px;
        height: 25px;
        flex-shrink: 0;
    }
    body.crm-pulsechat-platform .pcc-footer-chat-icon {
        display: flex;
        width: 25px;
        height: 25px;
        align-items: center;
        justify-content: center;
    }
    body.crm-pulsechat-platform .pcc-footer-chat-icon svg {
        width: 100%;
        height: 100%;
        fill: currentColor;
    }
    body.crm-pulsechat-platform .pcc-footer-chat-btn .icon-close {
        display: none;
    }
    body.crm-pulsechat-platform .pcc-footer-chat-btn.open .icon-chat {
        display: none;
    }
    body.crm-pulsechat-platform .pcc-footer-chat-btn.open .icon-close {
        display: flex;
    }
    body.crm-pulsechat-platform .pcc-footer-chat-label {
        font-size: 14px;
        line-height: 1;
        white-space: nowrap;
    }
    body.crm-pulsechat-platform .pcc-footer-chat-btn .pcc-toggle-badge {
        top: -4px;
        right: -4px;
        min-width: 16px;
        height: 16px;
        font-size: 9px;
        padding: 0 4px;
        border-width: 1px;
    }
    body.crm-pulsechat-platform .pcc-panel {
        bottom: 42px;
        right: 6px;
    }
    body.crm-pulsechat-platform .pcc-panel:not(.hidden) {
        z-index: 10400;
    }
    body.crm-pulsechat-platform .pcc-mini-windows {
        bottom: 42px;
        right: 6px;
        left: auto;
        max-width: calc(100vw - 12px);
        overflow-x: auto;
        overflow-y: visible;
        flex-wrap: nowrap;
        scrollbar-width: thin;
    }
    body.crm-pulsechat-platform .pcc-mini-window {
        width: 280px;
        height: 360px;
        flex-shrink: 0;
    }
    body.crm-pulsechat-platform .pcc-mini-window.minimized {
        display: none !important;
    }
    body.crm-pulsechat-platform .pcc-footer-chats-row {
        display: flex;
        align-items: center;
        flex: 0 0 auto;
        min-width: 0;
        gap: 4px;
        margin-right: 0;
        margin-left: auto;
        overflow: hidden;
        justify-content: flex-end;
    }
    body.crm-pulsechat-platform .pcc-footer-trigger {
        flex-shrink: 0;
    }
    body.crm-pulsechat-platform .pcc-mini-dock {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 4px;
        flex: 0 1 auto;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    body.crm-pulsechat-platform .pcc-mini-dock::-webkit-scrollbar {
        display: none;
    }
    body.crm-pulsechat-platform .pcc-mini-tab {
        display: inline-flex;
        align-items: center;
        gap: 0;
        width: 136px;
        min-width: 136px;
        max-width: 136px;
        height: 28px;
        padding: 0 2px 0 4px;
        border-radius: 6px;
        background: rgba(255, 255, 255, .12);
        color: inherit;
        flex-shrink: 0;
        box-sizing: border-box;
        transition: background-color .15s ease;
    }
    body.crm-pulsechat-platform .pcc-mini-dock:has(.pcc-mini-tab:nth-child(4)) .pcc-mini-tab {
        width: 124px;
        min-width: 124px;
        max-width: 124px;
    }
    body.crm-pulsechat-platform .pcc-mini-dock:has(.pcc-mini-tab:nth-child(5)) .pcc-mini-tab {
        width: 112px;
        min-width: 112px;
        max-width: 112px;
    }
    body.crm-pulsechat-platform .pcc-footer-chats-row:has(.pcc-mini-tab:nth-child(3)) .pcc-footer-chat-label {
        display: none;
    }
    body.crm-pulsechat-platform .pcc-footer-chats-row:has(.pcc-mini-tab:nth-child(3)) .pcc-footer-chat-btn {
        margin-right: 4px;
    }
    body.crm-pulsechat-platform[nz-theme="light"] .pcc-mini-tab {
        background: rgba(15, 23, 42, .08);
        color: var(--pcc-header-color, #36383e);
    }
    body.crm-pulsechat-platform[nz-theme="light"] .pcc-mini-tab-name {
        color: var(--pcc-header-color, #36383e);
        font-weight: 600;
    }
    body.crm-pulsechat-platform .pcc-mini-tab:hover {
        background: rgba(255, 255, 255, .18);
    }
    body.crm-pulsechat-platform[nz-theme="light"] .pcc-mini-tab:hover {
        background: rgba(15, 23, 42, .12);
    }
    body.crm-pulsechat-platform .pcc-mini-tab.is-active {
        background: rgba(255, 255, 255, .24);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
    }
    body.crm-pulsechat-platform[nz-theme="light"] .pcc-mini-tab.is-active {
        background: rgba(15, 23, 42, .14);
        box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .12);
    }
    body.crm-pulsechat-platform .pcc-mini-tab-main {
        display: flex;
        align-items: center;
        gap: 4px;
        min-width: 0;
        flex: 1;
        width: 0;
        padding: 2px 2px 2px 0;
        border: none;
        background: transparent;
        color: inherit;
        cursor: pointer;
    }
    body.crm-pulsechat-platform .pcc-mini-tab-pin {
        display: none;
        flex-shrink: 0;
        width: 12px;
        font-size: 9px;
        opacity: .65;
        line-height: 1;
        text-align: center;
    }
    body.crm-pulsechat-platform .pcc-mini-tab.is-pinned .pcc-mini-tab-pin {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    body.crm-pulsechat-platform .pcc-mini-tab-avatar-wrap {
        position: relative;
        flex-shrink: 0;
        width: 22px;
        height: 22px;
    }
    body.crm-pulsechat-platform .pcc-mini-tab-avatar {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        object-fit: cover;
        display: block;
    }
    body.crm-pulsechat-platform .pcc-mini-tab-presence {
        position: absolute;
        right: -1px;
        bottom: -1px;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        border: 1.5px solid #3a4357;
        box-sizing: border-box;
    }
    body.crm-pulsechat-platform[nz-theme="light"] .pcc-mini-tab-presence {
        border-color: #f0f2f6;
    }
    body.crm-pulsechat-platform .pcc-mini-tab-presence.online { background: var(--pcc-status-online); }
    body.crm-pulsechat-platform .pcc-mini-tab-presence.away { background: var(--pcc-status-away); }
    body.crm-pulsechat-platform .pcc-mini-tab-presence.busy,
    body.crm-pulsechat-platform .pcc-mini-tab-presence.dnd { background: var(--pcc-status-busy); }
    body.crm-pulsechat-platform .pcc-mini-tab-presence.offline { background: var(--pcc-status-offline); }
    body.crm-pulsechat-platform .pcc-mini-tab-name {
        font-size: 11px;
        line-height: 1.1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
        min-width: 0;
    }
    body.crm-pulsechat-platform .pcc-mini-tab-unread {
        position: absolute;
        top: -5px;
        right: -5px;
        min-width: 14px;
        height: 14px;
        padding: 0 3px;
        border-radius: 999px;
        background: var(--pcc-danger);
        color: #fff;
        font-size: 9px;
        font-weight: 700;
        line-height: 14px;
        text-align: center;
        border: 1.5px solid #3a4357;
        box-sizing: border-box;
    }
    body.crm-pulsechat-platform[nz-theme="light"] .pcc-mini-tab-unread {
        border-color: #f0f2f6;
    }
    body.crm-pulsechat-platform .pcc-mini-tab-unread.hidden {
        display: none;
    }
    body.crm-pulsechat-platform .pcc-mini-tab-close {
        width: 22px;
        min-width: 22px;
        height: 22px;
        border: none;
        border-radius: 4px;
        background: transparent;
        color: inherit;
        opacity: .75;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        flex-shrink: 0;
        padding: 0;
    }
    body.crm-pulsechat-platform .pcc-mini-pin,
    body.crm-pulsechat-platform .pcc-mini-close,
    body.crm-pulsechat-platform .pcc-mini-minimize {
        width: 24px;
        height: 24px;
    }
    body.crm-pulsechat-platform .pcc-mini-tab-close:hover {
        opacity: 1;
        background: rgba(255, 255, 255, .14);
    }
    body.crm-pulsechat-platform[nz-theme="light"] .pcc-mini-tab-close:hover {
        background: rgba(15, 23, 42, .1);
    }
}

/* Message images */
.pcc-msg-image-link {
    display: block;
    max-width: 100%;
    overflow: hidden;
}

.pcc-msg-image {
    max-width: 100%;
    max-height: 250px;
    width: auto;
    height: auto;
    border-radius: 8px;
    display: block;
    object-fit: contain;
}

.pcc-msg-body .pcc-msg-image {
    max-width: 100% !important;
    cursor: zoom-in;
    border-radius: var(--pcc-radius-sm, 8px);
}

/* Image Lightbox Overlay (platform/client) */
.pcc-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .85);
    animation: pcFadeIn .2s ease;
    cursor: zoom-out;
}
.pcc-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pcc-lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--pcc-radius-sm);
    box-shadow: 0 8px 40px rgba(0, 0, 0, .4);
}
.pcc-lightbox .pcc-lightbox-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--pcc-transition);
}
.pcc-lightbox .pcc-lightbox-close:hover {
    background: rgba(255, 255, 255, .25);
}

/* Message files */
.pcc-msg-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(0,0,0,.05);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background .2s;
}

.pcc-msg-file:hover {
    background: rgba(0,0,0,.1);
}

.pcc-msg-file i {
    font-size: 16px;
}

/* Message audio */
.pcc-msg-audio {
    max-width: 100%;
    width: 200px;
    height: 36px;
    border-radius: 18px;
    display: block;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Reactions
   -------------------------------------------------------------------------- */
.pcc-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}
.pcc-reaction-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    font-size: 13px;
    background: rgba(255, 255, 255, .2);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: var(--pcc-radius-full);
    cursor: pointer;
    transition: background .2s, border-color .2s;
    line-height: 1.4;
}
.pcc-msg-received .pcc-reaction-badge {
    background: rgba(0, 0, 0, .05);
    border-color: rgba(0, 0, 0, .1);
}
.pcc-reaction-badge:hover {
    background: rgba(255, 255, 255, .35);
}
.pcc-msg-received .pcc-reaction-badge:hover {
    background: rgba(0, 0, 0, .1);
}
.pcc-reaction-badge.mine {
    border-color: rgba(255, 255, 255, .6);
    background: rgba(255, 255, 255, .3);
}
.pcc-msg-received .pcc-reaction-badge.mine {
    border-color: var(--pcc-accent);
    background: var(--pcc-accent-light);
}
.pcc-reaction-count {
    font-size: 11px;
    color: rgba(255, 255, 255, .95);
    font-weight: 500;
}
.pcc-msg-received .pcc-reaction-count {
    color: var(--pcc-text-secondary);
}

/* Reaction add button */
.pcc-reaction-add {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 0 4px;
    opacity: 0;
    transition: opacity .2s;
    line-height: 1;
}
.pcc-msg:hover .pcc-reaction-add {
    opacity: .6;
}
.pcc-reaction-add:hover {
    opacity: 1 !important;
}

/* Emoji picker popup — appended to .pcc-mini-body to avoid overflow clipping */
.pcc-emoji-picker {
    position: fixed;
    background: var(--pcc-bg);
    border: 1px solid var(--pcc-border);
    border-radius: var(--pcc-radius-sm);
    box-shadow: var(--pcc-shadow);
    padding: 6px;
    display: flex;
    gap: 2px;
    z-index: 10500;
    animation: pcFadeIn .15s ease;
}
.pcc-emoji-option {
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border: none;
    background: transparent;
    border-radius: 4px;
    transition: background .15s;
    line-height: 1;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pcc-emoji-option:hover {
    background: var(--pcc-bg-alt);
}

.pcc-emoji-option.is-selected {
    background: rgba(84, 107, 241, .18);
    box-shadow: inset 0 0 0 1px rgba(84, 107, 241, .35);
}

.pcc-emoji-option.is-selected:hover {
    background: rgba(84, 107, 241, .28);
}

/* Message hover actions (edit / delete) */
.pcc-msg-hover-actions {
    position: absolute;
    top: -10px;
    display: none;
    align-items: center;
    gap: 2px;
    padding: 2px 4px;
    background: var(--pcc-bg, #fff);
    border: 1px solid var(--pcc-border, rgba(15, 23, 42, .12));
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .14);
    z-index: 20;
    white-space: nowrap;
}
.pcc-msg-sent .pcc-msg-hover-actions {
    right: 4px;
    left: auto;
}
.pcc-msg-received .pcc-msg-hover-actions {
    left: 4px;
    right: auto;
}
.pcc-msg:hover .pcc-msg-hover-actions {
    display: inline-flex;
}

/* Reply preview bar above mini input */
.pcc-mini-reply-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-top: 1px solid var(--pcc-border, rgba(15, 23, 42, .12));
    background: var(--pcc-bg-alt, #f8fafc);
    flex-shrink: 0;
}
.pcc-mini-reply-bar.hidden {
    display: none;
}
.pcc-mini-reply-bar-accent {
    width: 3px;
    align-self: stretch;
    background: var(--pcc-brand, #0084ff);
    border-radius: 2px;
    flex-shrink: 0;
}
.pcc-mini-reply-bar-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}
.pcc-mini-reply-bar-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--pcc-text-primary, #1e293b);
}
.pcc-mini-reply-bar-text {
    font-size: 11px;
    color: var(--pcc-text-muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pcc-mini-reply-bar-close {
    border: none;
    background: transparent;
    color: var(--pcc-text-muted, #64748b);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.pcc-mini-reply-bar-close:hover {
    color: var(--pcc-text-primary, #1e293b);
}
body.crm-pulsechat-platform .pcc-mini-reply-bar {
    background: var(--pcc-bg-alt, #1f2937);
    border-top-color: rgba(255, 255, 255, .1);
}

.pcc-msg-action-btn {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--pcc-text-muted, #64748b);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    padding: 0;
    line-height: 1;
    transition: background-color .15s ease, color .15s ease;
}
.pcc-msg-action-btn:hover {
    background: rgba(15, 23, 42, .06);
    color: var(--pcc-text-primary, #1e293b);
}
.pcc-msg-action-btn.pcc-action-delete:hover {
    color: var(--pcc-danger, #e53e3e);
    background: rgba(229, 62, 62, .1);
}
body.crm-pulsechat-platform .pcc-msg-hover-actions {
    background: var(--pcc-bg, #2a3347);
    border-color: rgba(255, 255, 255, .14);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
}
body.crm-pulsechat-platform .pcc-msg-action-btn {
    color: rgba(255, 255, 255, .72);
}
body.crm-pulsechat-platform .pcc-msg-action-btn:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}
body.crm-pulsechat-platform .pcc-msg-action-btn.pcc-action-delete:hover {
    color: #fca5a5;
    background: rgba(229, 62, 62, .22);
}
body.crm-pulsechat-platform[nz-theme="light"] .pcc-msg-hover-actions {
    background: #fff;
    border-color: rgba(15, 23, 42, .1);
    box-shadow: 0 2px 10px rgba(15, 23, 42, .12);
}
body.crm-pulsechat-platform[nz-theme="light"] .pcc-msg-action-btn {
    color: #64748b;
}
body.crm-pulsechat-platform[nz-theme="light"] .pcc-msg-action-btn:hover {
    background: rgba(15, 23, 42, .06);
    color: #1e293b;
}
.pcc-msg-edited {
    font-size: 10px;
    font-style: italic;
    opacity: .85;
}

.pcc-msg.is-editing .pcc-msg-hover-actions {
    display: none !important;
}

.pcc-msg-body--editing {
    min-width: 160px;
}

.pcc-edit-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.pcc-edit-textarea {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 36px;
    max-height: 120px;
    margin: 0;
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 8px;
    background: rgba(255, 255, 255, .14);
    color: inherit;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.45;
    resize: none;
    box-sizing: border-box;
    outline: none;
}
.pcc-edit-textarea:focus {
    border-color: rgba(255, 255, 255, .45);
    background: rgba(255, 255, 255, .2);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .12);
}
.pcc-msg-received .pcc-edit-textarea {
    background: rgba(255, 255, 255, .92);
    color: var(--pcc-recv-color, #050505);
    border-color: rgba(15, 23, 42, .12);
}
.pcc-msg-received .pcc-edit-textarea:focus {
    border-color: rgba(15, 23, 42, .22);
    box-shadow: 0 0 0 2px rgba(15, 23, 42, .06);
}

.pcc-edit-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}
.pcc-edit-save,
.pcc-edit-cancel {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    transition: background-color .15s ease, color .15s ease, opacity .15s ease;
}
.pcc-edit-save {
    background: var(--pcc-accent, #0aac96);
    color: #fff;
}
.pcc-edit-save:hover:not(:disabled) {
    filter: brightness(1.08);
}
.pcc-edit-save:disabled {
    opacity: .55;
    cursor: default;
}
.pcc-edit-cancel {
    background: rgba(255, 255, 255, .16);
    color: inherit;
}
.pcc-edit-cancel:hover {
    background: rgba(255, 255, 255, .26);
}
.pcc-msg-received .pcc-edit-cancel {
    background: rgba(15, 23, 42, .08);
    color: var(--pcc-recv-color, #050505);
}
.pcc-msg-received .pcc-edit-cancel:hover {
    background: rgba(15, 23, 42, .14);
}
body.crm-pulsechat-platform[nz-theme="light"] .pcc-msg-sent .pcc-edit-textarea {
    background: rgba(255, 255, 255, .55);
    color: #fff;
    border-color: rgba(255, 255, 255, .5);
}
body.crm-pulsechat-platform[nz-theme="light"] .pcc-msg-received .pcc-edit-textarea {
    background: #fff;
    color: #1e293b;
}

/* Recording state */
.pcc-mini-audio-btn.recording {
    color: var(--pcc-danger) !important;
    background: rgba(229, 62, 62, .1) !important;
    animation: pccPulse 1.5s infinite;
}

/* --------------------------------------------------------------------------
   Settings Modal
   -------------------------------------------------------------------------- */
.pcc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}
.pcc-modal-overlay.active {
    display: flex;
}
.pcc-modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.pcc-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pcc-modal-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pcc-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #999;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transition: all 0.2s;
}
.pcc-modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}
.pcc-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}
.pcc-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
.pcc-modal-section {
    margin-bottom: 24px;
}
.pcc-modal-section:last-child {
    margin-bottom: 0;
}
.pcc-modal-section h5 {
    margin: 0 0 12px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
}
.pcc-setting-item {
    padding: 10px 0;
}
.pcc-setting-item label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: normal;
    margin: 0;
}
.pcc-color-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.pcc-color-input {
    width: 48px;
    height: 32px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}
.pcc-btn {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}
.pcc-btn-primary {
    background: var(--pcc-accent, #667eea);
    color: #fff;
}
.pcc-btn-primary:hover {
    opacity: 0.9;
}
.pcc-btn-default {
    background: #f0f0f0;
    color: #333;
}
.pcc-btn-default:hover {
    background: #e0e0e0;
}

.crm-pulsechat-mobile {
    --pcc-accent: var(--nz-main-color, #0aac96);
    --pcc-platform-ring: color-mix(in srgb, var(--pcc-accent, #0aac96) 62%, transparent);
    --pcc-platform-ring-glow: color-mix(in srgb, var(--pcc-accent, #0aac96) 24%, transparent);
}

/* Trading platform embed (app.podcator.* dashboard) */
@media (max-width: 768px) {
    body.crm-pulsechat-platform {
        --pcc-mobile-top-header: 52px;
    }
    body.crm-pulsechat-platform .pcc-toggle-btn:not(.pcc-footer-chat-btn) {
        bottom: calc(56px + env(safe-area-inset-bottom, 0) + 12px);
        right: 16px;
        width: 48px;
        height: 48px;
        min-width: 48px;
        border-radius: 50%;
        z-index: 70;
        flex-direction: row;
        justify-content: center;
    }
    body.crm-pulsechat-platform .pcc-footer-chat-btn,
    body.crm-pulsechat-platform .pcc-footer-trigger {
        display: none;
    }
    body.crm-pulsechat-platform .pcc-panel:not(.hidden) {
        left: 0;
        right: 0;
        top: var(--pcc-mobile-top-header);
        bottom: calc(56px + env(safe-area-inset-bottom, 0));
        width: 100vw;
        max-width: 100vw;
        height: calc(100dvh - var(--pcc-mobile-top-header) - 56px - env(safe-area-inset-bottom, 0));
        max-height: calc(100dvh - var(--pcc-mobile-top-header) - 56px - env(safe-area-inset-bottom, 0));
        border-radius: 0;
        z-index: 75;
    }
    body.crm-pulsechat-platform .pcc-panel-header {
        position: sticky;
        top: 0;
        z-index: 2;
    }
    body.crm-pulsechat-platform .pcc-mini-windows {
        left: 0;
        right: 0;
        bottom: calc(56px + env(safe-area-inset-bottom, 0));
        z-index: 76;
    }
    body.crm-pulsechat-platform .pcc-mini-window {
        width: 100vw;
        height: calc(100dvh - var(--pcc-mobile-top-header) - 56px - env(safe-area-inset-bottom, 0));
        max-height: calc(100dvh - var(--pcc-mobile-top-header) - 56px - env(safe-area-inset-bottom, 0));
        border-radius: 0;
    }
    body.crm-pulsechat-platform .pcc-mini-header {
        position: sticky;
        top: 0;
        z-index: 3;
    }
}
