/* ============================================================
   Chat Widget — над колонкой соцсетей, анимации открытия / закрытия
   ============================================================ */

.chat-widget {
    position: fixed;
    right: 40px;
    bottom: 40px;
    z-index: 9998;
    font-family:
        "Manrope",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

/* Кнопка-тоггл скрыта — теперь открытие через duty-float-stack */
.chat-widget__toggle {
    display: none !important;
}

.chat-widget__badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

/* ── Окно чата ── */
.chat-widget__window {
    position: fixed;
    bottom: 26px;
    right: 40px;
    left: auto;
    width: 360px;
    height: 500px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(44, 54, 64, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transform-origin: bottom right;
    will-change: transform, clip-path, opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* ── Genie: открытие (выдувание из кнопки) ── */
.chat-widget__window--open {
    pointer-events: auto;
    right: 110px;
    top: 80px !important;
    height: unset;
    animation: genie-open 0.52s linear forwards;
}

@keyframes genie-open {
    0% {
        opacity: 0;
        transform: scale(0.03) translateY(55px);
        clip-path: polygon(43% 0%, 57% 0%, 53% 100%, 47% 100%);
    }
    6% {
        opacity: 0.15;
        transform: scale(0.06) translateY(50px);
        clip-path: polygon(40% 0%, 60% 0%, 54% 100%, 46% 100%);
    }
    12% {
        opacity: 0.3;
        transform: scale(0.12) translateY(44px);
        clip-path: polygon(35% 0%, 65% 0%, 56% 100%, 44% 100%);
    }
    20% {
        opacity: 0.45;
        transform: scale(0.22) translateY(36px);
        clip-path: polygon(28% 0%, 72% 0%, 62% 100%, 38% 100%);
    }
    28% {
        opacity: 0.58;
        transform: scale(0.34) translateY(28px);
        clip-path: polygon(20% 0%, 80% 0%, 72% 100%, 28% 100%);
    }
    36% {
        opacity: 0.7;
        transform: scale(0.46) translateY(21px);
        clip-path: polygon(14% 0%, 86% 0%, 82% 100%, 18% 100%);
    }
    44% {
        opacity: 0.8;
        transform: scale(0.58) translateY(15px);
        clip-path: polygon(9% 0%, 91% 0%, 90% 100%, 10% 100%);
    }
    52% {
        opacity: 0.88;
        transform: scale(0.68) translateY(10px);
        clip-path: polygon(6% 0%, 94% 0%, 95% 100%, 5% 100%);
    }
    62% {
        opacity: 0.93;
        transform: scale(0.78) translateY(6px);
        clip-path: polygon(3% 0%, 97% 0%, 98% 100%, 2% 100%);
    }
    72% {
        opacity: 0.97;
        transform: scale(0.87) translateY(2px);
        clip-path: polygon(1% 0%, 99% 0%, 99% 100%, 1% 100%);
    }
    82% {
        opacity: 0.99;
        transform: scale(0.94) translateY(-1px);
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    }
    90% {
        opacity: 1;
        transform: scale(0.98) translateY(-1px);
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    }
}

/* ── Genie: закрытие (засасывание в кнопку) ── */
.chat-widget__window--closing {
    pointer-events: none;
    right: 110px;
    top: 80px !important;
    height: unset;
    animation: genie-close 0.48s linear forwards;
}

@keyframes genie-close {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    }
    8% {
        opacity: 0.98;
        transform: scale(0.96) translateY(1px);
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    }
    16% {
        opacity: 0.95;
        transform: scale(0.9) translateY(3px);
        clip-path: polygon(1% 0%, 99% 0%, 99% 100%, 1% 100%);
    }
    24% {
        opacity: 0.9;
        transform: scale(0.82) translateY(7px);
        clip-path: polygon(3% 0%, 97% 0%, 97% 100%, 3% 100%);
    }
    32% {
        opacity: 0.82;
        transform: scale(0.72) translateY(12px);
        clip-path: polygon(6% 0%, 94% 0%, 93% 100%, 7% 100%);
    }
    40% {
        opacity: 0.72;
        transform: scale(0.6) translateY(18px);
        clip-path: polygon(10% 0%, 90% 0%, 86% 100%, 14% 100%);
    }
    50% {
        opacity: 0.58;
        transform: scale(0.48) translateY(25px);
        clip-path: polygon(15% 0%, 85% 0%, 77% 100%, 23% 100%);
    }
    60% {
        opacity: 0.42;
        transform: scale(0.36) translateY(32px);
        clip-path: polygon(21% 0%, 79% 0%, 68% 100%, 32% 100%);
    }
    70% {
        opacity: 0.28;
        transform: scale(0.24) translateY(39px);
        clip-path: polygon(28% 0%, 72% 0%, 60% 100%, 40% 100%);
    }
    80% {
        opacity: 0.16;
        transform: scale(0.15) translateY(44px);
        clip-path: polygon(34% 0%, 66% 0%, 56% 100%, 44% 100%);
    }
    90% {
        opacity: 0.06;
        transform: scale(0.08) translateY(49px);
        clip-path: polygon(39% 0%, 61% 0%, 54% 100%, 46% 100%);
    }
    100% {
        opacity: 0;
        transform: scale(0.03) translateY(54px);
        clip-path: polygon(44% 0%, 56% 0%, 52% 100%, 48% 100%);
    }
}

/* ── Мобилка ── */
/* Блокировка скролла страницы когда чат открыт на мобилке */
@media screen and (max-width: 768px) {
    body.chat-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .chat-widget {
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        top: 0 !important;
        pointer-events: none;
    }

    .chat-widget__window {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        height: 100dvh !important;
        border-radius: 0 !important; margin: 0 !important; max-height: none !important; max-width: none !important;
        transform-origin: bottom center;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        z-index: 9999;
    }

    /* Переопределяем десктопные right/top/height у --open */
    .chat-widget__window--open {
        right: 0 !important;
        left: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        height: 100dvh !important;
        border-radius: 0 !important; margin: 0 !important; max-height: none !important; max-width: none !important;
        animation: genie-open-m 0.45s linear forwards;
    }

    .chat-widget__window--closing {
        right: 0 !important;
        left: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        height: 100dvh !important;
        border-radius: 0 !important; margin: 0 !important; max-height: none !important; max-width: none !important;
        animation: genie-close-m 0.42s linear forwards;
    }

    body.chat-open .duty-float-stack {
        display: none !important;
    }
}

@keyframes genie-open-m {
    0% {
        opacity: 0;
        transform: scale(0.03) translateY(60px);
        clip-path: polygon(40% 0%, 60% 0%, 54% 100%, 46% 100%);
    }
    10% {
        opacity: 0.2;
        transform: scale(0.1) translateY(50px);
        clip-path: polygon(32% 0%, 68% 0%, 60% 100%, 40% 100%);
    }
    25% {
        opacity: 0.5;
        transform: scale(0.3) translateY(35px);
        clip-path: polygon(18% 0%, 82% 0%, 78% 100%, 22% 100%);
    }
    40% {
        opacity: 0.75;
        transform: scale(0.52) translateY(20px);
        clip-path: polygon(8% 0%, 92% 0%, 92% 100%, 8% 100%);
    }
    55% {
        opacity: 0.88;
        transform: scale(0.72) translateY(10px);
        clip-path: polygon(3% 0%, 97% 0%, 98% 100%, 2% 100%);
    }
    70% {
        opacity: 0.95;
        transform: scale(0.88) translateY(3px);
        clip-path: polygon(1% 0%, 99% 0%, 100% 100%, 0% 100%);
    }
    85% {
        opacity: 0.99;
        transform: scale(0.96) translateY(0px);
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    }
}

@keyframes genie-close-m {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    }
    15% {
        opacity: 0.9;
        transform: scale(0.88) translateY(5px);
        clip-path: polygon(2% 0%, 98% 0%, 98% 100%, 2% 100%);
    }
    30% {
        opacity: 0.75;
        transform: scale(0.68) translateY(15px);
        clip-path: polygon(8% 0%, 92% 0%, 88% 100%, 12% 100%);
    }
    45% {
        opacity: 0.55;
        transform: scale(0.48) translateY(28px);
        clip-path: polygon(16% 0%, 84% 0%, 74% 100%, 26% 100%);
    }
    60% {
        opacity: 0.35;
        transform: scale(0.3) translateY(40px);
        clip-path: polygon(26% 0%, 74% 0%, 64% 100%, 36% 100%);
    }
    75% {
        opacity: 0.15;
        transform: scale(0.14) translateY(50px);
        clip-path: polygon(35% 0%, 65% 0%, 57% 100%, 43% 100%);
    }
    90% {
        opacity: 0.04;
        transform: scale(0.06) translateY(57px);
        clip-path: polygon(41% 0%, 59% 0%, 53% 100%, 47% 100%);
    }
    100% {
        opacity: 0;
        transform: scale(0.03) translateY(62px);
        clip-path: polygon(44% 0%, 56% 0%, 52% 100%, 48% 100%);
    }
}

/* ── Шапка ── */
.chat-widget__header {
    background: #2c3640;
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.chat-widget__header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-widget__avatar {
    width: 44px;
    height: 44px;
    background: rgba(76, 175, 80, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-widget__avatar svg {
    width: 24px;
    height: 24px;
}

.chat-widget__header-text {
    display: flex;
    flex-direction: column;
}

.chat-widget__title {
    font-weight: 600;
    font-size: 16px;
    font-family: "Manrope", sans-serif;
}

.chat-widget__status {
    font-size: 12px;
    color: #4caf50;
    font-weight: 500;
}

.chat-widget__minimize {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background 0.2s;
}

.chat-widget__minimize:hover {
    background: rgba(76, 175, 80, 0.4);
}

.chat-widget__minimize svg {
    width: 18px;
    height: 18px;
}

/* ── Сообщения ── */
.chat-widget__messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fafafa;
}

.chat-widget__welcome {
    text-align: center;
    padding: 40px 20px;
    color: #909cab;
}

.chat-widget__welcome-icon {
    width: 60px;
    height: 60px;
    background: #eef0f3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.chat-widget__welcome-icon svg {
    width: 30px;
    height: 30px;
    color: #909cab;
}

.chat-widget__welcome h3 {
    font-size: 18px;
    font-weight: 500;
    color: #1d2229;
    margin: 0 0 8px;
}

.chat-widget__welcome p {
    margin: 0;
    font-size: 14px;
    color: #475769;
}

.chat-widget__message {
    max-width: 400px;
    width: fit-content;
    display: flex;
    flex-direction: column;
    gap: 4px;

    /* Анимация появления каждого сообщения */
    animation: chat-msg-in 0.22s ease both;
}

@keyframes chat-msg-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-widget__message--visitor {
    align-self: flex-end;
}

.chat-widget__message--manager,
.chat-widget__message--system {
    align-self: flex-start;
}

.chat-widget__message-content {
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    font-family: "Manrope", sans-serif;
}

.chat-widget__message--visitor .chat-widget__message-content {
    background: #2c3640;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-widget__message--manager .chat-widget__message-content {
    background: #fff;
    color: #1d2229;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(44, 54, 64, 0.1);
    border: 1px solid #e8e8e8;
}

.chat-widget__message--system .chat-widget__message-content {
    background: #eef0f3;
    color: #475769;
    font-size: 13px;
    text-align: center;
    border-radius: 8px;
}

.chat-widget__message-content p {
    margin: 0;
    word-wrap: break-word;
}

.chat-widget__message-time {
    font-size: 11px;
    color: #909cab;
    padding: 0 4px;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.chat-widget__message--visitor .chat-widget__message-time {
    text-align: right;
    align-items: flex-end;
}

.chat-widget__message-meta-main {
    display: block;
}

.chat-widget__message-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #5e6c7b;
    white-space: nowrap;
}

.chat-widget__status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4caf50;
    flex: 0 0 8px;
}

.chat-widget__message-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.chat-widget__message-attachments img,
.chat-widget__msg-img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    cursor: zoom-in;
    display: block;
    transition:
        opacity 0.15s,
        transform 0.15s;
}

.chat-widget__msg-img:hover {
    opacity: 0.88;
    transform: scale(1.02);
}

.chat-widget__file {
    display: block;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    font-size: 13px;
}

/* ── Форма контактов ── */
.chat-widget__contact-form {
    padding: 16px 20px;
    background: #f5f5f5;
    border-top: 1px solid #e8e8e8;
    flex-shrink: 0;
}

.chat-widget__contact-text {
    font-size: 13px;
    color: #475769;
    margin: 0 0 12px;
    font-family: "Manrope", sans-serif;
}

.chat-widget__input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cdd1d7;
    border-radius: 10px;
    font-size: 14px;
    font-family: "Manrope", sans-serif;
    color: #1d2229;
    background: #fff;
    margin-bottom: 8px;
    transition: border-color 0.2s;
}

