.tc-modal-media-stage {
    position: relative;
}

.tc-modal-carousel-loading {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 4;
    background: rgba(17, 20, 24, 0.88);
    color: #fff;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

.tc-modal-carousel-wrap {
    width: 100%;
}

.tc-modal-carousel {
    border-radius: 16px;
    overflow: hidden;
    background: #f6f7f9;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.tc-modal-carousel .carousel-inner {
    background: linear-gradient(180deg, rgba(0,0,0,0.015), rgba(0,0,0,0.06));
}

.tc-modal-carousel .carousel-item {
    transition: transform .22s ease-in-out;
}

.tc-modal-carousel .carousel-item img {
    width: 100%;
    height: min(62vh, 620px);
    object-fit: contain;
    display: block;
    background: rgba(0,0,0,0.03);
    -webkit-user-drag: none;
    user-select: none;
    touch-action: pan-y;
    background-color:white;
}

.tc-modal-carousel-control {
    width: 48px;
    opacity: 1;
    color: #fff;
    text-shadow: none;
}

.tc-modal-carousel-control span {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 12, 14, 0.65);
    border: 1px solid rgba(255,255,255,0.22);
    backdrop-filter: blur(4px);
}

.tc-modal-carousel-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(0,0,0,0.08);
    border-top: 0;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    background: #fff;
}

.tc-modal-carousel-count {
    font-size: 12px;
    font-weight: 700;
    color: rgba(0,0,0,0.62);
    min-height: 18px;
}

.tc-modal-carousel-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tc-modal-carousel-thumb {
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    background: #fff;
    width: 70px;
    height: 56px;
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.tc-modal-carousel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tc-modal-carousel-thumb.is-active {
    border-color: rgba(79,179,162,0.9);
    box-shadow: 0 0 0 3px rgba(79,179,162,0.18);
}

@media (hover: hover) and (pointer: fine) {
    .tc-modal-carousel-thumb:hover {
        transform: translateY(-1px);
        border-color: rgba(79,179,162,0.55);
        box-shadow: 0 6px 16px rgba(0,0,0,0.10);
    }
}

@media (max-width: 991.98px) {
    .tc-modal-carousel .carousel-item img {
        height: min(48vh, 320px);
    }

    .tc-modal-carousel-thumb {
        width: 58px;
        height: 46px;
    }
}
