/* Scholarship archives: keep the AJAX filter independent from Theme Options CSS. */
:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-finder {
  padding: 34px 0 52px;
  background: linear-gradient(180deg, #f7f9fc 0, #fff 420px);
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-archive-header {
  max-width: 820px;
  margin: 0 auto 24px;
  text-align: center;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-archive-header span {
  color: #bd160f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-archive-header h1 {
  margin: 5px 0 7px;
  color: #172a49;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.25;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-archive-header p {
  margin: 0;
  color: #65758b;
  font-size: 14px;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-table-hint {
  display: none;
  margin: 0 0 7px;
  color: #66758a;
  font-size: 12px;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-top-filter-section {
  margin-bottom: 24px !important;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-filter-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 18px;
  margin: 0 !important;
  padding: 22px !important;
  border: 1px solid #dce4ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(26, 48, 78, 0.07);
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-filter-grid > * {
  min-width: 0;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-fast-search-wrapper {
  grid-column: 1 / -1;
  margin: 0 0 2px;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) :is(.hb-fast-search-label, .hb-label) {
  display: block;
  margin: 0 0 7px;
  color: #526175;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-fast-search-label {
  color: #b3150d;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-fast-search-input {
  width: 100% !important;
  height: 46px !important;
  margin: 0 !important;
  padding: 0 46px 0 15px !important;
  border: 1px solid #bdc9d6 !important;
  border-radius: 9px !important;
  background-color: #fbfcfe !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Ccircle cx='8.5' cy='8.5' r='5.75' stroke='%23bd1a12' stroke-width='1.8'/%3E%3Cpath d='m13 13 4 4' stroke='%23bd1a12' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-position: calc(100% - 14px) center;
  background-repeat: no-repeat;
  background-size: 20px 20px;
  color: #26374d !important;
  font-size: 14px !important;
  box-shadow: inset 0 1px 2px rgba(26, 48, 78, 0.03) !important;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-fast-search-input:focus {
  border-color: #c91b12 !important;
  background-color: #fff !important;
  outline: 3px solid rgba(201, 27, 18, 0.1) !important;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-ajax-select,
:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .select2-container .select2-selection--single {
  width: 100% !important;
  height: 42px !important;
  margin: 0 !important;
  border: 1px solid #d2dbe5 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #26374d !important;
  font-size: 13px !important;
  box-shadow: none !important;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .select2-container {
  width: 100% !important;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-right: 34px;
  padding-left: 12px;
  color: #26374d !important;
  font-size: 13px !important;
  line-height: 40px !important;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 40px !important;
  right: 6px;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-special-projects-wrapper {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 16px;
  padding: 0 2px;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-special-projects-wrapper label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #314158;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-special-projects-wrapper input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #c9150c;
}

@media (max-width: 900px) {
  :is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  :is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-finder {
    padding: 20px 0 36px;
  }

  :is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-filter-grid {
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 14px !important;
    border-radius: 12px;
  }

  :is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-fast-search-wrapper {
    grid-column: 1;
  }

  :is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-archive-header {
    margin-bottom: 18px;
    padding: 0 6px;
  }

  :is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-table-hint {
    display: block;
  }
}

/* Scholarship result tables: one clean system for Vietnamese and English archives. */
:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-table-responsive {
  display: block !important;
  max-width: 100% !important;
  width: 100%;
  margin-top: 18px;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border: 1px solid #dce4ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(26, 48, 78, 0.08);
  scrollbar-color: #bd160f #edf1f5;
  scrollbar-width: thin;
  touch-action: pan-x pan-y;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-table {
  width: 100% !important;
  min-width: 1040px;
  margin: 0 !important;
  border: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  table-layout: fixed;
  background: #fff !important;
  color: #34445b;
}

@media (max-width: 600px) {
  :is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-table {
    width: 980px !important;
    min-width: 980px !important;
  }
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-table thead {
  background: linear-gradient(135deg, #8e1713 0%, #bd160f 60%, #d52a20 100%) !important;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-table thead th {
  padding: 12px 10px !important;
  border: 0 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-bottom: 3px solid #f1c84a !important;
  background: transparent !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.3;
  letter-spacing: 0.025em;
  text-align: left;
  text-transform: none;
  vertical-align: middle;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-table thead th:last-child {
  border-right: 0 !important;
  text-align: center;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-table :is(th, td):nth-child(1) {
  width: 14%;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-table :is(th, td):nth-child(2) {
  width: 37%;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-table :is(th, td):nth-child(3) {
  width: 12%;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-table :is(th, td):nth-child(4) {
  width: 9%;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-table :is(th, td):nth-child(5) {
  width: 12%;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-table :is(th, td):nth-child(6) {
  width: 10%;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-table :is(th, td):nth-child(7) {
  width: 86px;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-table tbody tr {
  background: #fff !important;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-table tbody tr:nth-child(even) {
  background: #fff7f6 !important;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-table tbody td {
  padding: 11px 10px !important;
  border: 0 !important;
  border-right: 1px solid #e5eaf0 !important;
  border-bottom: 1px solid #e5eaf0 !important;
  background: transparent !important;
  color: #45566d !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.45;
  text-align: left;
  vertical-align: middle;
  transition: background-color 160ms ease;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-table tbody tr:hover td {
  background: #f0f8fb !important;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-table tbody td:last-child {
  border-right: 0 !important;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-location-cell strong {
  display: block;
  margin-bottom: 2px;
  color: #b31912 !important;
  font-size: 13px;
  font-weight: 700;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-location-cell small {
  display: block;
  color: #718096;
  font-size: 11px;
  line-height: 1.35;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-program-link {
  display: block;
  margin: 0 0 6px;
  color: #243c61 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.4;
  text-decoration: none !important;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-program-link:is(:hover, :focus-visible) {
  color: #b31912 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-program-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) :is(.hb-program-id, .hb-data-badge, .hb-scholarship-badge) {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-program-id {
  border: 1px solid #f0c4c1;
  background: #fff5f4;
  color: #bc1d15;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-data-badge {
  border: 1px solid transparent;
  background: #e9eef4;
  color: #41546d;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-data-badge.is-211 {
  background: #fff2df;
  color: #9a560d;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-data-badge.is-985 {
  background: #e8f7ed;
  color: #1f7135;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-data-badge.is-csc {
  background: #eaf3ff;
  color: #1763aa;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-data-badge.is-school {
  background: #e9effa;
  color: #365b92;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-badge {
  background: #edf7f1;
  color: #277341;
  white-space: normal;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-deadline-cell {
  color: #b31912 !important;
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-action-cell {
  text-align: center !important;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-details-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  min-height: 32px !important;
  margin: 0 !important;
  padding: 5px 10px !important;
  border: 1px solid #c5160f !important;
  border-radius: 7px !important;
  background: linear-gradient(135deg, #d31a12, #a90f09) !important;
  color: #fff !important;
  box-shadow: 0 5px 12px rgba(185, 25, 17, 0.18) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1.2;
  text-transform: none !important;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-empty-cell {
  padding: 44px 20px !important;
  color: #7b8798 !important;
  text-align: center !important;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-table-responsive::-webkit-scrollbar {
  height: 8px;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-table-responsive::-webkit-scrollbar-track {
  background: #edf1f5;
}

:is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-table-responsive::-webkit-scrollbar-thumb {
  border: 2px solid #edf1f5;
  border-radius: 999px;
  background: #bd160f;
}

@media (max-width: 767px) {
  :is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-table-responsive {
    margin-top: 14px;
    border-radius: 11px;
    box-shadow: 0 8px 22px rgba(26, 48, 78, 0.07);
  }

  :is(body.post-type-archive-hocbongtq, body.post-type-archive-scholarships) .hb-scholarship-table {
    min-width: 980px;
  }
}