.chat-widget__input:focus {
    outline: none;
    border-color: #4caf50;
}

.chat-widget__btn {
    width: 100%;
    padding: 11px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: "Manrope", sans-serif;
    cursor: pointer;
    transition: opacity 0.2s;
}

.chat-widget__btn--primary {
    background: #4caf50;
    color: #fff;
}

.chat-widget__btn--primary:hover {
    opacity: 0.88;
}

/* ── Футер ── */
.chat-widget__footer {
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid #e8e8e8;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

@media screen and (max-width: 768px) {
    .chat-widget__footer {
        /* Отступ снизу: учитываем safe-area (notch/home indicator на iPhone) */
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }
}

.chat-widget__input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 4px 14px;
    border: 1px solid #e8e8e8;
}

.chat-widget__message-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 14px;
    font-family: "Manrope", sans-serif;
    color: #1d2229;
    outline: none;
}

.chat-widget__message-input::placeholder {
    color: #909cab;
}

.chat-widget__attach {
    cursor: pointer;
    color: #909cab;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.chat-widget__attach:hover {
    color: #4caf50;
}

.chat-widget__attach svg {
    width: 20px;
    height: 20px;
}

.chat-widget__send {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #4caf50;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: opacity 0.2s;
}

.chat-widget__send:hover:not(:disabled) {
    opacity: 0.85;
}

