/**
 * NT-Takeout 餐廳後台樣式表
 */

/* 側邊欄樣式 */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  padding: 48px 0 0;
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar-sticky {
  position: relative;
  top: 0;
  height: calc(100vh - 48px);
  padding-top: 0.5rem;
  overflow-x: hidden;
  overflow-y: auto;
}

.sidebar .nav-link {
  font-weight: 500;
  color: #333;
  padding: 0.75rem 1rem;
  margin-bottom: 0.2rem;
}

.sidebar .nav-link:hover {
  color: #0d6efd;
}

.sidebar .nav-link.active {
  color: #0d6efd;
  background-color: rgba(13, 110, 253, 0.1);
  border-radius: 0.25rem;
}

.sidebar .nav-link i {
  margin-right: 0.5rem;
  width: 20px;
  text-align: center;
}

/* 菜單上傳樣式 */
.image-preview-container {
  margin-top: 1rem;
  min-height: 50px;
}

#imagePreview img {
  width: 100%;
  border-radius: 0.25rem;
}

/* 上傳按鈕樣式 */
.upload-btn-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.upload-btn-wrapper input[type=file] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* 營業時間編輯區塊 */
.time-slots {
  padding: 0.5rem 0;
}

.time-slot {
  padding: 0.5rem 0;
}

/* 響應式表格調整 */
@media (max-width: 767.98px) {
  .table-responsive th,
  .table-responsive td {
    font-size: 0.875rem;
  }

  .sidebar {
    padding-top: 0;
  }

  .sidebar-sticky {
    height: auto;
  }

  /* 手機版下導航選項間距調整 */
  .sidebar .nav-link {
    padding: 0.5rem 1rem;
  }
}

/* 菜單預覽圖片樣式 */
.menu-image-preview {
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  padding: 0.5rem;
  margin-bottom: 1rem;
}

.menu-image-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 0.25rem;
}

/* 狀態標籤樣式 */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.25rem;
}

/* 表單樣式優化 */
.form-label {
  font-weight: 500;
}

.custom-file-input:lang(zh-TW) ~ .custom-file-label::after {
  content: "瀏覽";
}

/* 頁面頂部導航欄固定時內容區域的調整 */
body {
  padding-top: 0;
  font-family: "PingFang TC", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* 卡片容器陰影效果 */
.card {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  margin-bottom: 1.5rem;
}

.card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* 表格優化 */
.table th {
  background-color: #f8f9fa;
  font-weight: 500;
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 123, 255, 0.05);
}

/* 自定義按鈕樣式 */
.btn-custom-primary {
  color: #fff;
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.btn-custom-primary:hover {
  color: #fff;
  background-color: #0b5ed7;
  border-color: #0a58ca;
}

/* 分頁樣式 */
.pagination {
  justify-content: center;
  margin-top: 2rem;
}
