/* Styling for sold-out items */
.menu-item.sold-out {
  opacity: 0.6;
  position: relative;
}

.menu-item.sold-out::after {
  content: "售完";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  background-color: #ff5757;
  color: white;
  padding: 5px 10px;
  font-size: 2rem;
  font-weight: bold;
  border-radius: 5px;
  z-index: 10;
}

.menu-item.sold-out input {
  pointer-events: none;
  background-color: #f0f0f0;
}

/* Admin toggle button for sold out status */
.admin-controls {
  margin-top: 20px;
  padding: 20px;
  background-color: #f9f5f6;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-controls h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.sold-out-toggle {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.sold-out-toggle label {
  margin-left: 10px;
  font-size: 1.6rem;
}

/* Toggle switch styling */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #c84a6e;
}

input:focus + .slider {
  box-shadow: 0 0 1px #c84a6e;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Admin password modal */
.admin-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.admin-modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  width: 300px;
  text-align: center;
}

.admin-modal input {
  width: 100%;
  padding: 10px;
  margin: 15px 0;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.admin-modal button {
  margin-top: 10px;
  padding: 8px 15px;
}

.admin-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #f9f5f6;
  color: #c84a6e;
  border: 1px solid #c84a6e;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.6rem;
  cursor: pointer;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
}

.admin-btn:hover {
  background-color: #f3d0d7;
}