/*
 * Detail pages only (flat with its photo page, complex, complex plans, podobovo): linked after the bundle by their
 * templates in {% block page_stylesheets %}. Object rules that other pages use too (quick-view modals, share dialog,
 * advertising, lists) are in object-common.css, the last file of bundle.css (docs/CSS_SPLIT_PLAN.md, step 3d).
 */
.add-menu-detail-wrap-modal{
  margin-top: 0;
}

.modal-content.container{
  padding-left: 0;
  padding-right: 0;
  border: none;
  border-radius: 0;
}

#icon-street-view{
  background-color: white;
  height: 76px;
  width: 76px;
  position: absolute;
  right: 50px;
  bottom: 85px;
  display: none;
  padding: 3px;
  cursor: pointer;
}

#player-street-view{
  display: none;
}

.obj-detail-right-col{
  position: absolute;
  top: 0;
  right: 15px;
  width: 300px;
}

.contact-btn-in-menu{
  /*background: $bgBtnCustom;*/
}

.contact-btn-in-menu a{
  color: #fff;
}

.preview-obj-detail-inform{
  width: 100%;
  height: 80px;
  background-color: #008479 !important;
  color: #ffffff;
  text-align: center;
  padding-top: 20px;
  font-size: 24px;
  margin-top: -10px;
}

.sim-link-obj-detail{
  display: block;
  position: relative;
  line-height: 1.2em;
  color: rgb(59, 65, 68);
}

.sim-link-obj-detail:hover{
  color: rgb(59, 65, 68);
  text-decoration: none;
}

.sim-link-obj-detail:hover button{
  background-color: #8b4;
  color: #fff;
  border-color: #8b4;
}

.object-detail-container{
  max-width: 1200px;
  margin: 15px auto;
  padding: 0 15px;
}

.object-detail-photo{
  height: 400px;
  position: relative;
  margin: 0 auto 15px;
  border-radius: 8px;
  overflow: hidden;
}

.object-detail-photo img{
  object-fit: cover;
  height: 100%;
  width: 100%;
}

.object-detail-photo .view-large-photos,
.object-detail-photo .video-obj-detail-min,
.object-detail-photo .video-obj-detail-min-overlay{
  bottom: 20px;
}

@media (max-width: 550px) {
  .add-menu-obj-detail .nav.navbar-nav li .glyphicon{
    display: block !important;
    font-size: 16px;
  }

  .add-menu-obj-detail .nav.navbar-nav li a span{
    display: none;
  }
}

@media (max-width: 768px) {
  .obj-detail-content-modal{
    margin-top: 50px;
  }

  .contact-btn-in-menu a{
    color: #fff;
    margin-top: 10px;
  }

  .contact-btn-in-menu a:hover{
    color: #fff;
  }

  .preview-obj-detail-inform{
    padding-top: 10px;
    margin-top: 50px;
    font-size: 18px;
  }

  .object-detail-photo{
    margin: 0 -15px;
    border-radius: 0;
  }
}

.video-obj-detail-min{
  position: absolute;
  z-index: 10;
  bottom: 85px;
  left: 30px;
  height: 80px;
  width: 115px;
}