.chat-widget__send:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.chat-widget__send svg {
    width: 20px;
    height: 20px;
}

/* ── Вложения ── */
.chat-widget__attachments {
    padding: 8px 12px;
    background: #f5f5f5;
    border-top: 1px solid #e8e8e8;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.chat-widget__attachment-preview {
    position: relative;
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    overflow: visible;
    font-size: 12px;
    color: #475769;
}

.chat-widget__attachment-img-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    background: #cdd1d7;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chat-widget__attachment-img-wrap:hover .chat-widget__attachment-thumb {
    opacity: 0.85;
    transition: opacity 0.15s;
}

.chat-widget__attachment-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.chat-widget__attachment-file-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 28px 6px 8px;
    background: #eef0f3;
    border-radius: 10px;
    max-width: 140px;
    position: relative;
    color: #1d2229;
}

.chat-widget__attachment-file-wrap span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}

.chat-widget__attachment-remove {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    border: 2px solid #fff;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 0;
    transition: background 0.15s;
}

.chat-widget__attachment-remove:hover {
    background: #dc2626;
}

.chat-widget__attachment-loading {
    font-size: 11px;
    color: #909cab;
}

/* ── Уведомление о закрытии чата ── */
.chat-widget__closed-notice {
    text-align: center;
    padding: 16px 12px;
    margin: 12px 0 4px;
    background: #eef0f3;
    border-radius: 10px;
    border: 1px solid #cdd1d7;
}

