.chat-link-inline {
    color: #2563eb;
    text-decoration: underline;
    word-break: break-all;
}

.support-chat-bubble.user .chat-link-inline {
    color: #1d4ed8;
}

.chat-link-preview {
    margin-top: 8px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #f8fafc;
    max-width: min(100%, 280px);
    cursor: pointer;
}

.chat-link-preview__thumbWrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f172a;
    overflow: hidden;
}

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

.chat-link-preview__play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.chat-link-preview__meta {
    padding: 8px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.chat-link-preview__platform {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.chat-link-preview--open-app .chat-link-preview__play {
    background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af);
}
.chat-link-preview--instagram .chat-link-preview__platform { color: #c13584; }
.chat-link-preview--facebook .chat-link-preview__platform { color: #1877f2; }

.chat-link-preview__title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chat-video-modal {
    position: fixed;
    inset: 0;
    z-index: 20050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.chat-video-modal--open {
    display: flex;
}

.chat-video-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
}

.chat-video-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    background: #0b1220;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.chat-video-modal__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: #111827;
    color: #f8fafc;
}

.chat-video-modal__title {
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-video-modal__close {
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.chat-video-modal__frameWrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.chat-video-modal__iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

body.chat-video-modal-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .chat-link-preview {
        max-width: 100%;
    }

    .chat-video-modal {
        padding: 0;
    }

    .chat-video-modal__dialog {
        width: 100%;
        height: 100%;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .chat-video-modal__frameWrap {
        flex: 1;
        aspect-ratio: auto;
    }
}
