/*
 * Offer slider polish (appsettings "OfferSliderUi"). Only active when <html> has the "osu" class,
 * which _OfferSliderUiStyles.cshtml adds when OfferSliderUi.Enabled = true.
 * Scope: homepage offer sliders (.place-slider = Flight Offers, Holiday Packages, Hotel Offers,
 * Umrah Offers, Multi Module Display). Inner image carousels (.img-slider) are not affected.
 */

/* ---------- Arrows: subtle, vertically centred on the cards ---------- */
html.osu .place-slider.owl-carousel > .owl-nav button.owl-prev,
html.osu .place-slider.owl-carousel > .owl-nav button.owl-next {
    position: absolute;
    /* --osu-nav-top is set by offer-slider-ui.js to the middle of the visible cards; 50% is the fallback. */
    top: var(--osu-nav-top, 50%);
    transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1;
    color: #1f2937;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

html.osu .place-slider.owl-carousel > .owl-nav button.owl-prev { left: -20px; right: auto; }
html.osu .place-slider.owl-carousel > .owl-nav button.owl-next { right: -20px; left: auto; }

html.osu .place-slider.owl-carousel > .owl-nav button.owl-prev:hover,
html.osu .place-slider.owl-carousel > .owl-nav button.owl-next:hover {
    background: var(--tx-primary, #0ea5e9);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
}

/* First / last slide reached: fade the arrow that can no longer move. */
html.osu .place-slider.owl-carousel > .owl-nav button.disabled {
    opacity: 0;
    pointer-events: none;
}

/* Tablet: keep arrows inside the container gutter so they never cause sideways scroll. */
@media (max-width: 1199.98px) {
    html.osu .place-slider.owl-carousel > .owl-nav button.owl-prev,
    html.osu .place-slider.owl-carousel > .owl-nav button.owl-next {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    html.osu .place-slider.owl-carousel > .owl-nav button.owl-prev { left: -12px; }
    html.osu .place-slider.owl-carousel > .owl-nav button.owl-next { right: -12px; }
}

/* Mobile: arrows are hidden (HideArrowsOnMobile) - users swipe. */
@media (max-width: 767.98px) {
    html.osu.osu--hide-arrows-mobile .place-slider.owl-carousel > .owl-nav {
        display: none !important;
    }

    /* If arrows are kept on mobile, make them small and translucent at the card edges. */
    html.osu:not(.osu--hide-arrows-mobile) .place-slider.owl-carousel > .owl-nav button.owl-prev,
    html.osu:not(.osu--hide-arrows-mobile) .place-slider.owl-carousel > .owl-nav button.owl-next {
        width: 28px;
        height: 28px;
        font-size: 12px;
        background: rgba(255, 255, 255, 0.85);
    }

    html.osu:not(.osu--hide-arrows-mobile) .place-slider.owl-carousel > .owl-nav button.owl-prev { left: 4px; }
    html.osu:not(.osu--hide-arrows-mobile) .place-slider.owl-carousel > .owl-nav button.owl-next { right: 4px; }
}

/* ---------- Light swipe hint (mobile only, ShowSwipeHint) ---------- */
.osu-hint {
    display: none;
}

@media (max-width: 767.98px) {
    html.osu.osu--swipe-hint .osu-hint {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        margin: 10px auto 14px;
        pointer-events: none;
        user-select: none;
    }

    html.osu.osu--swipe-hint .osu-hint[hidden] {
        display: none;
    }

    .osu-hint__track {
        position: relative;
        width: 64px;
        height: 3px;
        border-radius: 3px;
        background: rgba(15, 23, 42, 0.10);
        overflow: hidden;
    }

    .osu-hint__thumb {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 33%;
        border-radius: 3px;
        background: var(--tx-primary, #0ea5e9);
        opacity: 0.75;
        transition: left 0.35s ease, width 0.35s ease;
    }

    .osu-hint__icon {
        font-size: 11px;
        line-height: 1;
        color: rgba(15, 23, 42, 0.35);
    }
}

/* ---------- Umrah cards: single static image (SimplifyUmrahCardImage) ---------- */
/* Owl items are flex rows; without the inner carousel the card would shrink to its content width. */
.umrah-offer-card--single-img {
    width: 100%;
}

.umrah-offer-card__img {
    overflow: hidden;
}

.umrah-offer-card__img > a,
.umrah-offer-card__img img {
    display: block;
    width: 100%;
    height: 100%;
}

.umrah-offer-card__img img {
    object-fit: cover;
}