.kv {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.kv .k {
  white-space: nowrap;
  font-weight: 600;
  color: #374151;
}

.kv .v {
  color: #374151;
}

/* Location lines styling to mirror program page */
.location-lines .kv .v {
  color: #374151;
}

/* white text inside the dark university header */
.uni-header .location-lines .kv .v {
  color: #ffffff;
}

/* Mobile sizing for location icons and text */
@media (max-width: 640px) {
  .location-lines .kv i[data-lucide],
  .location-lines .kv svg.lucide {
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    min-height: 1.25rem;
    flex: none;
  }

  .location-lines .kv .v {
    font-size: 1rem;
    line-height: 1.5;
  }
}

.kv-badges {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

a.link {
  color: rgb(37, 99, 235);
}

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

/* Prevent banner image rules from compressing the header logo */
body > header img {
  width: auto !important;
  height: auto !important;
  max-height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}

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

/* Ensure the major column shows slightly larger text */
table td.major-cell,
.major-cell {
  font-size: 15px !important;
  line-height: 1.25 !important;
}

@media print {
  #printHeaderWrap {
    display: flex !important;
    align-items: center !important;
  }

  #printHeaderWrap img#printLogo {
    display: block !important;
    height: 150px !important;
    width: 700px !important;
    visibility: visible !important;
  }

  /* Ensure page UI headers are not printed */
  header#header,
  .toolbar-row,
  .back-button,
  .uni-header {
    display: none !important;
  }
}

/* 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-active {
  background: #ffffff;
}

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

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

/* Disabled state styling using :disabled selector */
.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;
}

/* Dark filters */
#filtersBoxProg input[type="text"],
#filtersBoxProg select {
  background-color: #3f5d8f;
  border-color: #4d6a96;
  color: #ffffff;
}

/* Placeholders in dark inputs */
#filterMajor::placeholder,
#filterSpeciality::placeholder {
  color: #ffffff;
  opacity: 1;
}

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

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

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

/* Loading overlay + spinner styling */
@keyframes nbaq-spin {
  to {
    transform: rotate(360deg);
  }
}

#tableView {
  position: relative;
}

#tableView.loading tbody {
  opacity: 0.48;
  transition: opacity 0.18s ease;
}

#tableView.loading {
  overflow-x: auto;
  overflow-y: hidden;
}

#tableLoadingOverlay {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 0;
  z-index: 60;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.46);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  pointer-events: all;
  flex-direction: column;
}

#tableView.loading #tableLoadingOverlay {
  display: flex;
}

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

#tableLoadingOverlay .nbaq-loading-label {
  margin-top: 10px;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
}

#tableView thead,
#tableView thead th {
  position: sticky;
  top: 0;
  z-index: 90;
  background: #f9fafb;
}

#tableView tbody tr,
#tableView tbody td {
  position: relative;
  z-index: 1;
}

#header {
  z-index: 1000 !important;
}

#tableBody > tr#tableLoadingRow > td {
  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;
}
