/* One popup design for the public project pages and the Live Listings (resale-desk) flows.
   Reference: the "Offer a unit" popup. The shell selectors (.pb-popup*) and the original offer
   selectors (.unit-offer*, .offer-*) share the same rules, so the offer popup is unchanged. */
:root{--pb-pop-ink:#253444;--pb-pop-title:#1c2d3a;--pb-pop-muted:#536674;--pb-pop-line:#dde4e7;--pb-pop-field:#bdccd3;--pb-pop-primary:#b63f2d;--pb-pop-primary-hover:#9f3526;--pb-pop-disabled:#dae0e3;--pb-pop-disabled-ink:#54626a;--pb-pop-link:#31546a;--pb-pop-row:#dee5e9;--pb-pop-row-on:#fff7f4;--pb-pop-row-on-line:#d74b37}

/* Frame: <dialog> holding an iframe page, or a native dialog / Bootstrap modal with the shell inside. */
dialog.unit-offer-dialog,dialog.pb-popup-dialog{width:min(760px,94vw);height:min(680px,90dvh);max-width:none;max-height:none;padding:0;border:0;border-radius:14px;background:white;box-shadow:0 24px 80px #132a4044}
dialog.pb-popup-dialog--md{width:min(560px,94vw);height:min(640px,90dvh)}
:is(.unit-offer-dialog,.pb-popup-dialog)::backdrop{background:#10243591}
:is(.unit-offer-dialog,.pb-popup-dialog) iframe{display:block;width:100%;height:100%;border:0}

/* Page inside the iframe */
.offer-page,.pb-popup-page{margin:0;background:white;color:var(--pb-pop-ink);font:14px/1.5 Roboto,Arial,sans-serif}

/* Shell */
.unit-offer,.pb-popup{box-sizing:border-box;margin:auto;max-width:760px;height:100dvh;display:flex;flex-direction:column;color:var(--pb-pop-ink);background:white;font:14px/1.5 Roboto,Arial,sans-serif;text-align:left}
.pb-popup--md{max-width:560px}
.pb-popup--fit{height:auto;max-height:inherit}
.unit-offer *,.pb-popup *{box-sizing:border-box}
.unit-offer header,.unit-offer footer,.offer-body,.pb-popup__header,.pb-popup__footer,.pb-popup__body{padding:20px 26px}
.unit-offer header,.pb-popup__header{position:relative;padding-right:56px;border-bottom:1px solid var(--pb-pop-line)}
.unit-offer h1,.pb-popup__title{font-size:21px;letter-spacing:-.035em;margin:0;color:inherit;font-weight:bold;line-height:inherit}
.unit-offer h2,.pb-popup h2,.pb-popup__body h3.pb-popup__section{font-size:16px;margin:0 0 12px;font-weight:bold}
.unit-offer h3,.pb-popup h3{font-size:14px;margin:18px 0 8px;font-weight:bold}
.unit-offer p,.pb-popup p{margin:5px 0;color:var(--pb-pop-muted)}
.pb-popup__context{margin:5px 0!important;color:var(--pb-pop-muted)}
.offer-body,.pb-popup__body{overflow:auto;flex:1;min-height:0}
.unit-offer footer,.pb-popup__footer{border-top:1px solid #dce3e7;background:white}
.unit-offer footer>div,.pb-popup__actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.offer-confirm,.pb-popup__confirm{display:block;margin-bottom:12px}
.pb-popup__close{position:absolute;top:10px;right:10px;z-index:2;display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;background:transparent;color:#1c2d3a;cursor:pointer}

/* Fields */
.offer-body input[type=search],.pb-popup :is(input[type=text],input[type=search],input[type=email],input[type=tel],input[type=number],input[type=date],input:not([type]),select,textarea),.pb-popup :is(.form-control,.form-select){width:100%;border:1px solid var(--pb-pop-field);padding:9px;border-radius:6px;font:inherit;margin:4px 0 7px;background-color:white;color:var(--pb-pop-ink);box-shadow:none;min-height:40px}
.pb-popup :is(.form-control,.form-select,input,select,textarea):focus{border-color:var(--pb-pop-link);outline:2px solid #31546a33;outline-offset:0}
.pb-popup label{color:var(--pb-pop-ink);font-weight:500}
.unit-offer input,.pb-popup input{accent-color:var(--pb-pop-primary)}

/* Selectable rows (listings, units, choices) */
.offer-row,.pb-popup-row{display:flex;align-items:center;gap:10px;padding:12px 10px;margin:6px 0;border:1px solid var(--pb-pop-row);border-radius:8px;cursor:pointer;background:white;font-weight:400}
.offer-row:has(:checked),.pb-popup-row:has(:checked){border-color:var(--pb-pop-row-on-line);background:var(--pb-pop-row-on)}
.offer-row>span>span,.pb-popup-row>span>span{display:block;color:#536574}
.pb-popup-row input{flex:0 0 auto;width:auto;min-height:0;margin:0}
.pb-popup-row:has(:disabled){opacity:.55;cursor:default}

/* Buttons: one small solid primary, quiet text links for everything else */
.offer-primary,[data-unit-offer],.pb-popup-primary{background:var(--pb-pop-primary);border:0;border-radius:6px;color:white;padding:8px 12px;font:600 13px/1.4 Arial,sans-serif;text-decoration:none;cursor:pointer;display:inline-block;width:auto;box-shadow:none}
.pb-popup-primary:hover:not(:disabled),.offer-primary:hover:not(:disabled){background:var(--pb-pop-primary-hover);color:white}
.offer-primary:disabled,.pb-popup-primary:disabled,.pb-popup-primary[aria-disabled=true]{background:var(--pb-pop-disabled);color:var(--pb-pop-disabled-ink);cursor:default}
.unit-offer a,.pb-popup a,.pb-popup-link{color:var(--pb-pop-link)}
.pb-popup-link{background:none;border:0;padding:0;font:inherit;text-decoration:underline;cursor:pointer}
.unit-offer [hidden],.pb-popup [hidden]{display:none!important}

/* Success state */
.pb-popup-success{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:28px 26px}
.pb-popup-success__icon{display:grid;place-items:center;width:52px;height:52px;border-radius:50%;background:#e1f3ec;color:#215d49;margin-bottom:8px}
.pb-popup-success h3,.pb-popup-success h2{font-size:21px;letter-spacing:-.035em;margin:0;color:var(--pb-pop-title);font-weight:700}
.pb-popup-success p{margin:2px 0;color:var(--pb-pop-muted)}
.pb-popup-success__reference{font-weight:600;color:var(--pb-pop-ink)!important}
.pb-popup-success__actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:14px}

/* Quiet scrolling box (terms) */
.pb-popup-terms{border:1px solid var(--pb-pop-line);border-radius:8px;padding:12px 14px;max-height:220px;overflow:auto;color:var(--pb-pop-muted);background:#fafbfc;margin:0 0 16px}

/* Code entry */
.pb-popup .pb-code-hint{color:var(--pb-pop-muted)}

/* Existing containers wearing the shell: Bootstrap modals and native dialogs on the project pages */
.modal.pb-popup-modal .modal-dialog{max-width:560px}
.modal.pb-popup-modal--lg .modal-dialog{max-width:760px}
.modal.pb-popup-modal .modal-content{border:0;border-radius:14px;box-shadow:0 24px 80px #132a4044;overflow:hidden}
.modal.pb-popup-modal .modal-body{padding:20px 26px;color:var(--pb-pop-ink);font:14px/1.5 Roboto,Arial,sans-serif}
.modal.pb-popup-modal .modal-body>h2,.modal.pb-popup-modal .pb-popup-auth-card>h2,.modal.pb-popup-modal #property-interest-title{font-size:21px;letter-spacing:-.035em;color:var(--pb-pop-title);font-weight:700;margin:0 0 4px;padding-right:44px}
.modal.pb-popup-modal ~ .modal-backdrop,.modal-backdrop.show{--bs-backdrop-opacity:.57}
dialog.pb-popup-native{border:0;border-radius:14px;box-shadow:0 24px 80px #132a4044;padding:0;color:var(--pb-pop-ink);max-width:min(760px,94vw)}
dialog.pb-popup-native::backdrop{background:#10243591}
dialog.pb-popup-native>:first-child:is(h2,h3,header){padding-right:48px}

/* Neutralise template buttons inside popups: no gradient, dashed or pill buttons */
:is(.pb-popup,.pb-popup-modal,.pb-popup-native,.pb-account-embedded) :is(.btn-gradient,.btn.color-2.btn-pill:not(.btn-dashed),[data-enquiry-submit],.btn-dark,.btn-theme,.pb-btn--primary:not(.pb-dialog-close):not(.pb-heart)){background:var(--pb-pop-primary)!important;background-image:none!important;border:0!important;border-radius:6px!important;color:white!important;padding:8px 12px!important;font:600 13px/1.4 Arial,sans-serif!important;box-shadow:none!important;width:auto;min-height:0;text-transform:none!important;letter-spacing:0!important}
:is(.pb-popup,.pb-popup-modal,.pb-popup-native,.pb-account-embedded) :is(.btn-gradient,[data-enquiry-submit],.btn-dark,.btn-theme):disabled{background:var(--pb-pop-disabled)!important;color:var(--pb-pop-disabled-ink)!important}
:is(.pb-popup,.pb-popup-modal,.pb-popup-native,.pb-account-embedded) :is(.btn-dashed,.btn-outline-secondary,.btn-outline-primary,.btn-light-bg,.pb-btn--secondary:not(.pb-dialog-close),.pb-account-text-action,[data-enquiry-track]){background:none!important;border:0!important;box-shadow:none!important;padding:0!important;color:var(--pb-pop-link)!important;text-decoration:underline!important;font:inherit!important;font-weight:500!important;border-radius:0!important;min-height:0;width:auto;text-transform:none!important;letter-spacing:0!important}
:is(.pb-popup-modal,.pb-popup-native,.pb-account-embedded) :is(.form-control,.form-select){border:1px solid var(--pb-pop-field);border-radius:6px;box-shadow:none;min-height:40px}

/* Embedded forms (iframe pages in panel mode): no box inside the box, sticky action footer */
.pb-account-embedded .dashboard-content :is(.theme-card,.pb-form-section){border:0!important;box-shadow:none!important;background:transparent!important}
.pb-account-embedded .dashboard-content h1{font-size:21px!important;letter-spacing:-.035em;color:var(--pb-pop-title)}
.pb-account-embedded .dashboard-content .pb-form-section>h2,.pb-account-embedded .dashboard-content h2{font-size:16px;font-weight:600;color:var(--pb-pop-title)}
.pb-account-embedded :is(.mp-property-form,.mp-requirement-form) .mp-actions{position:sticky;bottom:0;z-index:3;background:white;border-top:1px solid #dce3e7;padding:14px 0!important;display:flex;align-items:center;gap:14px;flex-wrap:wrap}

@media(max-width:600px){
dialog.unit-offer-dialog,dialog.pb-popup-dialog,dialog.pb-popup-dialog--md{width:100vw;height:100dvh;margin:0;border-radius:0;max-height:none}
.unit-offer header,.unit-offer footer,.offer-body,.pb-popup__header,.pb-popup__footer,.pb-popup__body{padding:14px 16px}
.pb-popup__header{padding-right:52px}
.unit-offer footer>div,.pb-popup__actions{gap:8px 12px}
.modal.pb-popup-modal .modal-dialog{margin:0;max-width:none;min-height:100dvh}
.modal.pb-popup-modal .modal-content{border-radius:0;min-height:100dvh}
.modal.pb-popup-modal .modal-body{padding:14px 16px}
dialog.pb-popup-native{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0}
.pb-popup-success{padding:24px 16px}
}

/* Native dialogs on the project page: the × matches the shell, headings and spacing follow the standard */
dialog.pb-popup-native{position:fixed}
dialog.pb-popup-native .pb-dialog-close,dialog.pb-popup-native [data-close-dialog][aria-label^="Close"]{position:absolute;top:10px;right:10px;z-index:3;display:grid;place-items:center;width:36px;height:36px;min-height:0;padding:0!important;border:0!important;background:transparent!important;color:#1c2d3a!important;font-size:24px!important;line-height:1;box-shadow:none!important;border-radius:6px!important}
dialog.pb-popup-native :is(h2,h3):first-of-type{font-size:21px;letter-spacing:-.035em;color:var(--pb-pop-title);font-weight:700;margin:0 0 4px;padding-right:44px}
dialog.pb-popup-native form{padding:20px 26px!important}
dialog.pb-popup-native--media{background:#0f1720}
dialog.pb-popup-native--media .pb-dialog-close{color:white!important}

/* "I am interested" selections and shortlist: selectable rows like the offer list (3-home limit) */
.pb-account :is(label.enq-card,article.enq-card):has(input[type=checkbox][name="references[]"]){border:1px solid var(--pb-pop-row);border-radius:8px;padding:12px 14px;margin:6px 0;box-shadow:none;background:white}
.pb-account :is(label.enq-card,article.enq-card):has(input[type=checkbox][name="references[]"]:checked){border-color:var(--pb-pop-row-on-line);background:var(--pb-pop-row-on)}
.pb-account :is(label.enq-card,article.enq-card) input[type=checkbox][name="references[]"]{accent-color:var(--pb-pop-primary)}
.pb-popup-modal .enq-selected-list .pb-popup-row{cursor:default;flex-direction:column;align-items:flex-start;gap:2px}
.pb-popup-modal .enq-selected-list .pb-popup-row p{margin:0;color:var(--pb-pop-muted)}
.enq-limit-hint{color:var(--pb-pop-muted)}
:is(.pb-popup-modal,.pb-popup-native,.pb-popup-success) a:not(.pb-popup-primary):not(.btn){color:var(--pb-pop-link);text-decoration:underline}
dialog.pb-popup-native .pb-project-advice{padding:20px 26px;margin:0;border:0;box-shadow:none}
dialog.pb-popup-native .pb-project-advice h2{font-size:21px!important;line-height:1.5;letter-spacing:-.035em;color:var(--pb-pop-ink);font-weight:700;margin:0 0 4px;padding-right:44px}
dialog.pb-popup-native .pb-project-advice .pb-btn--block{width:auto!important}
/* Keep the shell header plain when a host page styles <header> or h1 (dashboard pages) */
.pb-popup .pb-popup__header{background:white!important;margin:0;min-height:0;box-shadow:none}
.pb-popup .pb-popup__header .pb-popup__title{font-size:21px!important;letter-spacing:-.035em;margin:0;line-height:1.5;color:var(--pb-pop-ink)!important;font-weight:bold}
.pb-popup .pb-popup__header .pb-popup__context{color:var(--pb-pop-muted)!important}
.pb-popup-terms:focus{outline:2px solid #31546a33;border-color:var(--pb-pop-link)}
/* Error and status lines take no space until they have a message */
:is(.pb-popup,.pb-popup-modal,.pb-popup-native) :is([data-enquiry-error],[data-enquiry-status],[data-marketplace-message],[data-offer-status],[role=alert]):empty{display:none}

/* Sign-in popup: title + context first, one small "Send code" in a sticky footer, quiet mode links */
.pb-popup-modal [data-entry-heading]{font-size:21px;letter-spacing:-.035em;line-height:1.5;color:var(--pb-pop-ink);font-weight:bold;margin:0;padding-right:44px}
.pb-popup-modal [data-login-helper]{color:var(--pb-pop-muted);margin:5px 0 14px}
.pb-popup-modal .pb-popup-entry-footer{position:sticky;bottom:-20px;z-index:3;display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:16px -26px -20px;padding:14px 26px;background:white;border-top:1px solid #dce3e7}
.pb-popup-modal .pb-popup-modes{display:flex!important;gap:14px;margin:0 0 0 auto}
.pb-popup-modal .pb-popup-modes a{background:none!important;border:0!important;box-shadow:none!important;padding:0!important;min-height:0!important;color:var(--pb-pop-link)!important;text-decoration:underline!important;font:inherit!important;font-size:13px!important;border-radius:0!important;width:auto!important}
.pb-popup-modal .pb-popup-modes a:is([aria-current=true],[aria-current=page]){color:var(--pb-pop-ink)!important;text-decoration:none!important;font-weight:600!important}
.pb-popup-info{background:#f3f6f8;color:var(--pb-pop-muted)!important;border-radius:8px;padding:8px 12px;font-size:13px;margin:12px 0 0!important}
@media(max-width:600px){.pb-popup-modal .pb-popup-entry-footer{margin:16px -16px -14px;padding:12px 16px;bottom:-14px}}

/* Neutral focus everywhere in popups: no gold rings */
:is(.pb-popup,.pb-popup-modal,.pb-popup-native,.pb-popup-dialog) :is(button,a,input,select,textarea,[tabindex]):focus{box-shadow:none!important}
:is(.pb-popup,.pb-popup-modal,.pb-popup-native,.pb-popup-dialog) :is(button,a,[tabindex]):focus-visible{outline:2px solid #31546a99!important;outline-offset:2px}
:is(.pb-popup,.pb-popup-modal,.pb-popup-native,.pb-popup-dialog) :is(button,a,[tabindex]):focus:not(:focus-visible){outline:none!important}
:is(.pb-popup,.pb-popup-modal,.pb-popup-native) :is(input,select,textarea,.form-control,.form-select):focus{border-color:var(--pb-pop-link)!important;outline:2px solid #31546a33!important;outline-offset:0}

/* Login page mode switch (Login / Create account) as quiet tabs */
.account-modes .pb-account-mode{display:inline-block;padding:4px 2px;margin-right:16px;color:var(--pb-pop-link);text-decoration:none;border-bottom:2px solid transparent;font-weight:500}
.account-modes .pb-account-mode.is-current{color:var(--pb-pop-ink);border-bottom-color:var(--pb-pop-primary);font-weight:600}
/* x-account.button outside popups (dashboards, account pages) */
a.pb-popup-primary,a.pb-popup-link{display:inline-block}
.pb-popup-primary.btn-sm,.pb-account-action.btn-sm{padding:6px 10px;font-size:12px}
.pb-popup-note{color:var(--pb-pop-muted)!important;font-size:13px;margin:10px 0 0!important}
.pb-popup-note a{color:var(--pb-pop-link)}
/* WhatsApp code boxes: always visible digits (dark, 22px, centred), a visible focus ring, in popups and full pages. */
.pb-otp-boxes{display:flex;gap:8px;margin:6px 0 4px}
.pb-otp-boxes[hidden]{display:none!important}
.pb-otp-boxes input[data-otp-digit]{flex:1 1 0;min-width:0;width:auto!important;max-width:56px;height:52px!important;min-height:52px!important;margin:0!important;padding:0!important;text-align:center;font:600 22px/52px Arial,Helvetica,sans-serif!important;color:#14212b!important;-webkit-text-fill-color:#14212b!important;caret-color:#14212b;background:#fff!important;border:1px solid #9fb0bd!important;border-radius:8px!important;text-indent:0!important;letter-spacing:0!important;opacity:1!important;box-shadow:none!important}
.pb-otp-boxes input[data-otp-digit]:focus{border-color:#31546a!important;outline:3px solid #31546a55!important;outline-offset:1px!important}
input[autocomplete="one-time-code"]:not([data-otp-digit]):not([type=hidden]){color:#14212b!important;-webkit-text-fill-color:#14212b!important;font-size:20px!important;letter-spacing:.25em;line-height:1.3!important}
/* Account popup steps use the popup standard: one small solid primary, no gradient or pill. */
#marketplace-action-panel.pb-auth-refresh form>button.pb-popup-primary:not([type=button]),#marketplace-action-panel.pb-auth-refresh .pb-popup-primary{background-image:none!important;background-color:var(--pb-pop-primary,#b5372b)!important;border-radius:6px!important;width:auto!important;min-height:40px!important;padding:9px 18px!important;box-shadow:none!important;font-size:14px!important}
