/**
 * Compatibility repairs for custom components already present in the parent theme.
 * This stylesheet restores the intended appearance only; it does not redesign the site.
 *
 * Covered components:
 * 1) Home-page customer review carousel (.bl-otz)
 * 2) [tour_rooms] accommodation cards (.rooms-list-container)
 */

/* The original review composition used a wider section container than the
   site's standard 1110px content column. Scope this only to reviews. */
@media (min-width: 1366px) {
    section.review > .cont {
        max-width: 1290px;
    }
}

/* =========================================================
   1. CUSTOMER REVIEW CAROUSEL
   The parent JS already expects .review-text-wrapper and
   .read-more-btn states, but the matching CSS is missing.
   ========================================================= */

.review .onotz {
    box-sizing: border-box;
    overflow: hidden;
}

.review .lf-otz {
    flex: 0 0 auto;
}

.review .rg-otz {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 10px;
    box-sizing: border-box;
}

.review .review-text-wrapper {
    position: relative;
    display: block;
    max-height: 64px;
    overflow: hidden;
}

.review .review-text-wrapper.full {
    max-height: none;
    overflow: visible;
}

.review .read-more-btn {
    display: none;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 5px 0 0;
    color: #FE9F53;
    font-family: Gilroy, Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.review .read-more-btn:hover,
.review .read-more-btn:focus {
    color: #FE9F53;
    background: transparent;
    box-shadow: none;
    text-decoration: none;
}

.review .read-more-btn:focus-visible {
    outline: 1px dotted #3A2F6A;
    outline-offset: 2px;
}

/* Allow a deliberately expanded review to grow without changing normal cards. */
.review .onotz.tm-review-expanded {
    overflow: visible;
    height: auto;
}

/* Keep review navigation at the sides and vertically centred on desktop.
   This overrides conflicting Slick theme/legacy responsive positioning only
   for this review carousel. */
@media (min-width: 1366px) {
    .review .bl-otz button.slick-prev.slick-arrow {
        left: -85px;
        right: auto;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
    }

    .review .bl-otz button.slick-next.slick-arrow {
        left: auto;
        right: -75px;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
    }
}

/* =========================================================
   2. TOUR ROOM / ACCOMMODATION CARDS
   Markup and Swiper JS already exist in the parent shortcode;
   these are the missing presentation rules seen in the old design.
   ========================================================= */

.rooms-list-container {
    width: 100%;
    max-width: 100%;
    margin: 20px 0 0;
    padding: 0;
    color: #5C5C5C;
    font-family: Gilroy, Arial, sans-serif;
    font-size: 15px;
    line-height: 22px;
    white-space: normal;
    box-sizing: border-box;
}

/* Gutenberg currently wraps this shortcode output in <code> on some posts.
   Neutralise only inside the room component; the rest of article content is untouched. */
code .rooms-list-container,
code .rooms-list-container * {
    font-family: Gilroy, Arial, sans-serif;
    white-space: normal;
}

/* wpautop may insert line breaks around the shortcode's inline scripts. */
.rooms-list-container > br {
    display: none;
}

.rooms-list-container .custom-room-card {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 240px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #DDDDDD;
    border-radius: 12px;
    background: #FFFFFF;
    box-sizing: border-box;
}

.rooms-list-container .custom-room-card + .custom-room-card {
    margin-top: 1px;
}

.rooms-list-container .room-gallery-wrapper {
    position: relative;
    flex: 0 0 35.3%;
    width: 35.3%;
    min-width: 0;
    min-height: 240px;
    overflow: hidden;
    background: #F3F3F3;
}

.rooms-list-container .room-gallery-wrapper .swiper {
    width: 100%;
    height: 100%;
    min-height: 240px;
    margin: 0;
    overflow: hidden;
    --swiper-navigation-size: 34px;
    --swiper-navigation-color: #FFFFFF;
}

.rooms-list-container .room-gallery-wrapper .swiper-wrapper,
.rooms-list-container .room-gallery-wrapper .swiper-slide {
    height: 100%;
    min-height: 240px;
}

.rooms-list-container .room-gallery-wrapper .swiper-slide {
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
    background: #F3F3F3;
}

.rooms-list-container .room-gallery-wrapper .swiper-slide img {
    display: block;
    width: 100%;
    height: 240px;
    max-width: none;
    margin: 0;
    object-fit: cover;
    object-position: center;
}

.rooms-list-container .room-gallery-wrapper .swiper-button-prev,
.rooms-list-container .room-gallery-wrapper .swiper-button-next {
    top: 50%;
    width: 38px;
    height: 44px;
    margin-top: -22px;
    color: #FFFFFF;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.rooms-list-container .room-gallery-wrapper .swiper-button-prev {
    left: 11px;
}

.rooms-list-container .room-gallery-wrapper .swiper-button-next {
    right: 11px;
}

.rooms-list-container .room-gallery-wrapper .swiper-button-prev::after,
.rooms-list-container .room-gallery-wrapper .swiper-button-next::after {
    font-size: 34px;
    font-weight: 300;
}

.rooms-list-container .room-gallery-wrapper .swiper-button-lock {
    display: none !important;
}

.rooms-list-container .photo-count {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.94);
    color: #292929;
    font-family: Gilroy, Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
    box-sizing: border-box;
}

