/*
 * M3 Admin 後台樣式 - 對應 docs/preview-web.html
 * 與 Tailwind M3 色系搭配使用
 */

/* Material Symbols */
.material-symbols-rounded {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.material-symbols-rounded.filled {
  font-variation-settings: 'FILL' 1;
}

/* 隱藏捲軸但保持可捲動 */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 頁籤切換動畫 */
.fade-enter {
  opacity: 0;
  transform: translateY(10px);
}
.fade-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 300ms, transform 300ms;
}

/* 登入畫面動畫 */
.login-transition {
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

/* M3 Input Label 動畫 (登入用)：浮起時上移，避免與輸入文字重疊 */
.m3-input:focus ~ .m3-label,
.m3-input:not(:placeholder-shown) ~ .m3-label {
  top: 0.5rem;
  transform: translateY(0) scale(0.75);
  color: #006874;
}

/* 隱藏瀏覽器內建的密碼顯示按鈕（Edge/IE 的 ::-ms-reveal、::-ms-clear）。
   本站密碼欄已自備顯示/隱藏切換鈕，否則 Edge 會出現兩個眼睛圖示。 */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
  width: 0;
  height: 0;
}

/* 路單清單：窄畫面改為整表水平捲動，而非把欄位擠到換行。
   min-width 取各欄自然寬度總和，低於此寬度就出現捲軸。 */
.route-slip-table {
  min-width: 62rem;
}

/* 操作欄的按鈕永遠排成一列，不因欄寬不足而堆疊 */
.route-slip-actions {
  white-space: nowrap;
}

/* 批次操作列在窄畫面允許換行，但每個控制項本身不被拆開 */
#batchActions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

#batchActions > * {
  white-space: nowrap;
}

/* 路單清單就地編輯的「已儲存」提示：淡入淡出，不佔用版面高度變化 */
.inline-saved-mark {
  transition: opacity 300ms ease-in-out;
  white-space: nowrap;
}

/* Bootstrap 相容：讓現有頁面在 M3 Layout 下視覺協調 */
.m3-admin .card {
  border-radius: 1.5rem;
  border: 1px solid rgba(111, 121, 122, 0.2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.m3-admin .btn-primary {
  background-color: #006874;
  border-color: #006874;
}
.m3-admin .btn-primary:hover {
  background-color: #004f56;
  border-color: #004f56;
}
