/* css/style.css - 最小限の変更でモダン化 */

/* --- モーダルをデフォルト非表示にする --- */
.pdf-viewer-modal {
    display: none; /* 重要: 初期状態は非表示 */
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85); /* モーダル背景を少し暗く */
}

/* --- モーダル内の白いコンテンツ枠 --- */
.pdf-viewer-content {
    position: relative;
    margin: 50px auto;
    background: #fff;
    width: 85%; /* 少し広く */
    max-width: 1100px;
    height: 85vh; /* 画面の85%の高さに固定 */
    overflow: hidden;
    box-sizing: border-box;
    border-radius: 10px; /* 角を少し丸く */
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25); /* シャドウ追加 */
    transition: all 0.3s ease; /* アニメーション */
}

/* 閉じるボタン (右上の×) */
.pdf-viewer-close {
    position: absolute;
    top: 12px;
    right: 15px;
    cursor: pointer;
    font-size: 26px;
    color: #444;
    transition: transform 0.3s ease;
    z-index: 10;
}

.pdf-viewer-close:hover {
    transform: rotate(90deg);
}

/* --- PDFビューワ本体 (canvas を入れる領域) --- */
#pdf-viewer-container {
    flex: 1;
    overflow: auto;
    padding: 15px;
    background-color: #f0f2f5; /* 薄いグレーの背景 */
    display: flex;
    justify-content: center;
}

#pdf-viewer canvas {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* キャンバスに影を追加 */
}

/* --- PDFリンクがボタン化される場合のデフォルトスタイル --- */
.pdf-viewer-button {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: #2563eb; /* モダンな青 */
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    margin: 6px 0;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.3);
}

.pdf-viewer-button:hover {
    background-color: #1d4ed8; /* ホバー時に少し暗く */
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.4);
}


/* --- PDFコントロール (横一列) --- */
.pdf-viewer-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap; /* スマホで折り返しやすく */
    gap: 10px;
    padding: 12px 15px;
    background: #fff;
    border-top: 1px solid #eaeaea;
}

.pdf-viewer-controls button {
    padding: 8px 12px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 0 3px;
}


.pdf-viewer-controls button:hover {
    background: #e2e6ed; /* ホバー時に少し暗く */
}

/* --- ナビゲーションボタン（前/次ページ） --- */
#prev-page, #next-page {
    background-color: #3b82f6; /* 青色 */
    color: white;
}

#prev-page:hover, #next-page:hover {
    background-color: #2563eb; /* ホバー時に濃い青 */
}

/* --- ズームボタン（拡大/縮小） --- */
#zoom-in, #zoom-out {
    background-color: #10b981; /* 緑色 */
    color: white;
}

#zoom-in:hover, #zoom-out:hover {
    background-color: #059669; /* ホバー時に濃い緑 */
}

/* ページ情報の表示スタイル */
.page-info {
    font-weight: bold;
    margin: 0 10px;
    padding: 5px 10px;
    background-color: #f1f5f9;
    border-radius: 6px;
    color: #333;
}

/* --- ダウンロードボタン --- */
.download-button {
    background-color: #ef4444 !important; /* 赤色 */
    color: #fff !important;
    padding: 8px 16px !important;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.3);
}

.download-button:hover {
    background-color: #dc2626 !important; /* ホバー時の色 */
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
}
/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .pdf-viewer-content {
        width: 95%;
        margin: 30px auto;
    }
    
    .pdf-viewer-controls {
        padding: 12px 10px;
    }
    
    .pdf-viewer-controls button {
        margin: 3px;
    }
}