/* v918 — Price Lists table/sidebar hard lock
   Fix the actual cause shown in screenshot:
   the 5-column price matrix was still wider than the left content lane,
   so it visually ran underneath the sticky Emergency sidebar.
   This file is loaded last and owns the column math. */

html body.price-table-sidebar-lock-v918 .price-xxx-layout-v871.container,
html body.price-table-sidebar-lock-v918 .price-xxx-layout-v871{
  display:grid !important;
  grid-template-columns:780px 340px !important;
  column-gap:30px !important;
  row-gap:24px !important;
  width:1150px !important;
  max-width:calc(100vw - 56px) !important;
  margin-left:auto !important;
  margin-right:auto !important;
  padding-left:0 !important;
  padding-right:0 !important;
  align-items:start !important;
  overflow:visible !important;
}

html body.price-table-sidebar-lock-v918 .price-xxx-main-v871{
  grid-column:1 !important;
  width:780px !important;
  max-width:780px !important;
  min-width:0 !important;
  overflow:visible !important;
  position:relative !important;
  z-index:1 !important;
}

html body.price-table-sidebar-lock-v918 .price-xxx-main-v871 .fees-main-rail-v438G,
html body.price-table-sidebar-lock-v918 .price-xxx-main-v871 .section,
html body.price-table-sidebar-lock-v918 .price-xxx-main-v871 .section > .container{
  width:780px !important;
  max-width:780px !important;
  min-width:0 !important;
  margin-left:0 !important;
  margin-right:0 !important;
  padding-left:0 !important;
  padding-right:0 !important;
  overflow:visible !important;
}

html body.price-table-sidebar-lock-v918 .price-xxx-sidebar-v871,
html body.price-table-sidebar-lock-v918 .price-sidebar-emergency-standard-v889,
html body.price-table-sidebar-lock-v918 .price-sidebar-v917{
  grid-column:2 !important;
  width:340px !important;
  min-width:340px !important;
  max-width:340px !important;
  position:sticky !important;
  top:92px !important;
  align-self:start !important;
  z-index:5 !important;
}

/* Price matrix: fixed left lane width. It cannot exceed 780px. */
html body.price-table-sidebar-lock-v918 #visa-service-fees .fees-matrix-wrap-v787DN{
  display:block !important;
  width:780px !important;
  max-width:780px !important;
  min-width:0 !important;
  margin-left:0 !important;
  margin-right:0 !important;
  overflow:visible !important;
  border:1px solid #cfd8e6 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  background:#fff !important;
}

html body.price-table-sidebar-lock-v918 #visa-service-fees .fees-matrix-v787DN{
  width:780px !important;
  min-width:780px !important;
  max-width:780px !important;
  table-layout:fixed !important;
  border-collapse:collapse !important;
  border-spacing:0 !important;
  background:#fff !important;
}

/* Column math: 220px + 4*140px = 780px */
html body.price-table-sidebar-lock-v918 #visa-service-fees .fees-matrix-v787DN thead th:first-child,
html body.price-table-sidebar-lock-v918 #visa-service-fees .fees-matrix-v787DN tbody th.fees-matrix-processing-v787EP{
  width:220px !important;
  max-width:220px !important;
  min-width:220px !important;
  text-align:left !important;
  border-right:1px solid #d5deeb !important;
}

html body.price-table-sidebar-lock-v918 #visa-service-fees .fees-matrix-v787DN thead th:nth-child(n+2),
html body.price-table-sidebar-lock-v918 #visa-service-fees .fees-matrix-v787DN tbody td{
  width:140px !important;
  max-width:140px !important;
  min-width:140px !important;
  text-align:center !important;
}

html body.price-table-sidebar-lock-v918 #visa-service-fees .fees-matrix-v787DN th,
html body.price-table-sidebar-lock-v918 #visa-service-fees .fees-matrix-v787DN td{
  border:1px solid #d5deeb !important;
  padding:10px 8px !important;
  font-size:13.6px !important;
  line-height:1.28 !important;
  color:#061948 !important;
  background:#fff !important;
  vertical-align:middle !important;
  white-space:normal !important;
  overflow-wrap:normal !important;
  word-break:normal !important;
}

html body.price-table-sidebar-lock-v918 #visa-service-fees .fees-matrix-v787DN thead th{
  font-size:13.4px !important;
  line-height:1.18 !important;
  font-weight:850 !important;
}

html body.price-table-sidebar-lock-v918 #visa-service-fees .fees-matrix-v787DN tbody th,
html body.price-table-sidebar-lock-v918 #visa-service-fees .fees-matrix-v787DN tbody td{
  height:48px !important;
}

