
/*
 DATE48 V37
 Repair the V36 desktop composition.

 - Place CTA in the vacant grid cell
 - Limit oversized venue photographs
 - Remove excessive bottom padding
 - Preserve the actual Yandex map
*/

@media (min-width:1200px) {

  /* Remove excessive whitespace */

  body:has(.d48v3-page)
  .d48v3-page {
    padding-bottom:16px!important;
    row-gap:18px!important;
  }

  body:has(.d48v3-page)
  .app-shell {
    padding-bottom:28px!important;
  }

  /*
   Place ready users and meeting planner
   in the same grid row.
  */

  body:has(.d48v3-page)
  .d48v3-page > .d48v3-stories {
    grid-column:1 / 2!important;
    grid-row:3!important;
    align-self:stretch!important;
    margin:0!important;
  }

  /*
   React may wrap the actual CTA in a div.
   Target its direct grid-child wrapper,
   instead of assuming the button is direct.
  */

  body:has(.d48v3-page)
  .d48v3-page > :has(.d48v3-places-cta):not(.d48v3-stories),

  body:has(.d48v3-page)
  .d48v3-page > .d48v3-places-cta {
    box-sizing:border-box!important;

    grid-column:2 / 3!important;
    grid-row:3!important;

    display:flex!important;
    align-items:stretch!important;

    width:100%!important;
    min-width:0!important;
    height:100%!important;
    min-height:174px!important;

    margin:0!important;
    padding:0!important;
    align-self:stretch!important;
  }

  /* Expand the actual meeting button */

  body:has(.d48v3-page)
  .d48v3-page .d48v3-places-cta {
    box-sizing:border-box!important;

    display:flex!important;
    align-items:center!important;

    width:100%!important;
    max-width:none!important;

    min-height:174px!important;
    height:100%!important;

    margin:0!important;
    padding:22px!important;

    border-radius:20px!important;

    background-size:cover!important;
    background-position:center!important;
  }

  body:has(.d48v3-page)
  .d48v3-places-copy {
    min-width:0!important;
    max-width:340px!important;
  }

  body:has(.d48v3-page)
  .d48v3-places-copy strong {
    font-size:19px!important;
    line-height:1.2!important;
  }

  /*
   Venue photos should look like cards,
   not panoramic banners.
  */

  body:has(.d48v3-page)
  .d48v3-place-rail {
    display:grid!important;

    grid-template-columns:
      repeat(2,minmax(0,1fr))!important;

    gap:16px!important;
    width:100%!important;

    max-width:960px!important;

    margin:0!important;
    padding:0 0 3px!important;
    overflow:visible!important;
  }

  body:has(.d48v3-page)
  .d48v3-place {
    box-sizing:border-box!important;

    display:block!important;
    width:100%!important;
    min-width:0!important;

    height:176px!important;
    min-height:176px!important;

    margin:0!important;
    border-radius:19px!important;

    background-size:cover!important;
    background-position:center!important;
    overflow:hidden!important;
  }

  /* Keep real map width intact */

  body:has(.d48v3-page)
  .d48v41-map {
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }

  body:has(.d48v3-page)
  .d48map-expand-button {
    margin-bottom:0!important;
  }

  body:has(.d48v3-page)
  .d48v3-status:empty {
    display:none!important;
  }
}

@media (min-width:1200px) and (max-width:1399px) {

  body:has(.d48v3-page)
  .d48v3-place-rail {
    max-width:850px!important;
  }

  body:has(.d48v3-page)
  .d48v3-place {
    height:158px!important;
    min-height:158px!important;
  }
}



/*
 DATE48 V38 — Restaurants grid.

 Only the 48 Hours desktop page.

 1200–1749px: 3 columns.
 1750px+: 4 columns.

 Existing restaurants only.
 No synthetic cards.
*/

@media (min-width:1200px) {

  body:has(.d48v3-page)
  .d48v3-place-rail {

    display:grid!important;

    grid-template-columns:
      repeat(3,minmax(0,1fr))!important;

    gap:16px!important;

    width:100%!important;
    max-width:none!important;
    min-width:0!important;

    margin:0!important;
    padding:0 0 4px!important;

    overflow:visible!important;

    align-items:stretch!important;
  }

  body:has(.d48v3-page)
  .d48v3-place {

    box-sizing:border-box!important;

    display:block!important;

    width:100%!important;
    max-width:none!important;
    min-width:0!important;

    margin:0!important;
    flex:none!important;

    height:172px!important;
    min-height:172px!important;

    border-radius:18px!important;

    background-size:cover!important;
    background-position:center!important;

    overflow:hidden!important;
  }

  body:has(.d48v3-page)
  .d48v3-place-copy {

    box-sizing:border-box!important;
    min-width:0!important;
  }

}

@media (min-width:1750px) {

  body:has(.d48v3-page)
  .d48v3-place-rail {

    grid-template-columns:
      repeat(4,minmax(0,1fr))!important;

    gap:18px!important;
  }

}


/* DATE48 V39b — four genuine venues */

@media (min-width:1500px) {

  body:has(.d48v3-page) .d48v3-place-rail {
    display:grid!important;

    grid-template-columns:
      repeat(4,minmax(0,1fr))!important;

    gap:14px!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    overflow:visible!important;
  }

  body:has(.d48v3-page) .d48v3-place {
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;

    height:166px!important;
    min-height:166px!important;

    margin:0!important;
    border-radius:17px!important;
    overflow:hidden!important;
  }
}