.chat-widget__closed-notice p {
    font-size: 13px;
    color: #475769;
    margin: 0 0 10px;
}

.chat-widget__closed-notice button {
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 20px;
    background: #1d2229;
    color: #f0f4ff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.chat-widget__closed-notice button:hover {
    opacity: 0.85;
}

/* Иконки внутри кнопки тоггла (на случай, если где-то показывается) */
.chat-widget__icon {
    width: 28px;
    height: 28px;
    color: #fff;
}

/* ── Модалка предпросмотра изображения ── */
.chat-preview-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: chatPreviewFadeIn 0.18s ease;
}

.chat-preview-modal.is-open {
    display: flex;
}

@keyframes chatPreviewFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.chat-preview-modal__img {
    max-width: min(92vw, 900px);
    max-height: 90vh;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    cursor: default;
    animation: chatPreviewZoomIn 0.18s ease;
}

@keyframes chatPreviewZoomIn {
    from {
        transform: scale(0.92);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.chat-preview-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    line-height: 1;
}

.chat-preview-modal__close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* AI Pulse Animation */
.chat-widget__status--typing {
    display: flex;
    align-items: center;
    color: #4a90e2;
    font-weight: 600;
}

.chat-widget__pulse {
    width: 8px;
    height: 8px;
    background-color: #4a90e2;
    border-radius: 50%;
    margin-right: 8px;
    animation: chat-pulse 1.5s infinite;
}

@keyframes chat-pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(74, 144, 226, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 144, 226, 0); }
}

/* Typing Indicator in Messages */
.chat-typing-indicator {
    display: flex;
    padding: 12px 16px;
    background: #f0f2f5;
    border-radius: 18px;
    width: fit-content;
    margin-bottom: 15px;
}

.chat-typing-indicator span {
    height: 8px;
    width: 8px;
    float: left;
    margin: 0 1px;
    background-color: #90949c;
    display: block;
    border-radius: 50%;
    opacity: 0.4;
}

.chat-typing-indicator span:nth-child(1) { animation: chat-typing 1s infinite; }
.chat-typing-indicator span:nth-child(2) { animation: chat-typing 1s infinite 0.33s; }
.chat-typing-indicator span:nth-child(3) { animation: chat-typing 1s infinite 0.66s; }

@keyframes chat-typing {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

/* Product Cards */
.chat-product-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.chat-product-card {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 8px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.chat-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.chat-product-card__img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
}

.chat-product-card__info {
    flex: 1;
}

.chat-product-card__name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chat-product-card__price {
    font-size: 13px;
    color: #e67e22;
    font-weight: 700;
}
