.gfc-ready > .gfc-faces {
    display: grid;
    perspective: 1000px;
    --gfc-css-ready: 1;
}
.gfc-ready > .gfc-faces > * {
    grid-area: 1 / 1;
    min-width: 0;
    margin-block: 0;
    backface-visibility: hidden;
    transition: transform .45s ease;
}
.gfc-ready {
    --gfc-front: rotateY(-180deg);
    --gfc-back: rotateY(180deg);
}
.gfc-ready[data-flip-direction="right"] { --gfc-front: rotateY(180deg); --gfc-back: rotateY(-180deg); }
.gfc-ready[data-flip-direction="up"] { --gfc-front: rotateX(180deg); --gfc-back: rotateX(-180deg); }
.gfc-ready[data-flip-direction="down"] { --gfc-front: rotateX(-180deg); --gfc-back: rotateX(180deg); }
.gfc-ready > .gfc-faces > :last-child { transform: var(--gfc-back); }
.gfc-flipped > .gfc-faces > :first-child { transform: var(--gfc-front); }
.gfc-flipped > .gfc-faces > :last-child { transform: none; }
.gfc-ready[data-flip-direction="fade"] {
    --gfc-front: none;
    --gfc-back: none;
}
.gfc-ready[data-flip-direction="fade"] > .gfc-faces > * {
    transition-property: opacity;
}
/* Add the two weighted faces in a transparent, isolated layer before compositing onto the page. */
.gfc-ready[data-flip-direction="fade"] > .gfc-faces {
    isolation: isolate;
}
.gfc-ready[data-flip-direction="fade"] > .gfc-faces > :last-child {
    mix-blend-mode: plus-lighter;
    z-index: 1;
}
.gfc-ready[data-flip-direction="fade"] > .gfc-faces > [inert] {
    opacity: 0;
    pointer-events: none;
}
.gfc-ready:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
    .gfc-ready > .gfc-faces > * { transition: none; }
}
.wp-block-group-flip-card[data-fit-width] {
    box-sizing: border-box;
    inline-size: fit-content;
    max-inline-size: 100%;
    flex-grow: 0;
}
.wp-block-group-flip-card[data-fit-height] {
    block-size: fit-content;
}
.gfc-ready[data-fit-height] > .gfc-faces {
    position: relative;
}
.gfc-ready[data-fit-height]:not(.gfc-flipped) > .gfc-faces > :last-child,
.gfc-ready.gfc-flipped[data-fit-height] > .gfc-faces > :first-child {
    position: absolute;
    inset: 0;
    overflow: clip;
    pointer-events: none;
}
.wp-block-group-flip-card[data-gfc-overlay] {
    position: relative;
    isolation: isolate;
}
.wp-block-group-flip-card[data-gfc-overlay]::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background-color: var(--gfc-overlay-color);
    opacity: var(--gfc-overlay-opacity);
    pointer-events: none;
}
.gfc-editor-faces {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: 1fr;
}
.gfc-editor-faces > [data-type="core/group"] {
    box-sizing: border-box;
    align-self: stretch;
    justify-self: stretch;
    min-width: 0;
    margin-block: 0;
}
.wp-block-group-flip-card[data-back-align="start"] { --gfc-back-align: start; }
.wp-block-group-flip-card[data-back-align="center"] { --gfc-back-align: center; }
.wp-block-group-flip-card[data-back-align="end"] { --gfc-back-align: end; }
.wp-block-group-flip-card[data-back-align] > :is(.gfc-faces, .gfc-editor-faces) > :nth-child(2) {
    align-content: var(--gfc-back-align);
}
.wp-block-group-flip-card[data-back-align] > :is(.gfc-faces, .gfc-editor-faces) > :nth-child(2).is-layout-flex:not(.is-vertical) {
    align-items: var(--gfc-back-align);
}
.wp-block-group-flip-card[data-back-align] > :is(.gfc-faces, .gfc-editor-faces) > :nth-child(2).is-layout-flex.is-vertical {
    justify-content: var(--gfc-back-align);
}

.gfc-ready:not(.gfc-interactive) > .gfc-faces > * { transition: none; }
.gfc-ready:not(.gfc-interactive) > .gfc-faces > :last-child { visibility: hidden; }
.gfc-editor-faces { grid-auto-rows: auto; }
.wp-block-group-flip-card[data-back-align] > :is(.gfc-editor-faces, .gfc-faces) > :nth-child(2):not(.is-layout-flex):not(.is-layout-grid) {
    display: flex;
    flex-direction: column;
    justify-content: var(--gfc-back-align);
}

.gfc-editor-faces [data-type="core/group"][style*="--gfc-editor-front-height"] {
    box-sizing: border-box;
    min-height: var(--gfc-editor-front-height);
}
/* The face keeps its background color and native positioning. Only the image is composited. */
.wp-block-group-flip-card[data-gfc-front-image] > :is(.gfc-faces, .gfc-editor-faces) > :first-child,
.wp-block-group-flip-card[data-gfc-back-image] > :is(.gfc-faces, .gfc-editor-faces) > :nth-child(2) {
    position: relative;
    isolation: isolate;
    background-size: 0 0 !important;
}
.wp-block-group-flip-card[data-gfc-front-image] > :is(.gfc-faces, .gfc-editor-faces) > :first-child::before,
.wp-block-group-flip-card[data-gfc-back-image] > :is(.gfc-faces, .gfc-editor-faces) > :nth-child(2)::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    pointer-events: none;
    background-image: inherit;
    background-position: inherit;
    background-repeat: inherit;
    background-attachment: inherit;
    background-size: var(--gfc-native-image-size, cover);
    opacity: var(--gfc-image-opacity);
    filter: brightness(var(--gfc-image-brightness));
}

.wp-block-group-flip-card[data-gfc-front-image] > :is(.gfc-faces, .gfc-editor-faces) > :first-child::before {
    background-size: var(--gfc-front-image-size, cover);
    opacity: var(--gfc-front-image-opacity);
    filter: brightness(var(--gfc-front-image-brightness));
}

/* Opt-in layout for a Gutenberg Grid group containing cards. */
.wp-block-group.flip-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
@media (max-width: 767px) {
    .wp-block-group.flip-card-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}
