/* ==========================================================================
   PRISTORA — Partner With Us

   Reproduces the approved Partner With Us.dc.html from that document's own
   declared values, under a `pr-pt` namespace, and is enqueued only on this page
   (see pristora_is_partner_page() in functions.php). Nothing here can reach
   another screen.

   `pr-partner` was not available: home.css already owns it for the homepage
   partner strip.

   Why its own layer rather than the shared page primitives: the design is a
   single dark section with the intro and partner-type chips on the left and the
   enquiry card on the right, not the .pr-phero + .pr-card grid + .pr-panel
   stack the page used before. Its card is #FBF8F0 on a violet-to-forest field
   with a 60px shadow, and its form is an auto-fit two-column grid — none of
   which the shared primitives express.

   The FORM keeps its original class names — .pr-field, .pr-field__label,
   .pr-input, .pr-select, .pr-textarea — because assets/js/pages.js walks
   `field.closest('.pr-field')`, appends `.pr-field__error` into it, and drives
   the conditional GSTIN row through `[data-pr-when]`. They are restyled here by
   scoping, never renamed.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Section joins

   Partner runs on the page-canvas template, whose `wp:post-content` WordPress
   wraps in `div.entry-content.is-layout-flow`; the theme's global blockGap then
   becomes a top margin on that wrapper's children. The design is a single
   section, so today it is also the first child and would be spared — but that
   is an accident of the content, not a guarantee, and a notice rendered above
   it would reintroduce the band. Stated explicitly, in this page-only sheet,
   rather than relying on :first-child.
   -------------------------------------------------------------------------- */

.pr-main .entry-content > .pr-pt-sec {
	margin-block-start: 0;
	margin-block-end: 0;
}

/* --------------------------------------------------------------------------
   Section

   The design's <body> sets neither font-size nor line-height, so it lays out at
   16px / `normal`; theme.json sets 17.6544px / 1.6 globally and both leak into
   the line boxes that inline-level labels, chips and controls sit in. Restored
   here, with the design's explicit values put back where it declares them.
   -------------------------------------------------------------------------- */

.pr-pt-sec {
	position: relative;
	overflow: hidden;
	font-size: 16px;
	line-height: normal;
}

.pr-pt {
	padding: clamp(48px, 7vw, 92px) clamp(20px, 5vw, 64px);
	color: var(--pr-cream);
	background:
		radial-gradient(60% 55% at 82% 12%, rgba(214, 168, 75, 0.14), transparent 60%),
		linear-gradient(158deg, #251c50 0%, #1d1638 46%, var(--pr-forest) 100%);
}

.pr-pt__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: clamp(32px, 5vw, 64px);
	max-width: 1240px;
	margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Left — intro and partner-type chips
   -------------------------------------------------------------------------- */

.pr-pt__intro {
	flex: 1 1 380px;
	min-width: 0;
	max-width: 520px;
	animation: pr-reveal 0.8s var(--pr-ease) both;
}

.pr-pt__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--pr-gold);
}

.pr-pt__spark {
	width: 7px;
	height: 7px;
	flex-shrink: 0;
	background: var(--pr-coral);
	transform: rotate(45deg);
}

.pr-pt__title {
	margin: 18px 0 0;
	font-family: var(--pr-font-display);
	font-weight: 700;
	font-size: clamp(2.4rem, 5.4vw, 4rem);
	line-height: 1.05;
	letter-spacing: -0.4px;
	color: var(--pr-cream);
}

.pr-pt__lede {
	margin: 20px 0 0;
	max-width: 46ch;
	font-size: clamp(1.02rem, 1.4vw, 1.18rem);
	line-height: 1.6;
	color: rgba(247, 242, 231, 0.78);
}

.pr-pt__chips {
	display: flex;
	flex-direction: column;
	gap: 11px;
	margin: 30px 0 0;
	padding: 0;
	list-style: none;
}

.pr-pt__chip {
	display: flex;
	align-items: center;
	gap: 13px;
	padding: 14px 18px;
	border: 1px solid rgba(247, 242, 231, 0.12);
	border-radius: 13px;
	background: rgba(247, 242, 231, 0.05);
}

.pr-pt__dot {
	width: 9px;
	height: 9px;
	flex-shrink: 0;
	transform: rotate(45deg);
}

.pr-pt__chiplabel {
	font-size: 15px;
	font-weight: 600;
	color: var(--pr-cream);
}

/* --------------------------------------------------------------------------
   Right — the enquiry card
   -------------------------------------------------------------------------- */

.pr-pt__col {
	flex: 1 1 440px;
	min-width: 0;
	max-width: 600px;
	width: 100%;
}

.pr-pt-card {
	padding: clamp(24px, 3.4vw, 40px);
	border-radius: 24px;
	background: var(--pr-cream-soft);
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.28);
	animation: pr-reveal 0.8s var(--pr-ease) 0.12s both;
}

