/* 9Servers Chat Widget */
:root {
    --ui-bg: #f6f3f2;
    --ui-dark: #1b1716;
    --ui-orange: #f05243;
    --ui-white: #ffffff;
    --ui-header: #272524;
    --ui-icon-bg: #343332;
    --alxchat-pattern-url: url('./background-chat.svg');
    --alxchat-pattern-size: 101px;
    --alxchat-header-h: 80px;
}

.alxchat-root *,
.alxchat-root *::before,
.alxchat-root *::after {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.alxchat-root {
    position: fixed;
    z-index: 999999;
    bottom: 24px;
    right: 24px;
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: end;
    -webkit-align-items: flex-end;
    -ms-flex-align: end;
    align-items: flex-end;
    font-family:
        'Onest',
        system-ui,
        -apple-system,
        Segoe UI,
        Roboto,
        sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* Toggle button */
.alxchat-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: var(--ui-orange);
    color: var(--ui-white);
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(240, 82, 67, 0.45);
    -webkit-transition:
        -webkit-transform 0.2s,
        box-shadow 0.2s;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
    outline: none;
    position: relative;
}

.alxchat-toggle:hover {
    -webkit-transform: scale(1.08);
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(240, 82, 67, 0.6);
}

.alxchat-toggle svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

/* Badge for unread */
.alxchat-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ui-dark);
    color: var(--ui-white);
    font-size: 10px;
    font-weight: 700;
    display: none;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.alxchat-badge.alxchat-visible {
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
}

/* Panel */
.alxchat-panel {
    position: relative;
    display: none;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    width: 360px;
    height: 600px;
    background: var(--ui-bg);
    border-radius: 1.25rem;
    box-shadow: 0 12px 48px rgba(26, 26, 46, 0.22);
    overflow: hidden;
    margin-bottom: 16px;
    -webkit-animation: alxchat-slideup 0.25s ease;
    animation: alxchat-slideup 0.25s ease;
}

