/* ==========================================================================
   Block Heading (Title + Desc shown above the cards)
   ========================================================================== */

.bravo-custom-block__heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    max-width: 720px;
    margin: 0 auto calc(var(--custom-block-space-between-blocks, 24px)) auto;
}

.bravo-custom-block__heading-title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--style_text_color);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.bravo-custom-block__heading-desc {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--style_text_color);
    opacity: 0.75;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.bravo-custom-block__heading-desc p {
    margin: 0 0 0.65em;
}

.bravo-custom-block__heading-desc p:last-child {
    margin-bottom: 0;
}

@media (max-width: 767px) {

    .bravo-custom-block__row > [class*="col-"],
    .bravo-custom-block__row > .custom-block__col {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }

    .bravo-custom-block__heading {
        gap: 8px;
        margin-bottom: calc(var(--custom-block-space-between-blocks, 24px) * 0.75);
    }

    .bravo-custom-block__heading-title {
        font-size: 24px;
    }

    .bravo-custom-block__heading-desc {
        font-size: 14px;
    }
}

.bravo-custom-block {
    /* padding: 10px 0; */
    --custom-block-media-height: 180px;
}

.bravo-custom-block__row {
    align-items: stretch;
}

.bravo-custom-block__row > [class*="col-"],
.bravo-custom-block__row > .custom-block__col {
    display: flex;
    align-items: stretch;
    min-width: 0;
    padding-right: calc(var(--custom-block-space-between-items, 30px) / 2);
    padding-left: calc(var(--custom-block-space-between-items, 30px) / 2);
}

.bravo-custom-block__row > .custom-block__col > .custom-block__item {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    min-width: 0;
    min-height: 100%;
}

.custom-block__item {
    height: auto;
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.custom-block__item-inner {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
}

.custom-block__item--horizontal .custom-block__item-inner {
    flex-direction: row;
    align-items: stretch;
}

.custom-block__item--horizontal.custom-block__item--media-only .custom-block__item-inner,
.custom-block__item--horizontal.custom-block__item--body-only .custom-block__item-inner {
    min-height: 280px;
}

.custom-block__item--media-only .custom-block__media,
.custom-block__item--body-only .custom-block__body {
    flex: 1 1 100%;
    max-width: 100%;
}

.custom-block__item--body-only.custom-block__item--horizontal .custom-block__body {
    flex: 1 1 100%;
    max-width: 100%;
}

.custom-block__item--media-only.custom-block__item--horizontal .custom-block__media {
    flex: 1 1 100%;
    max-width: 100%;
}

.custom-block__item--horizontal.custom-block__item--right .custom-block__item-inner {
    flex-direction: row-reverse;
}

@media (min-width: 768px) {
    .custom-block__item--plain-view.custom-block__item--horizontal.custom-block__item--left .custom-block__media,
    .custom-block__item--plain-view.custom-block__item--horizontal.custom-block__item--right .custom-block__body {
        padding-inline-start: calc(var(--custom-block-space-between-items, 30px) / 2);
    }
    .custom-block__item--plain-view.custom-block__item--horizontal.custom-block__item--right .custom-block__media,
    .custom-block__item--plain-view.custom-block__item--horizontal.custom-block__item--left .custom-block__body {
        padding-inline-end: calc(var(--custom-block-space-between-items, 30px) / 2);
    }
}

.custom-block__body {
    flex: 1 1 auto;
    padding-block: 0;
    padding-inline: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: start;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.custom-block__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.custom-block__item--card-view .custom-block__item-inner.custom-block__card {
    border: 1px solid #e5e7eb;
    border-radius: var(--custom-block-radius, 12px);
    background: #fff;
    box-sizing: border-box;
    overflow: hidden;
}

.custom-block__item-inner .custom-block__media-img{
        border-radius: var(--custom-block-radius, 12px);
}

.custom-block__item--card-view .custom-block__body {
    padding: 15px calc(var(--custom-block-space-between-items, 30px) / 2);
}

.custom-block__item--card-view.custom-block__item--horizontal .custom-block__body {
        padding-block: calc(var(--custom-block-space-between-items, 30px) / 2);
}

.custom-block__item--card-view.custom-block__item--media-only .custom-block__media,
.custom-block__item--card-view.custom-block__item--stacked .custom-block__media:only-child {
    padding: 0;
}

.custom-block__item--card-view.custom-block__item--horizontal .custom-block__media {
    padding-inline-start: calc(var(--custom-block-space-between-items, 30px) / 2);
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding: 15px;
}

.custom-block__item--bottom.custom-block__item--card-view .custom-block__media-img{
    border-bottom-right-radius: 0px !important;
    border-bottom-left-radius: 0px !important;
}

.custom-block__item--top.custom-block__item--card-view .custom-block__media-img{
    border-top-right-radius: 0px !important;
    border-top-left-radius: 0px !important;
}

.custom-block__item--card-view.custom-block__item--horizontal.custom-block__item--right .custom-block__media {
    padding-inline-start: 0;
    padding-inline-end: calc(var(--custom-block-space-between-items, 30px) / 2);
    padding-block: 0px !important;
}

.custom-block__col {
    margin-bottom: var(--custom-block-space-between-blocks, 24px);
}

.custom-block__icon-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    width: 100%;
    gap: 8px;
}

.custom-block__icon-slot {
    display: flex;
    align-items: center;
    min-height: 44px;
    min-width: 0;
}

.custom-block__icon-slot--left {
    justify-content: flex-start;
}

.custom-block__icon-slot--center {
    justify-content: center;
}

.custom-block__icon-slot--right {
    justify-content: flex-end;
}

.custom-block__item--horizontal .custom-block__body {
    flex: 0 1 50%;
    width: 50%;
    max-width: 50%;
    min-width: 0;
    justify-content: center;
    align-items: flex-start;
    text-align: start;
}

.custom-block__item--horizontal .custom-block__content .custom-block__btn {
    margin-top: 0;
}

.custom-block__item--horizontal .custom-block__btn {
    align-self: flex-start;
    margin-top: 0;
}

.custom-block__icon {
    width: 44px;
    height: 44px;
    border-radius: calc(var(--custom-block-radius, 12px) / 3);
    background-color: color-mix(in srgb, var(--style_main_color) 20%, transparent);
    color: var(--style_main_color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.custom-block__badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--style_main_color);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
    width: 100%;
    text-align: start;
}

.custom-block__badge p:last-child {
    margin-bottom: 0;
}

.custom-block__title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--style_text_color);
    line-height: 1.25;
    flex-shrink: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
    width: 100%;
    text-align: start;
}