.pr-pt-card__title {
	margin: 0;
	font-family: var(--pr-font-display);
	font-weight: 700;
	font-size: clamp(1.5rem, 3vw, 2rem);
	line-height: normal;
	letter-spacing: -0.3px;
	color: var(--pr-forest);
}

.pr-pt-card__lede {
	margin: 8px 0 0;
	font-size: 14px;
	line-height: normal;
	color: #6b756f;
}

.pr-pt-req {
	color: var(--pr-coral);
}

/* Form ------------------------------------------------------------------- */

/*
 * The design's own grid: two columns that collapse to one below ~210px per
 * track, rather than a media query. Overrides .pr-form's single-column grid.
 */
.pr-pt-form {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 16px;
	margin-top: 22px;
}

.pr-pt-field--wide {
	grid-column: 1 / -1;
}

.pr-pt-form .pr-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

/*
 * The conditional GSTIN row.
 *
 * assets/js/pages.js sets `target.hidden = true` and disables the inner field,
 * but `[hidden]` is only a UA rule at (0,0,1) and `.pr-field { display: flex }`
 * at (0,1,0) beat it — so on the live page the GSTIN row rendered permanently,
 * greyed out, for every GST status. Verified on staging before this change:
 * hidden = true, disabled = true, computed display = flex.
 *
 * This restores the behaviour the JS already intends. It is scoped to this
 * page's own field class rather than fixing `[hidden]` globally, because other
 * screens' hidden panels are already handled in pages.css and screens.css.
 */
.pr-pt-field[hidden] {
	display: none;
}

.pr-pt-form .pr-field__label {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: normal;
	color: var(--pr-forest);
}

.pr-pt-form .pr-field__req {
	color: var(--pr-coral);
}

.pr-pt-optional {
	font-weight: 500;
	color: #6b756f;
}

.pr-pt-form .pr-input,
.pr-pt-form .pr-select,
.pr-pt-form .pr-textarea {
	width: 100%;
	padding: 13px 15px;
	border: 1px solid rgba(23, 63, 53, 0.22);
	border-radius: 11px;
	/*
	 * `background-color`, not the `background` shorthand.
	 *
	 * The design declares `background:#fff` on its selects as well as its text
	 * inputs, and that was copied here literally. But the shorthand also resets
	 * `background-image` to `none`, and at (0,2,0) it outranked the chevron
	 * pages.css draws on `.pr-select` (0,1,0). Combined with the `appearance:
	 * none` that pages.css sets to suppress the native arrow, the Partner type
	 * and GST status dropdowns rendered with no arrow at all.
	 *
	 * The longhand sets the same white without touching the image, so the
	 * chevron every other select on the site uses comes back. The text inputs
	 * and the textarea in this rule carry no background image, so nothing else
	 * changes.
	 */
	background-color: var(--pr-white);
	color: var(--pr-ink);
	font-family: var(--pr-font-body);
	font-size: 15px;
	line-height: normal;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pr-pt-form .pr-input:focus,
.pr-pt-form .pr-select:focus,
.pr-pt-form .pr-textarea:focus {
	border-color: var(--pr-forest);
	box-shadow: 0 0 0 3px rgba(23, 63, 53, 0.12);
}

.pr-pt-form .pr-textarea {
	min-height: 110px;
	line-height: 1.5;
	resize: vertical;
}

/*
 * The design leaves its selects native, so the browser's own control box makes
 * them 50px tall against the 48.4px of its text inputs — a 1.6px difference
 * inside the design itself. The theme draws its own chevron instead
 * (`appearance: none` in pages.css, kept here so the control matches every
 * other select on the site), which loses that 1.6px and, across two selects,
 * left the whole form 3.2px short of the reference.
 *
 * `min-height` rather than a line-height: the control's font size is a fixed
 * 15px here (no clamp), and driving the inner box by line-height still landed
 * 0.4px short on each select through engine rounding. 50px matches the
 * reference exactly and is the floor, so longer option text still grows it.
 */
.pr-pt-form .pr-select {
	padding-right: 40px;
	min-height: 50px;
	background-position: right 13px center;
}

/*
 * The fixed +91 country code on the mobile field.
 *
 * The same component as the Contact form's WhatsApp field: one rounded outline
 * drawn around the prefix and the number, both clipped to it, rather than two
 * separate boxes. The prefix's padding, font size, weight, alignment and the two
 * specified colours are identical to contact.css, so the two pages read as one
 * control. The outline itself keeps THIS form's 11px radius and 0.22 border so
 * the field still matches the inputs beside it — Contact's is 12px/0.20 because
 * its own inputs are.
 *
 * Declared here rather than in screens.css because `.pr-inputgroup` is used by
 * nothing but these two number fields, and keeping each page's form styling in
 * its own stylesheet is what contact.css already does. Nothing global changes.
 */
.pr-pt-form .pr-inputgroup {
	display: flex;
	align-items: stretch;
	overflow: hidden;
	border: 1px solid rgba(23, 63, 53, 0.22);
	border-radius: 11px;
	background: var(--pr-white);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pr-pt-form .pr-inputgroup__prefix {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	padding: 0 14px;
	border: none;
	border-radius: 0;
	background: #004225;
	font-size: 15px;
	font-weight: 600;
	color: #f0fff0;
}

.pr-pt-form .pr-inputgroup .pr-input {
	flex: 1 1 auto;
	min-width: 0;
	border: none;
	border-radius: 0;
}

/*
 * Focus and error move to the wrapper, so the outline that surrounds both halves
 * is the one that reacts. Keeps this form's own focus ring.
 */
.pr-pt-form .pr-inputgroup:focus-within {
	border-color: var(--pr-forest);
	box-shadow: 0 0 0 3px rgba(23, 63, 53, 0.12);
}

.pr-pt-form .pr-inputgroup .pr-input:focus {
	box-shadow: none;
}

.pr-pt-form .pr-field--error .pr-inputgroup,
.pr-pt-form .pr-inputgroup:has(.pr-input[aria-invalid="true"]) {
	border-color: var(--pr-coral);
	box-shadow: none;
}

.pr-pt-form .pr-field--error .pr-input,
.pr-pt-form .pr-field--error .pr-select,
.pr-pt-form .pr-field--error .pr-textarea,
.pr-pt-form .pr-input[aria-invalid="true"],
.pr-pt-form .pr-select[aria-invalid="true"],
.pr-pt-form .pr-textarea[aria-invalid="true"] {
	border-color: var(--pr-coral);
	box-shadow: none;
}

.pr-pt-form .pr-field__error {
	font-size: 12.5px;
	font-weight: 600;
	line-height: normal;
	color: var(--pr-coral-deep);
}

.pr-pt-form .pr-notice {
	grid-column: 1 / -1;
}

.pr-pt-form .pr-form__actions {
	display: block;
	margin: 0;
}

.pr-pt-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	padding: 16px;
	border: none;
	border-radius: 12px;
	background: var(--pr-forest);
	color: var(--pr-cream);
	font-family: var(--pr-font-body);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.3px;
	line-height: normal;
	cursor: pointer;
	transition: transform 0.2s ease, background 0.2s ease;
}

.pr-pt-submit:hover {
	transform: translateY(-2px);
}

.pr-pt-submit[disabled],
.pr-pt-submit.is-busy {
	background: rgba(23, 63, 53, 0.45);
	transform: none;
	cursor: progress;
}

/* Notices sit above the form, inside the card. */
.pr-pt-card .pr-notice {
	margin-top: 18px;
}

/* --------------------------------------------------------------------------
   Submitted state

   Replaces only the right-hand card; the intro and chips stay, exactly as the
   design has it. Rendered solely when pristora-core has stored a record and
   redirected back with pristora_sent=1.
   -------------------------------------------------------------------------- */

.pr-pt-done {
	padding: clamp(30px, 4vw, 52px);
	border-radius: 24px;
	background: var(--pr-cream-soft);
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.28);
	text-align: center;
	animation: pr-pop-in 0.5s var(--pr-ease) both;
}