@-webkit-keyframes alxchat-slideup {
    from {
        opacity: 0;
        -webkit-transform: translateY(20px);
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

@keyframes alxchat-slideup {
    from {
        opacity: 0;
        -webkit-transform: translateY(20px);
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

.alxchat-root.alxchat-open .alxchat-panel {
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
}

/* Header */
.alxchat-header {
    background-color: var(--ui-header);
    padding: 1.25rem;
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.alxchat-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: var(--alxchat-pattern-url);
    background-repeat: repeat;
    background-size: var(--alxchat-pattern-size);
    background-position: 0 0;
    opacity: 0.5;
    pointer-events: none;
}

.alxchat-header > * {
    position: relative;
    z-index: 1;
}

.alxchat-header-left {
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 1rem;
}

.alxchat-avatar-wrap {
    width: 2.625rem;
    height: 2.625rem;
    border-radius: 0.525rem;
    background: var(--ui-icon-bg);
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    overflow: hidden;
}

.alxchat-avatar {
    width: 25px;
    height: 25px;
    -o-object-fit: cover;
    object-fit: cover;
}

.alxchat-header-title {
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 0.375rem;
}

.alxchat-header-name {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 90%;
}

.alxchat-header-sub-wrap {
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 0.3125rem;
}

.alxchat-header-sub {
    color: var(--ui-orange);
    font-size: 0.875rem;
    font-weight: 300;
    letter-spacing: -0.04em;
    line-height: 90%;
}

.alxchat-header-pulse {
    width: 0.75rem;
    height: 0.75rem;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.alxchat-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px;
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    border-radius: 4px;
    -webkit-transition: color 0.15s;
    transition: color 0.15s;
}

.alxchat-close:hover {
    color: var(--ui-white);
}

.alxchat-close svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
}

/* Status bar */
.alxchat-status {
    background: var(--ui-bg);
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-box-align: stretch;
    -webkit-align-items: stretch;
    -ms-flex-align: stretch;
    align-items: stretch;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    height: 2.3125rem;
    overflow: hidden;
    box-shadow: none;
}

.alxchat-status-label {
    background-color: var(--ui-header);
    --alxchat-status-notch: 24px;
    position: relative;
    border-radius: 0 0 var(--alxchat-status-notch) 0;
    padding: 0.75rem 1.25rem;
    color: var(--ui-white);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 90%;
    white-space: nowrap;
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    z-index: 0;
}

.alxchat-status-label::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: var(--alxchat-pattern-url);
    background-repeat: repeat;
    background-size: var(--alxchat-pattern-size);
    background-position: 0 calc(var(--alxchat-header-h) * -1);
    opacity: 0.5;
    pointer-events: none;
}

.alxchat-status-label > * {
    position: relative;
    z-index: 1;
}

.alxchat-status-label::after {
    content: '';
    position: absolute;
    right: -17.4px;
    bottom: 19px;
    width: 18px;
    height: 18px;
    background: url(./tr.svg) no-repeat center / contain;
    pointer-events: none;
}

.alxchat-status-text {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    padding: 0 1.25rem 0 0;
    color: var(--ui-icon-bg);
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 90%;
    opacity: 0.5;
    text-align: center;
}

@keyframes alxchat-reconnect-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.alxchat-status-text--reconnecting {
    color: var(--ui-orange);
    opacity: 1 !important;
    animation: alxchat-reconnect-pulse 1.4s ease-in-out infinite;
}

.alxchat-info-notice {
    flex-shrink: 0;
    padding: 0.625rem 1rem;
    background: #e8f4fd;
    color: #1a4d6d;
    font-size: 0.8125rem;
    line-height: 1.4;
    border-bottom: 1px solid #b8d9ee;
    text-align: center;
}

/* Messages area */
.alxchat-messages {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.5rem;
    background: var(--ui-bg);
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
}

.alxchat-messages::-webkit-scrollbar {
    width: 4px;
}

.alxchat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.alxchat-messages::-webkit-scrollbar-thumb {
    background: rgba(27, 23, 22, 0.2);
    border-radius: 2px;
}

/* Bubble wrapper */
.alxchat-bubble-wrap {
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 0;
    max-width: 82%;
}

.alxchat-bubble-wrap--visitor {
    -webkit-align-self: flex-end;
    -ms-flex-item-align: end;
    align-self: flex-end;
    -webkit-box-align: end;
    -webkit-align-items: flex-end;
    -ms-flex-align: end;
    align-items: flex-end;
}

.alxchat-bubble-wrap--operator {
    -webkit-align-self: flex-start;
    -ms-flex-item-align: start;
    align-self: flex-start;
    -webkit-box-align: start;
    -webkit-align-items: flex-start;
    -ms-flex-align: start;
    align-items: flex-start;
}

/* Bubbles */
.alxchat-bubble {
    padding: 0.85rem 1rem;
    word-break: break-word;
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.4;
    position: relative;
}

.alxchat-bubble a {
    color: inherit;
    text-decoration: underline;
    word-break: break-all;
}

.alxchat-bubble a:hover {
    opacity: 0.75;
}

.alxchat-bubble code {
    font-family: ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    font-size: 0.8em;
    background: rgba(0, 0, 0, 0.07);
    border-radius: 4px;
    padding: 0.15em 0.4em;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.alxchat-bubble--visitor code {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

.alxchat-bubble.alxchat-bubble--image {
    padding: 0;
    overflow: hidden;
    line-height: 0;
    position: relative;
}

.alxchat-bubble.alxchat-bubble--image .alxchat-time-wrap {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    margin: 0;
}

.alxchat-bubble--visitor {
    background: var(--ui-orange);
    color: var(--ui-white);
    border-radius: 1.15rem 1.15rem 0.25rem 1.15rem;
}
.alxchat-bubble--visitor .alxchat-time-wrap {
    left: 10px;
}

.alxchat-bubble--visitor .alxchat-profanity{
    font-weight: unset;
}
.alxchat-bubble--operator .alxchat-profanity {
    font-weight: 900 !important;
    font-synthesis: weight;
    font-size:24px;
    text-shadow:
        0.55px 0 0 currentColor,
        -0.55px 0 0 currentColor;
}

.alxchat-bubble--operator {
    background: var(--ui-white);
    color: var(--ui-dark);
    border-radius: 1.15rem 1.15rem 1.15rem 0.25rem;
}

.alxchat-bubble--operator p {
    margin: 0 0 0.6em;
}

.alxchat-bubble--operator p:last-child {
    margin-bottom: 0;
}

.alxchat-bubble--operator ol,
.alxchat-bubble--operator ul {
    margin: 0.4em 0 0.6em 0;
    padding-left: 1.4em;
}

.alxchat-bubble--operator ol {
    list-style: decimal;
}

.alxchat-bubble--operator ul {
    list-style: disc;
}

.alxchat-bubble--operator li {
    margin-bottom: 0.3em;
    line-height: 1.5;
}

.alxchat-bubble--operator li:last-child {
    margin-bottom: 0;
}

.alxchat-bubble--operator ol:last-child,
.alxchat-bubble--operator ul:last-child {
    margin-bottom: 0;
}

.alxchat-stream-text {
    line-height: 1.45;
    white-space: pre-wrap;
}

.alxchat-bubble--system {
    -webkit-align-self: center;
    -ms-flex-item-align: center;
    align-self: center;
    background: none;
    color: var(--ui-icon-bg);
    font-size: 0.75rem;
    font-style: italic;
    max-width: 100%;
    text-align: center;
    padding: 0.25rem 0.5rem;
    opacity: 0.6;
}

/* Time badge */
.alxchat-time-wrap {
    position: absolute;
    bottom: -5px;
    right: 10px;
}

.alxchat-time {
    display: inline-block;
    padding: 0.1rem 0.3rem;
    border-radius: 0.625rem;
    font-size: 0.5rem;
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 100%;
    min-width: 30px;
    text-align: center;
}

.alxchat-bubble-wrap--visitor .alxchat-time {
    background: var(--ui-orange);
    color: var(--ui-white);
    opacity: 1;
}

.alxchat-bubble-wrap--operator .alxchat-time {
    background: var(--ui-white);
    color: #808080;
    opacity: 0.7;
}

/* Input row */
.alxchat-input-row {
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--ui-white);
    border-radius: 1.25rem;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    -webkit-box-align: end;
    -webkit-align-items: flex-end;
    -ms-flex-align: end;
    align-items: flex-end;
    -webkit-flex-wrap: nowrap;
    -ms-flex-wrap: nowrap;
    flex-wrap: nowrap;
    box-shadow: 0 0 1.25rem 0 rgba(69, 54, 49, 0.1);
    overflow: hidden;
}

.alxchat-input-wrap {
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 0%;
    -ms-flex: 1 1 0%;
    flex: 1 1 0%;
    min-width: 0;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 0.5rem;
    -webkit-flex-wrap: nowrap;
    -ms-flex-wrap: nowrap;
    flex-wrap: nowrap;
}

.alxchat-attach {
    background: var(--ui-bg);
    border-radius: 0.75rem;
    padding: 0.75rem;
    cursor: pointer;
    color: rgba(27, 23, 22, 0.4);
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    -webkit-transition: color 0.15s;
    transition: color 0.15s;
    margin: 0;
    width: 52px;
    height: 52px;
}

.alxchat-attach:hover {
    color: var(--ui-dark);
}

.alxchat-attach svg {
    width: 1.25rem;
    height: 1.25rem;
}

.alxchat-input {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
    border: none;
    background: var(--ui-bg);
    border-radius: 0.75rem;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: -0.04em;
    color: var(--ui-dark);
    outline: none;
    font-family: inherit;
    min-width: 0;
    min-height: 52px;
    max-height: 120px;
    line-height: 1.3;
    resize: none;
    overflow-y: hidden;
    display: block;
}

.alxchat-input::-webkit-input-placeholder {
    color: var(--ui-dark);
    opacity: 0.3;
}

.alxchat-input:-ms-input-placeholder {
    color: var(--ui-dark);
    opacity: 0.3;
}

.alxchat-input::placeholder {
    color: var(--ui-dark);
    opacity: 0.3;
}

.alxchat-send {
    border: none;
    height: 52px;
    width: 52px;
    border-radius: 0.75rem;
    padding: 0.75rem;
    background: var(--ui-orange);
    color: var(--ui-white);
    cursor: pointer;
    -webkit-transition: background 0.15s;
    transition: background 0.15s;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    line-height: 1;
}

.alxchat-send svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
}

.alxchat-send:hover {
    background: #d94233;
}

.alxchat-send:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Closed screen */
.alxchat-closed {
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
    text-align: center;
}

.alxchat-closed svg {
    width: 2rem;
    height: 2rem;
    color: var(--ui-orange);
}

.alxchat-closed-title {
    color: var(--ui-dark);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.04em;
    line-height: 130%;
    -webkit-align-self: stretch;
    -ms-flex-item-align: stretch;
    align-self: stretch;
}

.alxchat-closed-sub {
    color: var(--ui-dark);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: -0.04em;
    line-height: 130%;
    opacity: 0.5;
    -webkit-align-self: stretch;
    -ms-flex-item-align: stretch;
    align-self: stretch;
}

/* Pre-chat form */
.alxchat-prechat {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    padding: 1.5rem 1.25rem;
    background: var(--ui-bg);
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 1rem;
}

.alxchat-prechat::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 18px;
    margin-top: -18px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(246, 243, 242, 0), rgba(246, 243, 242, 1));
}

