/*
 * rm/showcase (Product demand / supply). Panel and title/text values from staging Product
 * post-1032.css and getComputedStyle at 1440 / 390: section padding 10px; panel #F1F0F9, radius
 * 40px, padding 100px 20px; title Helvetica Neue 60/1.05; text 20/300/1.5.
 * Staging's accordion and image are replaced (2026-11-26, Spyros: concept "4b" paytable, no image,
 * refinement "B. One surface"): the title and text sit above one white surface (radius 32px), split
 * by a dashed rule into the paytable (rows of 64px with a 40px symbol square and a dark payline bar
 * with arrows in the logo blurple that slides to the chosen row) and the chosen item (its symbol 56px on blurple, the
 * optional line label, title 30px, text 18px). The item side keeps every item in one grid cell, so
 * it is as tall as the longest and nothing moves. Stacked (<=900) the item follows the rows under a
 * horizontal dashed rule. Without JS (no .is-ready) the item side lists every item and there is no bar.
 * Media (2026-11-27, Spyros, concept A): with an image or video the title and text share a row
 * with it (40/60; the supply slot puts the media on the left), the media framed as a white screen
 * (radius 20px, soft shadow); stacked at <=900 with the media under the text.
 * rm/ai-overview (blocks/ai-overview.php) reuses the panel, the row and the media, with a tag
 * pill and up to three check points under the text.
 */

.rm-showcase {
    max-width: var(--rm-container);
    margin: 0 auto;
    padding: 10px;
    overflow-x: clip;
}

.rm-showcase__panel {
    display: flex;
    flex-direction: column;
    gap: 48px;
    padding: 100px 30px;
    border-radius: 40px;
    background: var(--rm-lavender);
}

.rm-showcase__head {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 720px;
}

.rm-showcase__title {
    margin: 0;
    font-family: var(--rm-font-helvetica);
    font-size: var(--rm-type-h60);
    font-weight: 400;
    line-height: 1.05;
    color: var(--rm-black);
}

.rm-showcase__text {
    margin: 0;
    font-size: var(--rm-type-20l);
    font-weight: 300;
    line-height: 1.5;
}

/* Title and text beside the image or video */
.rm-showcase__top {
    display: grid;
    grid-template-columns: minmax(0, 40fr) minmax(0, 60fr);
    align-items: center;
    gap: 60px;
}

.rm-showcase__top--left {
    grid-template-columns: minmax(0, 60fr) minmax(0, 40fr);
}

.rm-showcase__top--left .rm-showcase__head {
    order: 2;
}

.rm-showcase__top--text {
    grid-template-columns: minmax(0, 1fr);
}

.rm-showcase__media {
    min-width: 0;
    overflow: hidden;
    border-radius: 20px;
    background: var(--rm-white);
    box-shadow: 0 30px 60px -24px rgba(41, 41, 41, .28), 0 0 0 1px rgba(41, 41, 41, .06);
}

.rm-showcase__video {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.rm-showcase__tag {
    align-self: flex-start;
    margin: 0;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--rm-white);
    color: var(--rm-blurple);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.rm-showcase__points {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.rm-showcase__points li {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    font-size: 18px;
    line-height: 1.4;
}

.rm-showcase__check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--rm-red);
    color: var(--rm-white);
}

.rm-showcase__check svg {
    width: 14px;
    height: 14px;
}

/* One surface: rows | chosen item */
.rm-showcase__surface {
    display: grid;
    grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
    overflow: hidden;
    border-radius: 32px;
    background: var(--rm-white);
}

.rm-pay {
    padding: 20px;
    border-right: 2px dashed var(--rm-grey-medium);
}

.rm-pay__head {
    margin: 0 0 10px;
    padding: 4px 14px 12px;
    border-bottom: 2px solid var(--rm-grey-medium);
    color: var(--rm-grey);
    font-size: 15px;
    font-weight: 400;
}

.rm-pay__list {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rm-pay__bar {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 64px;
    border-radius: 16px;
    background: var(--rm-black);
    transition: transform .45s cubic-bezier(.3, .7, .3, 1.12), height .45s cubic-bezier(.3, .7, .3, 1.12);
}

.rm-pay__bar::before,
.rm-pay__bar::after {
    content: "";
    position: absolute;
    top: 50%;
    margin-top: -8px;
    border: 8px solid transparent;
}

.rm-pay__bar::before {
    left: -18px;
    border-left-color: var(--rm-blurple);
}

.rm-pay__bar::after {
    right: -18px;
    border-right-color: var(--rm-blurple);
}

.rm-showcase:not(.is-ready) .rm-pay__bar {
    display: none;
}

.rm-pay__row {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    width: 100%;
    min-height: 64px;
    padding: 8px 16px 8px 12px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--rm-black);
    font: inherit;
    font-size: 18px;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
    transition: color .25s, background-color .25s;
}

