/* ═══ Icon ưu đãi gắn góc trên-phải box "Tham khảo chi phí" ═══ */
/* Box "Tham khảo chi phí" + icon: một khối thống nhất, icon cố định góc trên-phải box */
#lgchat-dock .lgchip.lgchip-cost {
    position: relative;
    overflow: visible;
    padding-right: 52px !important;
}
#lgchat-dock { overflow: visible; }

.lgcost-badge {
    position: absolute;
    right: -8px;
    top: -34px;
    width: 80px;
    height: 60px;
    z-index: 3;
    pointer-events: auto;            /* bấm icon = bấm box (icon là con của box) */
    transform-origin: 70% 80%;
    /* đứng yên – không đổi vị trí theo thao tác */
}

/* Ảnh sticker tự upload */
.lgcost-badge.lgcost-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Hộp quà */
.lgcost-gift {
    position: absolute;
    left: 2px;
    bottom: 14px;
    width: 34px;
    height: 34px;
    transform: rotate(-12deg);
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .18));
}

/* Bong bóng đỏ */
.lgcost-bubble {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 58px;
    height: 54px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 2px 4px;
    border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
    background: radial-gradient(circle at 35% 30%, #ff5a4f 0%, #e3201b 60%, #b80f0f 100%);
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(184, 15, 15, .35);
    color: #fff;
    font-family: inherit;
    font-size: 9.6px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    letter-spacing: -.1px;
    transform: rotate(-8deg);
}
.lgcost-bubble::after {             /* đuôi bong bóng */
    content: "";
    position: absolute;
    left: 4px;
    bottom: 2px;
    border: 6px solid transparent;
    border-top-color: #c41513;
    transform: rotate(35deg);
}

/* Tia sáng vàng */
.lgcost-rays {
    position: absolute;
    right: -4px;
    top: -6px;
    width: 18px;
    height: 16px;
}
.lgcost-rays b {
    position: absolute;
    width: 3px;
    height: 8px;
    border-radius: 2px;
    background: #ffc21a;
}
.lgcost-rays b:nth-child(1) { left: 0;    top: 6px; transform: rotate(-35deg); }
.lgcost-rays b:nth-child(2) { left: 7px;  top: 1px; transform: rotate(5deg); }
.lgcost-rays b:nth-child(3) { left: 14px; top: 5px; transform: rotate(40deg); }

@keyframes lgcost-wiggle {
    0%, 70%, 100% { transform: rotate(0); }
    76%           { transform: rotate(-6deg) scale(1.04); }
    82%           { transform: rotate(5deg)  scale(1.04); }
    88%           { transform: rotate(-3deg); }
    94%           { transform: rotate(2deg); }
}

@media (max-width: 360px) {
    .lgcost-badge { width: 72px; height: 54px; right: -6px; top: -30px; }
    .lgcost-gift { width: 30px; height: 30px; bottom: 12px; }
    .lgcost-bubble { width: 50px; height: 47px; font-size: 8.5px; }
}

/* ═══ Ảnh chi phí hiện full chiều ngang khung chat ═══ */
#lgchat-msgs .lm.lm-full {
    align-self: stretch;
    width: 100%;
    max-width: 100%;
}
#lgchat-msgs .lm.lm-full .lgimgs {
    max-width: 100%;
    width: 100%;
}
#lgchat-msgs .lm.lm-full .lgimgs img {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    border-radius: 12px;
}

/* ═══ Icon dạng ảnh (tem ngang) → nằm nhô lên trên mép box, không đè chữ ═══ */
#lgchat-dock .lgchip.lgchip-cost.lgchip-cost-img {
    padding-right: 8px !important;   /* chữ giữ nguyên 1 dòng như box thường */
}
#lgchat-dock .lgchip-cost-img .lgcost-badge.lgcost-img {
        width: 100px;
    height: 39px;
    top: -24px;                      /* chỉ chạm ~7px vào mép trên-phải của box */
    right: -4px;
}
#lgchat-dock .lgchip-cost-img .lgcost-badge.lgcost-img img {
    object-position: right bottom;   /* ảnh bám góc dưới-phải → luôn dính vào mép box */
}
@media (max-width: 360px) {
    #lgchat-dock .lgchip-cost-img .lgcost-badge.lgcost-img { width: 80px; height: 30px; top: -24px; }
}
