* {
  touch-action: manipulation;
}
p {
  font-family: Arial, Helvetica, sans-serif;
}
#timetable {
  padding: 5px;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 30px;
}
#menu {
  display: flex;
  justify-content: flex-end;
  margin-right: 30px;
}
span.admin_update {
  text-align: right;
  float: right;
  margin: auto 5px;
}
div.head {
  width: 180px;
  text-align: center;
  padding: 5px;
  border: 2px solid black;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  color: white;
  background-color: dimgrey;
  font-weight: bold;
}
div.head:hover {
  background-color:grey;
}
div.head:active {
  background-color:darkcyan;
}
div.alertwindow {
  width: max-content;
  height: max-content;
  position: fixed;
  background-color:aliceblue;
  padding: 10px 30px;
  border: 2px solid black;
  inset: 0px;
  margin: 50px auto;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
}
div.alertwindow h2 {
  margin-top: -10px;
}
div.close {
  user-select: none;
  text-align: right;
  border: 2px solid black;
  width: max-content;
  padding: 0px 4px;
  font-weight: bold;
  font-family: Arial, Helvetica, sans-serif;
  background-color: dimgrey;
  color: white;
  margin-left: auto;
  margin-right: -20px;
}
div.close:hover {
  cursor: pointer;
  background-color:grey;
}
div.close:active {
  background-color:darkcyan;
}
a.head {
  text-decoration: none;
  width: 194px;
  margin-left: 10px;
  margin-top: 10px;
  display: inline-flex;
}
form {
  display: flex;
  flex-direction: column;
}
button {
  width: max-content;
  padding: 5px 20px;
  align-self: center;
  border: 2px solid black;
  background-color: dimgrey;
  color: white;
  font-weight: bold;
}
button:hover {
  cursor: pointer;
  background-color:grey;
}
button:active {
  background-color:darkcyan;
}
div.inputoption {
  display: flex;
  padding: 10px;
}
div.inputoption label {
  padding: 10px;
}
div.inputoption input {
  margin-left: auto;
}
table, th, td {
  border: 2px solid;
  padding: 5px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 30px;
  text-align: left;
}
th {
  background: #ddd;
}
tr.odd {
  background: #cfefff;
}
table {
  border-collapse: collapse;
  margin-left: auto;
  margin-right: auto;
}
#internetstatus {
  padding: 5px;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 30px;
}
#calendar {
  padding: 5px;
  text-align: center;
}
#refreshtable {
  text-align: center;
}
#adminconfig {
  text-align: center;
  margin-top: 6px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: bold;
}
#adminconfig input[type="time"] {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  padding: 3px 6px;
  border: 2px solid black;
  vertical-align: middle;
}
#adminconfig button {
  vertical-align: middle;
}
/* Matches the "Daily reset time" control above it so the two admin-only
   controls under the table read as one row of settings. */
#logfilterwrapper {
  text-align: center;
  margin-top: 6px;
  margin-bottom: 6px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: bold;
}
#logfilterwrapper select,
#logfilterwrapper input[type="text"] {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  padding: 3px 6px;
  border: 2px solid black;
  vertical-align: middle;
}
/* The two filters read as separate fields rather than one run-on line, and wrap
   as whole fields on a narrow screen instead of splitting a label from its input. */
#logfilterwrapper .logfilter-field {
  display: inline-block;
  white-space: nowrap;
  margin: 0 8px;
}
#logfilterwrapper button {
  vertical-align: middle;
}
.on {
  color: green;
  background-color: lightgreen;
  font-weight: bold;
}
.off {
  color: red;
  background-color: pink;
  font-weight: bold;
}

footer {
    position:fixed;
    bottom:0;
}

