.error {
  /* red border */
  border: 1px #c00 solid;
}

:root {
  --button-blue: rgb(19, 181, 234);
  --light-blue-background: rgb(229, 244, 248);
  --mustard: rgb(238, 178, 16);
  --dark-blue: rgb(30, 62, 147);
  --violet: #4f34fe;
  --selected-border: #c9e6f1;

  --highlight: var(--violet);
  --primary: var(--dark-blue);
  --secondary: var(--button-blue);
  --button: var(--button-blue);
}

#main-form {
  /* Remove the left and right margins */
  margin-left: 0;
  margin-right: 0;

  /* Ensure the width is 100% of the parent, up to 600px */
  width: 100%;
  max-width: 600px;

  /* Add padding instead of margin for inner spacing */
  /* padding-left: 16px;
  padding-right: 16px; */

  /* Ensure padding is included in width calculation */
  box-sizing: border-box;

  /* Center the form */
  margin: 0 auto;

  /* Maintain other styles */
  display: block;
  flex-grow: 1;
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  font-size: 20px;
  line-height: 30px;
}

/* Adjust the parent container if necessary */
body,
main {
  padding-left: 0;
  padding-right: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
/* #main-form>h1 */
/* #main-form > h2,
#main-form > h3,
#main-form > p,
#main-form > button,
#carton-sizes {
  margin-left: 1.5rem;
} */

#main-form > label {
  display: flex;
  /* margin-left: 1rem; */
  margin-bottom: 0;
}

/* #ref {
  text-align: right;
  margin-right: 1.5rem;
} */
#submitted > h2,
#submitted > h3,
#submitted > p,
#submitted > button {
  margin: 1rem 2rem;
}

/* this ul is full width up to 768px */
.hidden {
  visibility: hidden;
}

.highlight {
  /* important */
  background-color: var(--highlight) !important;
  color: white !important;
  transition: background-color 0.5s ease-in;
}
/*<div id="error-modal" x-show="!!modalMessage"></div>
*/
#errormodal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* #errorbox is in the middle of the screen */
#errormodal #errorbox {
  background-color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  max-width: 600px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#errorbox {
  font-size: 24px;
}

#errorbuttons {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
}

/* submitted and children of submitted should be centred */
#submitted {
  font-size: 24px;
  display: block;
  justify-content: center;
  align-items: start;
  flex-direction: column;
  max-width: 600px;
  margin: 0 auto;
  padding: 0;
}
body {
  /* font-family: "Montserrat", sans-serif; */
  font-size: 1.25rem;
  /* margin: 0;
    padding: 0;
    background-color: #f7f7f7;
    color: #333; */
}

/* add a little margin */
#submit {
  margin-bottom: 1rem;
}

#notes,
#notes-bot {
  max-width: 600px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem;
}

#carton-sizes {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#carton-sizes div {
  display: flex;
  flex-direction: column;
}
#carton-sizes div img {
  align-self: center;
}

textarea {
  max-width: 600px;
  width: 100%;
  height: 100px;
  padding: 12px 20px;
  box-sizing: border-box;
  border: 2px solid #ccc;
  border-radius: 4px;
  background-color: #f8f8f8;
  font-size: 16px;
  resize: none;
}
/*rotate down arrow to the right */
.arrowright {
  transform: rotate(-90deg);
  transition: transform 0.2s;
}
.arrowdown {
  transform: rotate(0deg);
  transition: transform 0.2s;
}
#rooms {
  max-width: 600px;
  margin: 1rem auto;
  padding: 0;
}
/* #rooms {
    padding-bottom: 40vh;
} */
.quantity {
  display: inline-block;
  width: 1rem;
  text-align: right;
  font-size: 1rem;
}
#inventory {
  margin-bottom: 40vh;
}

#rooms > li {
  list-style: none;
  padding: 0rem;
  margin: 0rem;
  /* border: 1px solid #ccc; */
  /* border-style: none; */
  border-radius: 0.5rem;
}

/* #rooms > .unselectedRoom > ul {
            padding: 0;
            margin: 0;
        } */

.tick {
  font-size: 24pt;
  color: #0f0;
  margin: 0.5rem;
  padding: 0;
  height: 2rem;
  width: 2rem;
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  background-color: #f7f7f7;
  line-height: 26px;
}

button.doaction {
  border-radius: 0.5rem;
}
#inventory .room-actions > button {
  margin: 0.5rem;
  padding: 0.5rem;
  height: 2rem;
  width: auto;
  /* dispay flow in parent, act like a block internally */
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  background-color: var(--button);
  /* rgb(19, 181, 234); */

  cursor: pointer;
  color: white;
}

#home li {
  position: relative;
}

#inventory .inactive {
  color: #888;
}

