/******** START INVOICE GENERATOR CSS *********/

.invoice-container {
  background: #fff;
  width: 210mm; /* fixed width ensures PDF consistency */
  max-width: 100%; /* responsive fallback */
  min-height: auto; /* allow content to grow */
  margin: 2rem auto;
  padding: 0mm;
  border-radius: 8px;
  box-shadow: none!important;
  font-family: Arial, sans-serif;
  color: #000;
  box-sizing: border-box;
}


.invoice-info {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.invoice-info label {
  display: flex;
  flex-direction: column;
  font-weight: bold;
  flex: 1 1 200px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

thead {
  background: #dddddd!Important;
}

th, td {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: left;
}

input[type="text"],
input[type="number"],
input[type="date"],
select {
  padding: 6px;
  width: 100%;
  box-sizing: border-box;
}

.primary-btn {
  background-color: #EFB301;
  color: #000;
  border: 5px solid #000;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  margin: 5px 10px 10px 0;
}

.remove-btn {
  background: #f44336;
  color: white;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 999px;
}

.total-section {
  font-size: 1.1em;
  margin: 20px 0;
  line-height: 1.6;
}

.preview-box {
  padding: 20px;
  background: #fff;
  color: #000;
  margin-top: 20px;
}
/* Logo upload */
.logo-upload input {
  margin-bottom: 10px;
}

/* Notes box */
.notes-section {
  margin-top: 20px;
}

.notes-section textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px;
  border: 2px solid #000;
  border-radius: 8px;
  resize: vertical;
  font-family: inherit;
  font-size: 1em;
}

/* Compact tax input */
#tax-rate {
  width: 100%;
  max-width: 80px;
}

.company-info label {
  display: block;
  margin-bottom: 12px;
  width: 100%;
}

.company-info input {
  width: 100%;
  padding: 8px;
  font-family: inherit;
  font-size: 1em;
  border: 2px solid #000;
  border-radius: 8px;
  box-sizing: border-box;
}
.email-phone-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

#remove-logo {
  margin-left: 15px;
  background-color: #EFB301;
  border: 5px solid #000;
  border-radius: 999px;
  padding: 6px 15px;
  cursor: pointer;
  color: #000;
  font-weight: bold;
}
#remove-logo:hover {
  opacity: 0.9;
}
#preview {
  width: 210mm;
  background: #fff;
  margin: auto;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  .invoice-container {
    width: 100%;
    padding: 20px;
    margin: 1rem;
    border-radius: 0;
  }

  #preview {
    width: 100%;
    padding: 10px;
  }

  .invoice-info {
    flex-direction: column;
    gap: 10px;
  }

  .email-phone-row {
    flex-direction: column;
    gap: 6px;
  }

  .primary-btn,
  .remove-btn {
    width: 100%;
    margin: 5px 0;
  }

  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    margin-bottom: 15px;
    border-bottom: 2px solid #ccc;
  }

  td {
    text-align: right;
    position: relative;
  }

  td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    width: 45%;
    padding-right: 10px;
    font-weight: bold;
    text-align: left;
  }

  .invoice-info label {
  display: flex;
  flex-direction: column;
  font-weight: bold;
  flex: 1 1 50px;
}
.copyright {
    margin-bottom: 10% !important;
}
}

/******** END INVOICE GENERATOR CSS *********/

.invoice-hero {
  background-color: #ffc170;
  color: #000;
  padding: 40px 20px;
  text-align: center;
  border-bottom: 5px solid #000;
}

.invoice-hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.invoice-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.invoice-hero p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}
