body {
  font-family: Arial, sans-serif;
  margin: 1em;
  background-color: #faf3e0; /* light parchment */
  color: #2f2f2f; /* dark grey text */
}

h1 {
  color: #4b2e2b;
  margin-bottom: 1rem;
}

h2, h3 {
  color: #4b2e2b; /* tavern-style brown */
}

button {
  background-color: #a0522d; /* sienna */
  border: none;
  padding: 8px 16px;
  color: white;
  cursor: pointer;
  border-radius: 4px;
  font-size: 1rem;
  margin-top: 0.5em;
  transition: background-color 0.3s ease;
}

button:hover:enabled {
  background-color: #8b4513; /* darker sienna on hover */
}

button:disabled,
button[disabled] {
  background-color: #ccc;
  cursor: not-allowed;
}

table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
  border-collapse: collapse;
  margin-top: 1em;
  background-color: white;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

th, td {
  padding: 8px 12px;
  border: 1px solid #ddd;
  text-align: center;
  vertical-align: middle;
}

td {
  text-align: center;
  vertical-align: middle;
  position: relative;
}

td > button,
td > form,
td > a,
td > input,
td > select,
td > textarea {
  margin: 0 auto;
}

td > form {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

td > button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

th {
  background-color: #d6a86e; /* warm beige */
  color: #4b2e2b;
}

tr:nth-child(even) {
  background-color: #f0e2d0; /* alternating row */
}

tr:nth-child(odd) {
  background-color: #fff7ed; /* alternating row */
}

input[type="number"] {
  width: 60px;
  padding: 4px;
  font-size: 1rem;
}

input.readonly {
  background-color: #f0f0f0;
  color: #555;
}

.hidden {
  display: none !important;
}

.dish-photo {
  width: 20px;
  height: 20px;
  object-fit: cover;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.dish-photo:hover {
  transform: scale(1.1);
}

#photo-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 1em;
}

#photo-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 0 20px #000;
}

#overlay-close {
  position: absolute;
  top: 1em;
  right: 1em;
  background: transparent;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0 0.5em;
  line-height: 1;
}

#overlay-close:hover {
  color: #f00;
}

.message {
  margin-top: 0.5em;
  color: #c04040; /* muted red for messages */
}

.container {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
/*
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  justify-content: center;
}
 */
.table-wrapper table {
  margin: 0 auto;
}

#menu-container.collapsed {
  display: none;
}

.ready-row {
    background-color: #d9fdd3 !important;
}

.menu-button {
  display: inline-block;
  cursor: pointer;
  user-select: none;
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  font-size: 1.1rem;
  transition: background-color 0.3s ease;
  margin-bottom: 1rem;
  border: none;
}

.menu-button:hover {
  background-color: #0056b3;
}

.collapsed {
  display: none;
}
.menu-button {
  cursor: pointer;
  font-weight: bold;
  margin-top: 1em;
}

img {
  max-width: 30px;
  max-height: 30px;
  object-fit: cover;
}

.submit-btn {
  margin-top: 0.5rem;
}

.submit-btn.green {
  background-color: #4CAF50;  /* green */
  color: #fff;
}
.submit-btn.red {
  background-color: #f44336;  /* red */
  color: #fff;
}

#addons-popup {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
#addons-popup-content {
  background: #fff;
  padding: 2em;
  border-radius: 10px;
  min-width: 300px;
  box-shadow: 0 0 20px #000;
  text-align: center;
}
#addons-list label {
  display: block;
  margin: 0.5em 0;
}
#addons-popup.hidden {
  display: none !important;
}

.addons-btn {
  padding: 4px 8px;
  font-size: 0.9rem;
  margin: 0;
  min-width: 40px;
  max-width: 90px;
  white-space: nowrap;
}

#addons-list {
  text-align: left;
  margin-left: 0.5em;
}

#submit-btn {
  display: block;
  margin: 1em auto 0 auto;
}

/* Responsive table for mobile
@media (max-width: 600px) {
  table {
    width: 100%;
    table-layout: auto;
    font-size: 0.95em;
  }
  th, td {
    padding: 4px 6px;
    font-size: 0.95em;
    word-break: break-word;
    white-space: normal;
  }
  .dish-photo, img {
    max-width: 18px;
    max-height: 18px;
  }
  button, .submit-btn, .addons-btn {
    font-size: 0.85em;
    padding: 4px 8px;
    min-width: 32px;
    max-width: 70px;
  }
}
*/

/* Prevent table overflow on all screens */
table {
  width: 100%;
  table-layout: auto;
  min-width: 0;
}

/* Tabbed interface for admin.php */
.tabs {
  display: flex;
  border: 1px solid #ccc;        /* outer border */
  border-bottom: none;            /* remove bottom so content border joins */
  border-radius: 5px 5px 0 0;     /* rounded top corners */
  overflow: hidden;
  margin: 1em auto 0;             /* center and remove bottom margin */
}
.tab-button {
  flex: 1;
  padding: 0.75em;
  background-color: #597057;      /* light grey */
  color: #333;                    /* dark text */
  border: none;
  font-size: 1em;
  cursor: pointer;
}
.tab-button:hover {
  background-color: #e0e0e0;
}
.tab-button.active {
  background-color: #4b2e2b;      /* your brown */
  color: #fff;
  font-weight: bold;
}
.tab-content-container {
  border: 3px solid #000000;
  border-top: none;               /* remove top to join tabs border */
  border-radius: 0 0 5px 5px;     /* rounded bottom corners */
  padding: 1em;
  margin: 0 auto 2em;             /* center and add bottom space */
}
.tab-content {
  display: block;
}
.tab-content.hidden {
  display: none;
}