#invoiceApp {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom:100px;
}
body, header.header.header-main {
  background: linear-gradient(180deg, #fff2e9, rgba(255, 242, 233, 0)) !important;
}
.section-cal-title p {
  font-size: 20px;
  line-height: 1.2em;
}
.page-container h2 {
    font-size: 36px;
    font-weight: 900;
}
.row.content-ff {
    margin: 0;
    padding-left: 15px;
    padding-right: 15px;
}
h1.title--3xl {
  font-size: 42px !important;
}
.hide{
  display:none;
}

.grid-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.grid-half-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
.rate-col{
  display:flex;
  align-items:center;
  gap:0.5rem;
}
.logo-drop {
  width: 150px;
  height: 150px;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
}
.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.print-only {
  display: none;
}
.hero-banner {
    display: none;
}
.rate-col {
  border: 1px solid #d1d5db;
  gap: 0!important;
}
.rate-col input {
  border: none!important;
}
.flatpickr-calendar.hasWeeks.animate.arrowTop.arrowLeft.open {
  margin-top: -50px;
}
.flatpickr-calendar.hasWeeks.animate.arrowTop.arrowLeft.open {
  margin-top: -100px;
}
@media screen and (max-width: 767px) {
  .page-container h2{
    font-size:24px!important;
  }
    #calcpagecontrols.linkGenerateWork {
      display: flex;
      width: 100%;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 20px;
  }
  .invoice-buttons{
    gap:5px!important;
  }
  #invoiceApp {
    margin-bottom: 60px!important;
  }
  div#savebutton, button.button-print, div#resetbutton {
    padding: 7px 12px!important;
    font-size: 14px!important;
  }
  .notes-totals-wrapper {
    margin-bottom: 0!important;
  }
  div#calcpagecontrols{
    margin-top:0px;
    padding-bottom:50px;
  }
  input.rate-input {
    padding-left: 0!important;
    padding-right: 4px!important
  }
  input.rate-symbol.editable-label {
    padding-right: 0!important;
    padding-left: 4px!important;
    width:10vw!important;
  }
  .flatpickr-calendar.hasWeeks.animate.arrowTop.arrowLeft.open {
      margin-top: -50px!important;
  }
  h1.title--3xl{
    font-size: 25px !important;
    font-weight: 900;
    margin-top: 0px;
  }
  .section-cal-title{
    padding-top:0px!important;
  }
  .notes-totals-wrapper {
    flex-direction: column;
  }
  .notes-totals-wrapper {
    flex-direction: column!important;
    align-items: unset!important;
  }
  .subtotals-col {
    flex: unset!important;
    margin-bottom: 20px;
  }
  .sc_card p {
    padding-left: 0!important;
    padding-right: 0!important;
  }
  .grid-half-col {
    display: flex !important;
    flex-direction: column;
  }
  .invoice-table,
  .invoice-table tbody,
  .invoice-table tr,
  .invoice-table td {
    display: block;
    width: 100%;
  }

  .invoice-table tr {
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    padding: 0.5rem;
  }

  .invoice-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border: none;
    border-bottom: 1px solid #eee;
  }
  .invoice-table td button.hide-on-print {
      position: absolute!important;
      margin-top: -43px!important;
      margin-left: -15px!important;
      transform: scale(1.3);
  }
  .invoice-table td:last-child {
    border-bottom: none;
  }
  .invoice-table th:last-child {
    display: none;
  }
  .invoice-table thead{
    display: none;
  }
  .invoice-table td:nth-child(2) {
    width: 26%!important;
    display: inline-block;
    padding-right: 0 !important;
  }
  .invoice-table td:nth-child(3) {
    width: 43% !important;
    display: inline-flex;
    padding-left: 0!important;
    padding-right: 8px!important;
  }
  input.rate-input, input.qty-input {
    width: 100%!important;
  }
  .invoice-table td:nth-child(3)::before {
    content: "×";
    font-weight: bold;
    margin-right: 0.7em;
    margin-left: 0.4em;
  }
  .invoice-table td:nth-child(4) {
    width: 14% !important;
    display: inline-block;
    padding-left: 0!important;
    padding-right: 0!important;
  }
  .invoice-table td:nth-child(5) {
    width: 10% !important;
    display: inline-block;
  }
  table.invoice-table td {
    border: none;
  }
  .grid-two-col {
    display: flex !important;
    flex-direction: column-reverse;
  }
}
@media print {
  .button-add-line,
  .hide-on-print, 
  .footer-content,
  .footer--bottom,
  .header-main--content,
  .page-container,
  .row-hero-ff,
  #invoiceApp textarea,
  .subtotals-row.hide-if-zero,
  .toggle-symbol,
  section#qa,
  div#calcoverlay,
  body .pt,
  section#section-trial,
  section.section-fluid {
    display: none !important;
  }

  body {
    background: none !important;
  }
   
  .fw {
    width:100%;
  }
  input.rate-input, input.qty-input {
    width: 120px!important;
    overflow: visible !important;
    text-align: center;
  }
  .invoice-table th:nth-child(2), .invoice-table td:nth-child(2){
    width: 150px!important;
    text-align: center;
  }
  .invoice-table th:nth-child(3), .invoice-table td:nth-child(3) {
    width: 150px!important;
    text-align: center;
  }
  .invoice-table th:nth-child(4), .invoice-table td:nth-child(4) {
    width: 150px!important;
    text-align: center;
  }
  .rate-col {
    border: none!important;
  }
  .main-content {
    margin-top: 0px !important;
  }
  input[type="date"] {
      width: auto !important;
  }
  .subtotal-expand-row input {
    text-align: right;
    padding-right: 0;
  }
  input.rate-input{
    padding-left:2px!important;
  }
  button.toggle-btn{
    color:transparent!important;
  }
  input[type="number"] {
    width: fit-content;
    padding-right:0!important;
  }
  .total-row{
    border-top: 2px solid #e5e7eb !important;
    border-bottom: 2px solid #e5e7eb !important;
    padding-top: 5px;
    padding-bottom: 5px;
  }
  .rate-col{
    gap:0!important;
  }
  input.rate-symbol {
    text-align: right;
    padding-right: 0!important;
  }
  input[type="date"]::-webkit-calendar-picker-indicator,
  input[type="date"]::-webkit-inner-spin-button {
    display: none !important;
    -webkit-appearance: none !important;
  }
  input[type="date"] {
    -moz-appearance: textfield !important;
  }
 .print-only {
    display: block !important;
    white-space: pre-wrap;    
    word-wrap: break-word;  
    border:none;
  }
  .invoice-table tr:last-child td {
    border-bottom: 1px solid #e5e7eb!important;
  }
  .invcol{
    display:flex;
    flex-direction:column;
    margin-left:auto;
    width:80%;
  }
  .invcol h2 {
    text-align: right;
    margin-bottom: -10px;
    font-size: 40px;
  }
  .invcol .margin-top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }
  .invcol input {
    text-align: right;
    padding: 0!important;
  }
  div#invoiceApp {
    max-width: 100%;
  }
  .subtotals-col{
    margin-left:auto;
  }
  .logo-drop {
    border: none !important;
    background: none !important;
    color: transparent !important;
  }
  #jibble-print-logo{
    display:  block!important;
    margin-top:50px;
  }
  #jibble-print-logo img {
    width: 200px;
    margin-left: auto;
    display: block;
  }
  
  button, input, select, textarea {
    border: none !important;
    background: transparent !important;
  }
  .subtotals-col { 
    gap: 0 !important; 
  }
  footer.footer.footer--main{
    visibility: hidden;
    margin-top:-100vh;
  }
  .totaltop{
    display:flex!important;
    flex-direction:column!important;
  }
}

