/* =========================================================
   Listing feed skeleton
   ========================================================= */

.trippost-lazy-feed__placeholder {
    display: flex !important;
    width: 100%;
    padding: 0 !important;
    gap: 20px;
    overflow: hidden;
    box-sizing: border-box;
}

/* Desktop: 4 skeleton */
.trippost-lazy-feed__placeholder span {
    display: block;
    flex: 0 0 calc((100% - 60px) / 4);
    width: calc((100% - 60px) / 4);
    max-width: calc((100% - 60px) / 4);
    height: 304px;
    border-radius: 12px;
    box-sizing: border-box;

    background: linear-gradient(
        90deg,
        #ededed 25%,
        #f7f7f7 37%,
        #ededed 63%
    );

    background-size: 400% 100%;
    animation: trippost-feed-skeleton 1.35s ease infinite;
}

.trippost-lazy-feed__placeholder.is-error span {
    animation: none;
    opacity: 0.55;
}


/* =========================================================
   Single-result feed
   ========================================================= */

.trippost-single-feed {
    width: calc((100% - 60px) / 4);
}

.trippost-single-feed > .item-slide {
    width: 100%;
}


/* =========================================================
   Skeleton animation
   ========================================================= */

@keyframes trippost-feed-skeleton {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: 0 0;
    }
}


/* =========================================================
   Pre-Owl layout
   Kartları Owl yüklənənədək gizlətmir.
   ========================================================= */

.listing-feed-carousel.owl-carousel:not(.owl-loaded),
.trippost-managed-carousel.owl-carousel:not(.owl-loaded) {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
    gap: 20px;
    overflow: hidden !important;
    box-sizing: border-box;
}

.listing-feed-carousel.owl-carousel:not(.owl-loaded) > .item-slide,
.trippost-managed-carousel.owl-carousel:not(.owl-loaded) > .item-slide {
    display: block;
    flex: 0 0 var(--trippost-owl-d-width);
    width: var(--trippost-owl-d-width);
    max-width: var(--trippost-owl-d-width);
    min-width: 0;
    box-sizing: border-box;
}


/* =========================================================
   Tablet: 2 kart
   ========================================================= */

@media (min-width: 768px) and (max-width: 1199px) {
    .trippost-lazy-feed__placeholder {
        gap: 20px !important;
    }

    .trippost-lazy-feed__placeholder span {
        flex: 0 0 calc((100% - 20px) / 2) !important;
        width: calc((100% - 20px) / 2) !important;
        max-width: calc((100% - 20px) / 2) !important;
    }

    .trippost-single-feed {
        width: calc((100% - 20px) / 2);
        margin: 0;
    }

    .listing-feed-carousel.owl-carousel:not(.owl-loaded),
    .trippost-managed-carousel.owl-carousel:not(.owl-loaded) {
        gap: 20px !important;
    }

    .listing-feed-carousel.owl-carousel:not(.owl-loaded) > .item-slide,
    .trippost-managed-carousel.owl-carousel:not(.owl-loaded) > .item-slide {
        flex: 0 0 var(--trippost-owl-t-width) !important;
        width: var(--trippost-owl-t-width) !important;
        max-width: var(--trippost-owl-t-width) !important;
    }
}


/* =========================================================
   Mobile: 1 kart və növbəti kartın bir hissəsi
   ========================================================= */

@media (max-width: 767px) {
    .trippost-lazy-feed__placeholder {
        display: flex !important;
        width: 100%;
        padding: 0 !important;
        gap: 10px !important;
        overflow: hidden !important;
    }

    .trippost-lazy-feed__placeholder span {
        flex: 0 0 calc((100% - 60px) / 1.13) !important;
        width: calc((100% - 60px) / 1.13) !important;
        max-width: calc((100% - 60px) / 1.13) !important;
        height: 304px;
        border-radius: 12px;
    }

    .trippost-single-feed {
        width: calc((100% - 60px) / 1.13);
        margin: 0;
    }

    .listing-feed-carousel.owl-carousel:not(.owl-loaded),
    .trippost-managed-carousel.owl-carousel:not(.owl-loaded) {
        display: flex !important;
        width: 100%;
        gap: 10px !important;
        overflow: hidden !important;
    }

    .listing-feed-carousel.owl-carousel:not(.owl-loaded) > .item-slide,
    .trippost-managed-carousel.owl-carousel:not(.owl-loaded) > .item-slide {
        flex: 0 0 calc((100% - 60px) / 1.13) !important;
        width: calc((100% - 60px) / 1.13) !important;
        max-width: calc((100% - 60px) / 1.13) !important;
        min-width: 0 !important;
    }

    .listing-feed-carousel.owl-carousel:not(.owl-loaded) > .item-slide > .lf-item,
    .trippost-managed-carousel.owl-carousel:not(.owl-loaded) > .item-slide > .lf-item {
        width: 100% !important;
        max-width: 100% !important;
    }
}