.tnc-gallery-slider {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 32px 0;
    color: inherit;
    font-family: inherit;
}

.tnc-gallery-slider *,
.tnc-gallery-slider *::before,
.tnc-gallery-slider *::after {
    box-sizing: border-box;
}

.tnc-gallery-stage {
    position: relative;
    width: 100%;
    min-height: 420px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    background:
        linear-gradient(90deg, rgba(41, 50, 60, 0.88) 0 10%, rgba(18, 20, 23, 0.98) 10% 90%, rgba(41, 50, 60, 0.88) 90% 100%),
        #15171a;
}

.tnc-gallery-slides,
.tnc-gallery-slide {
    width: 100%;
    height: 100%;
}

.tnc-gallery-slide {
    position: absolute;
    inset: 0;
    display: none;
    margin: 0;
    padding: 0 10%;
    align-items: center;
    justify-content: center;
}

.tnc-gallery-slide.is-active {
    display: flex;
}

.tnc-gallery-slide img {
    display: block;
    width: auto;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
}

.tnc-gallery-toolbar {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    display: inline-flex;
    align-items: stretch;
    min-height: 40px;
    overflow: hidden;
    border-radius: 4px;
    background: rgba(31, 34, 40, 0.88);
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.tnc-gallery-toolbar button,
.tnc-gallery-count {
    min-width: 42px;
    height: 40px;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.11);
    background: transparent;
    color: inherit;
}

.tnc-gallery-toolbar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.tnc-gallery-toolbar button:last-child {
    border-right: 0;
}

.tnc-gallery-toolbar button:hover,
.tnc-gallery-toolbar button:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.tnc-gallery-count {
    display: inline-flex;
    min-width: 78px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 13px;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.tnc-gallery-toolbar svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.tnc-gallery-nav {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: inline-flex;
    width: 42px;
    height: 116px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #050505;
    cursor: pointer;
    transform: translateY(-50%);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.tnc-gallery-nav:hover,
.tnc-gallery-nav:focus-visible {
    background: #fff;
    outline: none;
}

.tnc-gallery-nav svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tnc-gallery-prev {
    left: 18px;
}

.tnc-gallery-next {
    right: 18px;
}

.tnc-gallery-thumbs {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 16px;
    padding: 0 14px 6px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.tnc-gallery-thumbs::-webkit-scrollbar {
    height: 6px;
}

.tnc-gallery-thumbs::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.tnc-gallery-thumb {
    flex: 0 0 auto;
    width: 104px;
    height: 58px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 7px;
    background: #202328;
    cursor: pointer;
    opacity: 0.72;
}

.tnc-gallery-thumb:hover,
.tnc-gallery-thumb:focus-visible,
.tnc-gallery-thumb.is-active {
    border-color: #fff;
    opacity: 1;
    outline: none;
}

.tnc-gallery-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tnc-gallery-caption {
    margin-top: 16px;
    font-size: clamp(14px, 1.3vw, 16px);
    font-weight: 800;
    line-height: 1.18;
}

.tnc-gallery-caption:empty,
.tnc-gallery-caption[hidden] {
    display: none;
}

.tnc-gallery-slider:fullscreen {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: center;
    padding: 24px;
    background: #202020;
}

.tnc-gallery-slider:fullscreen .tnc-gallery-stage {
    max-height: calc(100vh - 160px);
}

@media (max-width: 760px) {
    .tnc-gallery-slider {
        margin: 24px 0;
    }

    .tnc-gallery-stage {
        min-height: 260px;
        border-radius: 8px;
    }

    .tnc-gallery-slide {
        padding: 0 13%;
    }

    .tnc-gallery-nav {
        width: 34px;
        height: 82px;
        border-radius: 7px;
    }

    .tnc-gallery-prev {
        left: 10px;
    }

    .tnc-gallery-next {
        right: 10px;
    }

    .tnc-gallery-toolbar {
        top: 10px;
        right: 10px;
        min-height: 34px;
    }

    .tnc-gallery-toolbar button,
    .tnc-gallery-count {
        min-width: 36px;
        height: 34px;
    }

    .tnc-gallery-count {
        min-width: 64px;
        padding: 0 9px;
        font-size: 14px;
    }

    .tnc-gallery-thumb {
        width: 78px;
        height: 46px;
    }

    .tnc-gallery-caption {
        font-size: 21px;
    }
}
