/* Stack block — background theme overrides and embed support. */

/* Dark / brand mode — invert text colours for stack items.
   Overrides the hardcoded gray-900 / prose-gray classes
   set inside lcms_render_stack_item(). */
.block-stack--dark .font-heading,
.block-stack--brand .font-heading {
    color: #fff;
}

.block-stack--dark .prose,
.block-stack--brand .prose {
    color: rgba(255, 255, 255, 0.9);
}

.block-stack--dark .text-gray-500,
.block-stack--brand .text-gray-500 {
    color: rgba(255, 255, 255, 0.65);
}

.block-stack--dark .text-gray-400,
.block-stack--brand .text-gray-400 {
    color: rgba(255, 255, 255, 0.5);
}

/* HTML embed — responsive iframe wrapper */
.stack__html iframe {
    max-width: 100%;
    border-radius: var(--border-radius, 8px);
}

.stack__html iframe:only-child {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
}

/* Video facade — click-to-load embed (Vimeo/YouTube). Keeps the
   third-party iframe (its JS + cookies) out of the page until the
   visitor clicks play. Swap handled by VideoFacade in theme.js; the
   resulting iframe is styled by the :only-child rule above. */
.lcms-video-facade {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    cursor: pointer;
    background: #000;
    border: 0;
    padding: 0;
}

.lcms-video-facade__thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lcms-video-facade__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    border: 0;
    border-radius: var(--border-radius, 8px);
    background: rgba(0, 0, 0, 0.75);
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.lcms-video-facade__play::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-40%, -50%);
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent #fff;
}

.lcms-video-facade:hover .lcms-video-facade__play,
.lcms-video-facade:focus-within .lcms-video-facade__play {
    background: var(--color-brand-primary, #d00);
    transform: translate(-50%, -50%) scale(1.08);
}
