/* ==========================================================
   Directives Documents Page
   Add after wildfire-css.css
========================================================== */

.lineage-documents-page {
  --lineage-blue: var(--wf-blue, #005b96);
  --lineage-blue-dark: var(--wf-blue-dark, #003f70);
  --lineage-blue-soft: var(--wf-blue-soft, #eef6fb);
  --lineage-gray-50: #f7f9fb;
  --lineage-gray-100: #eef1f4;
  --lineage-gray-200: #d9e0e6;
  --lineage-gray-300: #c3cdd6;
  --lineage-gray-600: #52616d;
  --lineage-text: var(--wf-text, #2d3740);
  --lineage-muted: var(--wf-muted, #5f6f7a);
  --lineage-white: #ffffff;
  --lineage-border: #c8d5df;
  --lineage-focus: rgba(0, 91, 150, 0.3);
}

.lineage-documents-page .wildfire-main {
  width: min(1120px, 100%);
}

.lineage-documents-table-wrap,
.lineage-documents-table,
.lineage-documents-table *,
.lineage-documents-table *::before,
.lineage-documents-table *::after {
  box-sizing: border-box;
}

/* ==========================================================
   Breadcrumb
========================================================== */

.lineage-breadcrumb {
  margin: 0 0 1rem;
}

.lineage-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--lineage-blue) !important;
  font-weight: 800;
  text-decoration: none !important;
}

.lineage-breadcrumb a:hover,
.lineage-breadcrumb a:focus-visible {
  color: var(--lineage-blue-dark) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

/* ==========================================================
   Hero
========================================================== */

.lineage-documents-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background:
    radial-gradient(
      circle at top right,
      rgba(0, 91, 150, 0.12),
      transparent 36%
    ),
    linear-gradient(
      135deg,
      var(--lineage-blue-soft) 0%,
      var(--lineage-white) 60%,
      var(--lineage-gray-50) 100%
    );
  border: 1px solid var(--lineage-border);
  border-radius: 20px;
  box-shadow: 0 14px 32px rgba(0, 63, 112, 0.1);
}

.lineage-documents-hero__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: var(--lineage-blue);
  color: var(--lineage-white);
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(0, 63, 112, 0.2);
  font-size: 1.75rem;
}

.lineage-documents-hero__content {
  min-width: 0;
}

.lineage-documents-hero__eyebrow {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 0.55rem;
  padding: 0.3rem 0.65rem;
  background: var(--lineage-white);
  color: var(--lineage-blue-dark);
  border: 1px solid var(--lineage-border);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
}

.lineage-documents-hero h1 {
  margin: 0 0 0.75rem;
  color: var(--lineage-blue-dark);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 900;
  line-height: 1.12;
}

.lineage-documents-hero__content > p:last-child {
  max-width: 850px;
  margin: 0;
  color: var(--lineage-text);
  font-size: 1.05rem;
  line-height: 1.65;
}

/* ==========================================================
   Summary
========================================================== */

.lineage-documents-summary {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  background: var(--lineage-blue-soft);
  border: 1px solid var(--lineage-border);
  border-left: 5px solid var(--lineage-blue);
  border-radius: 14px;
}

.lineage-documents-summary__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: var(--lineage-white);
  color: var(--lineage-blue);
  border: 1px solid var(--lineage-border);
  border-radius: 12px;
  font-size: 1.1rem;
}

.lineage-documents-summary h2 {
  margin: 0 0 0.3rem;
  color: var(--lineage-blue-dark);
  font-size: 1.2rem;
  font-weight: 850;
}

.lineage-documents-summary p {
  margin: 0;
  color: var(--lineage-text);
  line-height: 1.6;
}

/* ==========================================================
   Document Category Jump Navigation
========================================================== */

.lineage-documents-jump {
  display: grid;
  grid-template-columns: repeat(4, minmax(225px, 265px));
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  margin: 0 auto 2.35rem;
}

.lineage-documents-jump a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
  min-height: 84px;
  padding: 0.55rem 0.65rem;
  background: var(--lineage-white);
  color: var(--lineage-blue-dark) !important;
  border: 1px solid var(--lineage-border);
  border-radius: 11px;
  box-shadow: 0 4px 10px rgba(0, 63, 112, 0.06);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.lineage-documents-jump a:hover,
.lineage-documents-jump a:focus-visible {
  background: var(--lineage-blue-soft);
  border-color: var(--lineage-blue);
  box-shadow: 0 8px 18px rgba(0, 63, 112, 0.12);
  transform: translateY(-2px);
}

.lineage-documents-jump a:focus-visible {
  outline: 3px solid var(--lineage-focus);
  outline-offset: 3px;
}

.lineage-documents-jump i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  background: var(--lineage-blue-soft);
  color: var(--lineage-blue);
  border: 1px solid var(--lineage-border);
  border-radius: 9px;
  font-size: 0.94rem;
}

