﻿/* ==========================================================================
   Property Details Page - Place Perfect Web Application
   ========================================================================== */

/* ==========================================================================
   Page Layout & Base Styles
   ========================================================================== */

body > .container-fluid {
	max-width: 1920px;
}

footer {
	margin-bottom: 90px;
}

@media (min-width: 769px) {
	footer {
		margin-bottom: 0;
	}
}

/* ==========================================================================
   Header & Navigation Components
   ========================================================================== */

.print-header {
	display:none;
}

/* Main Navigation Override */
.main-nav {
	z-index:20;
	min-height: 48px;
}

/* Details Header */
.details-header {
	display: flex;
	justify-content: center;
	position: sticky;
	top: 0;
	z-index: 10;
	width: 100%;
	margin-bottom: -55px;
}

.property-navbar {
	width: 100%;
	display: flex;
	justify-content: center;
	padding: 0.5rem 0;
	padding-left: 1rem;
	padding-right: 1rem;
	background-color: transparent !important;
}

.navbar-row {
	display: flex;
	justify-content: space-between;
	align-items:center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
	width: 100%;
	max-width: 1920px;
}

.property-navbar .navbar-row:last-child {
	margin-bottom: 0;
}

.property-navbar a.btn {
	display: flex;
	align-items: center;
	justify-content: center;
}

.property-navbar .btn:not(:hover) {
	background-color: white;
}

.property-navbar button span,
.property-navbar a.btn span {
	display: none;
}

/* Navigation Actions */
.action-buttons {
	justify-content: end;
	gap: 0.25rem;
}

.search-input {
	display: none;
}

/* Breadcrumb Navigation */
.breadcrumb-row {
	display: none;
	align-items: baseline;
	justify-content: start;
	width: 100%;
	overflow-x: auto;
	gap: 0.5rem;
}

.breadcrumb {
	margin-bottom: 0;
	padding: 0;
	background: none;
	width: max-content;
	flex-wrap: nowrap;
	text-wrap-mode: nowrap;
}

.breadcrumb-item > a {
	color: var(--bs-secondary);
}

	.breadcrumb-item > a:hover {
		text-decoration: underline;
	}

/* Header Responsive Styles */
@media (min-width: 576px) {

	.details-header {
		position: sticky;
		top: 0;
		width: 100%;
		margin-bottom: 0;
		border-bottom: 1px solid var(--bs-border-color);
	}

	.navbar-row {
		display: grid;
		grid-template-columns: auto 1fr auto;
	}

	.property-navbar button span {
		display: inline;
	}

	header {
		width: 100%;
		background-color: white;
	}

	.search-input {
		display: block;
		max-width: 300px;
	}
}

@media (min-width: 769px) {
	.navbar-row {
		grid-template-columns: auto auto 1fr auto;
	}

	.property-navbar button span {
		display: none;
	}

	.breadcrumb-row {
		display: flex;
	}
}

@media (min-width: 992px) {
	.property-navbar button span {
		display: none;
	}
}

@media (min-width: 1200px) {
	.property-navbar a.btn span {
		display: inline;
	}

	.property-navbar button span {
		display: inline;
	}
}

@media (min-width: 1920.9px) {
	.details-header {
		margin-bottom: 1rem;
	}
}

/* ==========================================================================
   Hero Content & Photo Components
   ========================================================================== */

/* Hero Content Container */
.hero-content {
	position: relative;
}

	.hero-content button {
		display: none;
		position: absolute;
		z-index: 1;
		cursor: pointer;
	}

	.hero-content .btn-prev {
		top: 50%;
		left: 10px;
		transform: translateY(-50%);
	}

	.hero-content .btn-next {
		top: 50%;
		right: 10px;
		transform: translateY(-50%);
	}

/* Photo Overlays */
.photo-count-overlay {
	position: absolute;
	bottom: 12px;
	right: 10px;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	font-size: 1rem;
	padding: 4px 12px;
	border-radius: 16px;
	z-index: 1;
	pointer-events: none;
	font-weight: 500;
}

.listing-status-overlay {
	display:flex;
	align-items:center;
	position: absolute;
	bottom: 12px;
	left: 10px;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	font-size: 1rem;
	padding: .25rem .75rem;
	border-radius: 1rem;
	z-index: 1;
	pointer-events: none;
	font-weight: 500;
}

	.listing-status-overlay::before {
		content: "";
		display: inline-block;
		line-height:1rem;
		margin-right: 4px;
		width: 1rem;
		height: 1rem;
		border-radius: 50%;
	}

	.listing-status-overlay.Active::before {
		background-color: var(--bs-success);
	}

	.listing-status-overlay.Pending::before {
		background-color: var(--bs-warning);
	}

	.listing-status-overlay.Sold::before {
		background-color: var(--bs-danger);
	}

