/**
 * FLUXX — My Account and WooCommerce forms.
 *
 * WooCommerce's own form styling was dequeued with the rest of its CSS, so
 * every input, label and button on the account, login, address and order pages
 * needs building here. Without it the login screen is raw browser defaults.
 */

/* ------------------------------------------------------------ login page */

/*
 * The columns are on `#customer_login`, not on `.woocommerce`.
 *
 * WooCommerce wraps login and register in `.u-columns.col2-set#customer_login`
 * inside `.woocommerce`, so gridding the outer element lays out a single child
 * and the two forms stay stacked in one narrow column.
 */
#customer_login,
.woocommerce-account .u-columns.col2-set {
	display: grid;
	gap: 40px;
	max-width: 940px;
	grid-template-columns: 1fr;
}

@media (min-width: 800px) {
	#customer_login,
	.woocommerce-account .u-columns.col2-set {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 56px;
	}
}

/* WooCommerce floats these; the grid places them instead. */
#customer_login > .u-column1,
#customer_login > .u-column2 {
	float: none;
	width: auto;
}

.woocommerce-account .u-column1,
.woocommerce-account .u-column2 {
	min-width: 0;
}

.woocommerce-account h2 {
	margin-bottom: 18px;
	font-size: 20px;
	font-weight: var(--fx-weight-light);
	text-transform: uppercase;
	letter-spacing: 0;
}

/* ------------------------------------------------------------ form fields */

.woocommerce form .form-row {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 16px;
	padding: 0;
}

.woocommerce form .form-row label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: var(--fx-tracking-nav);
	color: var(--fx-text-muted);
}

.woocommerce form .form-row .required {
	color: var(--fx-danger);
	text-decoration: none;
	border: 0;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce .select2-container .select2-selection--single {
	width: 100%;
	height: var(--fx-control-lg);
	padding: 0 14px;
	border: 1px solid var(--fx-border-control);
	border-radius: var(--fx-radius-none);
	background: var(--fx-paper);
	font-size: 14px;
	line-height: normal;
	transition: border-color var(--fx-dur) var(--fx-ease);
}

.woocommerce form .form-row textarea {
	height: auto;
	min-height: 110px;
	padding-block: 12px;
	line-height: 1.5;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
	border-color: var(--fx-ink);
	outline: none;
}

/* Two-up rows where WooCommerce asks for them. */
@media (min-width: 600px) {
	.woocommerce form .form-row-first,
	.woocommerce form .form-row-last {
		width: calc(50% - 8px);
		display: inline-flex;
		vertical-align: top;
	}

	.woocommerce form .form-row-first {
		margin-inline-end: 16px;
	}
}

/* Checkbox rows read as a line, not a stack. */
.woocommerce form .form-row.woocommerce-form__label-for-checkbox,
.woocommerce form label.woocommerce-form__label-for-checkbox {
	flex-direction: row;
	align-items: center;
	gap: 8px;
	text-transform: none;
	letter-spacing: var(--fx-tracking-body);
	font-size: 13px;
	color: var(--fx-text);
}

.woocommerce form .woocommerce-form__input-checkbox {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--fx-ink);
}

/* ---------------------------------------------------------------- buttons */
/*
 * WooCommerce reuses `.button` across the account, cart, order and address
 * screens. Styling it once here covers all of them.
 */
.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: var(--fx-control-cta);
	padding-inline: 26px;
	border: 1px solid var(--fx-ink);
	border-radius: var(--fx-radius-none);
	background: var(--fx-ink);
	color: var(--fx-text-on-dark);
	font-size: 13px;
	font-weight: var(--fx-weight-bold);
	letter-spacing: var(--fx-tracking-cta);
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color var(--fx-dur) var(--fx-ease), color var(--fx-dur) var(--fx-ease);
}

.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button:hover {
	background: var(--fx-ink-hover);
	color: var(--fx-text-on-dark);
}

/* The secondary action on a screen: outline rather than solid. */
.woocommerce a.button.wc-backward,
.woocommerce a.button.view,
.woocommerce .woocommerce-Address-title a.edit {
	background: transparent;
	color: var(--fx-ink);
}

