* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Noto Sans Thai", 'Roboto', Arial, sans-serif;
}

body {
  background-color: #fff;
  color: #333;
  padding-bottom: 70px;
  margin-bottom: 100px;
}

#app {
  max-width: 800px;
  margin: 0 auto;
  padding: 15px;
}

.table-card-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.table-card {
  background: #cafce9;
  border-radius: 8px;
  padding: 18px 10px;
  text-align: center;
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  transition: 0.2s;
}

.table-card:hover {
  transform: translateY(-3px);
  background: #e3e3e3;
}

.custom-toast {
  display: none;
  pointer-events: auto;
  position: absolute;
  top: 150px;
  left: 50%;
  transform: translateX(-50%);
  background-color: white;
  border-radius: 10px;
  padding: 15px 30px;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0,0,0,0.25);
  align-items: center;
  gap: 5px;
  max-width: 90%;
  text-align: center;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 600px) {
  .custom-toast { width: 80%; }
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 50%;
  transform: translateX(-50%) translateY(20px);
  min-width: 260px;
  max-width: 90%;
  padding: 14px 20px;
  border-radius: 12px;
  background-color: rgba(40, 250, 250, 0.7);
  color: black;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  backdrop-filter: blur(8px);
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.form-group { margin-bottom: 15px; }

label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 3px 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 18px;
  cursor: pointer;
}

.btn {
  padding: 3px 10px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 400;
  transition: background-color 0.3s;
}

