/*
 * College admission-history page.
 * Scoped to .nzk-adna-detail-page to avoid affecting legacy site tables.
 */

:root {
  --adna-navy: #102a43;
  --adna-blue: #1261a0;
  --adna-blue-dark: #0b4779;
  --adna-cyan: #0ea5a8;
  --adna-ink: #172b3a;
  --adna-muted: #607286;
  --adna-line: #dce6ef;
  --adna-soft: #f3f8fc;
  --adna-current: #eaf8f8;
  --adna-white: #fff;
  --adna-shadow: 0 18px 45px rgba(16, 42, 67, .10);
}

.nzk-adna-detail-page,
.nzk-adna-detail-page *,
.nzk-adna-detail-page *::before,
.nzk-adna-detail-page *::after {
  box-sizing: border-box;
}

.nzk-adna-page.nzk-adna-detail-page {
  width: min(1180px, calc(100% - 30px));
  margin: 32px auto 46px;
  direction: rtl;
  color: var(--adna-ink);
  font-family: "Alexandria", Tahoma, Arial, sans-serif;
}

.nzk-adna-detail-page a {
  text-decoration: none;
}

.nzk-adna-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--adna-muted);
  font-size: 13px;
  line-height: 1.7;
}

.nzk-adna-breadcrumbs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--adna-blue);
  font-weight: 700;
}

.nzk-adna-breadcrumbs > i {
  color: #9aabba;
  font-size: 10px;
}

.nzk-adna-breadcrumbs span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nzk-adna-detail-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 185px;
  align-items: center;
  gap: 22px;
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 10% 10%, rgba(14, 165, 168, .38), transparent 33%),
    linear-gradient(135deg, #0d3151 0%, #0e5588 58%, #087f83 100%);
  box-shadow: var(--adna-shadow);
  color: var(--adna-white);
}

.nzk-adna-detail-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto -70px -105px auto;
  width: 280px;
  height: 280px;
  border: 45px solid rgba(255, 255, 255, .055);
  border-radius: 50%;
}

.nzk-adna-detail-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 21px;
  background: rgba(255, 255, 255, .13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .20);
  font-size: 29px;
}

.nzk-adna-detail-copy {
  min-width: 0;
}

.nzk-adna-detail-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .11);
  color: #dffcff;
  font-size: 12px;
  font-weight: 700;
}

.nzk-adna-detail-copy h1 {
  margin: 10px 0 8px;
  color: #fff;
  font-size: clamp(23px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.35;
}

.nzk-adna-detail-copy > p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, .80);
  font-size: 14px;
  line-height: 1.9;
}

.nzk-adna-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px;
}

.nzk-adna-detail-tags span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .11);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.nzk-adna-detail-tags i {
  color: #82eff0;
}

.nzk-adna-detail-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 18px;
  background: rgba(5, 31, 52, .25);
  text-align: center;
}

.nzk-adna-detail-side small {
  color: rgba(255, 255, 255, .70);
  font-size: 12px;
}

.nzk-adna-detail-side strong {
  margin: 5px 0;
  color: #fff;
  font-size: 37px;
  font-weight: 800;
  line-height: 1;
}

.nzk-adna-detail-side span {
  color: #bff7f6;
  font-size: 11px;
  line-height: 1.6;
}

.nzk-adna-detail-section,
.nzk-adna-years {
  margin-top: 20px;
  padding: 23px;
  border: 1px solid var(--adna-line);
  border-radius: 22px;
  background: var(--adna-white);
  box-shadow: 0 10px 32px rgba(16, 42, 67, .07);
}

.nzk-adna-section-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
}

.nzk-adna-section-head > span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(135deg, #dff4ff, #ddf8f4);
  color: var(--adna-blue);
  font-size: 18px;
}

.nzk-adna-section-head b {
  display: block;
  color: var(--adna-navy);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.5;
}

.nzk-adna-section-head small {
  display: block;
  margin-top: 2px;
  color: var(--adna-muted);
  font-size: 12px;
  line-height: 1.7;
}

.nzk-adna-history-table-wrap {
  overflow: hidden;
  border: 1px solid var(--adna-line);
  border-radius: 17px;
  background: #fff;
}

.nzk-adna-history-table {
  width: 100%;
  margin: 0;
  border: 0;
  border-spacing: 0;
  border-collapse: separate;
  table-layout: auto;
  background: #fff;
  color: var(--adna-ink);
  font-size: 14px;
}