.video-obj-detail-max{
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

.video-obj-detail-min-overlay{
  position: absolute;
  z-index: 11;
  overflow: hidden;
  background: transparent;
  bottom:85px;
  left:30px;
  height: 80px;
  width: 115px;
  cursor: pointer;
}

.video-obj-detail-min-overlay svg{
  position: absolute;
  top: 18%;
  left: 30%;
  z-index: 12;
  height: 48px;
  width: 48px;
  fill: #ffffff;
}

.video-obj-detail-return-button{
  position: absolute;
  z-index: 12;
  bottom:50px;
  left:30px;
}

@media (min-width: 768px) {
  .fix-submenu {
    position: fixed;
    z-index: 1010;
    top: -50px;
    left: 0;
    right: 0;
    width: 100%;
  }

  .fix-dropdown-menu {
    position: fixed;
    z-index: 1010;
    top: 50px!important;
    left: 0;
    right: 0;
    width: 100%;
  }

}

/* complex page: the grid photos open the fullscreen gallery (js/gallery/photo_gallery.js) */
.object-detail-photo img[data-photo-open]{
  cursor: zoom-in;
}
.object-detail-photo img[data-photo-open]:focus-visible{
  outline: 3px solid var(--bs-primary, #0d6efd);
  outline-offset: -3px;
}

/* flat detail page, docs/PHOTO_STORAGE_PLAN.md step 3 (templates/flat/_photoMacros.html.twig): the mosaic (the main
   photo and up to 4 tiles, 450 px high) opens the photo page, which opens the gallery */
.flat-mosaic{
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  height: 450px;
  border-radius: 8px;
  overflow: hidden;
  /* white gaps between the photos; the grey shows only on a photo still loading */
  background-color: #fff;
}
.flat-mosaic--1{
  grid-template-columns: 1fr;
}
.flat-mosaic--2,
.flat-mosaic--3{
  grid-template-columns: 2fr 1fr;
}
.flat-mosaic__item{
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  background-color: rgb(216, 216, 216);
  cursor: zoom-in;
}
.flat-mosaic__main,
.flat-mosaic--2 .flat-mosaic__item:nth-child(2),
.flat-mosaic--4 .flat-mosaic__item:nth-child(2){
  grid-row: span 2;
}
.flat-mosaic__item:focus-visible{
  outline: 3px solid var(--bs-primary, #0d6efd);
  outline-offset: -3px;
}
/* the photos above the content and the contact column, over the whole container (1200 px) */
.obj-detail-photos-row{
  padding: 0 15px;
  margin-bottom: 0;
}
.obj-detail-photo--mosaic .view-large-photos,
.obj-detail-photo--mosaic .video-obj-detail-min,
.obj-detail-photo--mosaic .video-obj-detail-min-overlay{
  bottom: 20px;
}

/* the photo page: a fullscreen modal, the photos in one column (one wide, two half) and the price on the side */
.photo-page .modal-content{
  background-color: #ffffff;
}
.photo-page__bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 15px;
}
.photo-page__back{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  color: var(--bs-body-color);
  text-decoration: none;
}
.photo-page__back svg{
  fill: currentColor;
}
.photo-page__total{
  color: rgb(134, 144, 153);
  font-size: 14px;
}
.photo-page__body{
  padding: 0 15px 24px;
}
.photo-page__layout{
  display: flex;
  align-items: flex-start;
  gap: 24px;
  max-width: 1170px;
  margin: 0 auto;
}
.photo-page__photos{
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.photo-page__item{
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background-color: rgb(216, 216, 216);
  cursor: zoom-in;
}
.photo-page__item--wide{
  grid-column: span 2;
}
.photo-page__item:focus-visible{
  outline: 3px solid var(--bs-primary, #0d6efd);
  outline-offset: -3px;
}
.photo-page__side{
  flex: 0 0 300px;
  position: sticky;
  top: 0;
}
.photo-page__price{
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}
.photo-page__facts{
  margin-bottom: 4px;
}
.photo-page__address{
  color: rgb(134, 144, 153);
}

@media (max-width: 767.98px){
  .flat-mosaic{
    display: block;
    height: auto;
    border-radius: 0;
  }
  .flat-mosaic__main{
    aspect-ratio: 4 / 3;
  }
  .flat-mosaic__item:not(.flat-mosaic__main){
    display: none;
  }

  .photo-page__body{
    padding: 0;
  }
  .photo-page__layout{
    flex-direction: column;
    gap: 0;
  }
  .photo-page__photos{
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .photo-page__item--wide{
    grid-column: auto;
  }
  /* on phones: price and the contact button stay at the bottom */
  .photo-page__side{
    flex: none;
    width: 100%;
    top: auto;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background-color: #ffffff;
    border-top: 1px solid rgb(222, 226, 230);
  }
  .photo-page__price{
    font-size: 18px;
    margin: 0;
    flex: 1 1 auto;
  }
  .photo-page__facts,
  .photo-page__address{
    display: none;
  }
  .photo-page__side .btn{
    width: auto !important;
    margin: 0 !important;
  }
}