.alxchat-prechat-fields {
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 1rem;
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
}

.alxchat-prechat-field {
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 0.5rem;
}

.alxchat-prechat-label {
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 90%;
    color: var(--ui-dark);
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    gap: 0.25rem;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
}

.alxchat-prechat-label-required {
    color: var(--ui-orange);
}

.alxchat-prechat-label-optional {
    color: rgba(33, 26, 24, 0.5);
    font-size: 0.875rem;
    font-weight: 400;
}

.alxchat-prechat-input {
    background: var(--ui-white);
    border: none;
    border-radius: 0.75rem;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: -0.04em;
    font-family: inherit;
    color: var(--ui-dark);
    outline: none;
    width: 100%;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-transition: box-shadow 0.15s;
    transition: box-shadow 0.15s;
}

@media (max-height: 640px) {
    .alxchat-prechat {
        padding: 1rem 1rem;
        gap: 0.75rem;
    }
    .alxchat-prechat-fields {
        gap: 0.75rem;
    }
    .alxchat-prechat-input {
        padding: 0.85rem;
    }
}

.alxchat-prechat-input::-webkit-input-placeholder {
    color: var(--ui-dark);
    opacity: 0.3;
}

.alxchat-prechat-input:-ms-input-placeholder {
    color: var(--ui-dark);
    opacity: 0.3;
}

