/**
 * Elementor PDF Viewer - 前端样式
 */

/* 容器 */
.epv-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* iframe 预览 */
.epv-iframe {
    width: 100%;
    height: 600px;
    border: none;
    display: block;
}

/* 占位提示 */
.epv-placeholder {
    padding: 40px 20px;
    text-align: center;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    color: #666;
    font-size: 16px;
    border-radius: 4px;
}

/* 按钮 */
.epv-button-wrapper {
    text-align: center;
    padding: 20px;
}

.epv-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #2271b1;
    color: #ffffff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.epv-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.epv-button-icon {
    margin-right: 6px;
}

/* 文件名 */
.epv-filename {
    margin-top: 8px;
    font-size: 14px;
    color: #333;
    word-break: break-all;
}

/* 缩略图模式 */
.epv-thumbnail-wrapper {
    position: relative;
    display: inline-block;
    text-align: center;
    width: 100%;
}

.epv-thumbnail-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

.epv-thumbnail-default {
    width: 120px;
    height: 150px;
    margin: 0 auto;
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: #999;
}

.epv-thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 4px;
}

.epv-thumbnail-wrapper:hover .epv-thumbnail-overlay {
    opacity: 1;
}

/* 弹窗 */
.epv-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: epvFadeIn 0.3s ease;
}

.epv-modal.epv-active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.epv-modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: epvSlideIn 0.3s ease;
}

.epv-modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.epv-modal-close:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

.epv-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 动画 */
@keyframes epvFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes epvSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .epv-iframe {
        height: 400px;
    }

    .epv-modal-content {
        width: 95%;
        height: 80%;
    }

    .epv-button {
        font-size: 14px;
        padding: 10px 20px;
    }
}
