/* WIA Preview Viewer Modal */
.wia-preview-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 99999;
    backdrop-filter: blur(8px);
}
.wia-preview-modal.is-open { display: flex; flex-direction: column; }

.wia-preview-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
}
.wia-preview-modal__title { display: flex; align-items: center; gap: 10px; }
.wia-preview-modal__close {
    background: rgba(255,255,255,0.2);
    border: 0;
    color: #fff;
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}
.wia-preview-modal__close:hover { background: rgba(255,255,255,0.35); }

.wia-preview-modal__body {
    flex: 1;
    position: relative;
    background: #f3f3f3;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}
.wia-preview-modal__iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.wia-preview-modal__epub-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: stretch;
}
.wia-preview-modal__epub {
    flex: 1;
    height: 100%;
    overflow: hidden;
    background: #fff;
}
.wia-epub-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px; height: 80px;
    background: rgba(102, 126, 234, 0.85);
    color: #fff;
    border: 0;
    font-size: 42px;
    font-weight: 700;
    cursor: pointer;
    z-index: 10;
    border-radius: 8px;
    transition: background 0.2s, transform 0.2s;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
}
.wia-epub-nav:hover { background: rgba(118, 75, 162, 0.95); transform: translateY(-50%) scale(1.08); }
.wia-epub-nav--prev { left: 12px; }
.wia-epub-nav--next { right: 12px; }
@media (max-width: 640px) {
    .wia-epub-nav { width: 44px; height: 64px; font-size: 32px; }
}

.wia-preview-modal__footer {
    padding: 12px 20px;
    background: #1a1a2e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.wia-preview-modal__notice { color: #ccc; font-size: 13px; }
.wia-preview-modal__buy {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #fff !important;
    text-decoration: none !important;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 14px rgba(245, 87, 108, 0.4);
    transition: transform 0.2s;
}
.wia-preview-modal__buy:hover { transform: translateY(-2px); }

/* 미리보기 버튼 (상세페이지) */
.wia-btn-sample-preview {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 600;
}

/* 선택/인쇄 방어 */
.wia-preview-modal * {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
@media print {
    .wia-preview-modal { display: none !important; }
}
@media (max-width: 640px) {
    .wia-preview-modal__header { font-size: 13px; padding: 8px 12px; }
    .wia-preview-modal__buy { padding: 8px 14px; font-size: 13px; }
}
