/*
 * WooCommerce My Account presentation.
 *
 * The DOM, forms, tables, endpoints, and navigation remain the official
 * WooCommerce templates. This file only supplies RTL layout and brand styling.
 */

.moweb-woo-account .site-main--page {
	padding-block: 42px 88px;
	background: #fbfafc;
}

.moweb-woo-account .page-content,
.moweb-woo-account .entry-content,
.moweb-woo-account .entry-content > .woocommerce {
	min-width: 0;
}

.moweb-woo-account .entry-header {
	padding: 30px 34px;
	margin-bottom: 26px;
	border: 1px solid var(--moweb-color-border);
	border-radius: 20px;
	background: #ffffff;
}

.moweb-woo-account .entry-title {
	margin: 0;
	color: var(--moweb-color-heading);
	font-size: clamp(2rem, 4vw, 3.3rem);
}

/* Exact official WooCommerce structure: navigation followed by content. */
.moweb-woo-account--authenticated .entry-content > .woocommerce {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(210px, 245px);
	grid-template-areas:
		"notices notices"
		"content navigation";
	align-items: start;
	gap: 26px;
	direction: ltr;
}

.moweb-woo-account--authenticated .entry-content > .woocommerce > .woocommerce-notices-wrapper {
	grid-area: notices;
	direction: rtl;
}

.moweb-woo-account .woocommerce-MyAccount-navigation,
.moweb-woo-account .woocommerce-MyAccount-content {
	float: none;
	width: auto;
	min-width: 0;
}

.moweb-woo-account .woocommerce-MyAccount-navigation {
	grid-area: navigation;
	direction: rtl;
	overflow: hidden;
	border: 1px solid var(--moweb-color-border);
	border-radius: 14px;
	background: #ffffff;
}

.moweb-woo-account .woocommerce-MyAccount-navigation ul {
	padding: 7px;
	margin: 0;
	list-style: none;
}

.moweb-woo-account .woocommerce-MyAccount-navigation li {
	padding: 0;
	margin: 0;
	border-bottom: 1px solid #f0ebf1;
}

.moweb-woo-account .woocommerce-MyAccount-navigation li:last-child {
	border-bottom: 0;
}

.moweb-woo-account .woocommerce-MyAccount-navigation a {
	display: block;
	padding: 11px 12px;
	border-radius: 8px;
	color: var(--moweb-color-muted);
	font-size: .72rem;
	font-weight: 700;
	text-decoration: none;
}

.moweb-woo-account .woocommerce-MyAccount-navigation a:hover,
.moweb-woo-account .woocommerce-MyAccount-navigation .is-active a {
	color: var(--moweb-color-brand-deep);
	background: var(--moweb-color-brand-soft);
}

.moweb-woo-account .woocommerce-MyAccount-content {
	grid-area: content;
	direction: rtl;
	min-height: 430px;
	padding: 26px;
	border: 1px solid var(--moweb-color-border);
	border-radius: 16px;
	background: #ffffff;
}

.moweb-woo-account .woocommerce-MyAccount-content::after,
.moweb-woo-account .woocommerce-MyAccount-content::before {
	display: table;
	clear: both;
	content: "";
}

.moweb-woo-account .woocommerce-MyAccount-content > :first-child {
	margin-top: 0;
}

.moweb-woo-account .woocommerce-MyAccount-content a:not(.button) {
	color: var(--moweb-color-brand-dark);
}

/* Official WooCommerce tables. Do not change their column structure. */
.moweb-woo-account .woocommerce-orders-table,
.moweb-woo-account .woocommerce-table,
.moweb-woo-account .shop_table {
	width: 100%;
	margin: 0 0 20px;
	border: 1px solid var(--moweb-color-border);
	border-collapse: separate;
	border-spacing: 0;
	border-radius: 12px;
	overflow: hidden;
}

.moweb-woo-account table.shop_table th,
.moweb-woo-account table.shop_table td {
	padding: 12px;
	border: 0;
	border-bottom: 1px solid var(--moweb-color-border);
	text-align: start;
	vertical-align: middle;
}

.moweb-woo-account table.shop_table th {
	color: var(--moweb-color-muted);
	background: #f8f5f9;
	font-size: .65rem;
}

.moweb-woo-account table.shop_table tr:last-child td {
	border-bottom: 0;
}

.moweb-woo-account .woocommerce-MyAccount-content .button,
.moweb-woo-account .woocommerce-form .button {
	border-radius: 999px;
}

