.tdlw-shorts-slider .post-image-background {
    position: relative;
    overflow: hidden; /* Ukryj części obrazu wychodzące poza kontener */
    height: 100%;
}

.tdlw-shorts-slider .post-image-background img.tdlw-short-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Pokryj cały dostępny obszar, zachowując proporcje */
}

.tdlw-shorts-slider .glie-post-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 20px 20px 20px;
    color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
}

.tdlw-shorts-slider .faded-post-cover {
    /*position: absolute;*/
    /*inset: 0;*/
    /*background: rgba(0,0,0,0.1);*/
    /*transition: background 0.3s ease;*/
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0px;
    left: 0px;
    background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.55) 20%, transparent 50%);

}

.tdlw-shorts-slider .gliding-post:hover .faded-post-cover {
    background: rgba(0,0,0,0.3);
}

.tdlw-play-icon {
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    opacity:.9;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.tdlw-shorts-slider .gliding-post:hover .tdlw-play-icon {
    opacity: 1;
    transform: scale(1.1);
}

.tdlw-short-modal {
    position:fixed;
    inset:0;
    z-index:9999;
    display: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2vh 2vw;
    box-sizing: border-box;
}

.tdlw-short-backdrop {
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.7);
}

.tdlw-short-dialog {
    position:relative;
    background:#000;
    padding:12px;
    border-radius:8px;
    z-index:1;
    
    display: flex;
    flex-direction: column;
    
    /* Ograniczenia rozmiaru, aby dialog nie wyszedł poza ekran */
    max-width: 95vw; 
    max-height: 95vh; 
    
    /* Pozwalamy dialogowi rosnąć do rozmiaru wideo, ale nie poza max-width/max-height */
    width: auto;
    height: auto;
}

.tdlw-short-close {
    position:absolute;
    top:6px;
    right:8px;
    border:0;
    background:transparent;
    color:#fff;
    font-size:28px;
    cursor:pointer;
    line-height: 1;
    padding: 5px;
    z-index: 10;
}

.tdlw-short-player {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* KLUCZOWA ZMIANA: Pozwala kontenerowi na kurczenie się w pionie */
    min-height: 0;
}

.tdlw-short-player video {
    /* Wideo będzie się skalować, zachowując proporcje */
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    background:#000;
    border-radius: 4px;
}

.tdlw-short-quality {
    display:flex;
    justify-content: center;
    gap:8px;
    margin:6px 0 10px;
    flex-shrink: 0;
}

.tdlw-short-quality button {
    padding:6px 10px;
    border:1px solid #fff;
    background:transparent;
    color:#fff;
    cursor:pointer;
    border-radius: 4px;
}

.tdlw-short-quality button.is-active {
    background:#fff;
    color:#000;
    font-weight: bold;
}

body.tdlw-modal-open {
    overflow: hidden;
}
.gliding-post.tdlw-short-item{
    border-radius: 8px;
    overflow: hidden;
}
