.ls-chat {
    position: absolute;
    z-index: 6;
    display: flex;
    flex-direction: column;
    background: rgba(8, 8, 8, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.ls-chat--desktop {
    right: 12px;
    bottom: 12px;
    width: 320px;
    max-height: min(52vh, 420px);
}

.ls-chat--mobile {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 38vh;
    border-radius: 16px 16px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
}

.ls-chat__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    font-weight: 800;
}

.ls-chat__status {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
}

.ls-chat__status.is-connected { color: #7CFC90; }
.ls-chat__status.is-connecting { color: #ffd166; }
.ls-chat__status.is-reconnecting { color: #ffd166; }

.ls-chat__online {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
}

.ls-chat__pin {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0 10px 8px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 193, 7, 0.55);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.18), rgba(255, 152, 0, 0.12));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.ls-chat__pin[hidden] {
    display: none !important;
}

.ls-chat__pin-icon {
    font-size: 18px;
    line-height: 1;
    flex: 0 0 auto;
}

.ls-chat__pin-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffd166;
    margin-bottom: 4px;
}

.ls-chat__pin-body {
    font-size: 13px;
    line-height: 1.35;
    font-weight: 600;
    color: #fff7e6;
    white-space: pre-wrap;
    word-break: break-word;
}

.ls-chat__pin-meta {
    margin-top: 6px;
    font-size: 10px;
    opacity: 0.78;
}

.ls-chat__messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 120px;
}

.ls-chat__msg {
    font-size: 12px;
    line-height: 1.35;
    word-break: break-word;
}

.ls-chat__msg-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.ls-chat__name {
    font-weight: 800;
    color: #fff;
}

.ls-chat__badge {
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
}

.ls-chat__badge--operador,
.ls-chat__badge--admin { background: rgba(255, 23, 68, 0.35); }
.ls-chat__badge--sistema { background: rgba(100, 181, 246, 0.25); }
.ls-chat__badge--novo { background: rgba(129, 199, 132, 0.25); }
.ls-chat__badge--pergunta { background: rgba(171, 71, 188, 0.28); }
.ls-chat__badge--produto { background: rgba(33, 150, 243, 0.28); color: #bbdefb; }

.ls-chat__msg--product {
    border-left: 3px solid rgba(33, 150, 243, 0.65);
    padding-left: 8px;
    background: rgba(33, 150, 243, 0.08);
    border-radius: 8px;
}

.ls-chat__body--product {
    color: #e3f2fd;
    font-weight: 600;
}

.ls-chat__msg--stock {
    border: 0 !important;
    border-left: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    filter: none;
    padding-left: 8px;
    border-radius: 8px;
    background-color: transparent;
    background-image: linear-gradient(
        to right,
        rgba(255, 87, 34, 0.22) 0%,
        rgba(255, 87, 34, 0.12) 40%,
        rgba(255, 87, 34, 0.05) 68%,
        rgba(255, 87, 34, 0) 100%
    );
}

.ls-chat__badge--stock {
    background: rgba(255, 87, 34, 0.32);
    color: #ffccbc;
}

.ls-chat__body--stock {
    color: #ffe0b2;
    font-weight: 700;
}

.ls-chat__msg--commercial {
    border-left: 3px solid rgba(156, 39, 176, 0.55);
    padding-left: 8px;
}

.ls-chat__msg--commercial-active {
    background: rgba(156, 39, 176, 0.14);
    border-radius: 10px;
    box-shadow: 0 0 0 1px rgba(186, 104, 200, 0.35);
}

.ls-chat__badge--comercial {
    background: rgba(156, 39, 176, 0.35);
    color: #e1bee7;
}

.ls-chat__body--commercial {
    color: #f3e5f5;
    font-weight: 700;
}

.ls-chat__msg--reservas {
    border: 0 !important;
    border-left: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    filter: none;
    padding-left: 8px;
    border-radius: 8px;
    background-color: transparent;
    background-image: linear-gradient(
        to right,
        rgba(0, 200, 83, 0.22) 0%,
        rgba(0, 200, 83, 0.12) 40%,
        rgba(0, 200, 83, 0.05) 68%,
        rgba(0, 200, 83, 0) 100%
    );
}

.ls-chat__badge--reservas {
    background: rgba(0, 200, 83, 0.32);
    color: #b9f6ca;
}

.ls-chat__body--reservas {
    color: #c8e6c9;
    font-weight: 700;
}

.ls-chat__question {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.ls-chat__question.is-active {
    background: rgba(171, 71, 188, 0.45);
    border-color: rgba(171, 71, 188, 0.8);
}

.ls-chat__composer {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ls-chat__body {
    color: rgba(255, 255, 255, 0.92);
}

.ls-chat__body--system {
    color: rgba(255, 255, 255, 0.65);
    font-style: italic;
}

.ls-chat__input {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 13px;
}

.ls-chat__send {
    border: 0;
    background: #ff1744;
    color: #fff;
    font-weight: 800;
    border-radius: 999px;
    padding: 0 14px;
    font-size: 12px;
}

.ls-chat__send:disabled {
    opacity: 0.45;
}

.ls-chat__toggle {
    position: absolute;
    z-index: 6;
    right: 12px;
    bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(12, 12, 12, 0.55);
    color: #fff;
    font-weight: 800;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 12px;
    backdrop-filter: blur(16px);
}

.ls-chat[hidden],
.ls-chat__toggle[hidden] {
    display: none !important;
}

@media (min-width: 900px) {
    .ls-chat__toggle { display: none; }
}

@media (max-width: 899px) {
    .ls-chat--desktop { display: none; }
    .ls-chat--mobile:not([hidden]) { display: flex; }
}
