/* Our Product steps: a side-scrolling carousel of large screenshots, each with its text on a
   floating panel. Arrows and counter come from js/productCarouselLayout.js. Remove both links
   in product.html to fall back to the plain stacked layout. */

.our-product-main {
    max-width: min(1240px, calc(100vw - 3rem)) !important;
    width: 100%;
}

/* The strip: bottom padding gives card shadows room, and the sides fade so nothing ends in a hard edge */
.our-product-features {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch;
    gap: 1.15rem !important;
    padding: 0.5rem 1.25rem 4.75rem;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 1.25rem, #000 calc(100% - 1.25rem), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 1.25rem, #000 calc(100% - 1.25rem), transparent 100%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.our-product-features::-webkit-scrollbar {
    display: none;
}
.our-product-features > .our-product-reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}
.our-product-features > article {
    flex: 0 0 min(84%, 980px);
    display: flex;
    scroll-snap-align: center;
}
.our-product-feature-or {
    flex: 0 0 auto;
    width: auto !important;
    writing-mode: vertical-rl;
    justify-content: center;
}

/* Screenshot fills most of the card; the text panel overlaps one corner, swapping sides each step */
.our-product-features > article > .our-product-feature-layer-inner {
    flex: 1;
    display: flex !important;
    align-items: flex-start !important;
    position: relative;
    box-sizing: border-box;
    padding: clamp(1.35rem, 3vw, 2rem) !important;
    padding-bottom: clamp(3.5rem, 7vw, 5.5rem) !important;
}
.our-product-feature-media {
    width: 78%;
    margin-left: auto !important;
}
.our-product-features > article:nth-of-type(even) .our-product-feature-media {
    margin-left: 0 !important;
    margin-right: auto !important;
}
.our-product-feature-copy {
    position: absolute;
    left: clamp(1.35rem, 3vw, 2rem);
    bottom: clamp(1.35rem, 3vw, 2rem);
    z-index: 2;
    width: min(42%, 25rem);
    box-sizing: border-box;
    padding: 1.4rem 1.6rem;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.our-product-features > article:nth-of-type(even) .our-product-feature-copy {
    left: auto;
    right: clamp(1.35rem, 3vw, 2rem);
}
.our-product-feature-step {
    position: static !important;
    margin: 0 0 0.5rem !important;
}

/* Previous, next and position */
.product-carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin: -3.25rem 0 1.5rem;
    position: relative;
}
.product-carousel-controls button {
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    background: #0a55c4;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: filter 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}
.product-carousel-controls button:hover:not(:disabled) {
    filter: brightness(1.08);
}
.product-carousel-controls button:active:not(:disabled) {
    transform: scale(0.95);
}
.product-carousel-controls button:disabled {
    opacity: 0.4;
    cursor: default;
}
.product-carousel-controls button:focus-visible {
    outline: 3px solid rgba(10, 85, 196, 0.4);
    outline-offset: 3px;
}
.product-carousel-position {
    min-width: 4rem;
    text-align: center;
    font: 700 0.95rem var(--font-ui);
    font-variant-numeric: tabular-nums;
    color: rgb(10, 61, 145);
}

/* Phones and small tablets: screenshot on top, text panel below it, no overlap */
@media (max-width: 900px) {
    .our-product-main {
        max-width: 100% !important;
    }
    .our-product-features > article {
        flex-basis: 88%;
    }
    .our-product-features > article > .our-product-feature-layer-inner {
        flex-direction: column;
        padding-bottom: clamp(1.35rem, 3vw, 2rem) !important;
    }
    .our-product-feature-media,
    .our-product-features > article:nth-of-type(even) .our-product-feature-media {
        width: 100%;
        margin: 0 !important;
    }
    .our-product-feature-copy {
        position: static;
        width: 100%;
        margin-top: 1rem;
        padding: 1.1rem 1.2rem;
    }
}

/* Pause / play for the auto-advancing steps: smaller and quieter than the arrows */
.product-carousel-controls .product-carousel-autoplay {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.72rem;
    letter-spacing: -0.12em;
    color: #0a55c4;
    background: #fff;
    border: 1px solid rgba(10, 85, 196, 0.35);
    box-shadow: none;
}
