.banner-image {
  background-image:
    linear-gradient(rgba(2, 36, 84, 0), rgba(2, 36, 84, 0.9)),
    image-set(
      var(--banner-webp) type("image/webp"),
      var(--banner-jpg) type("image/jpeg")
    );
  background-size: cover;
  background-position: center;
}

body.njs-hide #tableView tbody tr[data-uid],
body.njs-hide #cardGrid > div[data-uid] {
  display: none !important;
}

/* keep the loading label visible when JS hasn't initialized - show spinner + text */
@keyframes nbaq-spin {
  to {
    transform: rotate(360deg);
  }
}

/* spinner */
body.njs-hide #tableBody::before {
  content: "";
  display: block;
  width: 36px;
  height: 36px;
  margin: 0.75rem auto 0;
  border: 4px solid rgba(75, 85, 99, 0.12);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: nbaq-spin 1s linear infinite;
}

body.njs-hide #tableBody::after {
  content: attr(data-loading-label);
  display: block;
  padding: 0.75rem 1rem 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: #4b5563;
  font-weight: 500;
}

a.link {
  color: #2563ebff;
}

a.link:hover {
  text-decoration: underline;
}

body > header img {
  width: auto !important;
  height: auto !important;
  max-height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}

.toggle-dir-ltr {
  direction: ltr;
}

@media (min-width: 640px) {
  body > header img {
    max-height: 64px;
  }
}

/* Triangle buttons for first/last page */
.triangle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  transition:
    background-color 0.15s,
    color 0.15s,
    border-color 0.15s;
  width: 36px;
  height: 36px;
  background: #ffffff;
}

.triangle-btn:hover {
  background: #f9fafb;
}

.triangle-btn:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.triangle-btn:disabled {
  background: #f3f4f6;
  border-color: #e5e7eb;
  cursor: not-allowed;
}

.triangle-left,
.triangle-right {
  width: 0;
  height: 0;
}

.triangle-left {
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 10px solid #374151;
}

.triangle-right {
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid #374151;
}

.triangle-btn:disabled .triangle-left {
  border-right-color: #9ca3af;
}

.triangle-btn:disabled .triangle-right {
  border-left-color: #9ca3af;
}

/* chevron orientation down when closed, up when open */
#toggleAdvanced #advChevron {
  transition: transform 0.2s ease;
}

/* When open, rotate the base down-chevron to point up */
#toggleAdvanced[aria-expanded="true"] #advChevron {
  transform: rotate(180deg);
}

#filtersBox input[type="text"],
#filtersBox select {
  background-color: #3f5d8f;
  border-color: #4d6a96;
  color: #ffffff;
}

/* Advanced filters area inputs override */
#advancedBox input[type="text"],
#advancedBox select {
  background-color: #26436b;
  border-color: #4d6a96;
  color: #ffffff;
}

/* Placeholders to white for dark inputs */
#countryInput::placeholder,
#filterUniversity::placeholder,
#filterMajor::placeholder,
#filterSpeciality::placeholder {
  color: #ffffff;
  opacity: 1;
}

#countryInput::-webkit-input-placeholder,
#filterUniversity::-webkit-input-placeholder,
#filterMajor::-webkit-input-placeholder,
#filterSpeciality::-webkit-input-placeholder {
  color: #ffffff;
}

#countryInput:-ms-input-placeholder,
#filterUniversity:-ms-input-placeholder,
#filterMajor:-ms-input-placeholder,
#filterSpeciality:-ms-input-placeholder {
  color: #ffffff;
}

#countryInput::-ms-input-placeholder,
#filterUniversity::-ms-input-placeholder,
#filterMajor::-ms-input-placeholder,
#filterSpeciality::-ms-input-placeholder {
  color: #ffffff;
}

.merit-university-badge {
  font-size: 0.625rem;
  line-height: 1.2;
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
}

/* Major column emphasis */
table td.major-cell,
.major-cell {
  font-size: 15px !important;
  line-height: 1.25 !important;
}

/* make tableView a positioned container for overlay */
#tableView {
  position: relative;
}

#tableView.loading tbody {
  opacity: 0.3;
  pointer-events: none;
}

#tableView.loading {
  overflow: hidden;
}

#tableView.loading #tableLoadingOverlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
  z-index: 10;
}

#tableView.loading #tableLoadingOverlay .nbaq-spinner {
  width: 36px;
  height: 36px;
  border: 4px solid rgba(75, 85, 99, 0.2);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: nbaq-spin 1s linear infinite;
}

#tableView.loading #tableLoadingOverlay .nbaq-loading-label {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: #4b5563;
  font-weight: 500;
}

#tableView thead,
#tableView thead th {
  background-color: #f9fafb;
}

#tableView tbody tr,
#tableView tbody td {
  border-color: #e5e7eb;
}

#tableBody > tr#tableLoadingRow {
  padding: 0;
  border: 0;
}

#tableBody > tr#tableLoadingRow #tableLoadingOverlay {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 120px;
  background: rgba(255, 255, 255, 0.46);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  pointer-events: all;
  z-index: 60;
  flex-direction: column;
}