/* Photo Grid */
.photo-grid-wrap {
	position: relative;
	overflow-x: scroll;
	width: 100%;
	height: calc(3/4 * 100vw);
	max-height: calc(1920px * 3 / 4 * 2 / 5);
	scroll-snap-type: x mandatory;
	scroll-padding-left: 0px;
}

	.photo-grid-wrap::-webkit-scrollbar {
		display: none;
	}

.photo-grid {
	padding-left: 0px;
	height: 100%;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 100%;
	grid-auto-rows: 100%;
	gap: 4px;
}

	.photo-grid .img-wrap {
		scroll-padding-left: 4px;
		scroll-snap-align: start;
		position: relative;
	}

		.photo-grid .img-wrap.main-photo {
			grid-row: auto;
		}

	.photo-grid img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		display: block;
		cursor: pointer;
	}

		.photo-grid img:hover {
			filter: brightness(0.7);
		}

/* Photo Grid Responsive */
@media (min-width: 576px) {
	.hero-content button {
		display: block;
	}

	.photo-grid-wrap {
		height: calc(100vw * 3 / 4 * 2 / 5);
	}

	.photo-grid {
		grid-auto-columns: calc((100% - (4px * 3)) / 4); /* 4 columns, 3 gaps */
		grid-auto-rows: calc((100% - (4px * 1)) / 2); /* 2 rows, 1 gap */
	}

		.photo-grid .img-wrap.main-photo {
			grid-row: span 2;
			grid-column: span 2;
		}
}

@media (min-width: 992px) {
	.photo-grid {
		grid-auto-columns: calc((100% - (4px * 4)) / 5); /* 5 columns, 4 gaps */
		grid-auto-rows: calc((100% - (4px * 1)) / 2); /* 2 rows, 1 gap */
	}
}

@media (min-width: 1920.9px) {
	.photo-grid-wrap {
		border-radius: 10px;
	}
}

/* ==========================================================================
   Modal Components
   ========================================================================== */

/* Vertical Photos Modal */
.vertical-photos-modal .modal-header {
	display: flex;
	justify-content: space-between;
}

	.vertical-photos-modal .modal-header .details {
		display: none;
	}

.vertical-photo-grid {
	display: grid;
	grid-template-columns: 1fr;
	grid-auto-rows: auto;
	justify-items: center;
}

	.vertical-photo-grid img {
		max-height: 50vh;
		width: 100%;
		object-fit: cover;
		display: block;
		cursor: pointer;
		padding-bottom: 6px;
	}

@media (min-width: 576px) {
	.vertical-photos-modal .modal-header {
		display: grid;
		grid-template-columns: auto 1fr auto;
		gap: 0.5em;
	}

		.vertical-photos-modal .modal-header .details {
			display: block;
		}

	.vertical-photo-grid img {
		max-height: 70vh;
		height: calc(3 / 4 * 50vw);
		width: 50vw;
	}
}

/* Lightbox Modal */
.lightbox-modal .modal-header {
	display: flex;
	justify-content: space-between;
}

	.lightbox-modal .modal-header .btn,
	.lightbox-modal .modal-header span,
	.lightbox-modal .modal-header address {
		color: white;
		border-color: white;
	}

	.lightbox-modal .modal-header .details {
		display: none;
	}

.lightbox-modal .grid-container {
	height: 100%;
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: 1fr auto;
}

.lightbox-counter {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	color: #fff;
	font-size: 1.1rem;
	font-weight: 500;
	text-align: center;
	min-width: 80px;
	letter-spacing: 1px;
	user-select: none;
}

/* Lightbox Photo Area */
.lightbox-photo {
	position: relative;
	display: flex;
	overflow: hidden;
	justify-content: center;
	align-items: center;
}

	.lightbox-photo img {
		max-height: 100%;
		max-width: 100%;
		object-fit: contain;
		display: block;
	}

	.lightbox-photo .lightbox-nav-btn {
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
		background: rgba(0, 0, 0, 0.5);
		color: white;
		border: none;
		border-radius: 50%;
		width: 50px;
		height: 50px;
		display: none;
		align-items: center;
		justify-content: center;
		cursor: pointer;
		font-size: 1.5rem;
		transition: background-color 0.2s;
		z-index: 1;
	}

		.lightbox-photo .lightbox-nav-btn:hover {
			background: rgba(0, 0, 0, 0.7);
		}

		.lightbox-photo .lightbox-nav-btn:focus {
			outline: 2px solid white;
			outline-offset: 2px;
		}

	.lightbox-photo .lightbox-prev {
		left: 20px;
	}

	.lightbox-photo .lightbox-next {
		right: 20px;
	}

/* Film Strip */
.film-strip-wrap {
	display: flex;
	align-items: center;
	overflow-x: auto;
	width: 100%;
	padding: 10px;
}

