body {
  font-family: Arial, sans-serif;
  padding: 20px;
}
.container {
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid #ccc;
  padding: 20px;
  background-color: hsla(313, 77%, 74%, 0.938);
  color: #0729c0;
}
h1 {
  text-align: center;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
table th, table td {
  padding: 8px;
  text-align: center;
}
table th { 
  background-color: gray;
}
#item-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;
}
#item-form input {
  padding: 8px;
  width: 150px;
}
button {
  padding: 10px 20px;
  background-color: blue;
  color: white;
  cursor: pointer;
  border: 1px solid #ccc;
}
button:hover {
  background-color: rgb(141, 19, 172); 
}
.summary {
  text-align: center;
  margin-bottom: 20px;
}
#total-items, #total-amount {
  font-weight: bold;
}
#print-invoice {
  background-color: blue;
  border: 1px solid #ccc;
}
#print-invoice:hover {
  background-color: rgb(141, 19, 172); 
}
#color-picker {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}
#color-picker label {
  font-weight: bold;
}
#color-picker input {
  padding: 5px;
  width: 50px;
}
.section {
  display: flex;
  font-size: bold;
}
.section textarea{
  padding: 0px 5px;
  font-size: bold;
}
.Description{
  display: flex;
}
textarea {
  width: 104%;
  height: 41px;
  margin-top: 1px;
  border: 2px solid #ccc; 
  border-radius: 4px; 
  font-size: 16px; 
  font-family: Arial, sans-serif; 
  resize: both; 
  box-sizing: border-box; 
  font-size: bold;
}
textarea:focus {
  border-color: #66afe9; 
  outline: none; 
  font-size: bold;
}
button {
  padding: 10px 20px;
   background-color: blue;
  color: white;
  cursor: pointer;
  border: 1px solid #ccc;
}

button:hover { 
  background-color: rgb(141, 19, 172); 
}
button:nth-of-type(2) { 
  background-color: blue;
 
}
button:nth-of-type(2):hover {
  background-color: rgb(141, 19, 172); 
}
.form-section{
  display: inline-flex;
  gap: 230px;
  grid-column-start: auto;
  justify-content: space-between;
}
.invoice{
  display: grid;
  gap: 2px;
  }
.number{
  display: grid;
  gap: 2px;
  float: left;
  justify-content: space-between;
  grid-row: 10px;
}
@media print {
  .number, .invoice{
    display: inline-block;
    margin-right: 320px; 
     }
}
@media print {
  .form-section {
      display: flex;   
      }
  .number, .invoice{
    margin-right: 100px;
    justify-content: space-between;
    grid-row: 10px;
  }
  }
@media print {
  textarea {
    border: none; 
    background: none;
    color: black; 
    font-size: 12pt; 
    width: auto; 
    height: auto; 
    resize: none; 
    display: block; 
    font-size: bold;
    
  }
}
@media print {
  #color-picker,
  #color-picker label {
    display: none; 
  }
 .invoice .Name, .Email, .Phone, .Address{
    display: none;
  }

  button,
  th:last-child,
  td:last-child {
    display: none;
  }
  #item-form {
    display: none;
  }
  #print-invoice {
    display: none;
  }
  .summary {
    display: block;
  }
  body {
    background-color: inherit;
    color: var(--print-color, black); 
  }
  .container {
    background-color: inherit;
   color:inherit;
  }
 #invoiceDate{
  color:inherit;
 }
  table th, table td {
     color: var(--print-color, black); 
  }
  textarea{
    color:inherit;
  }
  h2{
    display: none;
  }
 }
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  table th, table td {
    font-size: 14px;
  }
  #item-form {
    flex-direction: column;
    align-items: center;
  }
   #item-form input {
    width: 100%;
    margin-bottom: 10px;
  }
  button {
    width: 100%;
  }
  .form-section{
   display: block;
  }
}
@media (max-width: 480px) {
  h1 {
    font-size: 20px;
  }
  .summary {
    font-size: 14px;
  }
  table th, table td {
    font-size: 12px;
    padding: 1.6px;
  }
  #item-form input {
    width: 100%;
    padding: 6px;
  }
}
