.msg--visual {
    justify-content: flex-start;
}

.msg--visual .msg__bubble {
    width: min(100%, 560px);
    max-width: 96%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e7edf7;
    white-space: normal;
}

.chat-visual {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.chat-visual__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 0 2px 2px;
}

.chat-visual__title {
    font-size: 14px;
    font-weight: 800;
    color: #172033;
}

.chat-visual__count {
    font-size: 12px;
    color: #7a8798;
    white-space: nowrap;
}

.chat-visual__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-card {
    width: 100%;
    border: 1px solid #dbe7f6;
    border-radius: 16px;
    background: #fff;
    color: #172033;
    padding: 12px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.045);
}

.chat-card--booking {
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.chat-card--booking:hover,
.chat-card--booking:focus-visible {
    border-color: color-mix(in srgb, var(--primary) 28%, #dbe7f6);
    background: #fbfdff;
    transform: translateY(-1px);
    outline: none;
}

.chat-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.chat-card__main {
    min-width: 0;
}

.chat-card__title {
    font-size: 15px;
    line-height: 1.25;
    font-weight: 800;
    color: #142033;
}

.chat-card__subtitle {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.35;
    color: #56657a;
}

.chat-card__badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    border: 1px solid #dbe7f6;
    border-radius: 999px;
    background: #f7faff;
    color: #506078;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 8px;
}

.chat-card__arrow {
    flex: 0 0 auto;
    color: #96a3b8;
    font-size: 14px;
    line-height: 1;
    padding-top: 2px;
}

.chat-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.chat-card__chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 5px 8px;
    border-radius: 999px;
    border: 1px solid #e2e9f3;
    background: #f8fafc;
    color: #536278;
    font-size: 12px;
    line-height: 1.15;
}

.chat-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.chat-card__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid #dbe7f6;
    background: #fff;
    color: var(--primary-strong);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.chat-card__action:hover,
.chat-card__action:focus-visible {
    border-color: color-mix(in srgb, var(--primary) 32%, #dbe7f6);
    background: var(--primary-soft);
    outline: none;
}

.chat-card__action:active {
    transform: scale(.98);
}

.chat-card__action--primary {
    background: var(--primary-soft);
    border-color: color-mix(in srgb, var(--primary) 26%, #dbe7f6);
}

.chat-visual__more {
    width: 100%;
    border: 1px dashed #dbe7f6;
    border-radius: 15px;
    background: #fff;
    color: #334155;
    text-align: left;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
}

.chat-visual__more-main {
    font-size: 13px;
    font-weight: 800;
}

.chat-visual__more-meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 3px;
}


.chat-visual__load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2px;
}

.chat-visual__load-more-wrap.is-hidden {
    display: none;
}

.chat-visual__load-more-wrap .tasks-load-more {
    width: 100%;
}

.chat-visual__load-more-wrap .tasks-loading {
    width: 100%;
}

.chat-visual__load-error {
    width: 100%;
    margin-bottom: 8px;
    padding: 8px 10px;
    border: 1px solid #fee2e2;
    border-radius: 12px;
    background: #fff7f7;
    color: #b42318;
    font-size: 13px;
}

.chat-visual-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, .36);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 7vh 12px 20px;
}

.chat-visual-modal.is-hidden {
    display: none;
}

.chat-visual-modal__box {
    width: min(100%, 620px);
    max-height: 82vh;
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #dbe7f6;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .24);
}

.chat-visual-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #edf2f7;
}

.chat-visual-modal__title {
    font-weight: 800;
    color: #172033;
}

.chat-visual-modal__close {
    width: 34px;
    height: 34px;
    border: 1px solid #e2e9f3;
    border-radius: 12px;
    background: #fff;
    color: #1f2937;
    cursor: pointer;
}

.chat-visual-modal__body {
    max-height: calc(82vh - 64px);
    overflow: auto;
    padding: 14px 16px 16px;
}

.chat-visual-detail {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-visual-detail__title {
    font-size: 18px;
    line-height: 1.25;
    font-weight: 800;
    color: #172033;
}

.chat-visual-detail__section {
    border: 1px solid #edf2f7;
    border-radius: 14px;
    background: #fbfdff;
    padding: 10px 12px;
}

.chat-visual-detail__section-title {
    font-size: 13px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 7px;
}

.chat-visual-detail__row {
    font-size: 13px;
    line-height: 1.45;
    color: #334155;
}

.chat-visual-detail__row b {
    color: #172033;
}

@media (max-width: 520px) {
    .msg--visual .msg__bubble {
        max-width: 100%;
        padding: 8px;
    }

    .chat-card {
        padding: 11px;
    }
}