#inventory .iconbutton {
  /* display: flex; */
  flex-shrink: 0;
  flex-grow: 0;
  margin: 0.25rem;
  padding: 0;
  height: 1.5rem;
  overflow: hidden;
  width: 1.5rem;
  min-height: 1.5rem;
  min-width: 1.5rem;
  /* dispay flow in parent, act like a block internally */
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  background-color: #f7f7f7;
  cursor: pointer;
  color: black;
  /* ensure text is centred */
  /* justify-content: center;
    align-items: center; */
  vertical-align: middle;
}

.iconbutton span {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
}

#inventory h1,
#submitted h1 {
  background-color: var(--primary);
  /* #1A3A85; */
  color: white;
  min-height: 100px;
  /* vertically centre the text*/
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 36pt;
  line-height: 72px;
}

#inventory h2 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 24pt;
}

#inventory h3 {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 18pt;
  color: var(--primary);
  /* #1A3A85; */
}

#inventory h4 {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 16pt;
  color: #1a3a85;
  margin-top: 0.5rem;
}

#home {
  padding: 0;
}

#home > li {
  list-style: none;
  padding: 0;
  margin: 0.5rem;
  border: none;
  border-radius: 0.5rem;
  max-width: 768px;
}

/* #inventory>div>ul>li {
    list-style: none;
    padding: 0;
    margin: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    max-width: 768px;
} */

#rooms > li > ul {
  margin: 0 0.5rem 0.5rem 0.5rem;
  padding: 0;
  background-color: white;
  /* #F7FDFF; */
  /* overflow-y: scroll;
    max-height: 45vh;
        */
  padding: 0;
}

#rooms > li > ul > li {
  list-style: none;
  padding: 0rem;
}

#rooms li.expandedGroup {
  background-color: var(--selected-border);
  transition: background-color 0.5s ease-in;
}

#rooms li.expandedItem + li:not(.expandedItem) {
  border-top: 0.5rem solid var(--selected-border);
}

#rooms .selectedRoom ul {
  max-height: 300vh;
  transition: max-height 0.4s cubic-bezier(0.73, 0.11, 0.7, 0);
  /* transition: max-height 0.4s cubic-bezier(1.000, 0.005, 1.000, -0.015); */
}

#rooms .unselectedRoom ul {
  transition: max-height 0.4s cubic-bezier(0.25, 0.735, 0.005, 0.65);
  /* transition: max-height 0.4s cubic-bezier(0.000, 1.000, 0.000, 1.000); */
  max-height: 0;
  margin-bottom: 0;
}

#rooms .room-actions {
  display: flex;
  justify-content: space-between;
  overflow: hidden;
}

#rooms .unselectedRoom .room-actions {
  transition: max-height 0.5s ease-in;
  max-height: 0;
}

.unused {
  color: #888;
}

#rooms li {
  transition: background-color 0.5s ease-in;
  overflow: hidden;
}

#rooms .selectedRoom {
  background-color: var(--selected-border);
  /* max-height: 500px; */
}

#rooms .unselectedRoom {
  background-color: #ffffff;
  /* max-height: 32px; */
}

#rooms .room-header {
  list-style: none;
  position: relative;
  display: flex;
  align-self: stretch;
  justify-content: space-between;
  /* Left align along the main axis */
  /* 10px padding betwen items */

  /* Add this line */

  align-items: center;
}

#rooms .room-header .clickable-head {
  width: 100%;
  display: flex;
  align-self: stretch;
  justify-content: space-between;
  align-items: center;
}

#rooms .room-header * {
  display: flex;
}

#rooms .room-header div h3 {
  display: flex;
  margin: 0.25rem 1rem;
}

/* div shinks down to the size of the children (input child has :before and :after pseudo elements) */
div:has(> input.toggle) {
  position: relative;
  margin: 0.5rem;
}

/* Custom styles for the toggle switch */
input.toggle {
  width: 0;
  height: 0;
  margin: 13px 24px 13px 24px;
}

input.toggle:before {
  position: absolute;
  content: "";
  display: flex;

  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  width: 48px;
  height: 26px;
  background-color: #ccc;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

.hasitems input.toggle:checked:before {
  background-color: #99b4ca;
}

input.toggle:after {
  position: absolute;
  content: "";
  display: flex;

  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background-color: white;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

input.toggle:checked:before {
  background-color: #2196f3;
}

input.toggle:focus:before {
  box-shadow: 0 0 1px #2196f3;
}

input.toggle:checked:after {
  -webkit-transform: translateX(22px);
  -ms-transform: translateX(22px);
  transform: translateX(22px);
}

/* Rounded sliders */
input.toggle:before {
  border-radius: 50vh;
}

input.toggle:after {
  border-radius: 50%;
}
/* seachModal is stuck to the bottom of the screen
maximum height is half the screen height
make scrollable if it exceeds the height
hide exceess content
*/

:root {
  scroll-behavior: smooth;
}

/* seachModal is stuck to the bottom of the screen
maximum height is half the screen height
make scrollable if it exceeds the height
hide exceess content
*/
