/* ==========================================================================
   PROPZED PUBLISHER & BUILDERS
   --------------------------------------------------------------------------
   A. Fixes on top of the theme (only while <body> has .pzp-enhance)
      1. Colour contrast (WCAG AA)   2. Tap targets   3. Forms on mobile
      4. Focus and motion            5. WhatsApp shortcut on cards
   B. Components added by this plugin
      6. Builder logo, cards, grids  7. Builder page   8. Developer card
      9. Publisher area              10. Call-to-action card
   Class prefix "pzp-". Colours and radii reuse the theme tokens (--pz-*).
   ========================================================================== */

:root {
	--pzp-gold-text: #8a6410;   /* Gold that is readable as text on white (5.4:1) */
	--pzp-green: #177a54;       /* Green that is readable under white text (5.3:1) */
	--pzp-tap: 44px;            /* Minimum comfortable tap target */
}

/* A1. CONTRAST ------------------------------------------------------------ */
body.pzp-enhance { --pz-green: var(--pzp-green); }
.pzp-enhance .pz-eyebrow,
.pzp-enhance .pz-card__type,
.pzp-enhance .pz-card__link,
.pzp-enhance .pz-link-arrow:hover,
.pzp-enhance .pz-content a:hover { color: var(--pzp-gold-text); }
.pzp-enhance .pz-section--navy .pz-eyebrow,
.pzp-enhance .pz-page-head .pz-eyebrow,
.pzp-enhance .pz-hero .pz-eyebrow { color: var(--pz-gold); }
.pzp-enhance .pz-btn--gold:hover { background: var(--pz-gold-dark); color: var(--pz-navy); }
.pzp-enhance .pz-btn--wa:hover { background: #12613f; }
.pzp-enhance .pz-page-head .pz-breadcrumb { color: #a9b8ca; }
.pzp-enhance .pz-single .pz-breadcrumb { color: var(--pz-muted); }
.pzp-enhance .pz-infra__tag { color: var(--pzp-gold-text); }
/* Header menu: keep every item on one line when the extra links are added. */
.pz-menu > li > a { white-space: nowrap; }
@media (min-width: 1025px) {
	.pz-header .pz-nav__actions .pz-btn { white-space: nowrap; }
	/* The publisher link lives in the mobile menu and the footer; the desktop header stays uncluttered. */
	.pz-header .pz-menu > .pzp-menu-publisher { display: none; }
}
@media (min-width: 1025px) and (max-width: 1440px) {
	.pz-header .pz-nav { gap: 12px; }
	.pz-header .pz-menu { gap: 0; }
	.pz-header .pz-menu > li > a { padding: 10px 7px; font-size: .86rem; }
	.pz-header .pz-nav__actions .pz-btn { padding: 10px 16px; }
}
.pzp-enhance .pz-content a { text-decoration: underline; text-underline-offset: 3px; }

/* A2. TAP TARGETS --------------------------------------------------------- */
.pzp-enhance .pz-fav:not(.pz-fav--inline) { width: var(--pzp-tap); height: var(--pzp-tap); }
.pzp-enhance .pz-card__link { min-height: var(--pzp-tap); padding: 0 4px; }
.pzp-enhance .pz-slider__dots { gap: 0; }
.pzp-enhance .pz-slider__dots button { width: 24px; height: 24px; padding: 8px; background-clip: content-box; }
.pzp-enhance .pz-slider__dots button.is-active { width: 40px; }
.pzp-enhance .pz-faq__item summary { min-height: var(--pzp-tap); display: flex; align-items: center; cursor: pointer; }
.pzp-enhance .pz-footer__col li a { display: inline-block; padding: 4px 0; }
.pzp-enhance .pz-topbar a { min-height: 40px; }

@media (max-width: 900px) {
	.pzp-enhance .pz-chip,
	.pzp-enhance .pz-bubble,
	.pzp-enhance .pz-tool-btn,
	.pzp-enhance .pz-fav--inline { min-height: var(--pzp-tap); }
	.pzp-enhance .pz-chips-row .pz-chip { padding-top: 10px; padding-bottom: 10px; }
	.pzp-enhance .pz-footer__col li a,
	.pzp-enhance .pz-footer__menu a { padding: 10px 0; }
	.pzp-enhance .pz-breadcrumb a { display: inline-block; padding: 8px 0; }
	.pzp-enhance .pagination .page-numbers { min-width: var(--pzp-tap); min-height: var(--pzp-tap); display: inline-flex; align-items: center; justify-content: center; }
}

/* A3. FORMS ON MOBILE ----------------------------------------------------- */
/* 16px text stops iPhone Safari from zooming in when a field is focused. */
@media (max-width: 900px) {
	.pzp-enhance input[type="text"], .pzp-enhance input[type="tel"], .pzp-enhance input[type="email"],
	.pzp-enhance input[type="number"], .pzp-enhance input[type="search"], .pzp-enhance input[type="url"],
	.pzp-enhance input[type="password"], .pzp-enhance select, .pzp-enhance textarea { font-size: 16px; }
	.pzp-enhance .pz-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
	.pzp-enhance .pz-form .pz-select { min-height: 48px; }
	.pzp-enhance .pz-form .pz-btn { min-height: 50px; }
}
.pzp-enhance .pz-form input:focus, .pzp-enhance .pz-form textarea:focus, .pzp-enhance .pz-form select:focus {
	outline: 3px solid var(--pz-gold); outline-offset: 1px;
}
.pzp-enhance .pz-form input:user-invalid, .pzp-enhance .pz-form select:user-invalid { border-color: #b42318; }
.pzp-enhance .pz-form [aria-busy="true"] { opacity: .7; cursor: progress; }
.pzp-enhance .pz-notice:focus { outline: 3px solid var(--pz-gold); outline-offset: 2px; }

/* A4. FOCUS / MOTION ------------------------------------------------------ */
.pzp-enhance a:focus-visible, .pzp-enhance button:focus-visible, .pzp-enhance summary:focus-visible { outline: 3px solid var(--pz-gold); outline-offset: 2px; border-radius: 4px; }
.pzp-enhance .pz-section--navy a:focus-visible, .pzp-enhance .pz-footer a:focus-visible, .pzp-enhance .pz-page-head a:focus-visible { outline-color: #fff; }
.pzp-enhance .pz-card:focus-within { box-shadow: var(--pz-shadow-lg); }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.pzp-enhance *, .pzp-enhance *::before, .pzp-enhance *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* A5. WHATSAPP SHORTCUT ON CARDS ------------------------------------------ */
/* Round icon button under the shortlist heart, so the card layout does not change. */
.pz-card > .pzp-card-wa {
	position: absolute; right: 14px; top: 68px; z-index: 2; display: grid; place-items: center;
	width: var(--pzp-tap); height: var(--pzp-tap); border-radius: 50%;
	background: rgba(255, 255, 255, .95); color: var(--pzp-green); box-shadow: 0 2px 8px rgba(11, 29, 51, .12);
}
.pz-card > .pzp-card-wa:hover { background: var(--pzp-green); color: #fff; }
.pz-card > .pzp-card-wa .pz-icon { width: 22px; height: 22px; }
.pz-card > .pzp-card-wa span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* B6. BUILDER LOGO, CARDS, GRIDS ------------------------------------------ */
.pzp-logo { display: grid; place-items: center; flex: 0 0 auto; width: 56px; height: 56px; border-radius: 12px; background: #fff; border: 1px solid var(--pz-border); overflow: hidden; }
.pzp-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.pzp-logo--mono { background: linear-gradient(135deg, var(--pz-navy), var(--pz-navy-2)); border-color: transparent; color: var(--pz-gold); font-weight: 800; font-size: 1.15rem; letter-spacing: .02em; }
.pzp-logo--lg { width: 96px; height: 96px; border-radius: 18px; font-size: 2rem; }

.pzp-bgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pzp-bgrid--dir { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 40px; }
.pzp-bcard { display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 14px 16px; background: #fff; border: 1px solid var(--pz-border); border-radius: var(--pz-radius); color: var(--pz-navy); transition: border-color .2s, box-shadow .2s, transform .2s; }
.pzp-bcard:hover { border-color: var(--pz-gold); box-shadow: var(--pz-shadow); transform: translateY(-2px); color: var(--pz-navy); }
.pzp-bcard__text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.pzp-bcard__text strong { font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.pzp-bcard__text small { color: var(--pz-muted); font-size: .82rem; line-height: 1.35; }
.pzp-bcard > .pz-icon { color: var(--pzp-gold-text); }
.pzp-bcard[hidden] { display: none; }

.pzp-bsearch { display: grid; gap: 6px; max-width: 420px; margin-bottom: 16px; }
.pzp-bsearch label { font-weight: 600; font-size: .9rem; color: var(--pz-navy); }
.pzp-bsearch input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--pz-border); border-radius: var(--pz-radius-sm); background: #fff; font-size: 16px; }
.pzp-bsearch input:focus { outline: 3px solid var(--pz-gold); outline-offset: 1px; }

/* B7. BUILDER PAGE --------------------------------------------------------- */
.pzp-bhero { padding-bottom: 48px; }
.pzp-bhero__row { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.pzp-bhero__row h1 { margin-bottom: 6px; overflow-wrap: anywhere; }
.pzp-bhero__tagline { margin: 0; max-width: 720px; color: #dbe3ee; }
.pzp-bhero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.pzp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0; }
.pzp-stats > div { padding: 14px 16px; border-radius: var(--pz-radius-sm); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); }
.pzp-stats dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: #c9d4e2; }
.pzp-stats dd { margin: 4px 0 0; font-weight: 700; color: #fff; line-height: 1.3; }
.pzp-stats--light > div { background: var(--pz-bg-alt); border-color: var(--pz-border); }
.pzp-stats--light dt { color: var(--pz-muted); }
.pzp-stats--light dd { color: var(--pz-navy); font-size: 1.5rem; }

.pzp-bbody { padding-top: 40px; padding-bottom: 72px; }
.pzp-about { padding-top: 0; border-top: 0; margin-bottom: 8px; }
.pzp-projects__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.pzp-projects__head .pz-block__title, .pzp-projects__head p { margin-bottom: 0; }
.pzp-projects .pz-chips-row { margin: 12px 0 20px; }
.pzp-projects .pz-grid { margin-top: 16px; }

.pzp-enquire { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 40px; align-items: center; margin: 56px 0 40px; padding: 40px; border-radius: var(--pz-radius); background: var(--pz-bg-alt); }
.pzp-enquire h2 { margin-bottom: 16px; }
.pzp-enquire .pz-checklist { list-style: none; display: grid; gap: 10px; }
.pzp-enquire .pz-checklist li { display: flex; gap: 10px; align-items: flex-start; }
.pzp-enquire .pz-checklist .pz-icon { color: var(--pzp-green); margin-top: 4px; }

/* B8. DEVELOPER CARD (single property) ------------------------------------ */
.pzp-devcard { display: flex; align-items: center; gap: 16px; margin-top: 24px; padding: 16px; border: 1px solid var(--pz-border); border-radius: var(--pz-radius); background: var(--pz-bg-alt); }
.pzp-devcard__text { display: grid; gap: 2px; min-width: 0; }
.pzp-devcard__text strong { color: var(--pz-navy); font-size: 1.05rem; }
.pzp-devcard__text p { margin: 0; color: var(--pz-muted); font-size: .9rem; }
.pzp-devcard__eyebrow { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--pz-muted); }
.pz-content .pzp-devcard__link, .pzp-devcard__link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--pzp-tap); font-weight: 700; color: var(--pz-navy); text-decoration: underline; text-underline-offset: 3px; }
.pzp-devcard__link .pz-icon { width: 16px; height: 16px; }

/* B9. PUBLISHER AREA ------------------------------------------------------- */
.pzp-pub { padding-top: 32px; padding-bottom: 72px; }
.pzp-auth { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 32px; align-items: start; }
.pzp-narrow { max-width: 760px; }
.pzp-left { text-align: left; }
.pz-form .pzp-input, .pz-form input[type="password"], .pz-form input[type="url"] { width: 100%; padding: 11px 14px; border: 1px solid var(--pz-border); border-radius: var(--pz-radius-sm); background: var(--pz-bg-alt); }
.pz-form input[readonly] { color: var(--pz-muted); }
.pz-form label small { color: var(--pz-muted); font-size: .8rem; }
.pz-form label.pzp-check, .pzp-check { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; line-height: 1.45; }
.pzp-check input { flex: 0 0 auto; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--pz-navy); }
.pz-form label.pzp-check > span { font-weight: 500; font-size: .9rem; }
.pzp-form-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.pzp-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 24px; padding: 2px; }
.pzp-tabs::-webkit-scrollbar { display: none; }
.pzp-tabs a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: var(--pzp-tap); padding: 0 18px; border: 1px solid var(--pz-border); border-radius: 999px; background: #fff; color: var(--pz-navy); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.pzp-tabs a.is-active { background: var(--pz-navy); border-color: var(--pz-navy); color: #fff; }

.pzp-dash-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.pzp-hello { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--pz-navy); }
.pzp-pub .pzp-stats { margin-bottom: 28px; }

.pzp-listings { list-style: none; display: grid; gap: 14px; }
.pzp-listing { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--pz-border); border-radius: var(--pz-radius); background: #fff; }
.pzp-listing__media { display: grid; place-items: center; width: 96px; height: 96px; border-radius: var(--pz-radius-sm); background: var(--pz-bg-alt); color: var(--pz-muted); overflow: hidden; }
.pzp-listing__media img { width: 100%; height: 100%; object-fit: cover; }
.pzp-listing__media .pz-icon { width: 32px; height: 32px; }
.pzp-listing__title { font-size: 1.05rem; margin: 6px 0 4px; overflow-wrap: anywhere; }
.pzp-listing__meta { margin: 0; color: var(--pz-muted); font-size: .88rem; }
.pzp-listing__note { margin: 8px 0 0; padding: 8px 12px; border-radius: var(--pz-radius-sm); background: #fdecec; color: #7a1414; font-size: .88rem; }
.pzp-listing__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pzp-listing__actions .pz-btn { padding: 10px 18px; min-height: var(--pzp-tap); }
.pzp-listing__actions form { margin: 0; }
.pzp-linkbtn { min-height: var(--pzp-tap); padding: 0 10px; border: 0; background: none; color: #9b1c1c; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.pzp-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.pzp-pill--live { background: #e6f6ef; color: #12603f; }
.pzp-pill--review { background: #fff4d6; color: #6b4a00; }
.pzp-pill--changes { background: #fdecec; color: #9b1c1c; }
.pzp-pill--withdrawn { background: #eceff3; color: #3f4b5a; }

.pzp-photos { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; margin-bottom: 16px; }
.pzp-photos li { display: grid; gap: 6px; }
.pzp-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--pz-radius-sm); }

/* B10. CALL-TO-ACTION CARD -------------------------------------------------- */
.pzp-cta-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 24px 0; padding: 20px 24px; border: 1px solid var(--pz-border); border-left: 4px solid var(--pz-gold); border-radius: var(--pz-radius-sm); background: var(--pz-bg-alt); }
.pzp-cta-card > div { flex: 1 1 320px; }
.pzp-cta-card strong { color: var(--pz-navy); font-size: 1.05rem; }
.pzp-cta-card p { margin: 4px 0 0; color: var(--pz-muted); font-size: .92rem; }
.pz-content .pzp-cta-card .pz-btn { text-decoration: none; }

/* RESPONSIVE ---------------------------------------------------------------- */
@media (max-width: 1024px) {
	.pzp-bgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pzp-bgrid--dir { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pzp-enquire { grid-template-columns: 1fr; padding: 28px; gap: 24px; }
	.pzp-auth { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
	.pzp-bgrid, .pzp-bgrid--dir { grid-template-columns: 1fr; gap: 12px; }
	.pzp-home-builders .pzp-bgrid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px 8px; }
	.pzp-home-builders .pzp-bgrid::-webkit-scrollbar { display: none; }
	.pzp-home-builders .pzp-bcard { scroll-snap-align: start; }
	.pzp-bhero { padding-top: 32px; padding-bottom: 32px; }
	.pzp-bhero__row { align-items: flex-start; gap: 14px; }
	.pzp-logo--lg { width: 64px; height: 64px; border-radius: 14px; font-size: 1.35rem; }
	.pzp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.pzp-stats > div { padding: 12px; }
	.pzp-bhero__cta { display: grid; grid-template-columns: 1fr 1fr; }
	.pzp-bhero__cta .pz-btn { min-height: 50px; padding-left: 12px; padding-right: 12px; }
	.pzp-bhero__cta .pz-btn:first-child { grid-column: 1 / -1; }
	.pzp-bbody { padding-top: 28px; padding-bottom: 48px; }
	.pzp-enquire { margin: 40px -20px 32px; padding: 28px 20px; border-radius: 0; }
	.pzp-listing { grid-template-columns: 72px minmax(0, 1fr); align-items: start; }
	.pzp-listing__media { width: 72px; height: 72px; }
	.pzp-listing__actions { grid-column: 1 / -1; justify-content: flex-start; }
	.pzp-listing__actions .pz-btn { flex: 1 1 auto; }
	.pzp-dash-head .pz-btn { width: 100%; min-height: 50px; }
	.pzp-form-actions .pz-btn { flex: 1 1 100%; min-height: 50px; }
	.pzp-cta-card .pz-btn { width: 100%; min-height: 50px; }
	.pzp-devcard { align-items: flex-start; }
	.pz-form--wide.pzp-auth__form, .pzp-auth__form { padding: 20px; }
}
