.ltscc-panel[hidden],
.ltscc-backdrop[hidden],
.ltscc-invite[hidden],
.ltscc-report-modal[hidden] { display: none !important; }

#ltscc-root,
#ltscc-root * { box-sizing: border-box; }

.ltscc-launcher-wrap {
    position: fixed;
    left: var(--ltscc-left, 50px);
    bottom: var(--ltscc-bottom, 50px);
    z-index: 999960;
    width: var(--ltscc-size, 112px);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.ltscc-launcher {
    appearance: none;
    border: 0;
    padding: 0;
    margin: 0;
    width: var(--ltscc-size, 112px);
    height: var(--ltscc-size, 112px);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    filter: drop-shadow(0 7px 12px rgba(0,0,0,.24));
    transition: transform .16s ease, filter .16s ease;
}
.ltscc-launcher:hover { transform: translateY(-2px) scale(1.02); filter: drop-shadow(0 9px 15px rgba(0,0,0,.28)); }
.ltscc-launcher:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 6px var(--ltscc-primary, #0f66b3); }
.ltscc-launcher img { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 50%; }

.ltscc-count-label {
    appearance: none;
    margin-top: 4px;
    padding: 4px 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.96);
    color: #16263a;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    font-family: inherit;
    cursor: pointer;
}
.ltscc-count-label:focus-visible { outline: 2px solid var(--ltscc-primary, #0f66b3); outline-offset: 2px; }

.ltscc-invite {
    position: absolute;
    left: 0;
    bottom: calc(100% + 18px);
    width: 250px;
    min-height: 58px;
    padding: 9px 38px 9px 12px;
    border-radius: 14px;
    background: #fff;
    color: #18283d;
    box-shadow: 0 10px 28px rgba(0,0,0,.25);
    border: 1px solid rgba(0,0,0,.08);
}
.ltscc-invite::after {
    content: "";
    position: absolute;
    left: 40px;
    bottom: -9px;
    width: 18px;
    height: 18px;
    background: #fff;
    transform: rotate(45deg);
    border-right: 1px solid rgba(0,0,0,.08);
    border-bottom: 1px solid rgba(0,0,0,.08);
}
.ltscc-invite-open {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 5px 0;
    color: var(--ltscc-primary, #0f66b3);
    font: inherit;
    font-size: 15px;
    font-weight: 750;
    text-align: left;
    cursor: pointer;
}
.ltscc-invite-close {
    position: absolute;
    top: 7px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: #edf1f5;
    color: #30445b;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.ltscc-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999970;
    background: rgba(7,15,27,.55);
    backdrop-filter: blur(2px);
}

.ltscc-panel {
    position: fixed;
    z-index: 999980;
    display: grid;
    grid-template-rows: auto auto auto 1fr auto;
    width: var(--ltscc-panel-width, 430px);
    height: var(--ltscc-panel-height, 620px);
    min-width: 320px;
    min-height: 360px;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,.14);
    background: #fff;
    color: #17263a;
    box-shadow: 0 20px 55px rgba(0,0,0,.34);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.ltscc-panel.mode-floating { resize: none; }
.ltscc-panel.mode-side-panel { left: 0; top: 0; bottom: 0; width: min(460px, 95vw); height: 100vh; height: 100dvh; min-height: 100vh; min-height: 100dvh; border-radius: 0 16px 16px 0; resize: none; }
.ltscc-panel.mode-modal { left: 50%; top: 50%; width: min(760px, calc(100vw - 32px)); height: min(780px, calc(100vh - 32px)); transform: translate(-50%, -50%); resize: none; }
.ltscc-panel.mode-fullscreen { inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; border-radius: 0; resize: none; }

.ltscc-resize-handle {
    position: absolute;
    right: 2px;
    bottom: 2px;
    z-index: 8;
    display: none;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 7px 0 12px 0;
    background: transparent;
    color: #52677d;
    cursor: nwse-resize;
    touch-action: none;
}
.ltscc-resize-handle::before,
.ltscc-resize-handle::after {
    content: "";
    position: absolute;
    right: 5px;
    bottom: 5px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
}
.ltscc-resize-handle::before { width: 13px; height: 13px; }
.ltscc-resize-handle::after { width: 7px; height: 7px; }
.ltscc-panel.mode-floating:not(.is-minimized) .ltscc-resize-handle { display: block; }
.ltscc-resize-handle:hover { background: rgba(15,102,179,.1); color: var(--ltscc-primary, #0f66b3); }
.ltscc-resize-handle:focus-visible { outline: 2px solid var(--ltscc-primary, #0f66b3); outline-offset: -2px; }
.ltscc-panel.is-dragging,
.ltscc-panel.is-resizing { user-select: none; }

.ltscc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 58px;
    padding: 10px 12px 10px 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--ltscc-primary, #0f66b3), #084b86);
    user-select: none;
    touch-action: none;
    cursor: default;
}
.mode-floating .ltscc-header { cursor: move; }
.ltscc-heading { display: flex; flex-direction: column; min-width: 0; }
.ltscc-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.ltscc-connection { font-size: 11px; opacity: .85; }
.ltscc-connection[data-state="reconnecting"] { color: #ffe2a8; }
.ltscc-header-actions { display: flex; gap: 6px; }
.ltscc-header-actions button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: rgba(255,255,255,.16);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.ltscc-header-actions button:hover { background: rgba(255,255,255,.28); }

.ltscc-conduct {
    padding: 9px 14px;
    background: #f1f7fd;
    border-bottom: 1px solid #d8e5f2;
    color: #29435d;
    font-size: 12px;
    line-height: 1.38;
}
.ltscc-notice {
    padding: 9px 14px;
    border-bottom: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
}
.ltscc-notice[data-type="error"] { background: #fff0f0; color: #8a1f1f; border-color: #f0c4c4; }
.ltscc-notice[data-type="warning"] { background: #fff8e6; color: #74520a; border-color: #ecd99b; }
.ltscc-notice[data-type="success"] { background: #edf9ef; color: #215d2d; border-color: #bfe1c5; }

.ltscc-messages {
    min-height: 0;
    overflow-y: auto;
    padding: 14px;
    background: #f8fafc;
    scroll-behavior: smooth;
}
.ltscc-empty { margin: 30px 10px; text-align: center; color: #6b7b8c; font-size: 14px; }
#ltscc-root .ltscc-messages > article.ltscc-message {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    gap: 9px !important;
    align-items: start !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 0 13px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
    opacity: 1 !important;
    overflow: visible !important;
    color: inherit !important;
}
#ltscc-root .ltscc-messages > article.ltscc-message::before,
#ltscc-root .ltscc-messages > article.ltscc-message::after {
    content: none !important;
    display: none !important;
    background: none !important;
    box-shadow: none !important;
}
.ltscc-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: #dfe8f1;
    flex: 0 0 auto;
}
#ltscc-root img.ltscc-avatar {
    display: block !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    outline: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    background: transparent !important;
    object-fit: cover !important;
    clip-path: circle(50% at 50% 50%);
}
.ltscc-avatar-generic { display: grid; place-items: center; padding: 7px; color: #5c7085; }
.ltscc-avatar-generic svg { width: 100%; height: 100%; fill: currentColor; }
.ltscc-message-body {
    position: relative;
    min-width: 0;
    padding: 9px 11px 8px;
    border: 1px solid #dce4ec;
    border-radius: 4px 14px 14px 14px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.ltscc-message-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.ltscc-message-meta strong { color: #1d344e; font-size: 13px; }
.ltscc-message-meta time { color: #7b8997; font-size: 10px; white-space: nowrap; }
.ltscc-message-body p { margin: 0; color: #25384c; font-size: 14px; line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; }
.ltscc-flag {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 4px 0 0;
    color: #6e7f90;
    font-size: 10px;
    text-decoration: underline;
    cursor: pointer;
}
.ltscc-flag:hover { color: #9a2d2d; }

#ltscc-root .ltscc-messages > .ltscc-system-message {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 5px 0 13px !important;
    padding: 7px 10px !important;
    border: 0 !important;
    border-radius: 999px !important;
    outline: 0 !important;
    background: #eaf2f9 !important;
    background-color: #eaf2f9 !important;
    background-image: none !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
    opacity: 1 !important;
    overflow: visible !important;
    color: #41576d !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    text-align: center !important;
    isolation: isolate;
}
#ltscc-root .ltscc-messages > .ltscc-system-message::before,
#ltscc-root .ltscc-messages > .ltscc-system-message::after {
    content: none !important;
    display: none !important;
    background: none !important;
    box-shadow: none !important;
}
#ltscc-root .ltscc-system-message > span {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
}
#ltscc-root .ltscc-system-message time {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #728396 !important;
    box-shadow: none !important;
    font-size: 10px !important;
    white-space: nowrap !important;
}

.ltscc-new-messages {
    position: absolute;
    left: 50%;
    bottom: 94px;
    transform: translateX(-50%);
    z-index: 2;
    border: 0;
    border-radius: 999px;
    padding: 7px 13px;
    background: var(--ltscc-primary, #0f66b3);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.22);
    cursor: pointer;
}

.ltscc-composer {
    padding: 10px;
    border-top: 1px solid #dce4ec;
    background: #fff;
}
.ltscc-composer textarea {
    width: 100%;
    min-height: 58px;
    max-height: 150px;
    resize: vertical;
    border: 1px solid #bfcbd7;
    border-radius: 10px;
    padding: 9px 10px;
    color: #17263a;
    font: inherit;
    font-size: 14px;
}
.ltscc-composer textarea:focus { outline: 2px solid color-mix(in srgb, var(--ltscc-primary, #0f66b3) 45%, white); border-color: var(--ltscc-primary, #0f66b3); }
.ltscc-compose-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 7px; }
.ltscc-char-count { color: #758595; font-size: 11px; }
.ltscc-send {
    min-width: 78px;
    border: 0;
    border-radius: 9px;
    padding: 8px 14px;
    background: var(--ltscc-primary, #0f66b3);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.ltscc-send:disabled, .ltscc-composer textarea:disabled { opacity: .55; cursor: not-allowed; }

.ltscc-panel.is-minimized {
    width: min(380px, calc(100vw - 24px)) !important;
    height: 58px !important;
    min-height: 58px !important;
    resize: none !important;
}
.ltscc-panel.is-minimized > :not(.ltscc-header) { display: none !important; }

.ltscc-report-modal {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(7,15,27,.62);
}
.ltscc-report-card {
    width: min(440px, 100%);
    padding: 20px;
    border-radius: 14px;
    background: #fff;
    color: #17263a;
    box-shadow: 0 20px 50px rgba(0,0,0,.38);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.ltscc-report-card h3 { margin: 0 0 7px; }
.ltscc-report-card p { margin: 0 0 14px; color: #5d6e80; }
.ltscc-report-card label { display: block; margin: 12px 0; font-weight: 650; font-size: 13px; }
.ltscc-report-card select, .ltscc-report-card textarea { width: 100%; margin-top: 5px; padding: 8px; border: 1px solid #bfcbd7; border-radius: 8px; font: inherit; }
.ltscc-report-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 15px; }
.ltscc-report-actions button { border: 1px solid #aebdcb; border-radius: 8px; padding: 8px 12px; background: #fff; cursor: pointer; }
.ltscc-report-submit { background: var(--ltscc-primary, #0f66b3) !important; border-color: var(--ltscc-primary, #0f66b3) !important; color: #fff; }

.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 640px) {
    .ltscc-launcher-wrap { width: var(--ltscc-mobile-size, 82px); left: max(14px, env(safe-area-inset-left)); bottom: max(18px, env(safe-area-inset-bottom)); }
    .ltscc-launcher { width: var(--ltscc-mobile-size, 82px); height: var(--ltscc-mobile-size, 82px); }
    .ltscc-count-label { font-size: 12px; padding: 3px 8px; }
    .ltscc-invite { width: min(260px, calc(100vw - 28px)); left: 0; }
    .ltscc-panel { min-width: 0; min-height: 0; }
    .ltscc-panel.mode-modal { width: calc(100vw - 16px); height: calc(100vh - 16px); }
    .ltscc-header { padding-top: max(10px, env(safe-area-inset-top)); }
    .ltscc-composer { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
    .ltscc-launcher, .ltscc-messages { transition: none; scroll-behavior: auto; }
}

@media (max-height: 420px) {
    .ltscc-panel.mode-floating { min-height: 0; }
}
