body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

h1 {
  text-align: center;
  margin-top: 0;
  padding: 20px 0;
  font-size: 2em;
  color: blueviolet;;
}

.btn {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 10px;
  background-color: blueviolet;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}


/* Center container for table */

.order {
  text-align: center;
  max-width: 1000px;
  margin: 40px auto 20px;
  padding: 0 15px;
}

/* Table styles */
table {
  width: 90%;
  border-collapse: collapse;
  margin: 20px auto;
  font-size: 1em;
  align-items: center;
}
thead {
  background-color:beige;
  text-transform: uppercase;
}
th, td {
  border: 1px solid #ddd;
  padding: 12px 15px;
  text-align: center;
  vertical-align:middle;
  text-transform: capitalize;   /* Capitalize first letter of each word */

}
td button {
  display: inline-block;
  margin: 0 auto;
}
/* by AI: */
tbody tr:nth-child(even) {
  background-color: #a378b7;
}
th {
  font-weight: bold;
}



.status {
  padding: 5px 10px;
  border-radius: 4px;
  font-weight: bold;
}




/* Base styles for status rows */
.waiting {
  background-color: #ffe5b4; /* light orange */
  font-weight: bold;
}
.mark-ready {
  background-color: cornflowerblue;
  color: white;
}


.mark-delivered {
  background-color: green;
  color: white;
}
.table-wrapper {
  max-height: 300px;        /* adjust height as needed */
  overflow-y: auto;         /* vertical scroll only */
  overflow-x: auto;
  margin: 0 auto;
  border: 1px solid #6911a8;
  width: 90%;
  border: 1px solid #ccc;   /* optional: to show the box */
}

/* this part in generated by AI */
/* Set display block for both parts to control scrolling */
#ordersTable {
  width: 100%;
  border-collapse: collapse;
}

#ordersTable thead {
  display: block;
  background-color: beige;
}
#ordersTable tbody {
  display: block;
  max-height: 250px;  /* Slightly smaller to allow space for header */
  overflow-y: auto;
}

#ordersTable th, 
#ordersTable td {
  width: auto;
  min-width: 80px;
  padding: 10px;
  text-align: center;
  border: 1px solid #ddd;
  box-sizing: border-box;
  word-wrap: break-word; /* wrap long text instead of overflow */
}
#ordersTable th {
  position: sticky;
  top: 0;
  background-color: beige;
  z-index: 2;
}
.reset-wrapper {
  text-align: center;
  margin: 20px auto;
}

.reset-btn {
  padding: 10px 20px;
  background-color: crimson;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}
.reset-btn:hover {
  background-color: rgb(89, 156, 103);
}
.btn:hover {
  background-color: rgb(89, 156, 103);
}

/* for smaller screens */
@media (max-width: 600px) {
  #ordersTable th, 
  #ordersTable td {
    font-size: 0.8rem;
    padding: 6px;
    min-width: 100px;   /* prevent text from collapsing */
  }

  .btn {
    position: static;
    display: block;
    margin: 10px auto;
  }

  .table-wrapper {
    overflow-x: auto;
    width:100%;
    -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */

  }
  td button {
  display: inline-block;
  margin: 2px auto;
  font-size: 0.7rem;
  padding: 5px 8px;
}
#ordersTable {
  min-width: 600px;     /* ensures readability without breaking */
}
}

