/* The chat ("Tell us what's wrong") is docked and covers nothing (harmony-ops#1303, owner 26 Nov 2026). Linked by footer.inc.php just
   before the button, so it is right from the first paint and beats the older floating-bubble rules (kept in easyproperty-modern.css). */

/* phones. A page with the app's bottom tabs: the chat is the "Chat" tab. A page without them (a listing, the account area): the button is a
   strip in the page itself, above the footer. It never floats */
@media (max-width: 767px) {
	.ep-tabbar button { flex: 1 1 0; min-width: 0; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; margin: 0; padding: 0; border: 0; background: transparent; color: #4f5d6b; font-family: inherit; font-size: 11px; font-weight: 600; line-height: 1.2; cursor: pointer; -webkit-tap-highlight-color: transparent; }
	.ep-tabbar button[aria-expanded="true"] { color: #177b85; }
	.ep-tabbar button:focus-visible { outline: 2px solid #177b85 !important; outline-offset: -4px !important; border-radius: 8px; }
	.ep-tabbar button:focus:not(:focus-visible) { outline: 0; }   /* no ring after a tap */
	/* six tabs: each as wide as its word plus an equal share of the rest, so the words stay apart at 360px with large text */
	html body .ep-tabbar > a, html body .ep-tabbar > button { flex: 1 1 auto; min-width: 44px; }

	html body #ep-fb-btn:not(.ep-fb-inline) { position: static; display: flex; justify-content: center; width: 100%; max-width: none; height: auto; min-height: 48px; margin: 0; padding: 0 16px; border: 0; border-top: 1px solid #e3e8ef; border-bottom: 1px solid #e3e8ef; border-radius: 0; background: #f8fafc; color: #1d2939; box-shadow: none; font-size: 14px; font-weight: 600; transition: none; }
	html body #ep-fb-btn:not(.ep-fb-inline) .ep-fb-txt { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
	/* it does not hide while the page scrolls or by the footer: it covers nothing */
	html.ep-fb-scrollhide body #ep-fb-btn:not(.ep-fb-inline):not([aria-expanded="true"]),
	html.ep-foot-in body #ep-fb-btn:not(.ep-fb-inline):not([aria-expanded="true"]) { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
	html body.ep-typing #ep-fb-btn:not(.ep-fb-inline) { display: flex; }
	/* the open chat: a sheet the width of the screen, sitting on the tabs where they show */
	html body #ep-fb-box { width: 100%; box-sizing: border-box; }
	html.ep-has-tabbar body:not(:has(.epa-tabs, .lp-bar)) #ep-fb-box { bottom: calc(57px + env(safe-area-inset-bottom)); max-height: calc(100vh - 73px - env(safe-area-inset-bottom)); max-height: calc(100dvh - 73px - env(safe-area-inset-bottom)); }
	html body:has(.lp-bar) #ep-fb-box { bottom: 0; }

	/* where the tabs show, the Chat tab is the button. The account area has its own tabs, and a WhatsApp / Call bar (listing, agent page,
	   staff listing preview) takes the bottom: it was already drawn over the app tabs, so there the tabs are switched off and the button
	   is the strip */
	html.ep-has-tabbar body:not(:has(.epa-tabs, .lp-bar)) #ep-fb-btn:not(.ep-fb-inline) { display: none; }
	html body:has(.lp-bar) .ep-tabbar { display: none; }
}

/* from 768 px the button stays at the bottom right, in a 64px margin that page content does not enter. The sign-in pages and the account
   area keep it in the page */
@media (min-width: 768px) {
	html body:not(:has(.ap, .epa-wrap)) #ep-fb-btn:not(.ep-fb-inline) { right: 8px; bottom: 16px; justify-content: center; width: 48px; height: 48px; min-height: 48px; padding: 0; border-radius: 50%; }
	html body:not(:has(.ap, .epa-wrap)) #ep-fb-btn:not(.ep-fb-inline) .ep-fb-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	html body:not(:has(.ap, .epa-wrap)) #ep-fb-box { right: 8px; bottom: 72px; }
	html body:has(.epa-wrap) #ep-fb-btn:not(.ep-fb-inline) { position: static; display: flex; justify-content: center; width: 100%; max-width: none; min-height: 48px; margin: 0; border: 0; border-top: 1px solid #e3e8ef; border-bottom: 1px solid #e3e8ef; border-radius: 0; background: #f8fafc; color: #1d2939; box-shadow: none; font-weight: 600; }
	html.ep-foot-in body #ep-fb-btn:not(.ep-fb-inline):not([aria-expanded="true"]) { opacity: 1; visibility: visible; pointer-events: auto; }
	/* back to top sits above it, in the same margin */
	html body #back2Top { right: 12px; bottom: 72px; }
}
/* a listing below 992px has its WhatsApp / Call bar along the bottom: the button sits above it */
@media (min-width: 768px) and (max-width: 991.98px) {
	html body:has(.lp-bar) #ep-fb-btn:not(.ep-fb-inline) { bottom: 80px; }
	html body:has(.lp-bar) #back2Top { bottom: 136px; }
	html body:has(.lp-bar) #ep-fb-box { bottom: 136px; }
}

/* the e-mail form on a listing: its button stuck out 40px past the card, into the chat's margin */
html body .lp-contact .lp-btn { box-sizing: border-box; }

/* the margin: page boxes narrow just enough, only where the window does not already leave it (their own 15-16px padding counts) */
@media (min-width: 768px) and (max-width: 991.98px) { html body .container { max-width: min(720px, calc(100% - 108px)); } }
@media (min-width: 992px) and (max-width: 1199.98px) { html body .container { max-width: min(960px, calc(100% - 108px)); } }
@media (min-width: 1200px) and (max-width: 1279.98px) { html body .container { max-width: min(1170px, calc(100% - 108px)); } }
@media (min-width: 1280px) { html body .container { max-width: min(1200px, calc(100% - 108px)); } }
@media (min-width: 768px) {
	html body #main-wrapper .lp-wrap { max-width: min(1180px, calc(100% - 96px)); }
	html body main.sr > .sr-wrap { max-width: min(1440px, calc(100% - 96px)); }
	html body #main-wrapper .ql-wrap:not(.ar-wide) { max-width: min(560px, calc(100% - 96px)); }
	html body #main-wrapper .ql-wrap.ar-wide { max-width: min(760px, calc(100% - 96px)); }
	html body #main-wrapper .nw-wrap:not(.nw-prose) { max-width: min(1080px, calc(100% - 96px)); }
	html body #main-wrapper .nw-wrap.nw-prose { max-width: min(760px, calc(100% - 96px)); }
	html body #main-wrapper .nw-foot { max-width: min(1080px, calc(100% - 96px)); }
	html body #main-wrapper .epq-wrap { max-width: min(820px, calc(100% - 96px)); }
	html body #main-wrapper .ep-insights-wrap { max-width: min(960px, calc(100% - 96px)); }
}
