/**
 * PDF Viewer - 汎用PDFビューワースタイル
 * 複数のサービスページで共通利用可能
 */

/* ===========================
   PDFビューワーモーダル
   =========================== */
.pdf-viewer-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    overflow: hidden;
}

.pdf-viewer-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pdf-viewer-container {
    width: 95%;
    height: 95%;
    background-color: #2a2a2a;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ヘッダー */
.pdf-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background-color: #1a1a1a;
    border-bottom: 1px solid #444;
}

.pdf-viewer-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.pdf-page-info {
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
}

.pdf-columns-control {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-size: 0.9rem;
}

.pdf-columns-control select {
    background-color: #333;
    color: white;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 4px 8px;
}

.pdf-close-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.pdf-close-button:hover {
    background-color: #444;
}

/* PDFコンテンツエリア（スクロール対応） */
.pdf-viewer-content {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(var(--pdf-columns, 3), 1fr);
    gap: 10px;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #2a2a2a;
    align-content: start;
}

.pdf-canvas {
    width: 100%;
    height: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    background-color: white;
}

/* ローディング */
.pdf-viewer-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.pdf-viewer-modal.loading .pdf-viewer-loading {
    display: block;
}

.pdf-viewer-modal.loading .pdf-viewer-content {
    opacity: 0.3;
}

/* ===========================
   レスポンシブ対応
   =========================== */
@media (max-width: 768px) {
    .pdf-viewer-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .pdf-viewer-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}