/* ChatBase — pictures in chat (chatimages.js) */

.cb-img-btn {
    background: none;
    border: 0;
    font-size: 18px;
    line-height: 1;
    padding: 6px 8px;
    cursor: pointer;
    opacity: .8;
    border-radius: 8px;
}
.cb-img-btn:hover { opacity: 1; background: rgba(255, 255, 255, .08); }

/* the picture inside a message bubble */
img.cb-img {
    display: block;
    max-width: min(320px, 70vw);
    max-height: 320px;
    width: auto;
    height: auto;
    margin: 6px 0 4px;
    border-radius: 12px;
    cursor: zoom-in;
    background: rgba(255, 255, 255, .05);
    object-fit: contain;
}
.dm-bubble img.cb-img { max-width: min(260px, 62vw); }

/* tap to enlarge */
.cb-img-view {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(0, 0, 0, .88);
    cursor: zoom-out;
    animation: cbImgIn .14s ease;
}
.cb-img-view img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
@keyframes cbImgIn { from { opacity: 0; } to { opacity: 1; } }

/* AI tutor: the picture you attached, before you send it */
.cb-ai-attach {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    padding: 7px 10px;
    border-radius: 10px;
    background: rgba(91, 140, 255, .14);
    border: 1px solid rgba(91, 140, 255, .35);
    font-size: 12.5px;
}
.cb-ai-attach img { width: 40px; height: 40px; border-radius: 7px; object-fit: cover; }
.cb-ai-attach button {
    margin-left: auto;
    border: 0;
    background: rgba(255, 255, 255, .12);
    color: inherit;
    border-radius: 7px;
    padding: 4px 9px;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
}
