/* Призрак брони в режиме выбора места («Перенести», «Скопировать») и
   подсветка наезда при перетаскивании карточки. Высоту задаёт разметка
   (--tt-h — длительность брони по сетке, 40px на получасовку). */

.tt-ghost {
    position: absolute;
    inset: 0 2px auto 2px;
    height: var(--tt-h);
    z-index: 6;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 6px;
    border: 2px dashed var(--bp-blue);
    border-radius: var(--bp-radius-sm);
    background: color-mix(in srgb, var(--bp-blue-tint) 78%, transparent);
    color: var(--bp-blue-ink);
    box-shadow: var(--bp-shadow-pop);
    backdrop-filter: blur(1px);
    font-size: var(--bp-crm-fs-badge);
    line-height: 1.2;
    overflow: hidden;
    animation: tt-ghost-in .12s ease-out;
}

.tt-ghost__title {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.tt-ghost__when { opacity: .85; }

.tt-ghost__hint {
    margin-top: auto;
    font-weight: 600;
}

/* Наехал на чужую запись или за закрытие клуба — красный, со штриховкой. */
.tt-ghost--busy,
.tt-ghost--closed {
    border-color: var(--bp-stamp-red);
    color: var(--bp-stamp-red);
    background:
        repeating-linear-gradient(-45deg,
            color-mix(in srgb, var(--bp-red-tint) 85%, transparent) 0 6px,
            color-mix(in srgb, var(--bp-paper) 70%, transparent) 6px 12px);
}

/* В режиме выбора места куда встанем, говорит призрак — плашка прицела
   ячейки спорила бы с ним поверх. */
body.tt-reschedule-active .tt-cell.selectable[data-newlabel]:hover::after { content: none; }

/* Тащимая карточка наехала на чужую запись — та же красная рамка. */
.tt-booking.tt-drag-busy {
    outline: 2px dashed var(--bp-stamp-red);
    outline-offset: -2px;
    background-image:
        repeating-linear-gradient(-45deg,
            color-mix(in srgb, var(--bp-red-tint) 70%, transparent) 0 6px,
            transparent 6px 12px);
}

@keyframes tt-ghost-in {
    from { opacity: 0; transform: scale(.97); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .tt-ghost { animation: none; }
}
