/* Custom product layout (inc/custom-product-layout.php): media viewer left, text and booking right; the description's
   „Kaip tai vyksta“ accordion and „Kas įskaičiuota“ card below. Loaded only on those products' pages
   (body.mv-custom-layout), after lesson-configurator.css. */

.mv-custom-layout {
    --mv-cl-ink: #510000;
    --mv-cl-muted: rgba(81, 0, 0, .65);
    --mv-cl-line: rgba(81, 0, 0, .14);
    --mv-cl-sand: #f4f1e6;
    --mv-cl-peach: #ffc2b0; /* Rausva 2, the „Registruotis“ button */
    --mv-cl-yellow: #fde9a8; /* Geltona 1, the menu bar */
    --mv-cl-tint: #ffefe9;
    --mv-cl-white: #fff;
    /* the sticky header (header.css) once scrolled, plus a gap */
    --mv-cl-sticky-top: calc(var(--wp-admin--admin-bar--height, 0px) + 112px);
}

/* ------------------------------------------------------------------ top: media | text */

.mv-cl-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
}

@media (min-width: 922px) {
    .mv-cl-top {
        grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
        column-gap: 56px;
        align-items: start;
    }

    .mv-cl-media {
        position: sticky;
        top: var(--mv-cl-sticky-top);
    }
}

/* lesson-configurator.css makes the summary full width (no gallery column); here it is the right column */
.woocommerce.mv-custom-layout #content .ast-woocommerce-container div.product.mv-lesson-product .mv-cl-top > div.summary,
.woocommerce-js.mv-custom-layout #content .ast-woocommerce-container div.product.mv-lesson-product .mv-cl-top > div.summary {
    clear: none;
    min-width: 0;
}

/* The included list moves out of the price card into „Kas įskaičiuota“ below */
.mv-custom-layout .mv-lesson-summary .mv-lesson-included {
    display: none;
}

/* ------------------------------------------------------------------ media viewer */

.mv-cl-media {
    min-width: 0;
}

.mv-cl-stage {
    position: relative;
}

.mv-cl-track {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    border-radius: 20px;
    background: var(--mv-cl-sand);
}

.mv-cl-track::-webkit-scrollbar {
    display: none;
}

.mv-cl-track:focus-visible {
    outline: 2px solid var(--mv-cl-ink);
    outline-offset: 3px;
}