.alxchat-prechat-input::placeholder {
    color: var(--ui-dark);
    opacity: 0.3;
}

.alxchat-prechat-input:focus {
    box-shadow: 0 0 0 2px rgba(240, 82, 67, 0.3);
}

.alxchat-prechat-input--error {
    box-shadow: 0 0 0 2px var(--ui-orange) !important;
}

.alxchat-prechat-submit {
    border: none;
    border-radius: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--ui-orange);
    color: var(--ui-white);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.04em;
    cursor: pointer;
    font-family: inherit;
    -webkit-transition: background 0.15s;
    transition: background 0.15s;
    -webkit-align-self: stretch;
    -ms-flex-item-align: stretch;
    align-self: stretch;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.alxchat-prechat-submit:hover {
    background: #d94233;
}

.alxchat-prechat-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.alxchat-prechat-cancel {
    background: rgba(27, 23, 22, 0.08);
    color: var(--ui-dark);
}

.alxchat-prechat-cancel:hover {
    background: rgba(27, 23, 22, 0.12);
}

/* Typing indicator */
.alxchat-typing {
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 0.75rem;
    min-width: 3.25rem;
}

.alxchat-typing span {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(27, 23, 22, 0.3);
    margin: 0 2px;
    -webkit-animation: alxchat-bounce 1.2s infinite;
    animation: alxchat-bounce 1.2s infinite;
}

