/**
 * 文章海报生成器 - Canvas 版样式
 * 移植自 zaxu 主题
 */

/* ========== 弹窗容器（移植自 zaxu 主题） ========== */
.pp-poster-modal {
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    transition: visibility 0.3s;
}

.pp-poster-modal.opened {
    visibility: visible;
}

/* 确保弹窗内容在 PJAX 切换时被清理 */
.pp-poster-modal:not(.opened) .pp-poster-content {
    pointer-events: none;
}

/* ========== 遮罩层（移植自 zaxu 主题） ========== */
.pp-poster-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(10px);
}

.pp-poster-modal.opened .pp-poster-overlay {
    opacity: 1;
}

/* ========== 弹窗内容（移植自 zaxu 主题） ========== */
.pp-poster-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-overflow-scrolling: touch; /* 移动端流畅滚动 */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    
}

.pp-poster-modal.opened .pp-poster-content {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* 移动端优化滚动 */
@media (max-width: 768px) {
    .pp-poster-content {
        width: 85%;
        max-height: 95vh;
    }

    /* 二维码弹窗 */
    #pp-qrcode-modal .pp-poster-content{
        width: min-content;
    }
}

/* ========== 关闭按钮（移植自 zaxu 主题） ========== */
.pp-poster-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    padding: 0;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    font-size: 23px;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}
.pp-poster-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* ========== 加载状态（移植自 zaxu 主题） ========== */
.pp-poster-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