.nzk-adna-history-table thead th {
  padding: 15px 16px;
  border: 0;
  border-bottom: 1px solid #cbdbe7;
  background: linear-gradient(180deg, #f7fbfe, #edf5fa);
  color: #304d63;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.nzk-adna-history-table tbody td {
  padding: 15px 16px;
  border: 0;
  border-bottom: 1px solid #e6edf3;
  background: #fff;
  color: #304658;
  line-height: 1.75;
  text-align: right;
  vertical-align: middle;
}

.nzk-adna-history-table tbody tr:last-child td {
  border-bottom: 0;
}

.nzk-adna-history-table tbody tr {
  transition: transform .18s ease, box-shadow .18s ease;
}

.nzk-adna-history-table tbody tr:not(.is-current):hover td {
  background: #f8fbfd;
}

.nzk-adna-history-table tbody tr.is-current td {
  border-bottom-color: #cce8e7;
  background: var(--adna-current);
}

.nzk-adna-history-table tbody tr.is-current td:first-child {
  box-shadow: inset -4px 0 0 var(--adna-cyan);
}

.nzk-adna-history-table td strong {
  color: var(--adna-navy);
  font-size: 15px;
  font-weight: 800;
}

.nzk-adna-history-table td small {
  color: var(--adna-muted);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.nzk-adna-history-table td:last-child {
  width: 190px;
}

.nzk-adna-history-table td a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 39px;
  padding: 9px 13px;
  border: 1px solid #c9dfef;
  border-radius: 10px;
  background: #fff;
  color: var(--adna-blue);
  box-shadow: 0 4px 12px rgba(18, 97, 160, .07);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.nzk-adna-history-table td a:hover,
.nzk-adna-history-table td a:focus-visible {
  border-color: var(--adna-blue);
  background: var(--adna-blue);
  color: #fff;
  transform: translateX(-2px);
}

.nzk-adna-history-table td a i {
  font-size: 11px;
}

.nzk-adna-form-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 15px;
  padding: 13px 15px;
  border: 1px solid #d8e8f0;
  border-radius: 13px;
  background: var(--adna-soft);
  color: #536a7c;
  font-size: 12px;
  line-height: 1.85;
}

.nzk-adna-form-note > i {
  margin-top: 4px;
  color: var(--adna-cyan);
  font-size: 16px;
}

.nzk-adna-form-note b {
  color: var(--adna-navy);
}

.nzk-adna-year-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.nzk-adna-year-group {
  display: grid;
  grid-template-columns: 65px minmax(0, 1fr);
  gap: 11px;
  align-items: stretch;
  padding: 11px;
  border: 1px solid var(--adna-line);
  border-radius: 15px;
  background: #f9fcfe;
}

.nzk-adna-year-group > strong {
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--adna-navy);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.nzk-adna-year-group > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.nzk-adna-year-group a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-height: 39px;
  padding: 8px 10px;
  border: 1px solid #d9e6ee;
  border-radius: 9px;
  background: #fff;
  color: #3b566b;
  font-size: 11px;
  font-weight: 700;
}

.nzk-adna-year-group a:hover,
.nzk-adna-year-group a.is-active {
  border-color: #9dcadf;
  background: #eaf7fb;
  color: var(--adna-blue-dark);
}

.nzk-adna-year-group a i.fa-circle-check {
  color: #1f9d71;
}

.nzk-adna-year-group a i.fa-clock {
  color: #d49122;
}

.nzk-adna-detail-empty {
  padding: 45px 25px;
  border: 1px solid var(--adna-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--adna-shadow);
  text-align: center;
}

.nzk-adna-detail-empty > span {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 15px;
  border-radius: 20px;
  background: #fff0ed;
  color: #c75242;
  font-size: 27px;
}

.nzk-adna-detail-empty h1 {
  margin: 0 0 8px;
  color: var(--adna-navy);
  font-size: 24px;
}

.nzk-adna-detail-empty p {
  margin: 0 auto 17px;
  color: var(--adna-muted);
  line-height: 1.9;
}

.nzk-adna-detail-empty a {
  display: inline-flex;
  padding: 10px 15px;
  border-radius: 10px;
  background: var(--adna-blue);
  color: #fff;
  font-weight: 700;
}