.alxchat-typing span:nth-child(2) {
    -webkit-animation-delay: 0.2s;
    animation-delay: 0.2s;
}
.alxchat-typing span:nth-child(3) {
    -webkit-animation-delay: 0.4s;
    animation-delay: 0.4s;
}

@-webkit-keyframes alxchat-bounce {
    0%,
    80%,
    100% {
        -webkit-transform: translateY(0);
        transform: translateY(0);
        opacity: 0.6;
    }
    40% {
        -webkit-transform: translateY(-6px);
        transform: translateY(-6px);
        opacity: 1;
    }
}

@keyframes alxchat-bounce {
    0%,
    80%,
    100% {
        -webkit-transform: translateY(0);
        transform: translateY(0);
        opacity: 0.6;
    }
    40% {
        -webkit-transform: translateY(-6px);
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* Image in bubble */
.alxchat-img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 0.75rem 0 0;
    display: block;
    cursor: -webkit-zoom-in;
    cursor: zoom-in;
}

/* Mobile: full screen */
@media (max-width: 480px) {
    .alxchat-root {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
    }

    .alxchat-toggle {
        position: fixed;
        bottom: 16px;
        right: 16px;
    }

    .alxchat-panel {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
        margin-bottom: 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
    }

    .alxchat-root.alxchat-open .alxchat-toggle {
        display: none;
    }
}

.alxchat-new-chat-btn {
    display: block;
    width: calc(100% - 2.5rem);
    margin: 0.75rem 1.25rem;
    padding: 0.75rem;
    background: var(--ui-orange);
    color: var(--ui-white);
    border: none;
    border-radius: 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    -webkit-transition: background 0.15s;
    transition: background 0.15s;
}

.alxchat-new-chat-btn:hover {
    background: #d94233;
}

.alxchat-chat-divider {
    text-align: center;
    font-size: 0.75rem;
    color: var(--ui-icon-bg);
    margin: 1rem 0.5rem;
    position: relative;
}

.alxchat-chat-divider::before,
.alxchat-chat-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 20%;
    height: 1px;
    background: currentColor;
    opacity: 0.3;
}

.alxchat-chat-divider::before {
    left: 0;
}
.alxchat-chat-divider::after {
    right: 0;
}

.alxchat-review {
    margin: 0.75rem 1.25rem;
    padding: 0.875rem 1rem;
    background: var(--ui-white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.alxchat-review-prompt {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.625rem;
    color: var(--ui-text, #222);
}

.alxchat-review-btns {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 0.5rem;
}

.alxchat-review-btn {
    font-size: 1.75rem;
    line-height: 1;
    padding: 0.375rem 0.625rem;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    cursor: pointer;
    -webkit-transition: background 0.15s, transform 0.1s, border-color 0.15s;
    transition: background 0.15s, transform 0.1s, border-color 0.15s;
}

.alxchat-review-btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.04);
    -webkit-transform: scale(1.1);
    -ms-transform: scale(1.1);
    transform: scale(1.1);
}

.alxchat-review-btn:disabled {
    cursor: default;
    opacity: 0.45;
}

.alxchat-review-btn--selected {
    opacity: 1 !important;
    border-color: var(--ui-orange);
    background: rgba(239, 72, 54, 0.08);
}

.alxchat-review-thanks {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--ui-icon-bg);
}