/* Official address, account, login, and payment-method forms. */
.moweb-woo-account .woocommerce-Addresses,
.moweb-woo-account .u-columns {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

/* Force both columns onto the same grid row explicitly. Relying on default
 * auto-placement here was leaving .u-column2 (register) wrapping onto its own
 * implicit second row below .u-column1 (login) instead of sitting beside it,
 * producing a tall stacked layout instead of the intended side-by-side one. */
.moweb-woo-account .u-columns > .u-column1,
.moweb-woo-account .woocommerce-Addresses > .u-column1 {
	grid-column: 1;
	grid-row: 1;
}
.moweb-woo-account .u-columns > .u-column2,
.moweb-woo-account .woocommerce-Addresses > .u-column2 {
	grid-column: 2;
	grid-row: 1;
}

.moweb-woo-account .woocommerce-Address,
.moweb-woo-account .u-column1,
.moweb-woo-account .u-column2 {
	float: none;
	width: auto;
	min-width: 0;
}

.moweb-woo-account .woocommerce-Address,
.moweb-woo-account .woocommerce-form-login,
.moweb-woo-account .woocommerce-form-register,
.moweb-woo-account .woocommerce-EditAccountForm,
.moweb-woo-account .woocommerce-address-fields {
	padding: 22px;
	border: 1px solid var(--moweb-color-border);
	border-radius: 14px;
	background: #ffffff;
}

.moweb-woo-account .form-row {
	float: none;
	width: 100%;
	margin-bottom: 14px;
}

.moweb-woo-account .form-row label {
	display: block;
	margin-bottom: 5px;
	color: var(--moweb-color-heading);
	font-size: .67rem;
	font-weight: 700;
}

.moweb-woo-account .form-row input.input-text,
.moweb-woo-account .form-row textarea,
.moweb-woo-account .form-row select {
	width: 100%;
	min-height: 46px;
	border: 1px solid var(--moweb-color-border);
	border-radius: 10px;
	background: #fbfafc;
}

/* Match the login-modal's field icons on the plain /my-account/ page itself,
 * so the two entry points (modal vs. direct page visit) look consistent. */
.moweb-woo-account .woocommerce-form-login input[name="username"],
.moweb-woo-account .woocommerce-form-register input[name="username"] {
	padding-right: 44px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239c94a2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 13px center;
	background-size: 18px;
}
.moweb-woo-account .woocommerce-form-register input[name="email"] {
	padding-right: 44px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239c94a2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 13px center;
	background-size: 18px;
}
.moweb-woo-account .woocommerce-form-login input[name="password"],
.moweb-woo-account .woocommerce-form-register input[name="password"] {
	padding-right: 44px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239c94a2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 13px center;
	background-size: 18px;
}

.moweb-woo-account fieldset {
	padding: 18px;
	margin: 22px 0;
	border: 1px solid var(--moweb-color-border);
	border-radius: 12px;
}

.moweb-woo-account .woocommerce-pagination {
	margin-top: 20px;
}

@media (max-width: 900px) {
	.moweb-woo-account--authenticated .entry-content > .woocommerce {
		grid-template-columns: 1fr;
		grid-template-areas:
			"notices"
			"navigation"
			"content";
		direction: rtl;
	}

	.moweb-woo-account .woocommerce-MyAccount-navigation ul {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 4px;
	}

	.moweb-woo-account .woocommerce-MyAccount-navigation li {
		border: 0;
	}
}

@media (max-width: 600px) {
	.moweb-woo-account .site-main--page {
		padding-block: 24px 60px;
	}

	.moweb-woo-account .entry-header,
	.moweb-woo-account .woocommerce-MyAccount-content {
		padding: 18px;
	}

	.moweb-woo-account .woocommerce-MyAccount-navigation ul,
	.moweb-woo-account .woocommerce-Addresses,
	.moweb-woo-account .u-columns {
		grid-template-columns: 1fr;
	}

	.moweb-woo-account .woocommerce-orders-table,
	.moweb-woo-account .woocommerce-table,
	.moweb-woo-account .shop_table {
		display: block;
		overflow-x: auto;
	}
}


/* Tabbed login/register switcher on the plain /my-account/ page, matching
 * the header's login-modal tab style so both entry points look the same. */
.moweb-woo-account .account-auth-tabs {
	display: flex;
	gap: 6px;
	max-width: 620px;
	margin: 0 0 18px;
	padding: 6px;
	border: 1px solid var(--moweb-color-border);
	border-radius: 14px;
	background: #fbfafc;
}
.moweb-woo-account .account-auth-tab {
	display: flex;
	flex: 1 1 0;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 14px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--moweb-color-muted);
	font-family: inherit;
	font-size: .8rem;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.moweb-woo-account .account-auth-tab.is-active {
	background: var(--moweb-color-brand);
	color: #fff;
}
.moweb-woo-account .account-auth-columns {
	max-width: 620px;
	grid-template-columns: 1fr;
}
.moweb-woo-account .account-auth-columns .u-column1,
.moweb-woo-account .account-auth-columns .u-column2 {
	grid-column: 1;
	grid-row: 1;
}
.moweb-woo-account .account-auth-columns .u-column2[hidden],
.moweb-woo-account .account-auth-columns .u-column1[hidden] {
	display: none;
}
.moweb-woo-account .account-auth-columns h2 {
	display: none;
}

/* This page's login-modal.css.bak-...-icons.css addition
 * The page now reuses the header modal's .auth-modal__* classes directly
 * (login-modal.css) for 1:1 visual parity, so the earlier page-only tab
 * (.account-auth-tab) and field-icon rules added here are superseded and
 * safe to leave unused. WooCommerce's own native password-reveal button
 * duplicates our custom one here too, exactly like it did inside the
 * modal -- hide it on this page for the same reason. */
.account-auth .show-password-input {
	display: none !important;
}
.account-auth .auth-modal__panel {
	max-width: 620px;
}
.moweb-woo-account .account-auth .auth-modal__tabs {
	max-width: 620px;
}

/* Center the login/register card on the page instead of sitting flush
 * against one side with a large empty gap next to it. */
.moweb-woo-account .account-auth {
	max-width: 620px;
	margin-inline: auto;
}
.moweb-woo-account .account-auth .auth-modal__tabs,
.moweb-woo-account .account-auth .auth-modal__panel {
	max-width: 100%;
}