.film-strip {
	height: 100%;
	max-height: 10vh;
	display: flex;
	gap: 1em;
}

	.film-strip .img-wrap {
		display: flex;
		justify-content: center;
		align-items: center;
		height: 100%;
		width: max-content;
		scroll-snap-align: start;
	}

	.film-strip img {
		max-width: 100%;
		max-height: 100%;
		object-fit: contain;
		cursor: pointer;
		border-radius: 4px;
		transition: border-color 0.2s, transform 0.2s;
		border: 2px solid transparent;
	}

		.film-strip img:hover {
			transform: scale(1.05);
		}

		.film-strip img.selected {
			border-color: white;
			transform: scale(1.1);
		}

/* Modal Responsive Styles */
@media (min-width: 768px) {
	.lightbox-modal .modal-header {
		display: grid;
		grid-template-columns: auto 1fr auto;
		gap: 0.5em;
	}

	.lightbox-modal .modal-header .details {
		display: block;
	}
}

@media (min-width: 992px) {
	.lightbox-photo {
		padding: 1em;
	}

		.lightbox-photo .lightbox-nav-btn {
			display: flex;
		}

	.film-strip-wrap {
		padding: 1em;
	}

	.film-strip {
		gap: 1em;
	}
}

@media (max-width: 992px) {
	.film-strip-wrap::-webkit-scrollbar {
		display: none;
	}
}

/* ==========================================================================
   Property Information Components
   ========================================================================== */

/* Property Info Container */
.property-info {
	display: grid;
	row-gap: 1em;
}

	.property-info ul {
		list-style: none;
	}

/* Basic Information */
.basic-info {
	display: grid;
	grid-template-rows: auto;
}
	.basic-info .price-beds-baths {
		display:flex;
		justify-content:space-between;
		flex-wrap:wrap;
	}

    .basic-info address {
		display: flex;
		flex-wrap: wrap;
		font-size: 1.3rem;
		column-gap: .325rem;
    }

.basic-info address span{
	text-wrap: nowrap;
	break-inside:avoid;
}

	.basic-info .list-price {
		font-size: 2rem;
	}

	.basic-info address {
		display: flex;
		flex-direction: row;
	}

/* Property Highlights */
.highlights {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px 8px;
}

.highlight {
	display: flex;
	align-items: center;
	padding: 0.5em;
	background: var(--bg-tertiary);
	border-radius: 8px;
}

	.highlight svg {
		margin-right: 10px;
		min-width: 24px;
	}

	.highlight > div {
		display: flex;
		flex-wrap: wrap;
		column-gap: 0.5em;
	}

		.highlight > div span:last-child {
			font-weight: bold;
			font-size: 1.05rem;
			flex-wrap: nowrap;
		}

/* Property Details Lists */
.details-items > div {
	break-inside: avoid;
}

.details-section-header {
	padding: 0.5em;
	background: var(--bg-tertiary);
	border-radius: 8px;
	font-weight: normal;
}

/* Tables */
.table-container {
	overflow-x: auto;
	max-width: 100vw;
	border: 1px solid #ddd;
}

th {
	font-weight: normal;
}

/* Property Highlights Responsive */
@media (min-width: 576px) {
	.highlights {
		grid-template-columns: 1fr 1fr;
	}

	.details-items {
		column-count: 2;
	}
}

@media (min-width: 992px) {
	.details-items {
		column-count: 3;
	}
}

@media (min-width: 1400px) {
	.highlights {
		grid-template-columns: 1fr 1fr 1fr;
	}
}

/* ==========================================================================
   Contact & Action Components
   ========================================================================== */

/* Contact Forms */
.main-content .contact,
.ppr-contact {
	gap: 1em;
	min-height: 50px;
	background: white;
	width: 100%;
	z-index: 9;
	padding: 0.8em;
	height: auto;
	box-shadow: 0 0 8px -1px rgba(0, 0, 0, 0.4);
	position: fixed;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	display: grid;
}

.main-content .contact {
	grid-template-columns: 2fr 3fr;
}

.ppr-contact {
	grid-template-columns: 3fr 2fr;
}

.agent-contact {
	display: flex;
	align-content: start;
	flex-wrap: wrap;
	flex-direction: column;
	gap: .5em;
	font-size: 1rem;
}

@media (min-width: 768px) {
	.agent-contact {
		font-size: .8rem;
	}
}

@media (min-width: 992px) {
	.agent-contact {
		font-size: 1rem;
	}
}

	.agent-contact img {
		border-radius:inherit;
		width: 3.4em;
		height: 3.4em;
		object-fit: cover;
	}

.agent-info {
	display: flex;
	flex-direction: column;
	text-wrap: nowrap;
	justify-content: space-between;
	font-size: 1em;
	line-height: 1em;
}

.agent-contact .r1{
	display: flex;
}

