/* main style of the entire page */
body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: #f4f4f4;
}

/* container layout and size */
.container {
  width: 100vw;
  min-height: 100vh;
  display: grid;

  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 160px auto auto 125px;
  gap: 10px;
  padding: 15px;
  box-sizing: border-box;
}

/* general container style */
.container div {
  padding: 20px;
  background-color: white;
  border-radius: 12px;
}

header {
  background-color: white;
  text-align: center;
  border-radius: 12px;
  padding: 20px;
  grid-column: 1 / 5;
}

footer {
  background-color: white;
  text-align: center;
  border-radius: 12px;
  padding: 20px;
  grid-column: 1 / 5;
}

/* Object Style Area */
input{
  padding: 0.6rem;
  margin: 0.3rem 0;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  background-color: #fefefe;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus{
  outline: none;
  border-color: #222;
  box-shadow: 0 0 0 2px rgba(34, 34, 34, 0.2);
}

button {
  background-color: #222;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
}

button:hover {
  background-color: #444;
}

/* Class Style Area */
.box0 { grid-column: 1 / 4; grid-row: 2 / 4; text-align:center; }
.box1 { grid-column: 4 / 5; grid-row: 2 / 3; }
.box2 { grid-column: 4 / 5; grid-row: 3 / 4; }

/* modal class style*/
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  min-width: 300px;
}

.modal-content input {
  margin-bottom: 15px;
  display: block;
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
}

.invalid{
  border-color:#e74c3c !important;
  box-shadow:0 0 0 2px rgba(231,76,60,.3);
}

.hidden {
  display: none;
}

/* id style area*/
#titleContainer{ text-align : center; }
#dashboard{ text-align : center; }

/* custom input object size*/
#idNumber{ width: 7%; }
#itemInput{ width: 12%; }
#itemDescriptionInput{ width: 15%; }
#itemQuantityInput{ width: 7%; }

/* Style for Inventory Table */
#inventoryTable {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  transition: opacity 0.3s ease;
}

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

#inventoryTable th {
  background-color: #f4f4f4;
}

/* Table cell size handler */
#inventoryTable td:nth-child(3){
  max-width:200px;
  word-wrap:break-word;
}

#inventoryTable.hidden {
  opacity: 0;
  visibility: hidden;
}

