.table {
  display: flex;
  flex-direction: column;
  width: 80%;
  border: 1px solid #000;
  margin-left: auto;
  margin-right: auto;
}

.table-header,
.table-row {
  display: flex;
  width: 100%;
}

.table-cell {
  flex: 2;
  padding: 10px;
  border: 1px solid #000;
  /* text-align: center; */
}

.table-desc {
  flex: 6;
}

.table-by {
  flex: 1;
  text-align: center;
}

.date,
.qty,
.ext,
.rtl {
  text-align: center;
}

.amt {
  text-align: right;
}

.table-header .table-cell {
  font-weight: bold;
  background-color: #f2f2f2;
  text-align: center;
}

.proj-head {
  padding-left: 5em;
  font-weight: bolder;
  text-decoration: underline;
}
.project-header {
  cursor: pointer;
  background-color: #2a2a2a;
  color: #fff;
  font-weight: bold;
}
.project-header:hover {
  background-color: #3a3a3a;
}
/* .project-details {
  display: none;
} */
.project-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.7s ease;
}
.toggle-icon{
  margin-right: .5em;
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 1.2em;
}
.project-header.open .toggle-icon {
  transform: rotate(180deg);
}
.project-details.open {
  max-height: 1000px; /* large enough to accommodate your content */
}

.cust-info {
  display: flex;
  flex-direction: column;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
  font-size: larger;
  font-weight: bolder;
  flex: 1;
  padding-bottom: 0.5em;
}
.flex-container {
  display: flex;
  justify-content: space-around;
}
.flex-cell {
  /* border: #000 solid thin;
  border-radius: 5px;
  padding: .5em; */
}
.info {
  padding: 0 1em;
  border-left: #000 solid thin;
  border-right: #000 solid thin;
}
.modal-lg {
  max-width: 80%;
  height: 80vh;
}
#pdfModalContent {
  height: 85vh;
  /* width: 85vw; */
}
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
}

.modal[aria-hidden="false"] {
  display: flex;
}
.billing-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1em;
  /* width: 85vw;
  margin-left: auto;
  margin-right: auto; */
  padding: 1em 0;
  box-shadow: 0 0 5px #aaa inset;
  /* background-color: #2b2b2b;
  color: #fff; */
}

.billing-nav-left,
.billing-nav-center,
.billing-nav-right {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}

.billing-nav-left {
  justify-content: flex-start;
}

.billing-nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  /* justify-content: center;
  min-width: 200px; */
}

.billing-nav-right {
  justify-content: flex-end;
  gap: 0.5em;
  flex-wrap: wrap;
}

.invoice-total {
  font-size: 1.25em;
  font-weight: bold;
  background-color: #444;
  padding: 0.5em 1em;
  border-radius: 4px;
  white-space: nowrap;
  color: #fff;
}
/* .invoice-total {
  padding: .25em .5em;
  border: thin solid #8fbc8f;
  border-radius: 5px;
} */
.invoice-grid::before {
  all: unset;
}
.invoice-grid-wrapper {
  width: 85%;
  margin: 2em auto; /* centers the wrapper horizontally */
}

.invoice-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 equal columns */
  gap: 1em;
}

.invoice-btn {
  padding: 10px;
  background-color: #337ab7;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
  width: 100%; /* button fills the grid cell */
}

.invoice-btn:hover {
  background-color: #286090;
}

.modal-content {
  background: #fff;
  color: #000;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  /* max-width: 400px; */
  text-align: center;
}