.custom-block__title p:last-child {
    margin-bottom: 0;
}

.custom-block__desc {
    color: var(--style_text_color);
    font-size: 14px;
    line-height: 1.6;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    text-align: start;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.custom-block__desc p {
    margin: 0 0 0.65em;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: start;
}

.custom-block__desc p:last-child {
    margin-bottom: 0;
}

.custom-block__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    margin-top: auto;
    padding: 10px 18px;
    border-radius: calc(var(--custom-block-radius, 12px) / 2);
    background: var(--style_btn_primary_color);
    color: #fff !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none !important;
    flex-shrink: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    margin-bottom: 5px;
}

.custom-block__btn:hover {
    background: var(--style_btn_primary_color);
    color: #fff !important;
}

@media (min-width: 375px) {
    .bravo-custom-block {
        --custom-block-media-height: 220px;
    }
}
@media (min-width: 576px) {
    .bravo-custom-block {
        --custom-block-media-height: 200px;
    }
}

@media (min-width: 768px) {
    .bravo-custom-block {
        --custom-block-media-height: 230px;
    }
}

@media (min-width: 992px) {
    .bravo-custom-block {
        --custom-block-media-height: 260px;
    }
}

@media (min-width: 1200px) {
    .bravo-custom-block {
        --custom-block-media-height: 300px;
    }
}

/*
 * Image frame height lives on the <img>, not the wrapper — portrait images
 * stay narrow; the media box wraps the rendered image (no extra empty band).
 */