@media (max-width: 820px) {
  .nzk-adna-page.nzk-adna-detail-page {
    width: min(calc(100% - 22px), 720px);
    margin-top: 20px;
  }

  .nzk-adna-detail-hero {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 22px;
  }

  .nzk-adna-detail-side {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 10px;
    min-height: auto;
    text-align: right;
  }

  .nzk-adna-detail-side strong {
    margin: 0;
    font-size: 25px;
  }

  .nzk-adna-year-groups {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nzk-adna-page.nzk-adna-detail-page {
    width: calc(100% - 16px);
    margin: 14px auto 32px;
  }

  .nzk-adna-breadcrumbs {
    padding-inline: 3px;
    font-size: 11px;
  }

  .nzk-adna-detail-hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 19px 16px;
    border-radius: 19px;
  }

  .nzk-adna-detail-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    font-size: 22px;
  }

  .nzk-adna-detail-copy h1 {
    margin-top: 8px;
    font-size: 23px;
  }

  .nzk-adna-detail-copy > p {
    font-size: 12px;
  }

  .nzk-adna-detail-tags {
    gap: 6px;
  }

  .nzk-adna-detail-tags span {
    padding: 6px 8px;
    font-size: 10px;
  }

  .nzk-adna-detail-side {
    grid-template-columns: 1fr auto;
  }

  .nzk-adna-detail-side span {
    grid-column: 1 / -1;
  }

  .nzk-adna-detail-section,
  .nzk-adna-years {
    padding: 14px;
    border-radius: 17px;
  }

  .nzk-adna-section-head {
    align-items: flex-start;
    margin-bottom: 14px;
  }

  .nzk-adna-section-head > span {
    width: 39px;
    height: 39px;
  }

  .nzk-adna-section-head b {
    font-size: 14px;
  }

  .nzk-adna-section-head small {
    font-size: 10px;
  }

  .nzk-adna-history-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .nzk-adna-history-table,
  .nzk-adna-history-table tbody,
  .nzk-adna-history-table tr,
  .nzk-adna-history-table td {
    display: block;
    width: 100%;
  }

  .nzk-adna-history-table thead {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .nzk-adna-history-table tbody {
    display: grid;
    gap: 11px;
  }

  .nzk-adna-history-table tbody tr {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--adna-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(16, 42, 67, .07);
  }

  .nzk-adna-history-table tbody tr.is-current {
    padding-top: 27px;
    border-color: #8ed3cf;
    background: var(--adna-current);
  }

  .nzk-adna-history-table tbody tr.is-current::before {
    content: "السجل الحالي";
    position: absolute;
    inset: 0 0 auto;
    padding: 5px 12px;
    background: #ccefeb;
    color: #0a6668;
    font-size: 10px;
    font-weight: 800;
    text-align: right;
  }

  .nzk-adna-history-table tbody td,
  .nzk-adna-history-table tbody tr.is-current td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 47px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px dashed #dfe8ef;
    background: transparent;
    text-align: left;
  }

  .nzk-adna-history-table tbody tr.is-current td:first-child {
    box-shadow: none;
  }

  .nzk-adna-history-table tbody td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--adna-muted);
    font-size: 10px;
    font-weight: 700;
    text-align: right;
  }

  .nzk-adna-history-table tbody td:last-child {
    display: block;
    width: 100%;
    padding: 10px;
    border-bottom: 0;
  }

  .nzk-adna-history-table tbody td:last-child::before {
    display: none;
  }

  .nzk-adna-history-table td a {
    width: 100%;
    min-height: 42px;
  }

  .nzk-adna-form-note {
    padding: 11px;
    font-size: 10px;
  }

  .nzk-adna-year-group {
    grid-template-columns: 54px minmax(0, 1fr);
    padding: 8px;
  }

  .nzk-adna-year-group > div {
    grid-template-columns: 1fr;
  }
}

@media print {
  .nzk-adna-page.nzk-adna-detail-page {
    width: 100%;
    margin: 0;
    color: #000;
  }

  .nzk-adna-detail-hero,
  .nzk-adna-detail-section {
    border: 1px solid #aaa;
    box-shadow: none;
  }

  .nzk-adna-detail-hero {
    background: #fff;
    color: #000;
  }

  .nzk-adna-detail-copy h1,
  .nzk-adna-detail-copy > p,
  .nzk-adna-detail-kicker,
  .nzk-adna-detail-tags span,
  .nzk-adna-detail-side small,
  .nzk-adna-detail-side strong,
  .nzk-adna-detail-side span {
    color: #000;
  }

  .nzk-adna-detail-side,
  .nzk-adna-detail-tags span,
  .nzk-adna-detail-kicker {
    border-color: #bbb;
    background: #fff;
  }

  .nzk-adna-history-table-wrap {
    overflow: visible;
  }

  .nzk-adna-history-table tbody tr.is-current td {
    background: #eee;
  }

  .no-print,
  .nzk-adna-years {
    display: none !important;
  }
}