.woocommerce a.button.wc-backward:hover,
.woocommerce a.button.view:hover {
	background: var(--fx-ink);
	color: var(--fx-text-on-dark);
}

.woocommerce .woocommerce-form-login__rememberme {
	margin-block: 4px 14px;
}

.woocommerce-LostPassword {
	margin-top: 12px;
	font-size: 12px;
}

.woocommerce-LostPassword a {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

.woocommerce-privacy-policy-text {
	margin-block: 14px;
	font-size: 12px;
	color: var(--fx-text-muted);
}

/* ------------------------------------------------------- account dashboard */

.woocommerce-MyAccount-content {
	min-width: 0;
}

.woocommerce-MyAccount-content > p:first-child {
	margin-top: 0;
}

.woocommerce-Address {
	margin-bottom: 24px;
}

.woocommerce-Address-title {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.woocommerce-Address-title h2,
.woocommerce-Address-title h3 {
	font-size: 13px;
	font-weight: var(--fx-weight-bold);
	text-transform: uppercase;
	letter-spacing: var(--fx-tracking-nav);
}

.woocommerce-Address-title .edit {
	height: auto;
	padding: 0;
	border: 0;
	background: none;
	color: var(--fx-ink);
	font-size: 11px;
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

.woocommerce-Address address {
	font-style: normal;
	line-height: 1.7;
	color: var(--fx-text-muted);
}

.woocommerce-columns--addresses {
	display: grid;
	gap: 28px;
}

@media (min-width: 700px) {
	.woocommerce-columns--addresses {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ------------------------------------------------------------ order pages */

.woocommerce-order-overview,
.woocommerce-order-details,
.woocommerce-customer-details {
	margin-bottom: 32px;
}

.woocommerce-order-overview {
	display: grid;
	gap: 14px;
	margin: 0 0 32px;
	padding: 18px;
	background: var(--fx-sand);
	list-style: none;
}

@media (min-width: 700px) {
	.woocommerce-order-overview {
		grid-auto-flow: column;
		grid-auto-columns: 1fr;
	}
}

.woocommerce-order-overview li {
	display: flex;
	flex-direction: column;
	gap: 3px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: var(--fx-tracking-nav);
	color: var(--fx-text-muted);
	border: 0 !important;
}

.woocommerce-order-overview li strong {
	font-size: 14px;
	text-transform: none;
	letter-spacing: var(--fx-tracking-body);
	color: var(--fx-text);
}

.fx-order-gstin {
	margin-top: 10px;
	font-size: 13px;
}

/* -------------------------------------------------------------- messages */

.woocommerce-form-login,
.woocommerce-form-register,
.woocommerce-ResetPassword,
.woocommerce-EditAccountForm,
.woocommerce-address-fields {
	max-width: 520px;
}

.woocommerce-account .woocommerce-message,
.woocommerce-account .woocommerce-info {
	margin-bottom: 24px;
}

/* Hide the login prompt WooCommerce injects above the account form, which
   duplicates the heading immediately below it. */
.woocommerce-account:not(.logged-in) .woocommerce > .woocommerce-notices-wrapper:empty {
	display: none;
}

/* -------------------------------------------------------- order received */
/*
 * A receipt, not a page of loose tables: one centred column, a confirmation
 * header, the four facts in a sand band, then the order and the addresses as
 * bordered panels with room inside them.
 */
.woocommerce-order {
	max-width: 880px;
	margin-inline: auto;
}

.woocommerce-thankyou-order-received:empty {
	display: none;
}

.fx-thanks {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 8px 0 28px;
	text-align: center;
}

.fx-thanks__tick {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin-bottom: 6px;
	border-radius: var(--fx-radius-round);
	background: var(--fx-success);
	color: #fff;
}

.fx-thanks__overline {
	color: var(--fx-success);
}

.fx-thanks__title {
	margin: 0;
}

.fx-thanks__lede {
	max-width: 52ch;
	margin: 6px 0 0;
	font-size: 16px;
}

.fx-thanks__updates {
	max-width: 52ch;
	margin: 0;
	font-size: 14px;
	color: var(--fx-text-muted);
}

/* The overview band: four facts, two by two on a phone. */
.woocommerce-order .woocommerce-order-overview {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px 16px;
	padding: 20px;
}

@media (min-width: 700px) {
	.woocommerce-order .woocommerce-order-overview {
		grid-template-columns: none;
		padding: 22px 28px;
	}
}

.woocommerce-order .woocommerce-order-overview li strong {
	overflow-wrap: anywhere;
}

/* WooCommerce's payment instructions ("keep the exact amount ready"). */
.woocommerce-order > p:not(.fx-thanks__lede):not(.woocommerce-notice) {
	margin: 0 0 24px;
	padding: 14px 18px;
	border-left: 3px solid var(--fx-ink);
	background: var(--fx-surface);
	font-size: 14px;
}

.woocommerce-order .woocommerce-order-details,
.woocommerce-order .woocommerce-customer-details {
	padding: 22px 20px;
	border: 1px solid var(--fx-border-strong);
}

@media (min-width: 700px) {
	.woocommerce-order .woocommerce-order-details,
	.woocommerce-order .woocommerce-customer-details {
		padding: 28px 32px;
	}
}

.woocommerce-order .woocommerce-order-details__title,
.woocommerce-order .woocommerce-column__title {
	margin: 0 0 14px;
	font-size: 13px;
	font-weight: var(--fx-weight-bold);
	letter-spacing: var(--fx-tracking-nav);
	text-transform: uppercase;
}

.woocommerce-order table.order_details {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.woocommerce-order table.order_details th,
.woocommerce-order table.order_details td {
	padding: 12px 0;
	border-bottom: 1px solid var(--fx-border);
	text-align: left;
	vertical-align: top;
}

.woocommerce-order table.order_details td:last-child,
.woocommerce-order table.order_details th:last-child {
	text-align: right;
}

.woocommerce-order table.order_details thead th {
	padding-top: 0;
	font-size: 11px;
	letter-spacing: var(--fx-tracking-nav);
	text-transform: uppercase;
	color: var(--fx-text-muted);
}

.woocommerce-order table.order_details tfoot th {
	font-weight: var(--fx-weight-regular);
	color: var(--fx-text-muted);
}

.woocommerce-order table.order_details tfoot tr:last-child th,
.woocommerce-order table.order_details tfoot tr:last-child td {
	border-bottom: 0;
}

.woocommerce-order .woocommerce-customer-details address {
	padding: 16px;
	border: 0;
	background: var(--fx-surface);
	font-style: normal;
	line-height: 1.7;
}

.woocommerce-order .woocommerce-customer-details address p {
	margin: 6px 0 0;
}

.fx-thanks__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 8px;
}

.fx-thanks__actions .fx-btn {
	min-width: 220px;
}

/* ------------------------------------------------- checkout: mobile number */
/*
 * "+91" fixed in front of the mobile field, the way Indian checkouts show it.
 * The customer types only the ten digits; the country code is not theirs to
 * get wrong. The block checkout draws the label inside the box, above the
 * value, so the prefix sits on the value's line.
 */
.wc-block-components-text-input:has(#contact-fluxx-mobile) {
	position: relative;
}

.wc-block-components-text-input:has(#contact-fluxx-mobile)::before {
	content: "+91";
	position: absolute;
	left: 10px;
	bottom: 7px;
	z-index: 1;
	padding-right: 8px;
	border-right: 1px solid var(--fx-border-strong);
	font-size: 16px;
	line-height: 22px;
	color: var(--fx-ink);
	pointer-events: none;
}

.wc-block-components-text-input #contact-fluxx-mobile {
	padding-left: 56px;
	letter-spacing: .04em;
}

/* Until the box is focused or filled the label sits where the value goes;
   keep the prefix out of its way. */
.wc-block-components-text-input:has(#contact-fluxx-mobile):not(.is-active)::before {
	opacity: 0;
}