.main-content .container{
  max-width:960px!important;
}
.margin-top { margin-top: 1rem; }
.margin-bottom { margin-bottom: 1rem; }
.margin-bottom-lg { margin-bottom: 2rem; }

input[type="text"],
input[type="number"],
input[type="date"],
textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #111827;
  background: transparent;
}

.editable-label,
.rate-symbol {
  display: inline-block;
  padding: 0.2rem 0;
  cursor: text;
  border: none;
  background: transparent;
  color: #374151;
  font-weight: 600;
}
.editable-label:hover,
.rate-symbol:hover {
  outline: 1px dashed #6b7280;
  background: #f3f4f6;
}
.editable-label:focus,
.rate-symbol:focus,
input:focus,
textarea:focus {
  outline: none;
}

.rate-symbol { width: 50px; text-align: center; }

.button-add-line,
.toggle-btn,
.button-print {
  font-weight: 600;
  cursor: pointer;
}
.button-add-line {
  background: rgb(255,102,3);
  color: #fff;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
}
.button-add-line:hover { opacity: 0.9; }
.toggle-btn {
  background: none;
  border: none;
  color: rgb(255,102,3);
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
button.button-print {
    display: inline-block;
    padding: 11px 24px;
    font-size: 17px;
    line-height: 25px;
    background: #fff;
    color: #ff6603;
    font-weight: 700;
    border: 1px solid #ff6603;
    border-radius: 24px;
    cursor: pointer;
    width: fit-content;
    max-width: 90%;
    text-align: center;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  table-layout: fixed;
}
.invoice-table th,
.invoice-table td {
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
}
.invoice-table th {
  background: rgba(255,102,3,0.4);
  color: #111827;
  text-align: left;
}

.invoice-table th:nth-child(1),
.invoice-table td:nth-child(1) { width: auto; }
.invoice-table th:nth-child(2),
.invoice-table td:nth-child(2) { width: 100px; }
.invoice-table th:nth-child(3),
.invoice-table td:nth-child(3) { width: 150px; }
.invoice-table th:nth-child(4),
.invoice-table td:nth-child(4) { width: 100px; }
.invoice-table th:nth-child(5),
.invoice-table td:nth-child(5) { width: 40px; }

.invoice-table td:last-child,
.invoice-table th:last-child {
  text-align: center;
}
.invoice-table td button.hide-on-print {
    position: relative;
    margin-left: -7px;
}
.invoice-table tr:last-child td {
  border-bottom: none;
}

.notes-totals-wrapper {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}
.notes-section {
  flex: 1;
}
.notes-section.expanded {
  display: block;
}
.subtotals-col {
  flex: 0 0 300px;
}
.section-cal-title{
  padding-top:80px;
}
.subtotals-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}
.subtotals-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  justify-content: space-between;
}
.subtotal-expand-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
input.rate-input, input.qty-input{
  width: 67px;
}
#jibble-print-logo{
  display:none;
}
.totaltop {
  border: 2px solid rgba(255, 102, 3, 0.4);
  flex-direction: column;
  text-align: center;
  margin-top:auto;
  display:none;
  width:100%;
  margin-left:auto;
}
.totaltop .total {
  background: rgba(255, 102, 3, 0.4);
}
.totaltop .totalval {
    padding-top: 15px;
    padding-bottom: 15px;
    font-size: 1.5em;
}
div#calcoverlay{
  display:none;
}
div#savebutton {
  display: inline-block;
  padding: 11px 24px;
  font-size: 17px;
  line-height: 25px;
  background: #fff;
  color: #ff6603;
  font-weight: 700;
  border: 1px solid #ff6603;
  border-radius: 24px;
  cursor: pointer;
  width: fit-content;
  max-width: 90%;
  text-align: center;
}
div#resetbutton{
  display: inline-block;
  padding: 11px 24px;
  font-size: 16.5px;
  line-height: 25px;
  background: #fff;
  color: #ff6603;
  font-weight: 700;
  border: 1px solid #ff6603;
  border-radius: 24px;
  cursor: pointer;
  width: fit-content;
  max-width: 90%;
  text-align: center;
}
.invoice-buttons {
    display: flex;
    justify-content: end;
    gap: 10px;
}
div#calcpagecontrols{
  display: inline-block;
  width: 100%;
  position: relative;
  max-width: 100%;
  text-align: center;
  padding-bottom: 100px;
  margin-top: 20px;
}

