/*detail page */
.detail-page .detail-buttons {
  text-align: center;
  margin-top: 15px;
}
.detail-page .detail-buttons a {
  margin-right: 15px;
  margin-bottom: 15px;
}
@media (min-width: 768px) {
  .detail-page .detail-buttons {
    text-align: left;
  }
}
@media (max-width: 659px) {
  .detail-page .btn-det-col {
    display: none !important;
  }
}
/* GH #65: Two-column responsive layout */
/* Phone portrait (<600px): Single column, all panels stacked */
/* Tablet/Desktop (600-1919px): Two columns (45% map+photos, 55% panels) */
/* Ultrawide/4K (>=1920px): Two columns with more space for map+photos (55%/45%) */

.detail-page .detail .det-col-left,
.detail-page .detail .det-col-right {
  width: 100%;
  box-sizing: border-box;
}

/* Two-column layout for tablets and desktops (>=600px) */
@media (min-width: 600px) {
  .detail-page .detail .row {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    align-items: stretch; /* Make columns equal height */
  }
  .detail-page .detail .det-col-left {
    width: 45%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
  }
  /* GH #65: Gallery fills EXACTLY the space below the map - no more, no less */
  .detail-page .detail .det-col-left .det-item:last-child {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .detail-page .detail .det-col-left .thumbnails {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  /* Chain of divs down to the gallery - all must propagate flex height */
  .detail-page .detail .det-col-left .thumbnails > div,
  .detail-page .detail .det-col-left .thumbnails > div > div {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  /* .pswp is position:fixed overlay, ignore it. Hide the br that breaks layout */
  .detail-page .detail .det-col-left .thumbnails br {
    display: none;
  }
  /* HARD RECTANGLE: Gallery fills exactly the remaining space */
  .detail-page .detail .det-col-left .thumbnails #photo-gallery-target {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  /* Inner containers must also fill the gallery */
  .detail-page .detail .det-col-left .thumbnails #photo-gallery-target > div {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .detail-page .detail .det-col-left .thumbnails #photo-gallery-target .my-gallery {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    /* No gap - outline on .item provides visual spacing without affecting layout */
  }
  /* Loader should not take space when hidden */
  .detail-page .detail .det-col-left .thumbnails #photo-gallery-loader.hidden {
    display: none;
  }
  .detail-page .detail .det-col-left .thumbnails #photo-gallery-target img {
    flex-grow: 1;
    object-fit: cover;
    min-width: 150px;
    max-height: 300px;
  }
  .detail-page .detail .det-col-right {
    width: 55%;
    flex-grow: 1;
  }
}

/* Ultrawide/4K: Give more space to map and photos */
@media (min-width: 1920px) {
  .detail-page .detail .det-col-left {
    width: 55%;
  }
  .detail-page .detail .det-col-right {
    width: 45%;
  }
}
.detail-page .detail .det {
  margin-bottom: 25px;
}
.detail-page .detail .det .panel {
  overflow-x: auto;
}
.detail-page .detail .det .panel-heading {
  font-weight: bold;
}
.detail-page .detail .det .panel-body, .detail-page .detail .det .table {
  font-size: 0.875em;
}
.detail-page .detail .det .table tbody tr td, .detail-page .detail .det .table tfoot tr td {
  padding-left: 15px;
  padding-right: 15px;
}
.detail-page .detail .det .table tbody tr td:first-child, .detail-page .detail .det .table tfoot tr td:first-child {
  font-weight: bold;
}
.detail-page .detail .det .table thead tr th {
  padding-left: 15px;
  padding-right: 15px;
}
.detail-page .detail .det .table tfoot {
  border-top: 2px solid gray;
}
.detail-page .detail .det-payment-calculator img {
  max-width: 100%;
  height: auto;
}
.detail-page .detail .det-notify select, .detail-page .detail .det-notify button {
  margin-top: 10px;
}
.detail-page .detail .det-maps .det-map-wrap {
  position: relative;
  margin-bottom: 25px;
}
@media (min-width: 660px) {
  .detail-page .detail .det-maps .det-map-wrap {
    padding-top: 0px;
  }
}
.detail-page .detail .det-maps .det-map-wrap .toggle-buttom-map {
  display: none;
  width: 100%;
  text-align: center;
  position: absolute;
  top: 0;
  z-index: 1000;
  border-radius: 0;
}
.detail-page .detail .det-maps .det-map-wrap .toggle-buttom-map .glyphicon {
  -webkit-transition: all 0.3s;
  -moz-transition: all 0.3s;
  -o-transition: all 0.3s;
  transition: all 0.3s;
}
.detail-page .detail .det-maps .det-map-wrap .toggle-buttom-map.open .glyphicon {
  top: 2px;
  -webkit-transform: rotate(180deg);
  -moz-transform: rotate(180deg);
  -o-transform: rotate(180deg);
  transform: rotate(180deg);
}
.detail-page .detail .det-maps .det-map-wrap .toggle-buttom-map.visible {
  display: block;
}
@media (min-width: 660px) {
  .detail-page .detail .det-maps .det-map-wrap .toggle-buttom-map.visible {
    display: none;
  }
}
.detail-page .detail .det-maps .det-map-wrap .toggle-buttom-map.fixed {
  position: fixed;
  -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
  -moz-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
}
.detail-page .detail .det-maps .det-street {
  margin-bottom: 25px;
}

.detail-page .detail .det-maps .caption {
  text-align: center;
  margin-top: 5px;
  font-size: small;
  font-style: italic;
}

.detail-photos {
	font-size: 0;
}
.detail-photos .item {
	outline: 5px solid white;
}

@media(min-width: 992px) {
	.detail-photos * img {
		max-width: 800px;
		max-height: 80vh;
		width: auto;
  		height: auto;
	}
}

.detail-photos * {
	display: inline-block;
}
body#detail .pageHeading {
	padding: 5px;
	margin-bottom: 0;
}
.detail-room-items {
	display: flex;
	flex-wrap: wrap;
}
.detail-room-items div {
	flex: 25%;
	box-sizing: border-box;
	border-top: 1px solid grey;
}
.detail-room-items div span:nth-child(2) {
	font-weight: bold;
	display: block;
}

@media(max-width: 767px) {
	.detail {
		margin-top: 1em;
	} 
}
#map_canvas {
	height: 490px;
}
i.history-mls-id {
	color: lightgray;
}

/* GH #65: Extend container width for 4K/ultrawide monitors */
/* Override Bootstrap's .container max-width for detail page on large screens */
@media (min-width: 2560px) {
  .detail-page .container {
    width: 2400px;
  }
}

@media (min-width: 3840px) {
  .detail-page .container {
    width: 3600px;
  }
}