/* v905 — Price Lists layout root fix
   Root cause: the price page had a nested article rail + table min-widths inside a
   two-column layout. At desktop-zoom / laptop-width ranges the main rail could keep
   an intrinsic width and visually run under the sticky sidebar. This file is loaded
   last and treats the layout parent as the source of truth. */

html body.price-layout-rootfix-v905,
html body.price-layout-rootfix-v905 *{
  box-sizing:border-box !important;
}

/* Two-column page shell: one owner, fixed sidebar lane, shrinkable content lane. */
html body.price-layout-rootfix-v905 .price-xxx-layout-v871.container,
html body.price-layout-rootfix-v905 .price-xxx-layout-v871{
  display:grid !important;
  grid-template-columns:minmax(0, 1fr) 340px !important;
  gap:32px !important;
  width:min(1440px, calc(100vw - 80px)) !important;
  max-width:1440px !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-layout-rootfix-v905 .price-xxx-main-v871{
  grid-column:1 !important;
  min-width:0 !important;
  width:100% !important;
  max-width:100% !important;
  overflow:hidden !important;
  position:relative !important;
  z-index:1 !important;
}

/* Kill the old standalone fee-page rail behavior inside the left column. */
html body.price-layout-rootfix-v905 .price-xxx-main-v871 .fees-main-rail-v438G,
html body.price-layout-rootfix-v905 .price-xxx-main-v871 .section,
html body.price-layout-rootfix-v905 .price-xxx-main-v871 .section > .container,
html body.price-layout-rootfix-v905 .price-xxx-main-v871 .fees-support-text-v883 > .container,
html body.price-layout-rootfix-v905 .price-xxx-main-v871 .fees-article-notes-v883 > .container{
  width:100% !important;
  max-width:100% !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-layout-rootfix-v905 .price-xxx-sidebar-v871,
html body.price-layout-rootfix-v905 .price-sidebar-emergency-standard-v889{
  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:2 !important;
}

/* Tables must never define page width. On real desktop they fit the content lane. */
html body.price-layout-rootfix-v905 .fees-matrix-wrap-v787DN,
html body.price-layout-rootfix-v905 .urgent-table-wrap{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  -webkit-overflow-scrolling:touch !important;
  border:1px solid #cfd8e3 !important;
  background:#fff !important;
  box-shadow:none !important;
}

html body.price-layout-rootfix-v905 .fees-matrix-v787DN{
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  table-layout:fixed !important;
  border-collapse:separate !important;
  border-spacing:0 !important;
}
html body.price-layout-rootfix-v905 .fees-matrix-v787DN thead th:first-child,
html body.price-layout-rootfix-v905 .fees-matrix-v787DN tbody th.fees-matrix-processing-v787EP{
  width:30% !important;
}
html body.price-layout-rootfix-v905 .fees-matrix-v787DN thead th:nth-child(n+2){
  width:17.5% !important;
}
html body.price-layout-rootfix-v905 .fees-matrix-v787DN th,
html body.price-layout-rootfix-v905 .fees-matrix-v787DN td{
  min-width:0 !important;
  max-width:none !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
  word-break:normal !important;
  padding:10px 8px !important;
  font-size:12.2px !important;
  line-height:1.35 !important;
  vertical-align:middle !important;
}
html body.price-layout-rootfix-v905 .fees-matrix-v787DN th{
  font-size:12.4px !important;
}
html body.price-layout-rootfix-v905 .fees-matrix-total-v787DN{
  font-size:13.4px !important;
}

html body.price-layout-rootfix-v905 .urgent-table-wrap table,
html body.price-layout-rootfix-v905 .urgent-table{
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  table-layout:fixed !important;
}
html body.price-layout-rootfix-v905 .urgent-table-wrap th,
html body.price-layout-rootfix-v905 .urgent-table-wrap td{
  white-space:normal !important;
  overflow-wrap:anywhere !important;
  min-width:0 !important;
}

/* Non-table blocks in the content lane also need to shrink instead of expanding the rail. */
html body.price-layout-rootfix-v905 .nationality-fee-note-v598U,
html body.price-layout-rootfix-v905 .fees-consolidated-summary-v787DN,
html body.price-layout-rootfix-v905 .fees-inline-notes-v787DN,
html body.price-layout-rootfix-v905 .fees-check-section .grid.two,
html body.price-layout-rootfix-v905 .price-text-columns-v883,
html body.price-layout-rootfix-v905 .price-note-block-v883,
html body.price-layout-rootfix-v905 .private-service-bottom-note,
html body.price-layout-rootfix-v905 .hero-actions{
  max-width:100% !important;
  min-width:0 !important;
}
html body.price-layout-rootfix-v905 .fees-check-section .grid.two{
  grid-template-columns:minmax(0, .88fr) minmax(0, 1.12fr) !important;
}
html body.price-layout-rootfix-v905 .fee-card,
html body.price-layout-rootfix-v905 .price-text-item-v883,
html body.price-layout-rootfix-v905 .price-note-block-v883{
  min-width:0 !important;
  max-width:100% !important;
  overflow-wrap:anywhere !important;
}
html body.price-layout-rootfix-v905 .fee-card select,
html body.price-layout-rootfix-v905 .fee-card input{
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
}

/* The dangerous middle range: desktop browser is not phone-sized, but there is not enough
   useful horizontal room for the sidebar plus a 5-column fee table. Stack the sidebar here. */
@media (max-width:1500px){
  html body.price-layout-rootfix-v905 .price-xxx-layout-v871.container,
  html body.price-layout-rootfix-v905 .price-xxx-layout-v871{
    grid-template-columns:1fr !important;
    width:min(1180px, calc(100vw - 56px)) !important;
    max-width:1180px !important;
    gap:24px !important;
  }
  html body.price-layout-rootfix-v905 .price-xxx-main-v871{
    grid-column:1 !important;
    overflow:visible !important;
  }
  html body.price-layout-rootfix-v905 .price-xxx-sidebar-v871,
  html body.price-layout-rootfix-v905 .price-sidebar-emergency-standard-v889{
    grid-column:1 !important;
    position:static !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    display:grid !important;
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    gap:16px !important;
  }
  html body.price-layout-rootfix-v905 .price-xxx-sidebar-v871 .emergency-side-box-v787FR:nth-of-type(n+5){
    display:none !important;
  }
  html body.price-layout-rootfix-v905 .fees-matrix-v787DN{
    min-width:900px !important;
    width:max-content !important;
    max-width:none !important;
    table-layout:auto !important;
  }
  html body.price-layout-rootfix-v905 .fees-matrix-v787DN th,
  html body.price-layout-rootfix-v905 .fees-matrix-v787DN td{
    min-width:138px !important;
    font-size:13px !important;
    padding:10px 10px !important;
  }
  html body.price-layout-rootfix-v905 .fees-matrix-v787DN th:first-child,
  html body.price-layout-rootfix-v905 .fees-matrix-v787DN td:first-child{
    min-width:220px !important;
  }
  html body.price-layout-rootfix-v905 .urgent-table-wrap table,
  html body.price-layout-rootfix-v905 .urgent-table{
    min-width:680px !important;
    width:max-content !important;
    max-width:none !important;
    table-layout:auto !important;
  }
}

@media (max-width:900px){
  html body.price-layout-rootfix-v905 .price-xxx-layout-v871.container,
  html body.price-layout-rootfix-v905 .price-xxx-layout-v871{
    width:min(100%, calc(100vw - 24px)) !important;
    gap:18px !important;
  }
  html body.price-layout-rootfix-v905 .price-xxx-sidebar-v871,
  html body.price-layout-rootfix-v905 .price-sidebar-emergency-standard-v889{
    grid-template-columns:1fr !important;
  }
  html body.price-layout-rootfix-v905 .fees-check-section .grid.two,
  html body.price-layout-rootfix-v905 .price-text-columns-v883{
    grid-template-columns:1fr !important;
  }
  html body.price-layout-rootfix-v905 .fees-matrix-v787DN{
    min-width:760px !important;
  }
  html body.price-layout-rootfix-v905 .price-xxx-main-v871 h2{
    font-size:clamp(24px, 8vw, 34px) !important;
  }
}

@media (max-width:640px){
  html body.price-layout-rootfix-v905 .fees-matrix-v787DN{
    min-width:720px !important;
  }
  html body.price-layout-rootfix-v905 .fees-matrix-v787DN th,
  html body.price-layout-rootfix-v905 .fees-matrix-v787DN td{
    font-size:12.5px !important;
  }
}

/* Floating support dock: on this table-heavy page it must not sit on top of sidebar cards. */
@media (min-width:1181px){
  html body.price-layout-rootfix-v905{
    --vge-chat-edge:24px;
    --vge-chat-dock-bottom:42px;
  }
}
@media (max-width:1500px){
  html body.price-layout-rootfix-v905{
    padding-bottom:calc(128px + env(safe-area-inset-bottom,0px)) !important;
  }
}
