.bsj-hotel-rules,
.bsj-hotel-rules * {
    box-sizing: border-box;
}

.bsj-hotel-rules {
    --bsj-hotel-rules-ink: #172432;
    --bsj-hotel-rules-border: #e2e8ef;
    margin-top: clamp(38px, 4vw, 54px);
    padding-top: clamp(26px, 2.4vw, 32px);
    border-top: 1px solid #e9edf2;
    color: var(--bsj-hotel-rules-ink);
    scroll-margin-top: 110px;
}

.bsj-hotel-rules:focus {
    outline: none;
}

.bsj-hotel-rules__title {
    margin: 0 0 clamp(18px, 2vw, 22px);
    color: var(--bsj-hotel-rules-ink);
    font-size: clamp(24px, 2vw, 29px);
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.bsj-hotel-rules__list {
    margin: 0;
    padding: 0 clamp(18px, 2.2vw, 28px);
    overflow: hidden;
    border: 1px solid var(--bsj-hotel-rules-border);
    border-radius: 16px;
    background: #ffffff;
    list-style: none;
}

.bsj-hotel-rules__item {
    display: grid;
    grid-template-columns: 24px minmax(180px, 0.65fr) minmax(0, 1.35fr);
    align-items: center;
    gap: clamp(14px, 1.6vw, 22px);
    min-height: clamp(64px, 6vw, 82px);
    padding: 15px 0;
    border-bottom: 1px solid var(--bsj-hotel-rules-border);
}

.bsj-hotel-rules__item:last-child {
    border-bottom: 0;
}

.bsj-hotel-rules__icon {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    color: #25313e;
}

.bsj-hotel-rules__icon svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.bsj-hotel-rules__label,
.bsj-hotel-rules__value {
    min-width: 0;
    color: var(--bsj-hotel-rules-ink);
    font-size: clamp(13px, 1vw, 15px);
    line-height: 1.4;
}

.bsj-hotel-rules__label {
    font-weight: 650;
}

.bsj-hotel-rules__value {
    font-weight: 600;
}

/* V2 prototype: independent square cards in a native horizontal scroller. */
.bsj-hotel-rules--v2 .bsj-hotel-rules__list {
    display: flex;
    gap: clamp(12px, 1.4vw, 18px);
    padding: 2px 0 14px;
    overflow-x: auto;
    overflow-y: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 1px;
    scroll-snap-type: inline proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.bsj-hotel-rules--v2 .bsj-hotel-rules__list::-webkit-scrollbar {
    display: none;
}

.bsj-hotel-rules--v2 .bsj-hotel-rules__list:focus-visible {
    outline: 2px solid #1e66c5;
    outline-offset: 4px;
}

.bsj-hotel-rules--v2 .bsj-hotel-rules__list.is-draggable {
    cursor: grab;
    touch-action: pan-y;
}

.bsj-hotel-rules--v2 .bsj-hotel-rules__list.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
}

.bsj-hotel-rules--v2 .bsj-hotel-rules__list.has-overflow-end:not(.has-overflow-start) {
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 22px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 22px), transparent 100%);
}

.bsj-hotel-rules--v2 .bsj-hotel-rules__list.has-overflow-start.has-overflow-end {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
}

.bsj-hotel-rules--v2 .bsj-hotel-rules__list.has-overflow-start:not(.has-overflow-end) {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22px, #000 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 22px, #000 100%);
}

.bsj-hotel-rules--v2 .bsj-hotel-rules__item {
    display: flex;
    flex: 0 0 clamp(160px, 12.5vw, 184px);
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-height: 0;
    aspect-ratio: 1;
    padding: clamp(17px, 1.5vw, 20px);
    border: 1px solid #d8e1ea;
    border-radius: 16px;
    background: #fbfcfd;
    scroll-snap-align: start;
}

.bsj-hotel-rules--v2 .bsj-hotel-rules__item:last-child {
    border-bottom: 1px solid #d8e1ea;
}

.bsj-hotel-rules--v2 .bsj-hotel-rules__icon {
    width: 32px;
    height: 32px;
    margin-bottom: auto;
}

.bsj-hotel-rules--v2 .bsj-hotel-rules__icon svg {
    width: 24px;
    height: 24px;
}

.bsj-hotel-rules--v2 .bsj-hotel-rules__label,
.bsj-hotel-rules--v2 .bsj-hotel-rules__value {
    width: 100%;
    font-size: 14px;
}

.bsj-hotel-rules--v2 .bsj-hotel-rules__label {
    font-size: 15px;
}

.bsj-hotel-rules--v2 .bsj-hotel-rules__value {
    color: #5e6b78;
    font-weight: 500;
}

@media (max-width: 767px) {
    .bsj-hotel-rules {
        margin-top: 36px;
        padding-top: 24px;
        scroll-margin-top: 24px;
    }

    .bsj-hotel-rules__title {
        margin-bottom: 16px;
        font-size: 24px;
    }

    .bsj-hotel-rules__list {
        padding: 0 16px;
        border-radius: 14px;
    }

    .bsj-hotel-rules__item {
        grid-template-columns: 22px minmax(0, 1fr);
        gap: 3px 12px;
        min-height: 0;
        padding: 16px 0;
    }

    .bsj-hotel-rules__icon {
        grid-column: 1;
        grid-row: 1 / span 2;
        align-self: start;
        width: 22px;
        height: 22px;
        margin-top: 1px;
    }

    .bsj-hotel-rules__icon svg {
        width: 18px;
        height: 18px;
    }

    .bsj-hotel-rules__label,
    .bsj-hotel-rules__value {
        grid-column: 2;
        font-size: 14px;
    }

    .bsj-hotel-rules__label {
        grid-row: 1;
    }

    .bsj-hotel-rules__value {
        grid-row: 2;
        color: #5e6b78;
        font-size: 13px;
        font-weight: 500;
    }

    .bsj-hotel-rules--v2 .bsj-hotel-rules__list {
        gap: 12px;
        margin-right: -16px;
        padding: 2px 16px 12px 0;
    }

    .bsj-hotel-rules--v2 .bsj-hotel-rules__item {
        display: flex;
        flex-basis: clamp(148px, 44vw, 172px);
        gap: 5px;
        padding: 17px;
        border-radius: 14px;
    }

    .bsj-hotel-rules--v2 .bsj-hotel-rules__icon {
        grid-column: auto;
        grid-row: auto;
        align-self: auto;
        width: 28px;
        height: 28px;
        margin-top: 0;
        margin-bottom: auto;
    }

    .bsj-hotel-rules--v2 .bsj-hotel-rules__icon svg {
        width: 21px;
        height: 21px;
    }

    .bsj-hotel-rules--v2 .bsj-hotel-rules__label,
    .bsj-hotel-rules--v2 .bsj-hotel-rules__value {
        grid-column: auto;
        font-size: 13px;
    }

    .bsj-hotel-rules--v2 .bsj-hotel-rules__label {
        grid-row: auto;
        font-size: 14px;
    }

    .bsj-hotel-rules--v2 .bsj-hotel-rules__value {
        grid-row: auto;
    }
}

@media (min-width: 992px) {
    .bsj-hotel-rules__title {
        font-size: clamp(21px, 1.55vw, 23px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bsj-hotel-rules {
        scroll-behavior: auto;
    }
}