.mv-cl-slide {
    flex: 0 0 100%;
    margin: 0;
    aspect-ratio: 4 / 5;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.mv-cl-slide > img,
.mv-cl-slide > video {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

/* the story video is 9:16 – show it whole on a darker ground rather than cropping its captions */
.mv-cl-slide.is-video {
    background: #1d1414;
}

.mv-cl-slide.is-video > video {
    object-fit: contain;
}

.mv-cl-nav {
    position: absolute;
    top: 50%;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    padding: 0 0 4px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: var(--mv-cl-ink);
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.mv-cl-nav:hover {
    background: var(--mv-cl-white);
}

.mv-cl-nav:focus-visible {
    outline: 2px solid var(--mv-cl-ink);
    outline-offset: 2px;
}

.mv-cl-nav:disabled {
    opacity: 0;
    pointer-events: none;
}

.mv-cl-prev {
    left: 12px;
}

.mv-cl-next {
    right: 12px;
}

.mv-cl-count {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    color: var(--mv-cl-ink);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    pointer-events: none;
}

.mv-cl-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.mv-cl-thumbs li {
    margin: 0;
}

.mv-cl-thumb {
    position: relative;
    display: block;
    width: 64px;
    height: 64px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--mv-cl-sand);
    cursor: pointer;
    opacity: .7;
}

.mv-cl-thumb:hover,
.mv-cl-thumb.is-active {
    opacity: 1;
}

.mv-cl-thumb.is-active {
    border-color: var(--mv-cl-ink);
}

.mv-cl-thumb:focus-visible {
    outline: 2px solid var(--mv-cl-ink);
    outline-offset: 2px;
}

.mv-cl-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* a small play mark on the video's thumbnail */
.mv-cl-thumb.is-video::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -5px;
    border-style: solid;
    border-width: 8px 0 8px 13px;
    border-color: transparent transparent transparent #fff;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, .5));
}

@media (max-width: 921px) {
    .mv-cl-media {
        /* full bleed on phones and tablets, like a story */
        max-width: 560px;
    }

    .mv-cl-thumbs {
        display: none;
    }
}

@media (max-width: 544px) {
    .mv-cl-nav {
        display: none;
    }
}

/* ------------------------------------------------------------------ description: how it works | included */

.mv-custom-layout .woocommerce-tabs .panel .mv-cl-sections {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
}

@media (min-width: 922px) {
    .mv-custom-layout .woocommerce-tabs .panel .mv-cl-sections {
        grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
        column-gap: 56px;
        align-items: start;
    }
}

.mv-custom-layout .woocommerce-tabs .panel .mv-cl-sections h2 {
    text-transform: none;
}

.mv-custom-layout .mv-cl-sections h2 {
    margin: 0 0 6px;
    color: var(--mv-cl-ink);
    font-family: satoshi, 'Work Sans', sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.mv-custom-layout .mv-cl-sections .mv-cl-lead {
    margin: 0 0 18px;
    color: var(--mv-cl-muted);
    font-size: 16px;
    line-height: 1.5;
}

/* Kaip tai vyksta: a yellow card (the menu bar's colour) with numbered <details>; the first one open */
.mv-cl-how {
    padding: 28px;
    border-radius: 20px;
    background: var(--mv-cl-yellow);
    color: var(--mv-cl-ink);
}

.mv-cl-how .mv-cl-steps {
    margin-bottom: -1px;
}

.mv-cl-how .mv-cl-step:last-child {
    border-bottom: 0;
}

.mv-cl-steps {
    border-top: 1px solid var(--mv-cl-line);
}

.mv-cl-step {
    border-bottom: 1px solid var(--mv-cl-line);
}

.mv-cl-step > summary {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 24px;
    align-items: center;
    column-gap: 8px;
    padding: 16px 0;
    color: var(--mv-cl-ink);
    cursor: pointer;
    list-style: none;
}

.mv-cl-step > summary::-webkit-details-marker {
    display: none;
}

.mv-cl-step > summary:focus-visible {
    outline: 2px solid var(--mv-cl-ink);
    outline-offset: 2px;
    border-radius: 4px;
}

.mv-cl-step-no {
    grid-row: 1 / span 2;
    color: var(--mv-cl-muted);
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.mv-cl-step-when {
    grid-column: 2;
    color: var(--mv-cl-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    line-height: 1.4;
    text-transform: uppercase;
}

.mv-cl-step-title {
    grid-column: 2;
    font-family: satoshi, 'Work Sans', sans-serif;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
}

/* plus / minus */
.mv-cl-step > summary::after {
    content: "";
    grid-column: 3;
    grid-row: 1 / span 2;
    justify-self: end;
    width: 14px;
    height: 14px;
    background:
        linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
        linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat;
    transition: transform .2s ease;
}

.mv-cl-step[open] > summary::after {
    background: linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat;
}

.mv-cl-step-body {
    padding: 0 32px 18px 48px;
    color: var(--mv-cl-ink);
    font-size: 16px;
    line-height: 1.65;
}

.mv-cl-step-body > :last-child {
    margin-bottom: 0;
}

/* Kas įskaičiuota: a pink card (the „Registruotis“ button's colour), two short lists */
.mv-cl-included {
    padding: 28px;
    border-radius: 20px;
    background: var(--mv-cl-peach);
    color: var(--mv-cl-ink);
}

.mv-cl-included-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.mv-custom-layout .mv-cl-included h3 {
    margin: 0 0 10px;
    color: var(--mv-cl-muted);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    line-height: 1.4;
    text-transform: uppercase;
}

.mv-custom-layout .mv-cl-included ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mv-custom-layout .mv-cl-included li {
    position: relative;
    margin: 0 0 8px;
    padding-left: 24px;
    font-size: 15px;
    line-height: 1.5;
}

.mv-custom-layout .mv-cl-included li::before {
    content: "";
    position: absolute;
    top: .45em;
    left: 2px;
    width: 10px;
    height: 6px;
    border-left: 2px solid var(--mv-cl-ink);
    border-bottom: 2px solid var(--mv-cl-ink);
    transform: rotate(-45deg);
}

@media (max-width: 544px) {
    .mv-custom-layout .mv-cl-sections h2 {
        font-size: 22px;
    }

    .mv-cl-how,
    .mv-cl-included {
        padding: 22px 20px;
    }

    .mv-cl-included-cols {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .mv-cl-step-body {
        padding: 0 0 16px 48px;
    }

    .mv-cl-step > summary {
        grid-template-columns: 36px minmax(0, 1fr) 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mv-cl-track {
        scroll-behavior: auto;
    }
}

/* Launch price note under the price (inc/launch-price.php) */
.mv-custom-layout .summary .mv-launch-note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: -4px 0 18px;
    color: var(--mv-cl-ink);
    font-size: 15px;
    line-height: 1.45;
}

.mv-custom-layout .summary .mv-launch-left {
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--mv-cl-peach);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
