/* 強制淺色模式，不受外部主題覆蓋 */
body {
  background: #ffffff !important;
  color: #333333 !important;
}

/* 針對工具容器及其所有子元素強制淺色配色 */
#photo-tool,
#photo-tool * {
  background: #ffffff !important;
  color: #333333 !important;
}

/* 工具區整體樣式 */
#photo-tool {
  font-family: sans-serif;
  padding: 2em;
  text-align: center;
}

/* 標題 */
#photo-tool h2 {
  font-size: 2em;
  margin-bottom: 0.5em;
}

/* 檔案上傳按鈕 */
#photo-tool #fileInput {
  display: inline-block;
  margin: 0.5em 0 2em;
}

/* 縮圖區 */
#photo-tool .grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 2em;
  max-width: 90%;
  margin: 0 auto;
}

/* 每張縮圖容器 */
#photo-tool .thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 縮圖圖片 */
#photo-tool .thumb img {
  height: 150px;
  object-fit: cover;
  border: 2px solid transparent;
  cursor: pointer;
  transition: 0.2s ease;
}

/* 刪除覆蓋按鈕 */
#photo-tool .delete-overlay {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 50%;
  display: none;
  cursor: pointer;
  z-index: 10;
}

/* 滑鼠移上才顯示刪除按鈕 */
#photo-tool .thumb:hover .delete-overlay {
  display: block;
}

/* 被選中或懸停時的邊框樣式 */
#photo-tool .thumb img:hover,
#photo-tool .thumb img.selected {
  border-color: #007bff;
  border-width: 4px;
}

/* 縮圖檔名 */
#photo-tool .filename {
  font-size: 0.85em;
  margin-top: 6px;
  word-break: break-all;
  max-width: 150px;
  text-align: center;
}

/* 結果區 */
#photo-tool #resultSection {
  max-width: 800px;
  margin: 2em auto;
  text-align: center;
  background: #f9f9f9;
  border: 1px dashed #cccccc;
  padding: 1em;
}

/* 結果區主標題 */
#photo-tool #resultSection h3 {
  font-size: 1.6em;
  margin-bottom: 1em;
}

/* 結果兩欄佈局 */
#photo-tool .result-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 1em;
}

/* 結果欄 */
#photo-tool .result-column {
  flex: 1;
  max-width: 45%;
  text-align: left;
  background: #f9f9f9;
  padding: 1em;
}

/* 欄位標題 */
#photo-tool .result-column h4 {
  font-size: 1.6em;
  margin-bottom: 0.8em;
  text-align: center;
}

/* 結果清單 */
#photo-tool .result-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 結果列項目 */
#photo-tool .result-list li {
  padding: 0.75em;
  border-bottom: 1px solid #e0e0e0;
  word-break: break-all;
  color: #333333;
}

/* 最後一項不需底線 */
#photo-tool .result-list li:last-child {
  border-bottom: none;
}

/* 可還原項目滑鼠提示 */
#photo-tool .result-list li.restoreable {
  cursor: pointer;
  color: #007bff;
}
#photo-tool .result-list li.restoreable:hover {
  text-decoration: underline;
}

/* 按鈕區 */
#photo-tool .result-actions {
  text-align: center;
  margin-top: 1em;
}

/* ZIP 下載按鈕 */
#photo-tool #zipBtn {
  background: #28a745;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  padding: 0.5em 1em;
  cursor: pointer;
  font-size: 1em;
}

/* 隱藏元件 */
#photo-tool .hidden {
  display: none;
}