.rooms-list-container .photo-count svg {
    display: block;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.rooms-list-container .room-info {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 240px;
    padding: 22px 30px 18px;
    background: #FFFFFF;
    box-sizing: border-box;
}

.rooms-list-container .room-title {
    margin: 0 0 12px;
    padding: 0;
    color: #15194F;
    font-family: Gilroy, Arial, sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 600;
    line-height: 26px;
    text-align: left;
    text-transform: none;
}

.rooms-list-container .room-description-wrapper {
    position: relative;
    width: 100%;
}

.rooms-list-container .room-description {
    position: relative;
    width: 100%;
    max-height: none;
    overflow: hidden;
    color: #686868;
    font-family: Gilroy, Arial, sans-serif;
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: 22px;
    text-align: left;
    transition: max-height 0.25s ease;
}

.rooms-list-container .room-description.collapsed {
    max-height: 100px;
}

.rooms-list-container .room-description.collapsed::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 34px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #FFFFFF 88%);
}

.rooms-list-container .room-description.full::after {
    display: none;
}

.rooms-list-container .room-bottom {
    margin-top: 15px;
    min-height: 20px;
}

.rooms-list-container .more-info-btn {
    color: #0068C9;
    font-family: Gilroy, Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

.rooms-list-container .more-info-btn:hover,
.rooms-list-container .more-info-btn:focus {
    color: #0068C9;
    text-decoration: none;
}

.rooms-list-container .more-info-btn .arrow {
    margin-left: 2px;
}

/* Keep the same component on smaller screens, simply stacked instead of squeezed. */
@media (max-width: 767px) {
    .rooms-list-container {
        margin-top: 15px;
        font-size: 14px;
        line-height: 21px;
    }

    .rooms-list-container .custom-room-card {
        display: block;
        min-height: 0;
        margin-bottom: 12px;
    }

    .rooms-list-container .room-gallery-wrapper {
        width: 100%;
        min-height: 220px;
        height: 220px;
    }

    .rooms-list-container .room-gallery-wrapper .swiper,
    .rooms-list-container .room-gallery-wrapper .swiper-wrapper,
    .rooms-list-container .room-gallery-wrapper .swiper-slide {
        min-height: 220px;
        height: 220px;
    }

    .rooms-list-container .room-gallery-wrapper .swiper-slide img {
        height: 220px;
    }

    .rooms-list-container .room-info {
        min-height: 0;
        padding: 18px 18px 17px;
    }

    .rooms-list-container .room-title {
        font-size: 18px;
        line-height: 24px;
    }

    .rooms-list-container .room-description {
        font-size: 14px;
        line-height: 21px;
    }
}