.btn-primary { background-color: #3751fa; color: white; }
.btn-loading { background-color: #8bbff7 !important; color: #fff; }
.btn-secondary { background-color: #a7a7a8; color: white; }
#take-home-btn { background-color: #3eb0ed; color: white; }

.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.3);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.edit-item-btn { background-color: #dcecf7; color: #7e807f; }
.delete-item-btn { background-color: transparent; font-size: 20px; line-height: 1; }
#my-order-btn { background-color: #3eb0ed; color: white; }
#queue-btn { background-color: #2ab04e; color: white; }
.btn-block { display: block; width: 100%; }

.button-group { display: flex; gap: 10px; margin: 15px 0; }
.button-group .btn { flex: 1; }

.menu-card {
  display: flex;
  background-color: white;
  border-radius: 8px;
  margin-bottom: 5px;
  overflow: hidden;
  box-shadow: 0 1px 0.5px rgba(0,0,0,0.07);
  align-items: center;
  width: 100%;
  margin: 10px 0px;
  box-sizing: border-box;
}

.menu-image { flex: 0 0 120px; width: 120px; height: 92px; object-fit: cover; }

.menu-details {
  flex: 1;
  display: flex;
  padding: 10px;
  position: relative;
  align-items: center;
  word-wrap: break-word;
}

.menu-name { font-size: 18px; font-weight: 400; align-items: center; }

.menu-description {
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
  overflow-wrap: break-word;
  white-space: normal;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-price { font-size: 18px; font-weight: 500; color: #4CAF50; }

@media (max-width: 700px) {
  .menu-card { max-width: 100%; }
  .menu-name { max-width: 200px; }
  .menu-description { font-size: 0.8rem; }
}

.menu-row { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.menu-left { display: flex; gap: 10px; align-items: center; }

.add-item-btn {
  position: absolute;
  right: 20px;
  width: 25px; height: 25px;
  border-radius: 50%;
  background-color: #fcc047;
  color: white;
  border: none;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#modal-add-button-container { position: relative; }

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  animation: modalIn 0.3s;
}

@keyframes modalIn {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.close {
  color: #636363;
  float: right;
  font-size: 25px;
  font-weight: bold;
  cursor: pointer;
  margin-top: -13px;
}

.table-number-display { font-size: 40px; text-align: center; padding: 30px 0; }

.extra-container { margin: 15px 0; border-top: 1px solid #eee; padding-top: 15px; }
.choice-option { display: flex; align-items: center; margin-bottom: 10px; }
.choice-radio { margin-right: 10px; }
.choice-label { flex: 1; }
.choice-price { font-weight: 500; color: #4CAF50; }

.quantity-selector { display: flex; align-items: center; justify-content: center; margin: 20px 0; }
.quantity-btn { width: 40px; height: 40px; border-radius: 50%; background-color: #93faee; border: none; font-size: 18px; cursor: pointer; }
#quantity-value { padding: 0 20px; font-size: 18px; font-weight: 500; }
#add-to-cart-btn:disabled { background-color: #cccccc; cursor: not-allowed; opacity: 0.6; }

#bottom-bar {
  position: fixed;
  bottom: 0; left: 0;
  width: 100%;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 900;
}

.cart-icon { position: relative; font-size: 35px; }
.fa-basket-shopping {
  position: fixed;
  bottom: 70px; right: 100px;
  color: #35baf2;
  transform: translateX(150px);
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.fa-basket-shopping.slide-in { transform: translateX(0); opacity: 1; }

#cart-count {
  position: fixed;
  bottom: 100px; right: 100px;
  background-color: #3751fa;
  color: white;
  border-radius: 50%;
  width: 25px; height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transform: translateX(150px);
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#cart-count.slide-in { transform: translateX(0); opacity: 1; }
.pulse-badge { animation: pulse 2.5s infinite; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(55, 81, 250, 0.8); }
  70% { box-shadow: 0 0 0 30px rgba(55, 81, 250, 0); }
  100% { box-shadow: 0 0 0 0 rgba(55, 81, 250, 0); }
}

#order-btn { padding: 10px 25px; }

.category-marker {
  background-color: #c5e3fa;
  padding: 1px 15px;
  font-weight: 400;
  font-size: 14px;
  border-radius: 4px;
  margin: 10px 0 10px 0;
}

.menu-image.placeholder { background-color: #ddd; display: flex; align-items: center; justify-content: center; color: #999; }

.cart-modal-content { max-height: 80vh; overflow-y: auto; }
#cart-items-container { margin-bottom: 20px; }
.cart-item { border-bottom: 1px solid #eee; padding: 15px 0; }
.cart-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cart-item-name { font-weight: 600; font-size: 16px; }
.cart-item-price { font-weight: 600; color: #4CAF50; }
.cart-item-extras { margin: 8px 0; font-size: 14px; color: #666; }
.cart-item-extra { margin-bottom: 4px; }
.disabled-choice { opacity: 0.9; pointer-events: none; }
.disabled-choice label { color: #aaa; }
.cart-item-note { font-style: italic; margin: 8px 0; font-size: 14px; color: #666; }
.cart-item-quantity { color: #333; font-weight: 500; }
.cart-item-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
  padding: 15px 0;
  border-top: 2px solid #eee;
  margin-bottom: 15px;
}

#cart-total-price { color: #4CAF50; }

.order-success-message {
  background-color: #96d7fa;
  border-radius: 4px;
  padding: 15px;
  text-align: center;
  margin: 20px 0;
}
.order-success-message h3 { color: #6e6e6e; margin-bottom: 10px; }

.my-order-modal-content { max-width: 600px; max-height: 80vh; overflow-y: auto; }
.my-order-item { margin-bottom: 20px; padding: 15px; background-color: #f9f9f9; border-radius: 8px; }
.my-order-item-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; gap: 8px; }
.my-order-item-name {
  font-weight: bold;
  font-size: 16px;
  color: #333;
  flex: 1;
  min-width: 0;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}
.my-order-item-total { font-weight: bold; color: #4CAF50; font-size: 16px; white-space: nowrap; }
.my-order-item-details { margin-left: 10px; color: #666; font-size: 14px; }
.my-order-extra { margin: 2px 0; padding-left: 15px; position: relative; white-space: normal; word-break: break-word; }
.my-order-extra:before { content: "•"; position: absolute; left: 0; color: #999; }
.my-order-quantity { margin-top: 5px; color: #666; font-size: 14px; }
.my-order-note { margin-top: 5px; font-style: italic; color: #888; font-size: 13px; white-space: normal; word-break: break-word; overflow-wrap: break-word; }
.my-order-grand-total { text-align: right; font-size: 18px; color: #333; padding: 10px 0; }
.order-timestamp { font-size: 12px; color: #999; text-align: right; margin-bottom: 10px; }

#receipt-content { background: white; padding: 20px; font-family: 'Noto Sans Thai', Arial, sans-serif; color: #333; line-height: 1.4; }
.receipt-header { text-align: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px solid #333; }
.receipt-title { font-size: 18px; margin: 0; color: #333; }
.receipt-table-info { font-size: 16px; margin: 5px 0; color: #666; }
.my-order-item.download-style { margin-bottom: 15px; padding: 12px; background-color: #f8f9fa; border-radius: 6px; }
.download-timestamp { font-size: 14px; color: #666; margin-bottom: 15px; padding: 8px; background: #e9ecef; border-radius: 4px; text-align: center; }

.download-loading {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  color: white;
  font-size: 18px;
}

.wrap-text { word-wrap: break-word; white-space: normal; max-width: 130px; }

.imageModal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.6);
}

.imageModal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 10px 20px;
  width: 80%;
  max-width: 500px;
  border-radius: 8px;
  text-align: center;
}

.imageModal-content img { width: 100%; height: auto; margin-top: 5px; margin-bottom: 2px; border-radius: 5px; }
.modal-price { font-weight: bold; font-size: 1.1em; margin: 10px 0 10px 20px; color: #4CAF50; }

#modal-description {
  overflow-wrap: break-word;
  white-space: normal;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: auto;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.close-btn { float: right; font-size: 24px; cursor: pointer; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.imageModal.show { display: block; animation: fadeIn 0.4s ease forwards; }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
.imageModal.fade-out { animation: fadeOut 0.4s ease forwards; }

.thumbnail { width: 60px; height: auto; cursor: pointer; border-radius: 6px; margin: 3px; transition: transform 0.2s ease; }
.thumbnail:hover { transform: scale(1.05); }

.out-of-stock { color: red; font-weight: bold; font-size: 14px; align-self: center; }
.out-of-stock-card { opacity: 0.5; pointer-events: none; transition: opacity 0.3s; }

.queue-row-deletable { cursor: pointer; transition: background-color 0.2s; }
.queue-row-deletable:active { background-color: #ffe6e6 !important; }
.queue-row-deletable:hover { background-color: #f5f5f5; }

.minimal-confirm {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  font-family: sans-serif;
}

.confirm-box {
  background: #fff;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 280px;
  width: 90%;
  text-align: center;
}

.confirm-box p { margin: 0 0 12px; font-size: 15px; line-height: 1.4; }
.confirm-buttons { display: flex; justify-content: space-around; }
.confirm-btn { border: none; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 14px; }
.confirm-btn.yes { background: #b4d8fa; }
.confirm-btn.no { background: #f0f0f0; }

.mini-alert {
  position: fixed;
  bottom: 40%;
  left: 50%;
  transform: translateX(-50%);
  background: #36e5f5;
  color: #242424;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
  z-index: 9999;
  animation: fadeInOut 2.2s ease;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, 20px); }
  10% { opacity: 1; transform: translate(-50%, 0); }
  90% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 20px); }
}

.cart-item-qty {
  display: inline-block;
  min-width: 24px;
  text-align: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.qty-animate { animation: qtyPop 0.25s ease; }

@keyframes qtyPop {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}