.alxchat-blocked-card {
    margin: 0.75rem 1.25rem;
    padding: 1rem 1rem 1.125rem;
    background: var(--ui-white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 3px solid var(--ui-orange);
    border-radius: 0.75rem;
    text-align: left;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--ui-dark);
}

.alxchat-blocked-icon {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 0.375rem;
}

.alxchat-blocked-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.alxchat-blocked-reason {
    margin-bottom: 0.375rem;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.alxchat-blocked-when {
    margin-bottom: 0.5rem;
    color: var(--ui-icon-bg);
    font-size: 0.8125rem;
}

.alxchat-blocked-contact {
    margin-top: 0.625rem;
    padding-top: 0.625rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.alxchat-blocked-contact-prompt {
    font-size: 0.8125rem;
    color: var(--ui-icon-bg);
    margin-bottom: 0.25rem;
}

.alxchat-blocked-contact-link {
    display: inline-block;
    color: var(--ui-orange);
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}

.alxchat-blocked-contact-link:hover {
    text-decoration: underline;
}

.alxchat-bubble--pending .alxchat-img {
    opacity: 0.7;
}

.alxchat-img-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}

.alxchat-img-progress-bar {
    height: 100%;
    background: var(--ui-orange);
    transition: width 0.2s ease-out;
}

.alxchat-bubble--image {
    position: relative;
}

.alxchat-bubble--failed .alxchat-img {
    opacity: 0.35;
    filter: grayscale(0.5);
}

.alxchat-img-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    color: var(--ui-white);
    font-size: 0.8125rem;
    border-radius: inherit;
    text-align: center;
    padding: 0.5rem;
}

.alxchat-img-error-label {
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.alxchat-img-retry {
    background: var(--ui-orange);
    color: var(--ui-white);
    border: none;
    padding: 0.375rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}

.alxchat-img-retry:hover {
    filter: brightness(1.08);
}

.alxchat-drop-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(27, 23, 22, 0.72);
    color: var(--ui-white);
    font-size: 1rem;
    font-weight: 500;
    z-index: 10;
    pointer-events: none;
    border-radius: inherit;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.alxchat-drop-overlay--visible {
    display: flex;
}

.alxchat-drop-overlay-label {
    border: 2px dashed rgba(255, 255, 255, 0.7);
    padding: 0.875rem 1.25rem;
    border-radius: 0.75rem;
    max-width: 80%;
    text-align: center;
}

/* Header actions (theme / mute) */
.alxchat-header-actions {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 0.25rem;
}

.alxchat-header-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-transition: color 0.15s, background 0.15s;
    transition: color 0.15s, background 0.15s;
}

.alxchat-header-btn:hover {
    color: var(--ui-white);
    background: rgba(255, 255, 255, 0.08);
}

.alxchat-header-btn svg {
    display: block;
}

.alxchat-transcript-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.alxchat-transcript-card {
    width: 100%;
    max-width: 320px;
    background: var(--ui-white);
    color: var(--ui-dark);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    padding: 14px;
}

.alxchat-transcript-title {
    font-weight: 700;
    margin: 0 0 10px 0;
    font-size: 14px;
}

.alxchat-transcript-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.alxchat-transcript-label {
    font-size: 12px;
    opacity: 0.8;
}

.alxchat-transcript-input {
    width: 100%;
    border: 1px solid rgba(27, 23, 22, 0.18);
    border-radius: 10px;
    padding: 10px 12px;
    outline: none;
    font: inherit;
}

.alxchat-transcript-input:focus {
    border-color: rgba(240, 82, 67, 0.75);
    box-shadow: 0 0 0 3px rgba(240, 82, 67, 0.18);
}