.custom-block__media {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    height: var(--custom-block-media-height);
    max-height: var(--custom-block-media-height);
    line-height: 0;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-block__media-img {
    display: block;
    width: auto;
    max-width: 100%;
    height: var(--custom-block-media-height);
    max-height: var(--custom-block-media-height);
    /* object-fit: contain; */
    object-position: center center;
    flex-shrink: 0;
}

.custom-block__item--horizontal .custom-block__media {
    flex: 0 0 50%;
    max-width: 50%;
    align-self: flex-start;
    min-height: 0;
    box-sizing: border-box;
    box-sizing: border-box;
}

.custom-block__title {
    position: relative;
    font-size: 16px;
    line-height: 1.3;
    overflow: hidden;
    overflow-wrap: normal;
    word-break: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    margin-top: 5px;
}

@media (max-width: 767px) {
    .bravo-custom-block__row > [class*="col-"],
    .bravo-custom-block__row > .custom-block__col {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }

    .bravo-custom-block__row > .custom-block__col > .custom-block__item,
    .custom-block__item {
        width: 100%;
        max-width: 100%;
        flex: 1 1 100%;
    }

    .custom-block__item--horizontal .custom-block__item-inner {
        flex-direction: column !important;
        gap: 16px;
        align-items: stretch;
    }

    .custom-block__item--horizontal .custom-block__body {
        justify-content: flex-start;
    }

    .custom-block__item--horizontal .custom-block__btn {
        align-self: flex-start;
    }

    .custom-block__item--horizontal .custom-block__body,
    .custom-block__item--horizontal .custom-block__media {
        flex: 1 1 auto;
        max-width: 100%;
        width: 100%;
    }

    .custom-block__item--horizontal .custom-block__media {
        align-self: stretch;
    }

    .custom-block__title p {
        display: inline;
        margin: 0;
    }

    .custom-block__item--custom-room .custom-block__desc{
        font-size: 14px;
    }
    .custom-block__title[title]:hover::after,
    .custom-block__title[title]:focus-visible::after {
        content: attr(title);
        position: absolute;
        inset-inline-start: 0;
        top: calc(100% + 4px);
        z-index: 30;
        max-width: min(calc(100vw - 2rem), 320px);
        padding: 8px 10px;
        border-radius: 6px;
        background: #fff;
        color: var(--style_text_color);
        font-size: 14px;
        font-weight: 600;
        line-height: 1.4;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
        border: 1px solid #e5e7eb;
        pointer-events: none;
    }
}
/* ==========================================================================
   Custom Room — room-only fields (inside custom-block layout)
   ========================================================================== */

/* ==========================================================================
   Room Basic Information
   Guests / Beds / Size
   ========================================================================== */

.custom-room-card__info {
    width: 100%;
    min-width: 0;

    display: flex;
    align-items: stretch;

    margin: 0 0 10px;
    padding: 11px 0;

    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.custom-room-card__info-item {
    flex: 1 1 0;
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    font-size: 13px;
    line-height: 1.3;

    color: var(--style_text_color);

    text-align: center;
}

.custom-room-card__info-item + .custom-room-card__info-item {
    border-inline-start: 1px solid #e5e7eb;
}




/* Icon */

.custom-room-card__info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    color: var(--style_main_color);

    font-size: 16px;
    line-height: 1;
}


/* Number */

.custom-room-card__info-value {
    font-weight: 700;
    color: var(--style_text_color);

    white-space: nowrap;
}


/* Text */

.custom-room-card__info-label {
    color: var(--style_text_color);

    white-space: nowrap;

    overflow: hidden;
    text-overflow: ellipsis;
}


/* ==========================================================================
   Room Amenities
   Maximum 3 items
   ========================================================================== */

.custom-room-card__amenities {
    width: 100%;
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 8px;

    margin: 0 0 12px;

    overflow: hidden;
}

.custom-room-card__amenity {
    flex: 1 1 0;
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    font-size: 12px;
    line-height: 1.3;

    color: var(--style_text_color);

    white-space: nowrap;
    overflow: hidden;
}

.custom-room-card__amenity-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    color: var(--style_main_color);

    font-size: 15px;
    line-height: 1;
}

.custom-room-card__amenity-name {
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .custom-room-card__info {
        padding: 10px 0;
    }

    .custom-room-card__info-item {
        gap: 4px;
        font-size: 12px;
    }

    .custom-room-card__info-icon {
        font-size: 14px;
    }

    .custom-room-card__amenities {
        gap: 5px;
    }

    .custom-room-card__amenity {
        gap: 4px;
        font-size: 11px;
    }

    .custom-room-card__amenity-icon {
        font-size: 14px;
    }
}

/* Custom Room: description clamp (layouts 2–5 only) */
.bravo-custom-block:not(.bravo-custom-block--layout-1)
    .custom-block__item--custom-room
    .custom-block__desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.6;
    max-height: calc(1.6em * 2);
}

.custom-block__item--custom-room .custom-block__desc {
    font-size: 16px;
}
/* Custom Room: full-width button; pin to bottom only when card has title + extra data */
.custom-block__item--custom-room .custom-block__item-inner {
    min-height: 100%;
}

.custom-block__item--custom-room .custom-block__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.custom-block__item--custom-room:not(.custom-block__item--pin-btn) .custom-block__body {
    justify-content: center;
}

.custom-block__item--custom-room.custom-block__item--pin-btn .custom-block__content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.custom-block__item--custom-room .custom-block__btn--full {
    align-self: stretch;
    width: 100%;
    justify-content: center;
    text-align: center;
}

.custom-room-card__footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.custom-block__item--custom-room.custom-block__item--pin-btn .custom-room-card__footer {
    margin-top: auto;
}

.custom-block__item--custom-room.custom-block__item--pin-btn .custom-room-card__info,
.custom-block__item--custom-room.custom-block__item--pin-btn .custom-room-card__amenities {
    margin-bottom: 0;
}
