/* v917 — Price Lists fee checker frame + Emergency sidebar final
   User request:
   - shrink the outer fee checker frame, not only the inner form
   - remove old/sidebar-below behavior and place Emergency Visa sidebar on right
   - remove Good to know block */

html body.price-feecheck-sidebar-final-v917 .price-xxx-layout-v871.container,
html body.price-feecheck-sidebar-final-v917 .price-xxx-layout-v871{
  display:grid !important;
  grid-template-columns:minmax(0, 920px) 340px !important;
  gap:30px !important;
  width:min(1320px, calc(100vw - 56px)) !important;
  max-width:1320px !important;
  margin-left:auto !important;
  margin-right:auto !important;
  align-items:start !important;
  overflow:visible !important;
}

/* Main column keeps the compact content, but no section may create an empty full-width card. */
html body.price-feecheck-sidebar-final-v917 .price-xxx-main-v871,
html body.price-feecheck-sidebar-final-v917 .price-xxx-main-v871 .fees-main-rail-v438G,
html body.price-feecheck-sidebar-final-v917 .price-xxx-main-v871 .section,
html body.price-feecheck-sidebar-final-v917 .price-xxx-main-v871 .section > .container{
  min-width:0 !important;
  max-width:100% !important;
  width:100% !important;
  margin-left:0 !important;
  margin-right:0 !important;
  padding-left:0 !important;
  padding-right:0 !important;
}

/* IMPORTANT: shrink the outer fee checker section itself. */
html body.price-feecheck-sidebar-final-v917 .fees-check-section,
html body.price-feecheck-sidebar-final-v917 .price-feecheck-only-v915{
  width:560px !important;
  max-width:560px !important;
  min-width:0 !important;
  margin:24px 0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  border-radius:0 !important;
  box-shadow:none !important;
  overflow:visible !important;
}

html body.price-feecheck-sidebar-final-v917 .fees-check-section > .container.grid.two,
html body.price-feecheck-sidebar-final-v917 .price-feecheck-grid-v915{
  width:560px !important;
  max-width:560px !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 !important;
  display:block !important;
}

html body.price-feecheck-sidebar-final-v917 .fees-check-section .fee-card[data-fee-checker]{
  width:560px !important;
  max-width:560px !important;
  min-width:0 !important;
  margin:0 !important;
  padding:26px 26px 24px !important;
  border:1px solid #d0d9e8 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  background:#fff !important;
}

/* Remove inherited huge visual shell if older CSS tries to draw one around the checker area. */
html body.price-feecheck-sidebar-final-v917 .fees-check-section::before,
html body.price-feecheck-sidebar-final-v917 .fees-check-section::after,
html body.price-feecheck-sidebar-final-v917 .price-feecheck-only-v915::before,
html body.price-feecheck-sidebar-final-v917 .price-feecheck-only-v915::after{
  display:none !important;
  content:none !important;
}

/* Sidebar: force the Emergency sidebar to the right lane on desktop. */
html body.price-feecheck-sidebar-final-v917 .price-xxx-sidebar-v871,
html body.price-feecheck-sidebar-final-v917 .price-sidebar-emergency-standard-v889,
html body.price-feecheck-sidebar-final-v917 .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;
  display:block !important;
  z-index:3 !important;
}

html body.price-feecheck-sidebar-final-v917 .price-xxx-sidebar-v871 .emergency-side-box-v787FR,
html body.price-feecheck-sidebar-final-v917 .price-sidebar-emergency-standard-v889 .emergency-side-box-v787FR{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
}

/* Counteract previous middle-width rules that were forcing sidebar below too early. */
@media (min-width:1181px){
  html body.price-feecheck-sidebar-final-v917 .price-xxx-sidebar-v871,
  html body.price-feecheck-sidebar-final-v917 .price-sidebar-emergency-standard-v889,
  html body.price-feecheck-sidebar-final-v917 .price-sidebar-v917{
    grid-column:2 !important;
    position:sticky !important;
    display:block !important;
  }
}

/* Retain safe stacking only when the viewport truly cannot hold the sidebar. */
@media (max-width:1180px){
  html body.price-feecheck-sidebar-final-v917 .price-xxx-layout-v871.container,
  html body.price-feecheck-sidebar-final-v917 .price-xxx-layout-v871{
    grid-template-columns:1fr !important;
    width:min(920px, calc(100vw - 34px)) !important;
    max-width:920px !important;
  }

  html body.price-feecheck-sidebar-final-v917 .price-xxx-sidebar-v871,
  html body.price-feecheck-sidebar-final-v917 .price-sidebar-emergency-standard-v889,
  html body.price-feecheck-sidebar-final-v917 .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;
  }
}

@media (max-width:700px){
  html body.price-feecheck-sidebar-final-v917 .fees-check-section,
  html body.price-feecheck-sidebar-final-v917 .price-feecheck-only-v915,
  html body.price-feecheck-sidebar-final-v917 .fees-check-section > .container.grid.two,
  html body.price-feecheck-sidebar-final-v917 .price-feecheck-grid-v915,
  html body.price-feecheck-sidebar-final-v917 .fees-check-section .fee-card[data-fee-checker]{
    width:100% !important;
    max-width:100% !important;
  }

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