/* Вынесено из site.css (Important C, фаза A / PLAN_css_refactor_v2.md): превью вложений и lightbox. */
/* ============================================================
   VibeDesk — inline attachment preview + lightbox
   ============================================================ */
.vd-attach-thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 180px;
    max-height: 120px;
    overflow: hidden;
    border-radius: 0.55rem;
    border: 1px solid var(--vd-border-soft);
    background: rgba(168, 85, 247, 0.06);
    cursor: zoom-in;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    vertical-align: middle;
}
.vd-attach-thumb:hover {
    transform: translateY(-1px);
    border-color: var(--vd-border-strong);
    box-shadow: 0 6px 18px rgba(168, 85, 247, 0.26);
}
.vd-attach-thumb img { max-width: 100%; max-height: 100%; object-fit: cover; display: block; }

.vd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(8, 4, 20, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 2rem;
}
.vd-lightbox.is-open { display: flex; animation: vdTabsFadeIn 0.16s ease-out; }
.vd-lightbox img {
    max-width: 92vw;
    max-height: 86vh;
    border-radius: 0.75rem;
    border: 1px solid var(--vd-border);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    object-fit: contain;
    background: rgba(18, 12, 28, 0.6);
}
.vd-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--vd-border);
    background: rgba(18, 12, 28, 0.75);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.15rem;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.vd-lightbox-close:hover {
    background: var(--vd-accent-strong);
    border-color: var(--vd-accent);
}

.vd-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--vd-border);
    background: rgba(18, 12, 28, 0.75);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    transition: background 0.15s ease, border-color 0.15s ease;
    z-index: 2;
}
.vd-lightbox-nav:hover {
    background: var(--vd-accent-strong);
    border-color: var(--vd-accent);
}
.vd-lightbox-nav--prev { left: 1rem; }
.vd-lightbox-nav--next { right: 1rem; }

.vd-lightbox-counter {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(18, 12, 28, 0.75);
    border: 1px solid var(--vd-border);
    color: #fff;
    font-size: 0.82rem;
    z-index: 2;
}
