/* Development Locations: Grid / Map toggle and map */
/* the theme's filter list is a full-width positioned block; lift the toggles above it so it can't cover them */
.ph-dl__views { position: relative; z-index: 2; float: right; display: flex; gap: 8px; margin: 0 0 12px 12px; }
.ph-dl__views + ul.ptb-post-filter { max-width: calc(100% - 200px); }
.ph-dl__view {
	font: inherit; font-size: 12px; line-height: 1; padding: 6px 12px;
	border: 1px solid #002638; border-radius: 999px;
	background: #fff; color: #002638; cursor: pointer;
	transition: background-color .15s, color .15s;
}
.ph-dl__view[aria-pressed="true"] { background: #cbbba0; border-color: #cbbba0; }
.ph-dl__view:hover, .ph-dl__view:focus { background: #002638; border-color: #002638; color: #fff; }
.ph-dl__view[aria-pressed="true"]:hover, .ph-dl__view[aria-pressed="true"]:focus { background: #cbbba0; border-color: #cbbba0; color: #002638; }
.ph-dl__view:focus-visible { outline: 2px solid #002638; outline-offset: 2px; }

.ph-dl--off { display: none !important; }
.ph-dl__map { clear: both; height: 560px; margin: 16px 0 36px; background: #e8ecee; }
.ph-dl__map[hidden] { display: none; }

.ph-dl__pinWrap { background: none; border: 0; }
.ph-dl__pin {
	display: block; width: 24px; height: 24px; margin: 2px;
	background: #002638; border: 3px solid #cbbba0; border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

.ph-dl__map .leaflet-popup-content { margin: 0; width: 260px !important; }
.ph-dl__map .leaflet-popup-content-wrapper { border-radius: 0; padding: 0; overflow: hidden; }
.ph-dl__pop img { display: block; width: 100%; height: 130px; object-fit: cover; }
.ph-dl__popBody { display: grid; gap: 4px; padding: 12px 14px 14px; color: #002638; font-size: 14px; line-height: 1.35; }
.ph-dl__name { font-size: 20px; line-height: 1.15; }
.ph-dl__pill { justify-self: start; padding: 2px 10px; border-radius: 999px; background: #cbbba0; font-size: 12px; }
.ph-dl__go {
	justify-self: start; margin-top: 6px; padding: 6px 14px; border-radius: 999px;
	background: #002638; color: #fff !important; font-size: 13px; text-decoration: none;
}
.ph-dl__go:hover, .ph-dl__go:focus { background: #cbbba0; color: #002638 !important; }

/* Google Maps info window: use our card, without Google's own padding */
.ph-dl__map .gm-style .gm-style-iw-c { padding: 0 !important; border-radius: 0 !important; max-width: 280px !important; }
.ph-dl__map .gm-style .gm-style-iw-d { overflow: hidden !important; max-height: none !important; }
.ph-dl__map .gm-style .gm-ui-hover-effect { top: 4px !important; right: 4px !important; background: rgba(255, 255, 255, .85) !important; border-radius: 50%; width: 30px !important; height: 30px !important; }
.ph-dl__map .gm-style .gm-ui-hover-effect > span { margin: 5px !important; }

@media (max-width: 700px) {
	.ph-dl__map { height: 420px; }
	.ph-dl__views { float: none; margin: 0 0 12px; }
	.ph-dl__views + ul.ptb-post-filter { max-width: none; }
}

/* Cards (house types and developments): equal height, buttons always inside the coloured box, same-shaped photos */
.ptb_loops_wrapper[data-type="house-types"] article.ptb_post,
.ptb_loops_wrapper[data-type="developments"] article.ptb_post { display: flex; flex-direction: column; }
.ptb_loops_wrapper[data-type="house-types"] article.ptb_post > .ptb_items_wrapper,
.ptb_loops_wrapper[data-type="developments"] article.ptb_post > .ptb_items_wrapper { flex: 1 1 auto; display: flex; flex-direction: column; }
.ptb_loops_wrapper[data-type="house-types"] article.ptb_post .ptb_first_row,
.ptb_loops_wrapper[data-type="developments"] article.ptb_post .ptb_first_row { flex: 1 1 auto; }
.ptb_loops_wrapper[data-type="house-types"] article.ptb_post .ptb_last_row,
.ptb_loops_wrapper[data-type="developments"] article.ptb_post .ptb_last_row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; padding: 0 5% 5%; }
.ptb_loops_wrapper[data-type="house-types"] article.ptb_post .ptb_last_row .ptb_col,
.ptb_loops_wrapper[data-type="developments"] article.ptb_post .ptb_last_row .ptb_col { width: auto; float: none; flex: 0 0 auto; padding: 0; margin: 0; }
.ptb_loops_wrapper[data-type="house-types"] article.ptb_post .ptb_last_row a.ptb_link_button,
.ptb_loops_wrapper[data-type="developments"] article.ptb_post .ptb_last_row a.ptb_link_button { margin: 0; }
.ptb_loops_wrapper[data-type="house-types"] article.ptb_post .house-enquiry a,
.ptb_loops_wrapper[data-type="developments"] article.ptb_post .house-enquiry a { position: static !important; display: inline-block; margin: 0; }
.ptb_loops_wrapper[data-type="house-types"] article.ptb_post .ptb_post_image { aspect-ratio: 3 / 2; overflow: hidden; }
.ptb_loops_wrapper[data-type="house-types"] article.ptb_post .ptb_post_image a { display: block; height: 100%; }
.ptb_loops_wrapper[data-type="house-types"] article.ptb_post .ptb_post_image img { width: 100%; height: 100%; object-fit: cover; }

/* the grid drops to two, then one, column instead of squeezing three cards onto a phone */
@media (max-width: 1000px) { .ptb_loops_wrapper.ptb_grid3[data-type="house-types"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .ptb_loops_wrapper.ptb_grid3[data-type="house-types"] { grid-template-columns: minmax(0, 1fr); } }

/* Grid / Map buttons level with the section heading on desktop */
@media (min-width: 901px) { .ph-dl__views { margin-top: -84px; } }

/* the theme's clearfix ::before/::after become extra flex items in the button row and push the second button off the right edge */
.ptb_loops_wrapper[data-type="house-types"] article.ptb_post .ptb_last_row::before,
.ptb_loops_wrapper[data-type="house-types"] article.ptb_post .ptb_last_row::after,
.ptb_loops_wrapper[data-type="developments"] article.ptb_post .ptb_last_row::before,
.ptb_loops_wrapper[data-type="developments"] article.ptb_post .ptb_last_row::after { content: none; display: none; }

/* form error messages (including the phone check) get breathing room before the next field */
.wpcf7-form .wpcf7-not-valid-tip { display: block; margin: 6px 0 14px; padding: 0 20px; line-height: 1.35; }

/* Decorative lines behind the Development Locations section, from the same images the homepage uses
   (Media Library: ph-bg3 = tan swirl, ph-bg4 = sage line). They sit behind the cards, bleeding off the right edge. */
.module_row:has(.ptb_loops_wrapper[data-type="developments"]) {
	background-image: url(/wp-content/uploads/2026/06/ph-bg3.png), url(/wp-content/uploads/2026/06/ph-bg4.png);
	background-repeat: no-repeat, no-repeat;
	background-position: 100% 0, 100% 640px;
	background-size: auto, auto;
}
@media (max-width: 900px) {
	.module_row:has(.ptb_loops_wrapper[data-type="developments"]) { background-size: 640px auto, 110px auto; background-position: 100% 0, 100% 900px; }
}

/* The same lines behind Available Homes (ph-bg1 = pink swirl, ph-bg4 = sage line). A full-width layer sits behind the module so the
   lines run off the edge of the screen, not just the edge of the content. */
.module-text:has(.ph-ah) { position: relative; }
.module-text:has(.ph-ah)::before {
	content: ""; position: absolute; z-index: 0; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); pointer-events: none;
	background-image: url(/wp-content/uploads/2026/06/ph-bg1.png), url(/wp-content/uploads/2026/06/ph-bg4.png);
	background-repeat: no-repeat, no-repeat; background-position: 100% 0, 100% 45%;
}
.module-text:has(.ph-ah) > .tb_text_wrap { position: relative; z-index: 1; }
@media (max-width: 900px) { .module-text:has(.ph-ah)::before { background-size: 640px auto, 110px auto; } }
