/* Pollachi Property Portal — installed app (PWA) theme.
 * html.prp-app is set (before the page paints) when the site is opened from the home screen. */

/* ---------- App tab bar (installed app, phones and small tablets) ---------- */
.prp-tabbar { display: none; }
.prp-tabbar * { box-sizing: border-box; }

@media (max-width: 900px) {
	.prp-app .prp-tabbar {
		display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 96;
		background: #fff; border-top: 1px solid var(--prp-line);
		padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
		box-shadow: 0 -6px 20px rgba(12, 58, 45, .08);
	}
	/* The tab bar replaces the Call / WhatsApp / Post quick bar (listing pages keep their contact bar). */
	.prp-app .prp-mbar:not(.prp-mbar--listing),
	.prp-app .prp-wa-float { display: none !important; }
	.prp-app body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
	.prp-app body.single-property { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
}

.prp-tabbar__item {
	display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px;
	min-height: 54px; padding: 6px 2px 4px;
	font-family: var(--prp-body); font-size: 11.5px; font-weight: 600; line-height: 1.15;
	color: var(--prp-slate); text-decoration: none; text-align: center;
	-webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
}
.prp-tabbar__item:hover, .prp-tabbar__item:focus { color: var(--prp-palm); }
.prp-tabbar__item:focus-visible { outline: 2px solid var(--prp-grove); outline-offset: -2px; border-radius: 10px; }
.prp-tabbar__item.is-on { color: var(--prp-grove); }
.prp-tabbar__item.is-on .prp-i { stroke-width: 2.2; }
.prp-tabbar__item--saved.is-on .prp-i { fill: currentColor; }
.prp-tabbar__icon { position: relative; display: grid; place-items: center; width: 28px; height: 26px; }
.prp-tabbar__icon .prp-i { width: 23px; height: 23px; }
.prp-tabbar__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Post FREE: the raised amber button in the middle. */
.prp-tabbar__item--post { color: var(--prp-palm); }
.prp-tabbar__item--post .prp-tabbar__icon {
	width: 48px; height: 48px; margin-top: -22px; border-radius: 50%;
	background: var(--prp-amber); color: var(--prp-palm);
	box-shadow: 0 0 0 4px #fff, 0 6px 16px rgba(12, 58, 45, .22);
}
.prp-tabbar__item--post .prp-i { width: 24px; height: 24px; stroke-width: 2.4; }
.prp-tabbar__item--post.is-on, .prp-tabbar__item--post:hover { color: var(--prp-palm); }

.prp-tabbar__count {
	position: absolute; top: -5px; left: 17px; min-width: 18px; height: 18px; padding: 0 5px;
	border-radius: 9px; background: var(--prp-amber); color: var(--prp-palm);
	font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
	box-shadow: 0 0 0 2px #fff;
}
.prp-tabbar__count[hidden] { display: none; }

/* ---------- Install invitation ---------- */
.prp-install {
	position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 99;
	display: grid; grid-template-columns: 46px 1fr auto auto; gap: 12px; align-items: center;
	max-width: 520px; margin: 0 auto; padding: 12px 10px 12px 12px;
	background: #fff; border: 1px solid var(--prp-line); border-radius: 14px; box-shadow: var(--prp-shadow);
	font-family: var(--prp-body); color: var(--prp-ink);
	animation: prp-install-in .28s ease-out;
}
.prp-install[hidden], .prp-install [hidden] { display: none !important; }
.prp-install__mark { width: 46px; height: 46px; display: block; }
.prp-install__text { min-width: 0; }
.prp-install__text strong { display: block; font-family: var(--prp-display); font-weight: 800; font-size: 16.5px; line-height: 1.15; color: var(--prp-palm); }
.prp-install__text span { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.35; color: var(--prp-slate); }
.prp-install__text .prp-i { width: 16px; height: 16px; vertical-align: -3px; color: var(--prp-grove); }
.prp-install__go { padding: 10px 14px; font-size: 14.5px; white-space: nowrap; }
.prp-install__close {
	display: grid; place-items: center; width: 34px; height: 34px; padding: 0; margin: 0;
	background: none; border: 0; border-radius: 50%; color: var(--prp-slate); cursor: pointer;
}
.prp-install__close:hover, .prp-install__close:focus { background: var(--prp-mist); color: var(--prp-palm); }
.prp-install-btn[hidden] { display: none !important; }

@media (max-width: 760px) {
	/* Sit above the mobile quick bar. */
	.prp-install { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
	.prp-install { grid-template-columns: 40px 1fr auto; }
	.prp-install__mark { width: 40px; height: 40px; }
	.prp-install__go { grid-column: 2 / 4; justify-self: start; }
	.prp-install__close { grid-row: 1; grid-column: 3; }
}
@keyframes prp-install-in { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Installed-app polish ---------- */
.prp-app { -webkit-tap-highlight-color: transparent; }
.prp-app .prp-btn, .prp-app .prp-chip, .prp-app .prp-tab { -webkit-user-select: none; user-select: none; }

@media (prefers-reduced-motion: reduce) {
	.prp-install { animation: none; }
}
