﻿/* 
** style.css 
** 2025-12-12 by Gemini 2.5 Flash
** 2025-12-16 by Claude Sonnet 4.5
*/

/* 全てのページで共通する基本スタイル */
body {
  font-family: sans-serif;
  margin: 20px;
  background-color: #f4f4f4;
  color: #333;
  padding-bottom: 60px;   /* コピーライトの高さ分、bodyの下に余白を追加 */
}

h1 {
  color: #0056b3;
}

/* コピーライト表示のスタイル */
.copyright {
  position: fixed;  /* ページ下部に固定 */
  bottom: 0;  /* 下端に配置 */
  left: 0;  /* 左端に配置 */
  width: 100%;  /* 幅を100%にする */
  background-color: #1a62a8;  /* 背景色 */
  color: #fff;  /* 文字色 */
  text-align: center;  /* 中央寄せ */
  padding: 10px 0;  /* 上下の余白 */
  font-size: 14px;  /* フォントサイズ */
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);  /* 影で少し立体感を出す */
  z-index: 1000;  /* 他の要素より手前に表示 */
}

/* index.php 用スタイル */
#mainOperationForm {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 20px auto;
}

#mainOperationForm div {
  margin-bottom: 15px;
}

label {
  display: inline-block;
  width: 180px;
  font-weight: bold;
  white-space: nowrap;
}

input[type="file"],select,input[type="number"] {
  width: calc(100% - 190px);
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

small {
  display: block;
  margin-top: 5px;
  color: #666;
}

button {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

button:hover {
  background-color: #0056b3;
}

#mergeFiles,#extractFile,#rotateFile {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #eee;
}

/* ファイルリストのプレースホルダー */
#fileListMerge li.placeholder,#fileListExtract li.placeholder,#fileListRotate {
  color: #888;
  background-color: transparent;
  border: none;
  cursor: default;
}

/* download.php と check_pdf.php で共通する汎用的なスタイル */
.success {
  color: green;
  font-weight: bold;
}

.error {
  color: red;
  font-weight: bold;
}

/* download.php 用スタイル */
.download-container {
  /* download.phpの.containerに対応 */
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-width: 1000px;
  margin: 20px auto;
  text-align: left;
  white-space: auto;
}

.download-button-group {
  /* download.phpの.button-groupに対応 */
  margin-top: 20px;
}

.download-button-group a {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
  display: inline-block;
  margin: 0 10px;
}

.download-button-group a:hover {
  background-color: #0056b3;
}

.download-button-group a.delete-button {
  background-color: #dc3545;
}

.download-button-group a.delete-button:hover {
  background-color: #c82333;
}

.download-button-group a.return-button {
  background-color: #6c757d;
}

.download-button-group a.return-button:hover {
  background-color: #5a6268;
}


/* check_pdf.php 用スタイル */
.check-pdf-container {
  /* check_pdf.phpの.containerに対応 */
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  margin: 20px auto;
}

.pdf-info-card {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 15px;
  background-color: #f9f9f9;
}

.pdf-info-card h3 {
  margin-top: 0;
  color: #007bff;
}

.pdf-info-card ul {
  list-style: none;
  padding: 0;
}

.pdf-info-card li {
  margin-bottom: 5px;
}

.pdf-info-card table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.pdf-info-card th,
.pdf-info-card td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: left;
}

.pdf-info-card th {
  background-color: #e9ecef;
}

.warning {
  color: maroon;
  font-weight: bold;
}

.check-pdf-button-group {
  /* check_pdf.phpの.button-groupに対応 */
  margin-top: 20px;
  text-align: center;
}

.check-pdf-button-group button,
.check-pdf-button-group a {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
  display: inline-block;
  margin: 0 10px;
}

.check-pdf-button-group button:hover,
.check-pdf-button-group a:hover {
  background-color: #0056b3;
}

.check-pdf-button-group a.cancel-button {
  background-color: #6c757d;
}

.check-pdf-button-group a.cancel-button:hover {
  background-color: #5a6268;
}

/* Sortable.js用のCSS */
#sortable-list li {
  padding: 8px;
  margin-bottom: 5px;
  background-color: #e2e6ea;
  border: 1px solid #c2c9d1;
  border-radius: 4px;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#sortable-list li.sortable-ghost {
  opacity: 0.4;
  background-color: #cfd6de;
}

#sortable-list li.placeholder {
  color: #888;
  background-color: transparent;
  border: none;
  cursor: default;
}

/* PDF結合リストのスタイル 2025-12-16 */
.pdf-merge-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pdf-merge-list li {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 8px;
  padding: 12px;
  cursor: move;
  transition: background-color 0.2s;
}

.pdf-merge-list li:hover {
  background-color: #f0f0f0;
}

.pdf-item-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  /* 折り返しを防ぐ */
}

.pdf-filename {
  flex: 1 1 250px;
  min-width: 250px;    
  max-width: 250px;   
  font-weight: bold;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;    /* 長いファイル名は省略記号で表示 */
  white-space: nowrap;    /* 1行表示 */
}

.pdf-pages {
  flex: 0 0 80px;  
  color: #666;
  text-align: right;
  white-space: nowrap;
}

.pdf-size {
  flex: 0 0 40px;  /* A4, A3などの表示用 */
  color: #666;
  text-align: center;  /* right -> center */
  white-space: nowrap;
}

.pdf-version {
  flex: 0 0 80px;  
  color: #666;
  text-align: right;
  white-space: nowrap;
}

/* Sortable.js用のゴーストスタイル */
.sortable-ghost {
  opacity: 0.4;
  background-color: #e3f2fd;
}