.lineage-documents-jump span {
  display: block;
  max-width: 100%;
}

/* ==========================================================
   Document Sections
========================================================== */

.lineage-document-section + .lineage-document-section {
  position: relative;
  margin-top: 2.25rem;
  padding-top: 2.5rem;
}

.lineage-document-section + .lineage-document-section::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: min(960px, 90%);
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--lineage-gray-200) 12%,
    var(--lineage-blue) 50%,
    var(--lineage-gray-200) 88%,
    transparent 100%
  );
  transform: translateX(-50%);
}

.lineage-document-section + .lineage-document-section::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 50%;
  width: 16px;
  height: 16px;
  background: var(--lineage-blue);
  border: 4px solid var(--lineage-white);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px var(--lineage-border),
    0 3px 8px rgba(0, 63, 112, 0.18);
  transform: translateX(-50%);
}

.lineage-document-section__header {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--lineage-gray-200);
}

.lineage-document-section__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--lineage-blue);
  color: var(--lineage-white);
  border-radius: 13px;
  font-size: 1.15rem;
}

.lineage-document-section__header h2 {
  position: relative;
  margin: 0 0 0.25rem;
  color: var(--lineage-blue-dark);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1.2;
}

.lineage-document-section__header p {
  margin: 0;
  color: var(--lineage-muted);
  line-height: 1.55;
}

/* ==========================================================
   Responsive Directives Table
========================================================== */

.lineage-documents-table-wrap {
  width: 100%;
  min-width: 0;
}

.lineage-documents-table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  background: var(--lineage-white);
  color: var(--lineage-text);
  border: 1px solid var(--lineage-border);
  border-radius: 14px;
  box-shadow: 0 5px 16px rgba(0, 63, 112, 0.07);
  overflow: hidden;
}

.lineage-documents-table caption {
  margin-bottom: 0.75rem;
  color: var(--lineage-blue-dark);
  font-size: 1rem;
  font-weight: 850;
  text-align: left;
}

.lineage-documents-table thead th {
  padding: 0.85rem 0.9rem;
  background: var(--lineage-blue);
  color: var(--lineage-white);
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.035em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
  vertical-align: middle;
}

.lineage-documents-table thead th:last-child {
  border-right: 0;
  text-align: center;
}

.lineage-documents-table__title-column {
  width: 52%;
}

.lineage-documents-table__type-column {
  width: 16%;
}

.lineage-documents-table__date-column {
  width: 20%;
}

.lineage-documents-table__action-column {
  width: 12%;
}

.lineage-documents-table tbody th {
  text-align: left !important;
}

.lineage-documents-table tbody th,
.lineage-documents-table tbody td {
  padding: 0.9rem;
  border-top: 1px solid var(--lineage-gray-200);
  text-align: center;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.lineage-documents-table tbody tr:first-child th,
.lineage-documents-table tbody tr:first-child td {
  border-top: 0;
}

.lineage-documents-table tbody tr:nth-child(even) {
  background: var(--lineage-gray-50);
}

.lineage-documents-table tbody tr {
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.lineage-documents-table tbody tr:hover,
.lineage-documents-table tbody tr:focus-within {
  background: var(--lineage-blue-soft);
  box-shadow:
    inset 4px 0 0 var(--lineage-blue);
}

/* ==========================================================
   Directive Title
========================================================== */

.lineage-document-row__title {
  color: var(--lineage-blue-dark);
  font-weight: 400;
}

.lineage-document-row__title-layout {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.lineage-document-row__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--lineage-blue-soft);
  color: var(--lineage-blue);
  border: 1px solid var(--lineage-border);
  border-radius: 10px;
  font-size: 1rem;
}

.lineage-document-row__content {
  min-width: 0;
}

.lineage-document-row__heading {
  display: block;
  color: var(--lineage-blue-dark);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.35;
}

.lineage-document-row__description {
  display: block;
  margin-top: 0.3rem;
  color: var(--lineage-muted);
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.45;
}

/* ==========================================================
   Type and Date
========================================================== */

.lineage-document-row__type {
  min-width: 0;
}

.lineage-document-row__type-label {
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
  width: auto;
  padding: 0.24rem 0.55rem;
  background: var(--lineage-gray-100);
  color: var(--lineage-blue-dark);
  border: 1px solid var(--lineage-gray-300);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.025em;
  line-height: 1.25;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  text-align: center;
}

.lineage-document-row__date time {
  color: var(--lineage-gray-600);
  font-size: 0.85rem;
  font-weight: 750;
  line-height: 1.35;
  white-space: normal;
}

.lineage-document-row__empty {
  color: var(--lineage-muted);
  font-size: 0.82rem;
}

/* ==========================================================
   Download Action
========================================================== */

.lineage-document-row__action {
  text-align: center !important;
}

.lineage-document-row__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--lineage-blue);
  color: var(--lineage-white) !important;
  border: 1px solid var(--lineage-blue);
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1;
  text-decoration: none !important;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.lineage-document-row__link:hover,