/* Local to this sheet; the design's own ease-in, with no overshoot. */
@keyframes pr-pop-in {
	from { opacity: 0; transform: scale(0.9); }
	to { opacity: 1; transform: scale(1); }
}

.pr-pt-done__mark {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 66px;
	height: 66px;
	margin-inline: auto;
	border-radius: 50%;
	background: rgba(111, 143, 61, 0.16);
	color: var(--pr-leaf);
}

.pr-pt-done__title {
	margin: 22px 0 0;
	font-family: var(--pr-font-display);
	font-weight: 700;
	font-size: clamp(1.6rem, 3.2vw, 2.2rem);
	line-height: normal;
	letter-spacing: -0.3px;
	color: var(--pr-forest);
}

.pr-pt-done__lede {
	margin: 16px auto 0;
	max-width: 44ch;
	font-size: clamp(1rem, 1.3vw, 1.12rem);
	line-height: 1.6;
	color: var(--pr-slate);
}

.pr-pt-done__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
	margin-top: 30px;
}

.pr-pt-done__cta {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 15px 30px;
	border-radius: 12px;
	background: var(--pr-forest);
	color: var(--pr-cream);
	font-family: var(--pr-font-body);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.3px;
	line-height: normal;
	text-decoration: none;
	transition: transform 0.25s var(--pr-ease), background 0.25s;
}

.pr-pt-done__cta:hover,
.pr-pt-done__cta:focus-visible {
	transform: translateY(-3px);
	background: var(--pr-forest-soft);
	color: var(--pr-cream);
}

.pr-pt-done__ghost {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 14px 26px;
	border: 1px solid rgba(23, 63, 53, 0.3);
	border-radius: 12px;
	color: var(--pr-forest);
	font-family: var(--pr-font-body);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: normal;
	text-decoration: none;
	transition: border-color 0.2s, color 0.2s;
}

.pr-pt-done__ghost:hover,
.pr-pt-done__ghost:focus-visible {
	border-color: var(--pr-leaf);
	color: var(--pr-leaf);
}
