/* =========================================================================
   Voley PLT — My Account

   Two screens: a centred card for signing in, and a sidebar + panel dashboard
   once signed in. WooCommerce's own forms and tables are restyled rather than
   rebuilt, so validation, endpoints and third-party additions keep working.
   ========================================================================= */

.voley-account {
	padding-block: 54px 90px;
	background: var(--v-white);
}

/* Signed out --------------------------------------------------------------
   One panel at a time, not two side by side. Two near-identical boxes make the
   visitor work out which one is theirs; a single panel with a way through to
   the other does not. Both are rendered — only the CSS hides one — so the
   switch is instant and a failed submit can be shown on the right panel by the
   server adding `is-register`. */
.voley-account--login {
	max-width: var(--v-max);
}

.voley-account #customer_login.col2-set {
	display: block;
}

.voley-account #customer_login .u-column1,
.voley-account #customer_login .u-column2 {
	width: auto;
	float: none;
	margin: 0;
}

.voley-account-root--out .u-column2 {
	display: none;
}

.voley-account-root--out.is-register .u-column1 {
	display: none;
}

.voley-account-root--out.is-register .u-column2 {
	display: block;
}

/* The panel spans the container; the form inside stays a readable width rather
   than stretching a password field across 1300px. */
.voley-account .u-column1,
.voley-account .u-column2,
.voley-account--login > form.woocommerce-form-login {
	padding: 46px 48px 50px;
	border: 1px solid var(--v-line-soft);
	border-radius: var(--v-r-card);
	background: var(--v-grey-50);
}

/* Centred, not left-aligned. The panel is far wider than a login form should
   be, and empty space on one side reads as a bug where empty space on both
   sides reads as deliberate. */
.voley-account-root--out .u-column1,
.voley-account-root--out .u-column2 {
	text-align: center;
}

.voley-account .u-column1 > form,
.voley-account .u-column2 > form,
.voley-account--login > form.woocommerce-form-login {
	max-width: 460px;
	margin-inline: auto;
	text-align: left;
}

.voley-account-root--out .voley-account__intro {
	margin-inline: auto;
	text-align: center;
}

.voley-root.voley-root .voley-account h2 {
	margin-bottom: 4px;
	font-family: var(--v-font-display);
	font-size: var(--v-fs-h2);
	font-style: italic;
	font-weight: 800;
	text-transform: uppercase;
	color: var(--v-ink);
}

.voley-account__intro {
	max-width: 46ch;
	margin: 0 0 26px;
	font-size: var(--v-fs-body);
	color: var(--v-grey-600);
}

.voley-account form.login,
.voley-account form.register {
	margin: 0 auto;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
}

/* Switch between the two panels ------------------------------------------- */
.voley-account__switch {
	margin: 22px 0 0;
	padding-top: 20px;
	border-top: 1px solid var(--v-line);
	font-size: var(--v-fs-sm);
	color: var(--v-grey-600);
}

.voley-account__switchbtn {
	padding: 0;
	border: 0;
	background: none;
	font-family: inherit;
	font-size: inherit;
	font-weight: 600;
	color: var(--v-ink);
	border-bottom: 1px solid var(--v-accent);
	cursor: pointer;
	transition: color 0.2s var(--v-ease);
}

.voley-account__switchbtn:hover {
	color: var(--v-accent);
}

/* Forms ------------------------------------------------------------------- */
.voley-account .form-row,
.voley-account .woocommerce-form-row {
	display: block;
	margin: 0 0 16px;
	padding: 0;
}

.voley-account label {
	display: block;
	margin-bottom: 7px;
	font-size: var(--v-fs-sm);
	font-weight: 600;
	color: var(--v-ink);
}

.voley-account .required {
	color: var(--v-accent);
	text-decoration: none;
}

.voley-account input[type="text"],
.voley-account input[type="email"],
.voley-account input[type="tel"],
.voley-account input[type="password"],
.voley-account input[type="number"],
.voley-account select,
.voley-account textarea {
	width: 100%;
	height: 48px;
	padding: 0 16px;
	border: 1px solid var(--v-line);
	border-radius: var(--v-r-sm);
	background: var(--v-white);
	font-family: var(--v-font-body);
	font-size: var(--v-fs-sm);
	color: var(--v-ink);
	appearance: none;
}

.voley-account textarea {
	height: auto;
	padding: 12px 16px;
	line-height: 1.6;
}

.voley-account select {
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23111213' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	cursor: pointer;
}

.voley-account input:focus,
.voley-account select:focus,
.voley-account textarea:focus {
	outline: none;
	border-color: var(--v-accent);
}

/* Remember-me sits inline with its checkbox, not stacked like a field label. */
.voley-account .woocommerce-form-login__rememberme,
.voley-account label.checkbox {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
	font-weight: 500;
	color: var(--v-grey-600);
	cursor: pointer;
}

.voley-account input[type="checkbox"] {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--v-accent);
}

.voley-account .woocommerce-privacy-policy-text,
.voley-account .woocommerce-password-hint,
.voley-account em {
	display: block;
	margin-bottom: 14px;
	font-size: var(--v-fs-xs);
	font-style: normal;
	line-height: 1.6;
	color: var(--v-grey-500);
}