.lineage-document-row__link:focus-visible {
  background: var(--lineage-blue-dark);
  color: var(--lineage-white) !important;
  border-color: var(--lineage-blue-dark);
  transform: translateY(-1px);
}

.lineage-document-row__link:focus-visible {
  outline: 3px solid var(--lineage-focus);
  outline-offset: 3px;
}

.lineage-document-row__link i {
  font-size: 1rem;
}

/* ==========================================================
   Responsive Table
========================================================== */

@media (max-width: 840px) {
  .lineage-documents-table-wrap {
    overflow: visible;
  }

  /* Accessibly hide column headings */
  .lineage-documents-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .lineage-documents-table,
  .lineage-documents-table tbody,
  .lineage-documents-table tr,
  .lineage-documents-table th,
  .lineage-documents-table td {
    display: block;
    width: 100%;
  }

  .lineage-documents-table {
    table-layout: auto;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  .lineage-documents-table tbody {
    display: grid;
    gap: 0.9rem;
  }

  .lineage-documents-table tbody tr {
    display: block;
    overflow: hidden;
    margin: 0;
    background: var(--lineage-white);
    border: 1px solid var(--lineage-border);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 63, 112, 0.07);
  }

  .lineage-documents-table tbody tr:nth-child(even) {
    background: var(--lineage-white);
  }

  .lineage-documents-table tbody tr:hover,
  .lineage-documents-table tbody tr:focus-within {
    background: var(--lineage-white);
    box-shadow:
      0 8px 20px rgba(0, 63, 112, 0.12),
      inset 4px 0 0 var(--lineage-blue);
  }

  .lineage-documents-table tbody th,
  .lineage-documents-table tbody td {
    position: relative;
    display: grid;
    grid-template-columns:
      minmax(90px, 28%)
      minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    width: 100%;
    padding: 0.72rem 0.85rem;
    border-top: 1px solid var(--lineage-gray-200);
    text-align: left !important;
    white-space: normal;
  }

  .lineage-documents-table tbody th:first-child {
    border-top: 0;
  }

  .lineage-documents-table tbody th::before,
  .lineage-documents-table tbody td::before {
    content: attr(data-title);
    color: var(--lineage-muted);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.035em;
    line-height: 1.25;
    text-transform: uppercase;
  }

  /*
   * The directive title is the mobile card header.
   */
  .lineage-document-row__title {
    background: var(--lineage-blue);
    color: var(--lineage-white);
  }

  .lineage-document-row__title::before {
    color: rgba(255, 255, 255, 0.82) !important;
  }

  .lineage-document-row__icon {
    width: 38px;
    height: 38px;
    background: var(--lineage-white);
    color: var(--lineage-blue);
    border-color: rgba(255, 255, 255, 0.7);
  }

  .lineage-document-row__heading {
    color: var(--lineage-white);
  }

  .lineage-document-row__description {
    color: rgba(255, 255, 255, 0.92);
  }

  .lineage-document-row__action {
    text-align: left !important;
  }

  .lineage-document-row__link {
    justify-self: start;
  }
}

@media (max-width: 480px) {
  .lineage-documents-table tbody th,
  .lineage-documents-table tbody td {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .lineage-documents-table tbody th::before,
  .lineage-documents-table tbody td::before {
    margin-bottom: 0.05rem;
  }

  .lineage-document-row__link {
    justify-self: start;
  }
}

/* ==========================================================
   Footer Action
========================================================== */

.lineage-documents-footer-action {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--lineage-gray-200);
}

.lineage-documents-footer-action .btn-modern {
  margin: 0;
}

