body {
  font-family: Arial, sans-serif;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  /* border: 1px solid #ccc; */
  padding: 20px;
  /* background-color: #f9f9f9; */
}
.container1 {
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid #ccc;
  padding: 20px;
  /* background-color: #f9f9f9; */
}
.invoice-table1{
  width: 60%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

h1 {
  text-align: center;

}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}



table th, table td {
  padding: 8px;
  text-align: center;
  border: 1px solid #ccc;
}

table th {
  /* background-color: #f2f2f2; */
  background-color: gray;
}

#item-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;
}

#item-form input {
  padding: 8px;
  width: 150px;
}

.summary {
  text-align: center;
  margin-bottom: 20px;
}

#total-items, #total-amount {
  font-weight: bold;
}

#print-invoice {
  /* background-color: #008CBA; */
  background-color:blue;
  color: white;
  border: 1px solid #ccc;
}

#print-invoice:hover {
  /* background-color: #006f8e; */
  background-color: rgb(141, 19, 172); 
}

/* Show color picker tabs */
#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;
}
.section textarea{
  padding: 0px 5px;
}
.Description{
  display: flex;
}
textarea {
  width: 50%;
  height: 60px;
 /* width: 100%;  Make the textarea take the full width of its parent */
 /* height: 150px;  Set a fixed height */
  /* padding: 10px; Add some padding inside the textarea */
  margin-top: 1px;
  border: 2px solid #ccc; /* Add a light border around the textarea */
  border-radius: 4px; /* Optional: add rounded corners */
  font-size: 16px; /* Set font size */
  font-family: Arial, sans-serif; /* Choose a font */
  resize: both; /* Allow the user to resize the textarea */
  box-sizing: border-box; /* Make sure padding is included in the width/height calculation */
}

textarea:focus {
  border-color: #66afe9; /* Change border color on focus */
  outline: none; /* Remove the default focus outline */
}
button {
 /* padding: 5px 10px;
  margin: 2px;
  cursor: pointer;
  background-color: #f44336;  Red for Delete */
  /*color: white;*/
  /* border: none; */
  /* border-radius: 4px;*/
 /*  border: 1px solid #ccc;*/
 padding: 5px 10px;
 margin: 2px;
 cursor: pointer;
/* background-color: #f44336;  Red for Delete */
background-color: blue;
 color: white;
/* border: none; */
 border-radius: 4px;
 border: 1px solid #ccc;
}

button:hover {
  background-color: rgb(141, 19, 172);  /* Darker Red for hover */
}

button:nth-of-type(2) {
  background-color:blue; /* Green for Edit */
}

button:nth-of-type(2):hover {
  background-color: rgb(141, 19, 172);  /* Darker Green for hover */
}
.form-section{
  /* display: inline-flex;
  gap: 230px;
  grid-column-start: auto;
  justify-content: space-between; */
  display: flex;
  gap: 94px;
 
}
.label .textarea{
  display: flex;
}
.invoice{
  display: grid;
  gap: 2px;
 width: 550px;

}
.number{
  display: grid;
  gap: 2px;
  float: right;
  justify-content: space-between;
  grid-row: 10px;
  width: 550px;
  
}
@media print {
  .number, .invoice{
    display: inline-block;
    margin-right: 320px; /* Optional: Adds space between the two elements */
   
  }
}

@media print {
  .form-section {
    display: flex;
    /* justify-content: flex-start; */

  }
  
.invoice{
  width: 1000px;
}

  .number, .invoice{
     /* Optional: Adds space between the two elements */
    margin-right: 100px;
    justify-content: space-between;
    grid-row: 10px;
 
  }
  
}
h1{
  padding:0px 0px 2px 320px
  
}
/* Printing styles */
@media print {
  textarea {
    border: none; /* Remove the border when printing */
    background: none; /* Remove the background */
    color: black; /* Ensure text is printed in black */
     /* font-size: 12pt;Adjust font size for printing */
     font-size: 12pt;
    width: auto; /* Adjust width for printing */
    height: auto; /* Adjust height for printing */
    resize: none; /* Disable resizing on print */
    display: block; /* Ensure it displays as a block element */
   font-weight: 600;
  }
}


/* Hide color pickers and labels when printing */
@media print {
  #color-picker,
  #color-picker label {
    display: none; /* Hide color pickers and labels during printing */
  }
 .invoice .Name, .Email, .Phone, .Address{
    display: none;
  }

  button,
  th:last-child,
  td:last-child {
    display: none;
  }

  /* Hide the form for adding new items */
  #item-form {
    display: none;
  }

  /* Hide the print button */
  #print-invoice {
    display: none;
  }

  /* Show total amount and items during print */
  .summary {
    display: block;
  }

  /* Set the print color dynamically */
  body {
    /* background-color: inherit; */
    color: var(--print-color, black); /* Default to black if no color is chosen */
  }

  .container {
   /* background-color: inherit;  Remove background color when printing */
  }

  table th, table td {
    color: var(--print-color, black); /* Set print text color */
  }
}

/* Media Query for Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  table th, table td {
    font-size: 14px;
    /*padding-right: 256px;*/
  }

  #item-form {
    flex-direction: column;
    align-items: center;
  }
 
  #item-form input {
    width: 100%;
    margin-bottom: 10px;
  }

  button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 20px;
  }

  .summary {
    font-size: 14px;
  }

  table th, table td {
    font-size: 12px;
    display: flex;
  }

  #item-form input {
    width: 100%;
    padding: 6px;
  }
}
