/* RealPic 组件样式 */

/* 注册./fonts/中存在的字体 */
/* 平方韶华体 */
@font-face {
    font-family: 'pingfangshaohua';
    src: url('./../realpic/fonts/pingfangshaohua.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.realpic-mount-point { box-sizing: border-box; }

.realpic-root {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1200px;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.realpic-viewport {
    position: relative;
    transform-style: preserve-3d;
    transform: translateZ(0);
    transition: transform 0.2s ease;
}

.realpic-flipper {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.realpic-root.realpic-flipped .realpic-flipper {
    transform: rotateY(180deg);
}

.realpic-front, .realpic-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    top: 0;
    left: 0;
    overflow: visible;
    border-radius: 4px;
}

.realpic-front { z-index: 2; }
.realpic-back { transform: rotateY(180deg); }

.realpic-frame {
    position: absolute;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    overflow: hidden;
}

.realpic-content-area {
    position: absolute;
    overflow: hidden;
    display: flex;
}

/* position 样式 */
.realpic-content-area[data-position="center"] { align-items: center; justify-content: center; }
.realpic-content-area[data-position="top"] { align-items: flex-start; justify-content: center; }
.realpic-content-area[data-position="bottom"] { align-items: flex-end; justify-content: center; }
.realpic-content-area[data-position="left"] { align-items: center; justify-content: flex-start; }
.realpic-content-area[data-position="right"] { align-items: center; justify-content: flex-end; }

/* fit 样式 */
.realpic-content-area[data-fit="contain"] img { object-fit: contain; }
.realpic-content-area[data-fit="cover"] img { object-fit: cover; }
.realpic-content-area[data-fit="stretch"] img { object-fit: fill; }

.realpic-content-area img {
    width: 100%;
    height: 100%;
    display: block;
}

.realpic-content-area .realpic-text-content {
    width: 100%;
    height: 100%;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: inherit;
    line-height: 1.6;
}

.realpic-hidden {
    visibility: hidden;
    opacity: 0;
}

/* @media (max-width: 768px) {
    .realpic-root { perspective: 800px; }
    .realpic-flipper { transition-duration: 0.5s; }
} */
