/* DataTable header pinned and styled */
table.dataTable thead .main-tr th {
  position: sticky !important;
  top: 0;
  z-index: 10;
  white-space: nowrap;
  color: #fff;
  background-color: #008444 !important;
}

#resultsarea {
  margin: 30px 0;
}

/* Caleffi Part # link styling */
a.caleffi-link {
  color: #008444 !important;
  font-weight: 700;
  text-decoration: none;
}

a.caleffi-link:hover {
  text-decoration: underline;
}

a.caleffi-link i {
  color: #008444;
  opacity: 0.8;
  transition: opacity 0.2s;
}

a.caleffi-link:hover i {
  opacity: 1;
}

/* Prevent wrapping in the Caleffi Part # column */
#xref td:nth-child(7),  /* the 7th column = Caleffi Part # */
#xref th:nth-child(7) {
  white-space: nowrap !important;
}



#xref {
  width: 100% !important;
  table-layout: auto !important; /* allow natural width */
}

#xref th,
#xref td {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

#xref td a {
  color: #008444 !important;
}

table.dataTable .hide-sort .dt-column-order:after,
table.dataTable .hide-sort .dt-column-order:before {
   display: none !important;
}

table.dataTable .dt-column-order:after,
table.dataTable .dt-column-order:before {
   padding-bottom: 2px;
   padding-left: 4px;
}




table.dataTable thead .sub-tr th {
  border: none !important;
}

.green {
  color: #008444 !important;
}

.caleffi-subtle {
  background-color: rgba(0, 132, 68, 0.05) !important;
}

.form-label {
  font-weight: bold;
}

.active > .page-link,
.page-link.active {
  z-index: 3;
  color: #fff !important;
  background-color: #008444 !important;
  border-color: var(--bs-pagination-active-border-color);
}

.page-link {
  color: #008444 !important;
}

/* Body cells for columns 3-7 */
#xref tbody td:nth-child(n + 4):nth-child(-n + 8) {
  background-color: rgba(0, 132, 68, 0.05);
}

/* Header */
.header {
  background-color: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header__logo-img,
.header__logo-img--bg {
  display: block;
  height: 56px;
  width: auto;
}

.header__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #006937;
  line-height: 1;
}

/* Footer */
.footer {
  color: #a5a5a5;
  background-color: #1c1c1c;
  padding: 32px clamp(8px, 4vw, 32px);
}

.footer__container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
}

.footer__logo {
  display: flex;
  align-items: center;
}

.footer__text {
  font-size: 14px;
  text-align: center;
}

.footer__nav {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer__menu {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer__menu-item {
  font-size: 14px;
  font-weight: 700;
}

footer.footer {
  background: #000;
  color: #fff;
  padding: 1.5rem 0;
}

.footer__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1rem;
}

.footer__menu-item {
  margin: 0;
}

.footer__menu a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

.footer__menu a:hover {
  text-decoration: underline;
}

/* Modal polish */
#disclaimerModal .modal-content {
  border-radius: 0.75rem;
}
#disclaimerModal .modal-title {
  font-weight: 700;
}
#disclaimerModal p {
  line-height: 1.5;
}

/* Responsive */
@media (min-width: 576px) {
  .header__logo-img {
    display: none;
  }
}

@media (max-width: 1024px) {
  .header__logo-img--bg {
    display: none;
  }
}

@media (max-width: 900px) {
  .container {
    gap: 24px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .footer__container {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
  }
  .footer__logo {
    justify-content: center;
  }
  table.dataTable thead .sub-tr {
    display: none;
  }
}

@media (max-width: 600px) {
  #xref th,
  #xref td {
    min-width: auto !important;
    white-space: normal !important;
  }
  .hero {
    max-width: 100%;
  }
  .form {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .form__button {
    width: 100%;
  }
}


/* --- Initial blur state --- */
#xref.initial-blur,
.dt-info-wrapper.initial-blur,
.dt-pagination-wrapper.initial-blur {
  filter: blur(4px);
  opacity: 0.5;
  pointer-events: none;
  transition: filter 0.4s ease, opacity 0.4s ease;
}



/* --- Reveal once user searches --- */
#xref.show-results,
.dt-info-wrapper.show-results,
.dt-pagination-wrapper.show-results {
  filter: none;
  opacity: 1;
  pointer-events: auto;
}


#xref-hint {
  transition: opacity 0.4s ease;
}
#xref-hint.hidden {
  opacity: 0;
  visibility: hidden;
}

