/* 上部カテゴリ */
#category-bar {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  background: #fff;
  border-bottom: 1px solid #ddd;
}

.category {
  flex: 0 0 auto;
  padding: 12px 20px;
  font-size: 14px;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.category.active {
  border-bottom: 3px solid #ff6600;
  font-weight: bold;
}

/* 商品リスト */
#menu-list {
  padding-bottom: 70px; /* ナビ分余白 */
}

.page-title-bar {
  background: #fff;
  border-bottom: 1px solid #ddd;
}

.page-title {
  padding: 12px 16px;
  font-size: 16px;
  font-weight: bold;
}

.subcategory {
  padding: 8px 12px;
  margin: 10px 8px 4px;
  background: #f1f3f5;
  border-left: 4px solid #555;
  font-weight: bold;
}

.menu-item {
  display: flex;
  background: #fff;
  margin: 8px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  cursor: pointer;
}

.menu-item img {
  width: 100px;
  height: 100px;
  object-fit: cover;
}

.menu-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.menu-name {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 5px;
}

.menu-price {
  color: #ff6600;
  font-size: 14px;
}

/* 注文ダイアログ */
#order-dialog {
  width: 90vw;
  max-width: 520px;
  height: 70vh;
  max-height: 720px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0,0,0,0.24);
}

#order-dialog::backdrop {
  background: rgba(0,0,0,0.35);
}

.order-dialog-form {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.order-dialog-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.order-dialog-image-wrap {
  width: min(60%, 260px);
  aspect-ratio: 1 / 1;
  margin-bottom: 14px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  border-radius: 8px;
  background: #f1f3f5;
}

.order-dialog-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-dialog-name {
  margin-bottom: 6px;
  font-size: 20px;
  font-weight: bold;
}

.order-dialog-price {
  margin-bottom: 16px;
  color: #ff6600;
  font-size: 16px;
  font-weight: bold;
}

.order-field {
  display: block;
  margin-bottom: 14px;
}

.order-option-field[hidden] {
  display: none;
}

.order-field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: bold;
}

.order-count,
.order-option {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  font-size: 16px;
}

.order-count-control {
  display: flex;
  width: 60%;
  min-width: 180px;
  height: 44px;
  margin: 0 auto;
}

.order-count-control .order-count {
  width: 100%;
  min-width: 0;
  border-right: none;
  border-left: none;
  border-radius: 0;
  text-align: center;
}

.order-count-button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  border: 1px solid #ccc;
  background: #f7f7f7;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
}

.order-count-button.decrease {
  border-radius: 6px 0 0 6px;
}

.order-count-button.increase {
  border-radius: 0 6px 6px 0;
}

.order-dialog-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #ddd;
  background: #fff;
}

.order-dialog-button {
  flex: 1;
  padding: 12px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
}

.order-dialog-button.secondary {
  background: #eee;
  color: #333;
}

.order-dialog-button.primary {
  background: #ff6600;
  color: #fff;
}

/* 注文確認ダイアログ */
#order-confirm-dialog {
  width: 86vw;
  max-width: 420px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0,0,0,0.24);
}

#order-confirm-dialog::backdrop {
  background: rgba(0,0,0,0.35);
}

.order-confirm-content {
  padding: 24px 16px 16px;
}

.order-confirm-message {
  margin-bottom: 20px;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
}

.order-confirm-actions {
  display: flex;
  gap: 8px;
}

.order-confirm-button {
  flex: 1;
  padding: 12px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
}

.order-confirm-button.secondary {
  background: #eee;
  color: #333;
}

.order-confirm-button.primary {
  background: #ff6600;
  color: #fff;
}

/* 注文内容 */
#order-list {
  padding: 8px 8px 8px;
}

#order-history-list {
  padding: 8px 8px 8px;
}

.order-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  margin: 8px 0;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.order-list-item.deleted {
  background: #e6e6e6;
  color: #777;
}

.order-list-item.deleted .order-list-price {
  color: #777;
}

.order-list-main {
  min-width: 0;
}

.order-list-name {
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: bold;
}

.order-list-option {
  margin-bottom: 6px;
  color: #555;
  font-size: 14px;
  font-weight: bold;
}

.order-list-option::before {
  content: "オプション: ";
  color: #888;
  font-size: 13px;
}

.order-list-count {
  color: #666;
  font-size: 14px;
}

.order-list-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.order-list-price {
  color: #ff6600;
  font-size: 16px;
  font-weight: bold;
}

.order-delete-button {
  padding: 8px 10px;
  border-radius: 6px;
  background: #eee;
  color: #333;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

.order-confirm-area {
  padding: 0 8px 84px;
}

.order-submit-button {
  width: 100%;
  padding: 14px;
  border-radius: 6px;
  background: #ff6600;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

.order-history-total {
  margin: 8px;
  padding: 16px 12px;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  background: #fff;
}

.order-history-total-label {
  margin-bottom: 6px;
  color: #666;
  font-size: 16px;
  font-weight: bold;
  text-align: left;
}

.order-history-total-price {
  color: #ff6600;
  font-size: 34px;
  font-weight: bold;
  text-align: right;
}

.checkout-button {
  width: 100%;
  padding: 14px;
  border-radius: 6px;
  background: #ff6600;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

/* キッチン注文一覧 */
.kitchen-title-bar {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  border-bottom: 2px solid #ddd;
}

.kitchen-title {
  padding: 18px 24px;
  font-size: 34px;
  font-weight: bold;
}

#kitchen-order-list {
  padding: 76px 12px 88px;
}

#kitchen-order-list.kitchen-served-order-list {
  padding-top: 12px;
}

.kitchen-top-actions {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: #f7f7f7;
  border-bottom: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.kitchen-reload-button,
.kitchen-sound-enable-button {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 8px;
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
}

.kitchen-reload-button {
  background: #1976d2;
}

.kitchen-sound-enable-button {
  background: #2e7d32;
}

.kitchen-reload-button:disabled,
.kitchen-sound-enable-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.kitchen-order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 132px;
  margin-bottom: 12px;
  padding: 20px 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.14);
}

.kitchen-order-time {
  flex: 0 0 64px;
  color: #777;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
}

.kitchen-order-info {
  flex: 1 1 auto;
  min-width: 0;
}

.kitchen-table-name {
  margin-bottom: 12px;
  color: #666;
  font-size: 30px;
  font-weight: bold;
}

.kitchen-menu-name {
  font-size: 42px;
  font-weight: bold;
}

.kitchen-order-option {
  margin-top: 10px;
  color: #555;
  font-size: 28px;
  font-weight: bold;
}

.kitchen-order-option::before {
  content: "オプション: ";
  color: #888;
  font-size: 24px;
}

.kitchen-order-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  margin-left: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #f3f3f3;
  color: #333;
  font-size: 34px;
}

.kitchen-delete-button,
.kitchen-restore-button {
  flex: 0 0 auto;
  min-width: 190px;
  min-height: 84px;
  padding: 18px 28px;
  border-radius: 8px;
  color: #fff;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
}

.kitchen-delete-button {
  background: #1976d2;
  font-size: 26px;
}

.kitchen-restore-button {
  background: #1976d2;
  font-size: 26px;
}

.kitchen-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid #ddd;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
}

.kitchen-footer-link {
  display: block;
  width: 100%;
  max-width: 420px;
  padding: 16px;
  border-radius: 8px;
  background: #333;
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
}

/* 下部ナビ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  background: #fff;
  border-top: 1px solid #ddd;
}

.nav-item {
  flex: 1;
  color: inherit;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

.nav-item:hover {
  background: #f0f0f0;
}