/* Buttons ------------------------------------------------------------------
   WooCommerce prints the same .button class on links and buttons across every
   endpoint, so one rule covers login, register, save and the empty-state CTA. */
.voley-account .button,
.voley-account button[type="submit"],
.voley-account input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	padding: 0 28px;
	border: 0;
	border-radius: var(--v-r-pill);
	background: var(--v-accent);
	color: var(--v-white);
	font-family: var(--v-font-display);
	font-size: var(--v-fs-sm);
	font-style: italic;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.25s var(--v-ease), transform 0.25s var(--v-ease);
}

.voley-account .button:hover,
.voley-account button[type="submit"]:hover,
.voley-account input[type="submit"]:hover {
	background: var(--v-accent-ink);
	transform: translateY(-1px);
}

/* Secondary weight for the row of buttons inside an order row. */
.voley-account .woocommerce-orders-table__cell-order-actions .button {
	height: 38px;
	padding: 0 18px;
	background: var(--v-ink);
	font-size: var(--v-fs-xs);
}

.voley-account .woocommerce-orders-table__cell-order-actions .button:hover {
	background: var(--v-black);
}

.voley-account .lost_password {
	margin: 4px 0 0;
	font-size: var(--v-fs-sm);
}

.voley-account .lost_password a {
	color: var(--v-grey-600);
	border-bottom: 1px solid var(--v-line);
}

.voley-account .lost_password a:hover {
	color: var(--v-accent);
	border-color: var(--v-accent);
}

/* Signed in — sidebar + panel --------------------------------------------- */
.voley-account-root:not(.voley-account-root--out) .voley-account {
	display: grid;
	grid-template-columns: 250px minmax(0, 1fr);
	gap: 20px 46px;
	align-items: start;
}

.voley-account .woocommerce-MyAccount-navigation {
	width: auto;
	float: none;
	padding: 10px;
	border: 1px solid var(--v-line-soft);
	border-radius: var(--v-r-card);
	background: var(--v-grey-50);
}

.voley-account .woocommerce-MyAccount-navigation ul {
	display: grid;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.voley-account .woocommerce-MyAccount-navigation li {
	margin: 0;
	padding: 0;
	border: 0;
}

.voley-account .woocommerce-MyAccount-navigation li a {
	display: block;
	padding: 11px 14px;
	border-radius: var(--v-r-sm);
	font-size: var(--v-fs-sm);
	font-weight: 600;
	color: var(--v-grey-600);
	transition: background-color 0.2s var(--v-ease), color 0.2s var(--v-ease);
}

.voley-account .woocommerce-MyAccount-navigation li a:hover {
	background: var(--v-grey-150);
	color: var(--v-ink);
}

.voley-account .woocommerce-MyAccount-navigation li.is-active a {
	background: var(--v-ink);
	color: var(--v-white);
}

/* Log out reads as an exit, not another destination. */
.voley-account .woocommerce-MyAccount-navigation-link--customer-logout a {
	color: var(--v-grey-500);
}

.voley-account .woocommerce-MyAccount-navigation-link--customer-logout {
	margin-top: 6px;
	padding-top: 8px;
	border-top: 1px solid var(--v-line-soft);
}

.voley-account .woocommerce-MyAccount-content {
	width: auto;
	float: none;
	min-width: 0;
	font-size: var(--v-fs-body);
	line-height: 1.7;
	color: var(--v-grey-600);
}

.voley-account .woocommerce-MyAccount-content p {
	margin: 0 0 14px;
}

.voley-account .woocommerce-MyAccount-content a:not(.button) {
	color: var(--v-ink);
	border-bottom: 1px solid var(--v-line);
}

.voley-account .woocommerce-MyAccount-content a:not(.button):hover {
	color: var(--v-accent);
	border-color: var(--v-accent);
}

/* Orders table ------------------------------------------------------------
   Turned into rows, the same treatment the cart gets, so it survives a narrow
   column without a horizontal scrollbar. */
.voley-account table.woocommerce-orders-table {
	display: block;
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
}

.voley-account table.woocommerce-orders-table thead {
	display: none;
}

.voley-account table.woocommerce-orders-table tbody,
.voley-account table.woocommerce-orders-table td {
	display: block;
	width: auto;
	padding: 0;
	border: 0;
	background: none;
}

.voley-account table.woocommerce-orders-table tr {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
	gap: 10px 18px;
	align-items: center;
	padding: 18px 20px;
	margin-bottom: 12px;
	border: 1px solid var(--v-line-soft);
	border-radius: var(--v-r-card);
	background: var(--v-white);
}

.voley-account table.woocommerce-orders-table td::before {
	display: block;
	margin-bottom: 2px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--v-grey-500);
}

.voley-account td.woocommerce-orders-table__cell-order-number::before { content: "Order"; }
.voley-account td.woocommerce-orders-table__cell-order-date::before { content: "Date"; }
.voley-account td.woocommerce-orders-table__cell-order-status::before { content: "Status"; }
.voley-account td.woocommerce-orders-table__cell-order-total::before { content: "Total"; }