.alxchat-transcript-msg {
    min-height: 18px;
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.35;
    color: rgba(27, 23, 22, 0.8);
}

.alxchat-transcript-msg--error {
    color: #b42318;
}

.alxchat-transcript-msg--ok {
    color: #027a48;
}

.alxchat-transcript-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.alxchat-transcript-send,
.alxchat-transcript-cancel {
    border: none;
    cursor: pointer;
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
}

.alxchat-transcript-cancel {
    background: rgba(27, 23, 22, 0.06);
    color: rgba(27, 23, 22, 0.9);
}

.alxchat-transcript-send {
    background: var(--ui-orange);
    color: var(--ui-white);
    box-shadow: 0 8px 20px rgba(240, 82, 67, 0.35);
}

.alxchat-transcript-send:disabled,
.alxchat-transcript-cancel:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    box-shadow: none;
}

.alxchat-header-pulse--offline {
    opacity: 0.35;
    -webkit-filter: grayscale(1);
    filter: grayscale(1);
}

/* File bubble */
.alxchat-bubble--file {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 0.625rem;
    min-width: 180px;
    position: relative;
}

.alxchat-file-icon {
    font-size: 1.5rem;
    line-height: 1;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.alxchat-file-info {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.alxchat-file-name {
    font-weight: 500;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 220px;
}

.alxchat-bubble--visitor .alxchat-file-name {
    color: inherit;
}

.alxchat-bubble--operator .alxchat-file-name:hover,
.alxchat-bubble--visitor .alxchat-file-name:hover {
    text-decoration: underline;
}

.alxchat-file-size {
    font-size: 0.75rem;
    opacity: 0.7;
}

.alxchat-file-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}

.alxchat-file-progress-bar {
    height: 100%;
    background: var(--ui-orange);
    -webkit-transition: width 0.2s ease-out;
    transition: width 0.2s ease-out;
}

/* 5-star review */
.alxchat-stars {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.alxchat-star {
    background: transparent;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: #cbc7c5;
    cursor: pointer;
    padding: 0.125rem 0.25rem;
    -webkit-transition: color 0.1s, -webkit-transform 0.1s;
    transition: color 0.1s, transform 0.1s;
}

.alxchat-star:hover {
    -webkit-transform: scale(1.15);
    transform: scale(1.15);
}

.alxchat-star--active {
    color: #f5b301;
}

.alxchat-stars--error {
    -webkit-animation: alxchat-shake 0.35s;
    animation: alxchat-shake 0.35s;
}

@-webkit-keyframes alxchat-shake {
    0%, 100% { -webkit-transform: translateX(0); }
    25% { -webkit-transform: translateX(-4px); }
    75% { -webkit-transform: translateX(4px); }
}

@keyframes alxchat-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.alxchat-review-comment {
    width: 100%;
    resize: vertical;
    min-height: 2.75rem;
    margin-bottom: 0.5rem;
}

.alxchat-review-submit {
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Offline form */
.alxchat-offline-wrap {
    display: none;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
}

.alxchat-offline {
    padding: 1rem 1.25rem;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 0.625rem;
}

.alxchat-offline-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ui-dark);
}

.alxchat-offline-sub {
    font-size: 0.8125rem;
    color: var(--ui-icon-bg);
    margin-bottom: 0.25rem;
}

.alxchat-offline-textarea {
    resize: vertical;
    min-height: 4.5rem;
    width: 100%;
}

.alxchat-offline-status {
    font-size: 0.8125rem;
    color: #1a7a3e;
    min-height: 1.125rem;
}

.alxchat-offline-status--error {
    color: #c0392b;
}

.alxchat-prechat-label-required {
    color: var(--ui-orange);
    margin-left: 0.125rem;
}

.alxchat-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    background: rgba(0,0,0,0.85);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    cursor: -webkit-zoom-out;
    cursor: zoom-out;
}

.alxchat-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 0.5rem;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    pointer-events: none;
}