.modal-buttons {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.responsive-iframe {
  width: 100%;
  height: 85vh;
}
#billing-nav {
  position: -webkit-sticky; /* For Safari */
  position: sticky;
  top: 84px;
  background-color: white;
  padding: 10px;
  z-index: 1000; /* Ensure it stays on top of other elements */
  border: none;
  /* border-bottom: 1px solid #ccc; */

  /* margin-left: auto;
  margin-right: auto; */
  font-weight: 600;
  font-size: 14px;
  line-height: 160%;
  letter-spacing: 1px;
  box-shadow: 0 0 5px #333 inset;
  margin-bottom: 5px;
}
#billing-nav ul {
  justify-content: center;
}
li.menu-item .disabled-link {
  pointer-events: none;
  cursor: default;
  color: gray; /* Style to indicate the link is disabled */
  text-decoration: none; /* Remove underline if desired */
}
li.menu-item:hover .disabled-link {
  color: gray !important; /* Keep the same color on hover */
  text-decoration: none; /* Ensure no underline on hover */
}
#err-msg {
  display: inline;
  color: red;
  font-weight: bolder;
  padding-left: 0.5em;
}
/* #logout-wrap { */
/* margin-left: auto; */
/* } */
.billing-nav-btn {
  margin-right: 1em;
}
/* .billing-nav-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
  font-weight: 800;
  font-size: 16px;
  line-height: 160%;
  letter-spacing: 1px;
  padding-bottom: 0.5em;
} */

.table-wrapper {
  width: 85%;
  margin: 2em auto;
  font-family: Arial, sans-serif;
  font-size: 0.95em;
}
.year-header {
  grid-column: 1 / -1;
  font-size: 1.2em;
  font-weight: bold;
  margin: 1em 0 0.5em;
  color: #4f4f4f;
  border-bottom: 1px solid #888;
  padding-bottom: 0.25em;
}

.grid-container {
  display: grid;
  grid-template-columns: 1fr 3fr 0.5fr 0.5fr 1fr 1fr 1fr;
  gap: 0.5em;
  padding: 0.75em;
  border-bottom: 1px solid #444;
  background-color: #cccccc;
  color: #333333;
}
.grid-container::before {
  all: unset;
}
.grid-header {
  font-weight: bold;
  background-color: #ababab;
  margin-bottom: 0.25em;
  position: sticky;
  top: 220px;
  z-index: 1;
}
.grid-item {
  word-break: break-word;
}
/* Center alignment for specific columns */
.grid-item.center {
  text-align: center;
}
.grid-item.right {
  text-align: right;
  padding-right: 1em;
}
/* Optional: Add monospace font for dollar formatting */
.grid-item.dollar {
  font-family: monospace;
}

.full-width {
  grid-template-columns: 1fr 1fr;
  background-color: #333;
  font-weight: bold;
  color: #fff;
  margin-top: 1em;
}
/* .full-width .grid-item {
  grid-column: span 7;
  background-color: #555;
  color: #ccc;
  padding-left: 5em;
  font-weight: bolder;
} */
@media (max-width: 1024px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-header {
    display: none; /* Hide header on small screens */
  }

  .grid-container .grid-item::before {
    content: attr(data-label) ": ";
    font-weight: bold;
    display: inline-block;
    width: 40%;
  }

  .grid-item {
    padding: 0.25em 0;
  }
}
@media (max-width: 768px) {
  /* Adjust the breakpoint as needed */
  .grid-container {
    grid-template-columns: 0.75fr 1.75fr 0.5fr 1fr; /* Adjust as needed */
  }
  .grid-item::before {
    content: attr(data-label) ": ";
    font-weight: bold;
    display: inline-block;
    width: 40%;
  }
  .grid-item:nth-child(4), /* Hide column D */
  .grid-item:nth-child(5), /* Hide column E */
  .grid-item:nth-child(6) {
    /* Hide column F */
    display: none;
  }
  .full-width .grid-item {
    grid-column: span 4; /* Adjust based on remaining columns */
  }
  .invoice-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on tablet */
  }
  .billing-nav-head {
    flex-direction: column;
    align-items: stretch;
  }

  .billing-nav-left,
  .billing-nav-center,
  .billing-nav-right {
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;
  }

  #cust-name-wrap {
    flex-direction: column;
  }
}
@media (max-width: 480px) {
  .invoice-grid {
    grid-template-columns: 1fr; /* 1 column on phone */
  }
}
