/* A second layout using the same coloured, botanical and icon-accented cards. */
body.wisekal-loop-design-masonry :is(.is-style-bwp-timeline > .wp-block-post-template, .wisekal-story-timeline)::before,
body.wisekal-loop-design-masonry :is(.is-style-bwp-timeline > .wp-block-post-template > li, .wisekal-story-row)::before,
body.wisekal-loop-design-masonry :is(.is-style-bwp-timeline > .wp-block-post-template > li, .wisekal-story-row)::after {
    display: none !important;
}
body.wisekal-loop-design-masonry :is(.is-style-bwp-timeline > .wp-block-post-template > li, .wisekal-story-row) {
    min-height: 0;
}
body.wisekal-loop-design-masonry :is(.is-style-bwp-timeline .bwp-format-gallery, .wisekal-story-row .bwp-format-gallery) {
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
}
body.wisekal-loop-design-masonry :is(.is-style-bwp-timeline, .wisekal-story-timeline) .bwp-gallery-open {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}
body.wisekal-loop-design-masonry :is(.is-style-bwp-timeline, .wisekal-story-timeline) .bwp-gallery-open::after {
    content: '▧  Gallery';
    position: absolute;
    bottom: 14px;
    right: 14px;
    padding: 9px 13px;
    background: #254a38;
    color: #fffdf7;
    border: 1px solid #fffdf7b3;
    border-radius: 5px;
    font: 600 14px/1.4 var(--wp--preset--font-family--system-sans, sans-serif);
    box-shadow: 0 2px 7px #172c2233;
    pointer-events: none;
}
body.wisekal-loop-design-masonry :is(.is-style-bwp-timeline, .wisekal-story-timeline) .bwp-gallery-open:hover::after {
    background: #376348;
}
/* Match the existing gallery corner badge while retaining the central play icon. */
body.wisekal-loop-design-masonry .bwp-video-cover .bwp-video-cover-label {
    position: absolute;
    top: auto;
    left: auto;
    right: 14px;
    bottom: 14px;
    transform: none;
    display: block;
    padding: 9px 13px;
    background: #254a38;
    color: #fffdf7;
    border: 1px solid #fffdf7b3;
    border-radius: 5px;
    font: 600 14px/1.4 var(--wp--preset--font-family--system-sans, sans-serif);
    box-shadow: 0 2px 7px #172c2233;
    pointer-events: none;
}
body.wisekal-loop-design-masonry .bwp-video-cover .bwp-video-cover-label::before {
    content: '▶';
    margin-right: 6px;
}
body.wisekal-loop-design-masonry .bwp-video-cover:hover .bwp-video-cover-label {
    background: #376348;
}
body.wisekal-loop-design-masonry :is(.is-style-bwp-timeline, .wisekal-story-timeline) .bwp-gallery-open:focus-visible {
    outline: 3px solid #b17a14;
    outline-offset: -4px;
}
body.wisekal-loop-design-masonry :is(.bwp-format-gallery, .bwp-format-video) img {
    height: 100% !important;
    object-fit: cover;
}
body.wisekal-loop-design-masonry :is(.is-style-bwp-timeline .bwp-format-video, .wisekal-story-row .bwp-format-video) {
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
}
body.wisekal-loop-design-masonry :is(.is-style-bwp-timeline, .wisekal-story-timeline) .bwp-format-video .bwp-video-cover {
    width: 100%;
    height: 100% !important;
}
body.wisekal-loop-design-masonry :is(.is-style-bwp-timeline, .wisekal-story-timeline) :is(.bwp-format-gallery, .bwp-format-video) img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
}
/* Optional centred timeline dates become normal stamps within their own cards. */
body.wisekal-loop-design-masonry :is(.is-style-bwp-timeline > .wp-block-post-template > li, .wisekal-story-row) > :is(.wisekal-loop-date, .wisekal-author-feed-date) {
    position: static;
    transform: none;
    align-self: flex-start;
    margin: 0 0 12px !important;
    padding: 0;
    background: transparent !important;
    white-space: normal;
}
@media (min-width: 701px) {
    body.wisekal-loop-design-masonry :is(.is-style-bwp-timeline > .wp-block-post-template > li, .wisekal-story-row) {
        width: calc(50% - 12px);
    }
    body.wisekal-loop-design-masonry :is(.is-style-bwp-timeline > .wp-block-post-template, .wisekal-story-timeline).is-tight-timeline > :is(li, .wisekal-story-row),
    body.wisekal-loop-design-masonry :is(.is-style-bwp-timeline > .wp-block-post-template, .wisekal-story-timeline).is-tight-timeline > :is(li, .wisekal-story-row):nth-child(even) {
        left: var(--masonry-left);
        right: auto;
    }
}
@media (max-width: 700px) {
    body.wisekal-loop-design-masonry :is(.is-style-bwp-timeline > .wp-block-post-template, .wisekal-story-timeline) {
        padding-left: 0 !important;
        gap: 24px !important;
    }
}
