@charset "utf-8";

/* ===== 既存ボタンCSS ===== */
.pdf-open {
  display: block;
  background: #003884;
  color: #fff !important;
  width: 180px;
  text-align: center;
  padding: 10px 0;
  border-radius: 2px;
  margin: 10px 0 0 400px;
}
@media screen and (max-width: 767px) {
  .pdf-open { margin: 10px auto 0; }
}

/* ===== Modal ===== */
.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}
.pdf-modal.is-open { display: block; }

.pdf-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

.pdf-modal__dialog {
  position: relative;
  width: min(1000px, calc(100vw - 24px));
  height: min(80vh, 720px);
  margin: 60px auto 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
}

.pdf-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #003884;
  color: #fff;
}
.pdf-modal__title { margin: 0; font-weight: bold; }
.pdf-modal__close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.pdf-modal__body {
  position: relative;
  flex: 1;
  background: #f2f2f2;
}

/* iframe表示 */
.pdf-modal__frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #f2f2f2;
  display: none; /* JSでON */
}

/* PDF.js領域 */
.pdf-modal__pdfjs {
  position: absolute;
  inset: 0;
  display: none; /* JSでON */
  background: #eaeaea;
}

.pdfjs-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px;
  background: #fff;
  border-bottom: 1px solid #ddd;
}
.pdfjs-btn {
  padding: 6px 10px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
}
.pdfjs-spacer { flex: 1; }
.pdfjs-page, .pdfjs-zoom { font-size: 14px; color: #333; }

.pdfjs-stage {
  height: calc(100% - 52px);
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px;
}
.pdfjs-canvas {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  border-radius: 4px;
}

/* 文章フォールバック */
.pdf-modal__fallback {
  display: none; /* JSでON */
  position: absolute;
  inset: 0;
  background: #fff;
  padding: 18px;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.pdf-modal__fallback p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

/* SP */
@media screen and (max-width: 767px) {
  .pdf-modal__dialog {
    width: calc(100vw - 16px);
    height: calc(100vh - 100px);
    margin-top: 50px;
  }
}

.hoken-flex {
	display: flex;
	gap:10px;
}

.hoken-flex a {
	display: block;
	text-align: center;
}