div#calcoverlay{
  display: none;
  transition-duration: .2s;
  position: fixed;
  background: #000;
  height: 100%;
  width: 100%;
  z-index: 10000000;
  opacity: .95;
  top: 0;
  left:0;
}

.overlayinside {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  max-width: 90%;
}

#copied-to-clipboard {
  opacity: 0;
  transition: opacity .5s ease-out;
  display: block;
  position: absolute;
  top: -70px;
  left: 50%;
  transform: translate(-50%);
  height: fit-content;
  display: inline-block;
  padding: 8px 16px;
  font-size: 20px;
  margin-right: 20px;
  line-height: 25px;
  background: #fff;
  color: #ff6603;
  font-weight: 700;
  border-radius: 24px;
  cursor: pointer;
  width: fit-content;
}

#saveurlbox {
  overflow: auto;
  resize: vertical;
  width: 100%;
  height: 200px;
  font-size: 18px;
  padding: 10px 15px;
  border: 2px solid #ff6603;
  border-radius: 20px;
  background: white;
}

#overlaybuttons {
  text-align: center;
  margin-top: 20px;
}

.overlaybutton {
  display: inline-block;
  padding: 8px 16px;
  font-size: 20px;
  margin-right: 20px;
  line-height: 25px;
  background: #fff;
  color: #ff6603;
  font-weight: 700;
  border: 1px solid #ff6603;
  border-radius: 24px;
  cursor: pointer;
  width: fit-content;
}

 #closeOverlay {
  margin-right: 0;
}