/* ==========================================================
   Empty and Error Messages
========================================================== */

.lineage-documents-empty,
.lineage-documents-error {
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  background: var(--lineage-gray-50);
  color: var(--lineage-text);
  border: 1px solid var(--lineage-gray-300);
  border-left: 5px solid var(--lineage-blue);
  border-radius: 10px;
  font-weight: 700;
}

.lineage-documents-error {
  color: #842029;
}

/* ==========================================================
   Page Responsive Layout
========================================================== */

@media (max-width: 1024px) {
  .lineage-documents-jump {
    grid-template-columns:
      repeat(4, minmax(115px, 155px));
  }

  .lineage-documents-table {
    font-size: 0.94rem;
  }

  .lineage-documents-table__title-column {
    width: 48%;
  }

  .lineage-documents-table__type-column {
    width: 17%;
  }

  .lineage-documents-table__date-column {
    width: 21%;
  }

  .lineage-documents-table__action-column {
    width: 14%;
  }
}

@media (max-width: 840px) {
  .lineage-documents-jump {
    grid-template-columns: repeat(2, minmax(165px, 315px));
    gap: 0.5rem;
    margin-bottom: 1.25rem;
  }

  .lineage-documents-jump a {
    min-height: 80px;
    padding: 0.5rem 0.55rem;
    font-size: 0.8rem;
  }

  .lineage-documents-jump i {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    font-size: 0.85rem;
  }
}

