/* audace/production — front + editor styles */

.audace-production {
    position: relative;
    display: block;
    box-sizing: border-box;
    background: var(--wp--preset--color--gray-25, #bfbfbf);
    color: var(--wp--preset--color--contrast, #000);
    min-height: var(--audace-viewport-h, 70vh);
}

.wp-block-audace-productions-showcase.is-style-slide.audace-production {
    height: var(--audace-viewport-h, 70vh);
    min-height: 0;
}

.audace-production.is-empty {
    display: block;
    opacity: .6;
    font-style: italic;
    padding: 1rem;
}

.audace-production__stage {
    position: relative;
    height: 100%;
    min-height: 0;
    isolation: isolate;
    overflow: hidden;
}

.audace-production__slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, var(--audace-prod-left, 1fr)) minmax(0, var(--audace-prod-right, 1fr));
    grid-template-rows: 1fr auto;
    gap: 0;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.4s cubic-bezier(.4, 0, .2, 1), visibility 0s linear 1.4s;
    will-change: opacity;
    background: var(--wp--preset--color--gray-25, #bfbfbf);
    z-index: 0;
    pointer-events: none;
}

.audace-production__slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 1.4s cubic-bezier(.4, 0, .2, 1), visibility 0s linear 0s;
    z-index: 2;
    pointer-events: auto;
}

.audace-production__media {
    position: relative;
    overflow: hidden;
    min-height: 0;
    padding: var(--audace-prod-left-pad-y, 0) var(--audace-prod-left-pad-x, 0);
    box-sizing: border-box;
    display: flex;
}

.audace-production__figure {
    margin: 0;
    width: 100%;
    height: auto;
}

.audace-production__figure img,
.audace-production__img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.audace-production__body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: var(--audace-prod-right-pad-y, 2rem) var(--audace-prod-right-pad-x, 2.5rem);
    box-sizing: border-box;
    min-width: 0;
    height: 100%;
}

.audace-production__title {
    margin: 0 0 1rem;
    font-weight: 800;
    line-height: 1;
    font-size: 3rem;
}

.audace-production__content {
    margin: 0 0 1.5rem;
    line-height: 1.3;
}
.audace-production__content > :first-child { margin-top: 0; }
.audace-production__content > :last-child  { margin-bottom: 0; }

.audace-production__footer {
    grid-column: 1 / -1;
    width: 100%;
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 4rem;
    padding: var(--audace-prod-right-pad-y, 2rem) var(--audace-prod-right-pad-x, 2.5rem);
    box-sizing: border-box;
}

.audace-production__download {
    display: inline-flex;
    align-items: end;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--wp--preset--color--contrast, #000);
    font-weight: 700;
    transition: color .2s ease;
}

.audace-production__download:hover,
.audace-production__download:focus-visible {
    opacity: 0.3;
    outline: none;
}

.audace-production__download img {
    display: block;
    width: 2rem;
    height: auto;
}

.audace-production__arrows {
    display: flex;
    align-items: end;
    gap: 1rem;
}

.audace-production__arrow {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 0.25em 0.5em;
    font: inherit;
    cursor: pointer;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity .2s ease, transform .2s ease;
}

.audace-production__arrow img {
    display: block;
    width: 3rem;
    height: auto;
}

.audace-production__arrow:hover,
.audace-production__arrow:focus-visible {
    outline: none;
    transform: translateY(-2px);
}

.audace-production__arrow[disabled] {
    opacity: .25;
    cursor: not-allowed;
    transform: none;
}

/* Mobile */
@media (max-width: 782px) {
    .audace-production {
        padding-bottom: 0;
    }
    .audace-production__slide {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    .audace-production__media {
        height: 50vh;
        justify-self: center;
    }
    .audace-production__figure {
        max-height: 45vh;
        width: auto;
        justify-self: center;
    }
    .audace-production__figure img {
        display: block;
        width: auto;
        height: 45vh;
    }
    .audace-production__body {
        flex: 1 1 auto;
        align-items: center;
        text-align: center;
        padding: 1.5rem 1.25rem;
        height: auto;
    }
    .audace-production__title {
        font-size: 2.5rem;
    }
    .audace-production__excerpt {
        font-size: 0.9375rem;
    }
    .audace-production__footer {
        align-items: end;
        margin-top: auto;
    }
    .audace-production__download {
        flex-direction: row;
        gap: 0.5rem;
    }
    .audace-production__arrow img {
        width: 2rem;
    }
    .audace-production__slide {
        position: static;
        transition: none;
    }
    .audace-production__slide:not(.is-active) {
        display: none;
    }
    .audace-production__stage {
        overflow: visible;
    }
}

/* Editor preview */
.editor-styles-wrapper .wp-block-audace-productions-showcase .audace-production__slide {
    position: static;
    transition: none;
}
.editor-styles-wrapper .wp-block-audace-productions-showcase .audace-production__slide:not(.is-active) {
    display: none;
}
.editor-styles-wrapper .wp-block-audace-productions-showcase .audace-production__stage {
    min-height: auto;
    overflow: visible;
}
.editor-styles-wrapper .wp-block-audace-productions-showcase {
    min-height: 420px;
}