#usermenu, #internetmenu {
  display: none;
  position: absolute;
  z-index: 10;
  background-color: white;
  border: 2px solid black;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: bold;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
}
.usermenu-item {
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
}
.usermenu-item:hover {
  background-color: dimgrey;
  color: white;
}
/* Admins click the ON/OFF in "Internet is ON/OFF" to turn the internet on for a while. */
.internet-toggle {
  cursor: pointer;
  text-decoration: underline dotted;
}

/* The store: a full-page panel over the time table. The site has no mobile
   viewport tag, so a phone draws it ~980px wide and shrinks it (the time table
   copes with 30px text); the store is sized in em and scaled up on touch
   screens the same way, without changing how the rest of the page lays out. */
#menu {
  flex-wrap: wrap;
}
#storewindow {
  position: fixed;
  inset: 10px;
  z-index: 20;
  overflow-y: auto;
  max-width: 1100px;
  margin: 0 auto;
  background-color: aliceblue;
  border: 2px solid black;
  padding: 10px 16px 40px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  box-sizing: border-box;
}
@media (pointer: coarse) {
  #storewindow {
    font-size: 30px;
  }
}
#storewindow button, #storewindow input, #storewindow select {
  font-size: 0.9em;
}
#storewindow .close {
  position: sticky;
  top: 0;
  margin-right: 0;
}
#storewindow h2, #storewindow h3 {
  margin: 0.6em 0;
}
.store-balance {
  font-size: 1.35em;
  font-weight: bold;
  margin: 0.25em 0;
}
.store-hint {
  color: #444;
}
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10em, 1fr));
  gap: 0.6em;
}
.store-card {
  background: white;
  border: 2px solid black;
  padding: 0.5em;
  display: flex;
  flex-direction: column;
  gap: 0.25em;
  text-align: center;
}
.store-card img {
  width: 100%;
  height: 7.5em;
  object-fit: contain;
}
.store-card button {
  margin-top: auto;
  width: 100%;
  padding: 0.5em 0.4em;
  white-space: normal;
}
#storewindow button:disabled {
  background-color: #aaa;
  cursor: not-allowed;
}
.store-name {
  font-weight: bold;
}
.store-size, .store-note {
  color: #555;
  font-size: 0.875em;
}
.store-note {
  color: darkorange;
}
.store-price {
  font-size: 0.95em;
}
.store-cartline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
  padding: 0.25em 0;
  border-bottom: 1px solid #ccc;
}
.store-cartname {
  flex: 1 1 14em;
}
.store-cartline button, .store-cartline select {
  align-self: center;
}
button.store-small {
  padding: 0.2em 0.6em;
}
.store-inactive {
  opacity: 0.55;
}
.store-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4em;
  margin: 0.4em 0;
}
.store-controls input, .store-controls select {
  padding: 0.25em 0.4em;
  border: 2px solid black;
}
.store-controls button {
  align-self: auto;
}
body.store-open {
  overflow: hidden;
}

/* Hiding time-table columns (columns.js): the x on a header, and the bar of
   hidden ones above the table to bring them back. */
.column-hide {
  margin-left: 8px;
  padding: 0 6px;
  font-size: 0.7em;
  color: #666;
  cursor: pointer;
  vertical-align: middle;
  user-select: none;
}
.column-hide:hover {
  color: black;
  background-color: #bbb;
}
#hiddencolumns {
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  margin-top: 6px;
}
#hiddencolumns button.column-show {
  display: inline-block;
  margin: 3px;
  padding: 3px 10px;
  font-size: 18px;
}
/* Flavor picker on a store card, and the "tick to add as flavors" box in admin search. */
select.store-flavor {
  width: 100%;
  font-size: 0.9em;
  padding: 0.2em;
}
.store-tick {
  font-size: 0.85em;
  color: #444;
  align-self: flex-start;
}
/* "Can't find the snack you want?" under the balance at the top of the store. */
.store-ask {
  margin: 0.2em 0 0.6em;
  padding: 0.4em 0.6em;
  background-color: #fff8dc;
  border-left: 4px solid goldenrod;
  font-style: italic;
}