@media (max-width: 680px) {
  .lineage-documents-jump {
    grid-template-columns:repeat(2, minmax(215px, 260px));
  }

  /*.lineage-documents-jump a:last-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(190px, 100%);
  }*/

  .lineage-documents-hero {
    grid-template-columns: 1fr;
  }

  .lineage-documents-hero__icon {
    width: 58px;
    height: 58px;
    font-size: 1.35rem;
  }

  .lineage-documents-summary,
  .lineage-document-section__header {
    grid-template-columns: 1fr;
  }

  .lineage-documents-summary__icon,
  .lineage-document-section__icon {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 650px) {
  .lineage-document-section +
  .lineage-document-section {
    margin-top: 1.5rem;
    padding-top: 1.75rem;
  }

  .lineage-document-section +
  .lineage-document-section::before {
    width: 90%;
  }
}

/* ==========================================================
   Small-Screen Table Fix
========================================================== */

@media (max-width: 640px) {
  .lineage-documents-table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
  }

  .lineage-documents-table,
  .lineage-documents-table tbody,
  .lineage-documents-table tr,
  .lineage-documents-table th,
  .lineage-documents-table td {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .lineage-documents-table tbody {
    grid-template-columns: minmax(0, 1fr);
  }

  .lineage-documents-table tbody tr {
    min-width: 0;
    max-width: 100%;
  }

  .lineage-documents-table tbody th,
  .lineage-documents-table tbody td {
    grid-template-columns:
      minmax(76px, 24%)
      minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.7rem 0.75rem;
    overflow: hidden;
  }

  .lineage-document-row__title-layout,
  .lineage-document-row__content,
  .lineage-document-row__heading,
  .lineage-document-row__description {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .lineage-document-row__type,
  .lineage-document-row__date,
  .lineage-document-row__action {
    min-width: 0;
  }

  .lineage-document-row__icon,
  .lineage-document-row__link {
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .lineage-documents-table tbody th,
  .lineage-documents-table tbody td {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
  }

  .lineage-documents-table tbody th::before,
  .lineage-documents-table tbody td::before {
    display: block;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .lineage-documents-hero {
    padding: 1rem;
    border-radius: 16px;
  }

  .lineage-documents-hero h1 {
    font-size: 1.7rem;
  }

  .lineage-documents-summary {
    padding: 1rem;
  }

  .lineage-documents-jump {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    margin-bottom: 1.1rem;
  }

  .lineage-documents-jump a,
  .lineage-documents-jump a:last-child {
    grid-column: auto;
    justify-self: stretch;
    width: auto;
    min-height: 76px;
    padding: 0.45rem 0.55rem;
  }

  .lineage-documents-jump i {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 8px;
    font-size: 0.8rem;
  }
}

@media (max-width: 360px) {
  .lineage-documents-jump {
    grid-template-columns:
      minmax(0, 220px);
  }

  .lineage-documents-jump a {
    min-height: 72px;
    padding: 0.4rem 0.5rem;
    font-size: 0.78rem;
  }
}

/* ==========================================================
   RTL Safety
========================================================== */

html[dir="rtl"] .lineage-breadcrumb a i,
html:lang(ar) .lineage-breadcrumb a i,
html:lang(fa) .lineage-breadcrumb a i {
  transform: rotate(180deg);
}

html[dir="rtl"] .lineage-documents-summary {
  border-right:
    5px solid var(--lineage-blue);
  border-left:
    1px solid var(--lineage-border);
}

html[dir="rtl"]
  .lineage-documents-table thead th,
html[dir="rtl"]
  .lineage-documents-table tbody th,
html[dir="rtl"]
  .lineage-documents-table tbody td {
  text-align: right;
}

html[dir="rtl"]
  .lineage-documents-table tbody tr:hover,
html[dir="rtl"]
  .lineage-documents-table tbody tr:focus-within {
  box-shadow:
    inset -4px 0 0 var(--lineage-blue);
}

@media (max-width: 840px) {
  html[dir="rtl"]
    .lineage-documents-table tbody th,
  html[dir="rtl"]
    .lineage-documents-table tbody td {
    text-align: right !important;
  }

  html[dir="rtl"]
    .lineage-documents-table tbody tr:hover,
  html[dir="rtl"]
    .lineage-documents-table tbody tr:focus-within {
    box-shadow:
      0 8px 20px rgba(0, 63, 112, 0.12),
      inset -4px 0 0 var(--lineage-blue);
  }
}

/* ==========================================================
   Reduced Motion
========================================================== */

@media (prefers-reduced-motion: reduce) {
  .lineage-documents-jump a,
  .lineage-documents-table tbody tr,
  .lineage-document-row__link {
    transition: none;
  }

  .lineage-documents-jump a:hover,
  .lineage-documents-jump a:focus-visible,
  .lineage-document-row__link:hover,
  .lineage-document-row__link:focus-visible {
    transform: none;
  }
}


/* ==========================================================
   Section Download Controls
========================================================== */

.lineage-document-section__header {
  grid-template-columns:
    52px
    minmax(0, 1fr)
    minmax(150px, auto);
}

.lineage-section-download-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;

  width: 100%;
  max-width: 260px;
  min-width: 0;
}

.lineage-section-download-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  width: auto;
  max-width: 100%;
  min-height: 34px;
  padding: 0.35rem 0.85rem;

  background: var(--lineage-blue);
  color: var(--lineage-white);
  border: 1px solid var(--lineage-blue);
  border-radius: 9px;

  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  white-space: normal;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.lineage-section-download-all:hover,
.lineage-section-download-all:focus-visible {
  background: var(--lineage-blue-dark);
  border-color: var(--lineage-blue-dark);
  transform: translateY(-1px);
}

.lineage-section-download-all:focus-visible {
  outline: 3px solid var(--lineage-focus);
  outline-offset: 3px;
}

.lineage-section-download-all:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.lineage-section-download-all i {
  flex: 0 0 auto;
}

.lineage-section-download-all span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.lineage-section-download-status {
  width: 100%;
  max-width: 260px;
  min-height: 1em;

  color: var(--lineage-muted);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.35;
  text-align: right;
  overflow-wrap: anywhere;
}

.lineage-section-download-status:empty {
  display: none;
}

.lineage-section-download-status--error {
  color: #842029;
}

/* Stack the download controls before the header becomes cramped. */
@media (max-width: 820px) {
  .lineage-document-section__header {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }

  .lineage-document-section__header
  .lineage-section-download-controls {
    flex: 0 0 100%;
    display: flex;
    justify-content: flex-end;
    width: 100%;
    max-width: none;
  }

  .lineage-section-download-controls
  .lineage-section-download-all {
    margin-left: auto;
    min-height: 36px;
  }

  .lineage-section-download-status {
    max-width: none;
    text-align: left;
  }

  
  .lineage-document-row__date time, .lineage-document-row__type-display, .lineage-document-row__link {
    text-align: right;
  }

  .lineage-document-row__link {
    justify-self: end;
  }
}

@media (max-width: 480px) {
  .lineage-document-section__header {
    grid-template-columns: 1fr;
  }

  .lineage-section-download-all {
    min-height: 30px;
    padding: 0.25rem 0.35rem;
    font-size: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lineage-section-download-all {
    transition: none;
  }

  .lineage-section-download-all:hover,
  .lineage-section-download-all:focus-visible {
    transform: none;
  }
}

/* ==========================================================
Document Pagination
========================================================== */

.lineage-documents-table-container {
width: 100%;
min-width: 0;
}

.lineage-documents-pagination-status {
margin: 0.75rem 0 0;
color: var(--lineage-muted);
font-size: 0.82rem;
font-weight: 650;
line-height: 1.4;
text-align: center;
}

.lineage-documents-pagination-wrap {
display: flex;
justify-content: center;
width: 100%;
margin-top: 0.85rem;
}

.lineage-documents-pagination {
max-width: 100%;
}

.lineage-documents-pagination__list {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 0.4rem;
margin: 0;
padding: 0;
list-style: none;
}

.lineage-documents-pagination__item {
margin: 0;
padding: 0;
}

.lineage-documents-pagination__button {
display: inline-flex;
align-items: center;
justify-content: center;

width: 34px;
height: 34px;
min-width: 34px;
min-height: 34px;
padding: 0;

background: var(--lineage-white);
color: var(--lineage-blue-dark);
border: 1px solid var(--lineage-border);
border-radius: 8px;

font: inherit;
font-size: 0.85rem;
font-weight: 800;
line-height: 1;

cursor: pointer;

transition:
background-color 0.2s ease,
border-color 0.2s ease,
color 0.2s ease,
transform 0.2s ease,
box-shadow 0.2s ease;
}

.lineage-documents-pagination__button:hover:not(:disabled),
.lineage-documents-pagination__button:focus-visible:not(:disabled) {
background: var(--lineage-blue);
color: var(--lineage-white);
border-color: var(--lineage-blue);
box-shadow: 0 4px 10px rgba(0, 63, 112, 0.14);
transform: translateY(-1px);
}

.lineage-documents-pagination__button:focus-visible {
outline: 3px solid var(--lineage-focus);
outline-offset: 3px;
}

.lineage-documents-pagination__button:disabled {
background: var(--lineage-gray-100);
color: var(--lineage-muted);
border-color: var(--lineage-gray-200);
cursor: not-allowed;
opacity: 0.55;
transform: none;
box-shadow: none;
}

.lineage-documents-pagination__button i {
font-size: 0.78rem;
line-height: 1;
pointer-events: none;
}

/* Visually distinguish first and last page controls */
.lineage-documents-pagination__button
.fa-angles-left,
.lineage-documents-pagination__button
.fa-angles-right {
font-size: 0.72rem;
}

/* ==========================================================
Pagination Responsive Layout
========================================================== */

@media (max-width: 840px) {
.lineage-documents-pagination-status {
margin-top: 0.85rem;
}

.lineage-documents-pagination-wrap {
margin-top: 0.7rem;
}

.lineage-documents-pagination__list {
gap: 0.35rem;
}

.lineage-documents-pagination__button {
width: 38px;
height: 38px;
min-width: 38px;
min-height: 38px;
padding: 0;
}

.lineage-documents-pagination__button i {
font-size: 0.82rem;
}

.lineage-documents-pagination__button
.fa-angles-left,
.lineage-documents-pagination__button
.fa-angles-right {
font-size: 0.76rem;
}
}

@media (max-width: 480px) {
.lineage-documents-pagination__list {
gap: 0.3rem;
}

.lineage-documents-pagination__button {
width: 36px;
height: 36px;
min-width: 36px;
min-height: 36px;
padding: 0;
}

.lineage-documents-pagination-status {
font-size: 0.76rem;
}
}

/* ==========================================================
Pagination RTL Support
========================================================== */

html[dir="rtl"]
.lineage-documents-pagination__button i,
html:lang(ar)
.lineage-documents-pagination__button i,
html:lang(fa)
.lineage-documents-pagination__button i {
transform: rotate(180deg);
}

/* ==========================================================
Pagination Reduced Motion
========================================================== */

@media (prefers-reduced-motion: reduce) {
.lineage-documents-pagination__button {
transition: none;
}

.lineage-documents-pagination__button:hover,
.lineage-documents-pagination__button:focus-visible {
transform: none;
}
}


/* ==========================================================
   Directive Title Wrapping Fix
========================================================== */

.lineage-documents-table tbody th,
.lineage-document-row__title,
.lineage-document-row__title-layout,
.lineage-document-row__content,
.lineage-document-row__heading,
.lineage-document-row__description {
  min-width: 0;
  max-width: 100%;
}

.lineage-document-row__title {
  overflow: hidden;
}

.lineage-document-row__title-layout,
.lineage-document-row__content {
  width: 100%;
}

.lineage-document-row__heading,
.lineage-document-row__description {
  display: block;
  width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}