.r1 a {
	text-decoration:none;
	font-size: 1.4em;
	font-weight: 500;
	line-height: 1.4em;
}

.agent-contact .r2{
	display: none;
}

.modal-footer .contact {
	gap: 1em;
	min-height: 50px;
	width: 100%;
	display: grid;
	grid-template-columns: 2fr 3fr;
	padding: 0.8em;
	height: auto;
	margin: 0;
}

.contact button {
	display: inline-block;
	padding-left: 0;
	padding-right: 0;
}

/* ==========================================================================
   Layout & Content Areas
   ========================================================================== */

/* Main Content Layout */
@media (min-width: 576px) {
	.main-content {
		display: grid;
		grid-template-columns: auto;
	}
}

@media (min-width: 769px) {
	.main-content {
		display: grid;
		grid-template-columns: 7fr 2fr;
		grid-template-rows: auto;
		gap: 1em;
	}

		.main-content .contact, .ppr-contact {
			position: sticky;
			top: calc(56px + 1em);
			transform: none;
			border: 1px solid #ddd;
			border-radius: 8px;
			display: flex;
			flex-wrap: wrap;
			box-shadow: none;
			height: min-content;
		}
			.agent-contact .r2{
				display:flex;
			}

			.main-content .contact button, .ppr-contact button {
				height: fit-content;
				width: 100%;
			}

	.lightbox-modal .modal-footer, 
	.vertical-photos-modal .modal-footer {
		display: none;
	}
}

.similar-properties {
	grid-column:1;
}

/* ==========================================================================
   Embedded Content
   ========================================================================== */

/* Google Maps Embed */
.embedded-gmap {
	display: flex;
	justify-content: center;
}

	.embedded-gmap iframe {
		width: 100%;
		height: 450px;
		border: 0;
		border-radius: 8px;
	}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {

	body {
		margin: 0;
		padding: 0;
		color: black;
	}

	footer, body, .highlight {
		background-color: white;
	}

	.print-header {
		display: grid;
		grid-template-columns: auto 1fr;
		justify-content: center;
		align-items: center;
		margin-bottom: 1rem;
		gap: 1rem;
	}

	.details-header,
	.main-nav,
	.property-navbar,
	.breadcrumb-row,
	.main-content .contact,
	.ppr-contact,
	.hero-content,
	.browse,
	.realtor,
	.website-info,
	.disclaimer img,
	hr,
	.similar-properties,
	footer
	{
		display: none !important;
	}

	.map,
	.details-section.rooms,
	.listing-info,
	.financial,
	.disclaimer,
	.offices
	{
		page-break-inside: avoid;
	}

	.office-locations-grid {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		grid-template-rows: auto;
		row-gap: 0;
	}

	.office-location {
		display: grid;
		grid-template-rows: auto auto 1fr;
		grid-template-columns: auto 1fr;
		justify-items: start;
		column-gap: 0.5em;
		padding: 0 .5em;
		text-align: left;
	}

		.office-location span {
			grid-column: span 2;
			grid-row: 1;
			align-content: start;
		}

		.office-location .bi-telephone-outbound {
			grid-column: 1;
			grid-row: 2;
		}

		.office-location .bi-geo-alt {
			grid-column: 1;
			grid-row: 3;
		}

		.office-location address {
			grid-column: 2;
			grid-row: 3;
		}

		.office-location phone {
			grid-column: 2;
			grid-row: 2;
		}

	.main-content {
		display: grid;
		grid-template-columns: 1fr;
	}

	.basic-info {
		display: grid;
		grid-template:
			"photo address"
			"photo price"
			"highlights highlights";
		grid-template-columns: 300px 1fr;
		column-gap: 16px;
		row-gap: 24px;
	}
	.print-photo {
		grid-area: photo;
		display: block !important;
		height: 200px;
		width: 300px;
	}
		.print-photo img {
			height: 100%;
			width: 100%;
			object-fit: cover;
		}

	.basic-info > :nth-child(2) {
		grid-area: price;
		display: grid;
		grid-template-rows: auto auto;
		align-items:end;
	}
	.basic-info .list-price {
		font-size: 20px;
		font-weight: normal;
	}

	.basic-info address {
		grid-area: address;
		display: grid;
		grid-template-rows: auto auto;
	}
		.basic-info address {
			font-size: 24px;
			line-height: 24px;
			font-weight: 700;
		}

	.basic-info .highlights {
		grid-area: highlights;
	}
	.details-section-header {
		padding-left: 0;
		padding-right: 0;
		border-radius:0;
		border-top: solid 1px black;
		background:white;
	}
}

/* ==========================================================================
   Media Query Placeholders
   ========================================================================== */

@media (min-width: 992px) {
	/* Large devices styles */
}

@media (min-width: 1200px) {
	/* X-Large devices styles */
}

@media (min-width: 1400px) {
	/* XX-Large devices styles */
}
