/* Rishta Desk — the form has to survive a cheap phone and a weak connection */

/* 1. If the script never runs, show every step instead of an empty page.
      rishta.css hides .phwo-rishta-step; that hiding now waits for js-on. */
.phwo-rishta-form:not(.js-on) .phwo-rishta-step { display: block !important; border-bottom: 1px solid #e1e9ea; padding-bottom: 1.4rem; margin-bottom: 1.4rem; }
.phwo-rishta-form:not(.js-on) .phwo-rishta-progress,
.phwo-rishta-form:not(.js-on) .phwo-rishta-nav [data-next],
.phwo-rishta-form:not(.js-on) .phwo-rishta-nav [data-prev],
.phwo-rishta-form:not(.js-on) .phwo-rishta-meter { display: none !important; }
.phwo-rishta-form:not(.js-on) [data-submit] { display: inline-flex !important; }

/* 2. A capture the chosen document does not need is out of the way. */
.phwo-capture.is-not-needed { display: none !important; }

/* 3. The "no document" panel reads as a helping hand, not an error. */
.phwo-rishta-nodoc { background: #f3faf8; border: 1px solid #bfe3da; border-radius: 14px; padding: 1rem 1.1rem; margin: .2rem 0 1.2rem; }
.phwo-rishta-nodoc[hidden] { display: none !important; }
.phwo-rishta-nodoc h4 { margin: 0 0 .4rem; }

/* 4. Phones: the Continue button is pinned where a thumb already is, and the
      floating chat bubble and language pill stop covering it. */
@media (max-width: 860px) {
	.phwo-rishta-form.js-on .phwo-rishta-nav {
		position: sticky;
		bottom: 0;
		z-index: 40;
		background: #fff;
		margin: 0 -1rem;
		padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
		border-top: 1px solid #e1e9ea;
		box-shadow: 0 -8px 20px rgba(13, 92, 99, .08);
		flex-wrap: wrap;
		gap: .5rem;
	}
	.phwo-rishta-form.js-on .phwo-rishta-nav .phwo-btn-primary { flex: 1 1 100%; order: -1; min-height: 52px; font-size: 1.05rem; }
	.phwo-rishta-form.js-on .phwo-rishta-nav [data-prev],
	.phwo-rishta-form.js-on .phwo-rishta-nav [data-save-later] { flex: 1 1 45%; min-height: 44px; }
	/* While the form is being filled the assistant hides; the language pill hides
	   with it, rather than moving to the top of the screen over the header. */
	body.phwo-rishta-filling .phwo-lang-pill { display: none !important; }
	body.phwo-rishta-filling .phwo-assist { display: none !important; }
	.phwo-rishta-page .phwo-rishta-form { padding-bottom: .5rem; }
	/* one question at a time reads far better than a two-column grid */
	.phwo-rishta-page .phwo-grid { grid-template-columns: 1fr !important; }
	.phwo-rishta-step legend { font-size: 1.2rem; }
}

/* 5. Desktop: the pills should never sit on top of the form either. */
@media (min-width: 861px) {
	body.phwo-rishta-focus .phwo-lang-pill { opacity: .75; }
}


/* The theme reserves 78px at the foot of the body for the fixed quick-actions
   bar. Focus mode hides that bar, and the reserved strip was left behind as a
   white band under the footer — only on phones, only while filling the form. */
@media (max-width: 860px) {
	body.phwo-rishta-focus { padding-bottom: 0 !important; }
}