.rm-showcase:not(.is-ready) .rm-pay__row {
    cursor: default;
}

.rm-showcase.is-ready .rm-pay__row:not([aria-selected="true"]):hover {
    background: var(--rm-lavender);
}

.rm-pay__row:focus-visible {
    outline: 2px solid var(--rm-blurple);
    outline-offset: 2px;
}

.rm-pay__row[aria-selected="true"] {
    color: var(--rm-white);
}

.rm-pay__icon,
.rm-showcase__symbol {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.rm-pay__icon {
    width: 40px;
    height: 40px;
    background: var(--rm-lavender);
    color: var(--rm-black);
    transition: background-color .25s, color .25s;
}

.rm-pay__icon svg {
    width: 22px;
    height: 22px;
}

.rm-pay__num {
    font-size: 16px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.rm-pay__row[aria-selected="true"] .rm-pay__icon {
    background: var(--rm-blurple);
    color: var(--rm-white);
}

/* The chosen item */
.rm-showcase__card {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 48px 52px;
}

.rm-showcase.is-ready .rm-showcase__card {
    display: grid;
    align-content: center;
}

.rm-showcase.is-ready .rm-showcase__item {
    grid-area: 1 / 1;
    visibility: hidden;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .25s, transform .35s cubic-bezier(.23, 1, .32, 1), visibility 0s .25s;
}

.rm-showcase.is-ready .rm-showcase__item.is-active {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity .3s .05s, transform .45s cubic-bezier(.23, 1, .32, 1) .05s, visibility 0s;
}

.rm-showcase__item:focus-visible {
    outline: 2px solid var(--rm-blurple);
    outline-offset: 8px;
    border-radius: 8px;
}

.rm-showcase__symbol {
    width: 56px;
    height: 56px;
    margin-bottom: 22px;
    border-radius: 16px;
    background: var(--rm-blurple);
    color: var(--rm-white);
}

.rm-showcase__symbol svg {
    width: 28px;
    height: 28px;
}

.rm-showcase__symbol .rm-pay__num {
    font-size: 22px;
}

.rm-showcase__line {
    margin: 0 0 6px;
    color: var(--rm-blurple);
    font-size: 15px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.rm-showcase__item-title {
    margin: 0 0 14px;
    font-family: var(--rm-font);
    font-size: 30px;
    font-weight: 400;
    line-height: 1.15;
    color: var(--rm-black);
}

.rm-showcase__item-text {
    max-width: 52ch;
    margin: 0;
    color: var(--rm-grey);
    font-size: 18px;
    font-weight: 300;
    line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
    .rm-pay__bar,
    .rm-pay__row,
    .rm-pay__icon,
    .rm-showcase.is-ready .rm-showcase__item,
    .rm-showcase.is-ready .rm-showcase__item.is-active {
        transition: none;
    }
}

@media (max-width: 900px) {
    .rm-showcase__panel {
        gap: 32px;
    }

    .rm-showcase__top,
    .rm-showcase__top--left {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .rm-showcase__top--left .rm-showcase__head {
        order: 0;
    }

    .rm-showcase__surface {
        grid-template-columns: minmax(0, 1fr);
    }

    .rm-pay {
        border-right: 0;
        border-bottom: 2px dashed var(--rm-grey-medium);
    }

    .rm-showcase__card {
        padding: 32px 28px 36px;
    }
}

@media (max-width: 767px) {
    .rm-showcase__panel {
        padding: 72px 20px;
    }

    .rm-showcase__surface {
        border-radius: 26px;
    }

    .rm-pay {
        padding: 14px;
    }

    .rm-pay__row {
        gap: 12px;
        min-height: 56px;
        padding: 6px 12px 6px 8px;
        font-size: 16px;
    }

    .rm-pay__icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .rm-pay__icon svg {
        width: 19px;
        height: 19px;
    }

    .rm-pay__bar::before {
        left: -14px;
    }

    .rm-pay__bar::after {
        right: -14px;
    }

    .rm-showcase__card {
        padding: 26px 22px 30px;
    }

    .rm-showcase__symbol {
        width: 48px;
        height: 48px;
        margin-bottom: 18px;
    }

    .rm-showcase__item-title {
        font-size: 24px;
    }

    .rm-showcase__item-text {
        font-size: 16px;
    }

    .rm-showcase__media {
        border-radius: 14px;
    }

    .rm-showcase__points li {
        font-size: 16px;
    }
}

/* Block editor preview (no showcase.js there): show the first item only, as the page does before a click */
.acf-block-preview .rm-showcase:not(.is-ready) .rm-showcase__item:not(:first-child) {
    display: none;
}
