/* ============================================================
   images2pdf — スタイルシート
   ============================================================ */

/* ── リセット & ベース ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Meiryo", "Yu Gothic", sans-serif;
  background: #f5f5f5;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 64px;
}

/* ── ヘッダー ── */
h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: #1a1a2e;
  letter-spacing: 0.02em;
}

/* ── メインコンテナ ── */
.container {
  width: 100%;
  max-width: 840px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── ドロップゾーン ── */
.drop-zone {
  border: 2px dashed #6c8ebf;
  border-radius: 12px;
  background: #eef3fb;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  user-select: none;
}

.drop-zone.drag-over {
  background: #d6e4f7;
  border-color: #3a6fc4;
}

.drop-zone p {
  font-size: 1rem;
  color: #4a6fa5;
  margin-bottom: 12px;
  pointer-events: none;
}

.drop-zone .hint {
  font-size: 0.82rem;
  color: #7a9acc;
  margin-bottom: 0;
}

/* ファイル選択ボタン（label で input[type=file] をラップ） */
.btn-file-label {
  display: inline-block;
  margin-bottom: 10px;
  padding: 9px 22px;
  background: #3a6fc4;
  color: #fff;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-file-label:hover {
  background: #2d57a0;
}

/* ── エラーメッセージ ── */
.error-box {
  display: none;
  background: #fdecea;
  border: 1px solid #f5c6c2;
  border-radius: 8px;
  padding: 12px 16px;
  color: #c0392b;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.error-box.visible {
  display: block;
}

/* ── サムネイル一覧 ── */
.thumbnail-section {
  display: none;
}

.thumbnail-section.visible {
  display: block;
}

.thumbnail-section h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #333;
}

.thumbnail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 各サムネイルカード */
.thumb-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #dde3ef;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.thumb-card img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 4px;
  background: #f0f0f0;
  flex-shrink: 0;
}

.thumb-info {
  flex: 1;
  min-width: 0;
}

.thumb-info .filename {
  font-size: 0.88rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #222;
}

.thumb-info .filesize {
  font-size: 0.78rem;
  color: #888;
  margin-top: 2px;
}

/* 操作ボタン群 */
.thumb-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  border: 1px solid #ccd4e0;
  border-radius: 5px;
  background: #f8f9fc;
  color: #555;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
  font-family: inherit;
}

.btn-icon:hover:not(:disabled) {
  background: #e8edf6;
  color: #1a1a2e;
}

.btn-icon:disabled {
  opacity: 0.3;
  cursor: default;
}

.btn-icon.btn-delete {
  border-color: #f5c6c2;
  color: #c0392b;
  background: #fef5f5;
}

.btn-icon.btn-delete:hover {
  background: #fdecea;
  color: #922b21;
}

/* ── 変換ボタン ── */
.convert-area {
  text-align: center;
}

.btn-convert {
  padding: 13px 48px;
  font-size: 1.05rem;
  font-weight: 700;
  background: #27ae60;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 0.03em;
}

.btn-convert:hover:not(:disabled) {
  background: #1e8449;
}

.btn-convert:disabled {
  background: #aaa;
  cursor: default;
}