html body.price-table-sidebar-lock-v918 #visa-service-fees .fees-matrix-total-v787DN{
  font-size:14.6px !important;
  font-weight:900 !important;
  line-height:1.2 !important;
}

html body.price-table-sidebar-lock-v918 #visa-service-fees .fees-matrix-quote-v787DN{
  font-size:13px !important;
  font-weight:850 !important;
  line-height:1.22 !important;
  color:#e11d2e !important;
}

/* Top notes and chips must not exceed the left lane. */
html body.price-table-sidebar-lock-v918 #visa-service-fees .nationality-fee-note-v598U,
html body.price-table-sidebar-lock-v918 #visa-service-fees .fees-consolidated-summary-v787DN,
html body.price-table-sidebar-lock-v918 #visa-service-fees .fees-consolidated-intro-v787DN{
  width:780px !important;
  max-width:780px !important;
  margin-left:0 !important;
  margin-right:0 !important;
}

/* Fee checker remains a compact frame, not a full-width empty block. */
html body.price-table-sidebar-lock-v918 .fees-check-section,
html body.price-table-sidebar-lock-v918 .price-feecheck-only-v915{
  width:560px !important;
  max-width:560px !important;
  margin:24px 0 !important;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
}

html body.price-table-sidebar-lock-v918 .fees-check-section > .container.grid.two,
html body.price-table-sidebar-lock-v918 .price-feecheck-grid-v915,
html body.price-table-sidebar-lock-v918 .fees-check-section .fee-card[data-fee-checker]{
  width:560px !important;
  max-width:560px !important;
  min-width:0 !important;
  margin-left:0 !important;
  margin-right:0 !important;
}

/* Speed-up/add-on tables also stay in the left lane. */
html body.price-table-sidebar-lock-v918 #speedup-existing-evisa-fees .urgent-table-wrap,
html body.price-table-sidebar-lock-v918 #addon-fees .urgent-table-wrap{
  width:560px !important;
  max-width:560px !important;
  margin-left:0 !important;
  margin-right:0 !important;
}

/* If the viewport cannot fit 780 + 30 + 340, stack safely instead of overlapping. */
@media (max-width: 1200px){
  html body.price-table-sidebar-lock-v918 .price-xxx-layout-v871.container,
  html body.price-table-sidebar-lock-v918 .price-xxx-layout-v871{
    grid-template-columns:1fr !important;
    width:min(900px, calc(100vw - 34px)) !important;
    max-width:900px !important;
  }

  html body.price-table-sidebar-lock-v918 .price-xxx-main-v871,
  html body.price-table-sidebar-lock-v918 .price-xxx-main-v871 .fees-main-rail-v438G,
  html body.price-table-sidebar-lock-v918 .price-xxx-main-v871 .section,
  html body.price-table-sidebar-lock-v918 .price-xxx-main-v871 .section > .container{
    width:100% !important;
    max-width:100% !important;
  }

  html body.price-table-sidebar-lock-v918 .price-xxx-sidebar-v871,
  html body.price-table-sidebar-lock-v918 .price-sidebar-emergency-standard-v889,
  html body.price-table-sidebar-lock-v918 .price-sidebar-v917{
    grid-column:1 !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    position:static !important;
    display:grid !important;
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    gap:16px !important;
  }
}

/* On phone, allow horizontal scroll for the 5-column matrix rather than overlapping. */
@media (max-width: 820px){
  html body.price-table-sidebar-lock-v918 #visa-service-fees .fees-matrix-wrap-v787DN{
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch !important;
  }

  html body.price-table-sidebar-lock-v918 #visa-service-fees .fees-matrix-v787DN{
    width:760px !important;
    min-width:760px !important;
    max-width:none !important;
  }

  html body.price-table-sidebar-lock-v918 .fees-check-section,
  html body.price-table-sidebar-lock-v918 .price-feecheck-only-v915,
  html body.price-table-sidebar-lock-v918 .fees-check-section > .container.grid.two,
  html body.price-table-sidebar-lock-v918 .price-feecheck-grid-v915,
  html body.price-table-sidebar-lock-v918 .fees-check-section .fee-card[data-fee-checker],
  html body.price-table-sidebar-lock-v918 #speedup-existing-evisa-fees .urgent-table-wrap,
  html body.price-table-sidebar-lock-v918 #addon-fees .urgent-table-wrap{
    width:100% !important;
    max-width:100% !important;
  }

  html body.price-table-sidebar-lock-v918 .price-xxx-sidebar-v871,
  html body.price-table-sidebar-lock-v918 .price-sidebar-emergency-standard-v889,
  html body.price-table-sidebar-lock-v918 .price-sidebar-v917{
    grid-template-columns:1fr !important;
  }
}