.voley-account table.woocommerce-orders-table td {
	font-size: var(--v-fs-sm);
	color: var(--v-ink);
}

.voley-account .woocommerce-orders-table__cell-order-actions {
	justify-self: end;
}

.voley-account .woocommerce-orders-table__cell-order-actions::before {
	content: none;
}

/* Addresses ---------------------------------------------------------------- */
.voley-account .woocommerce-Addresses {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--v-gap);
	margin: 0;
}

.voley-account .woocommerce-Address {
	width: auto;
	float: none;
	padding: 24px 24px 26px;
	border: 1px solid var(--v-line-soft);
	border-radius: var(--v-r-card);
	background: var(--v-grey-50);
}

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

.voley-root.voley-root .voley-account .woocommerce-Address-title h2,
.voley-root.voley-root .voley-account .woocommerce-Address-title h3 {
	margin: 0;
}

.voley-account .woocommerce-Address-title .edit {
	font-size: var(--v-fs-sm);
	font-weight: 600;
	color: var(--v-accent);
	border-bottom: 1px solid transparent;
}

.voley-account .woocommerce-Address-title .edit:hover {
	border-color: var(--v-accent);
}

.voley-account address {
	font-style: normal;
	font-size: var(--v-fs-sm);
	line-height: 1.7;
	color: var(--v-grey-600);
}

/* Account details form ----------------------------------------------------- */
.voley-account .woocommerce-EditAccountForm fieldset {
	margin: 26px 0 20px;
	padding: 24px 24px 8px;
	border: 1px solid var(--v-line-soft);
	border-radius: var(--v-r-card);
	background: var(--v-grey-50);
}

.voley-root.voley-root .voley-account .woocommerce-EditAccountForm legend {
	padding: 0 8px;
	font-family: var(--v-font-display);
	font-size: var(--v-fs-sm);
	font-style: italic;
	font-weight: 800;
	text-transform: uppercase;
	color: var(--v-ink);
}

.voley-account .woocommerce-EditAccountForm .form-row-first,
.voley-account .woocommerce-EditAccountForm .form-row-last {
	width: 100%;
	float: none;
}

@media (min-width: 620px) {
	/* The gap has to cover the margin *and* the whitespace between the two
	   inline-block tags, or the pair wraps onto separate lines. */
	.voley-account .woocommerce-EditAccountForm > .form-row-first,
	.voley-account .woocommerce-EditAccountForm > .form-row-last {
		display: inline-block;
		width: calc(50% - 12px);
		vertical-align: top;
	}

	.voley-account .woocommerce-EditAccountForm > .form-row-first {
		margin-right: 12px;
	}
}

/* Notices ------------------------------------------------------------------ */
.voley-account-root .woocommerce-message,
.voley-account-root .woocommerce-info,
.voley-account-root .woocommerce-error {
	margin: 0 0 22px;
	padding: 16px 20px;
	border: 0;
	border-left: 3px solid var(--v-accent);
	border-radius: var(--v-r-sm);
	background: var(--v-grey-50);
	font-size: var(--v-fs-sm);
	color: var(--v-ink);
	list-style: none;
}

.voley-account-root .woocommerce-error {
	border-left-color: #b3261e;
}

.voley-account-root .woocommerce-message .button,
.voley-account-root .woocommerce-info .button {
	float: right;
	height: 36px;
	padding: 0 18px;
	background: var(--v-ink);
	font-size: var(--v-fs-xs);
}

/* Responsive --------------------------------------------------------------- */
@media (min-width: 1001px) and (min-height: 640px) {
	.voley-account .woocommerce-MyAccount-navigation {
		position: sticky;
		top: calc(var(--v-header-h) + 20px);
	}
}

@media (max-width: 1000px) {
	.voley-account-root:not(.voley-account-root--out) .voley-account {
		grid-template-columns: minmax(0, 1fr);
		gap: 26px;
	}

	.voley-account .woocommerce-MyAccount-navigation ul {
		grid-auto-flow: column;
		grid-auto-columns: max-content;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.voley-account .woocommerce-MyAccount-navigation ul::-webkit-scrollbar {
		display: none;
	}

	.voley-account .woocommerce-MyAccount-navigation-link--customer-logout {
		margin-top: 0;
		padding-top: 0;
		border-top: 0;
		border-left: 1px solid var(--v-line-soft);
		padding-left: 6px;
	}
}

@media (max-width: 700px) {
	.voley-account {
		padding-block: 34px 60px;
	}

	.voley-account .u-column1,
	.voley-account .u-column2,
	.voley-account--login > form.woocommerce-form-login {
		padding: 30px 24px 32px;
	}

	.voley-account .woocommerce-Addresses {
		grid-template-columns: minmax(0, 1fr);
	}

	.voley-account table.woocommerce-orders-table tr {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.voley-account .woocommerce-orders-table__cell-order-actions {
		justify-self: start;
	}

	.voley-account .woocommerce-orders-table__cell-order-actions {
		grid-column: 1 / -1;
		justify-self: start;
	}
}
