/* =====================================================================
 * My Account — scoped polish for WooCommerce's default account pages.
 *
 * Loaded only when is_account_page() is true (see
 * /add-ons/utils/my-account-styles.php). Every selector is scoped under
 * .woocommerce-account so these rules can't leak into other pages.
 *
 * No template overrides. Pure CSS over WC core's default markup.
 * =================================================================== */

body.woocommerce-account {
	background: #f8f9fa;
}

body.woocommerce-account .site-main,
body.woocommerce-account main {
	padding-top: 2rem;
	padding-bottom: 3rem;
}

body.woocommerce-account h1.entry-title,
body.woocommerce-account .entry-header h1 {
	font-weight: 700;
	letter-spacing: -0.01em;
	margin-bottom: 1.5rem;
}

/* ---------------------------------------------------------------------
 * Logged-out: login / register forms (side-by-side on md+)
 * ------------------------------------------------------------------- */
.woocommerce-account .u-columns,
.woocommerce-account .woocommerce > .u-columns {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	margin: 0;
}

.woocommerce-account .u-columns > .col-1,
.woocommerce-account .u-columns > .col-2 {
	flex: 1 1 320px;
	padding: 0;
	margin: 0;
	width: auto;
	max-width: none;
	background: #fff;
	border-radius: 0.75rem;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
	padding: 1.75rem 1.75rem 2rem;
}

.woocommerce-account .col-1 > h2,
.woocommerce-account .col-2 > h2,
.woocommerce-account .u-column1 > h2,
.woocommerce-account .u-column2 > h2 {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0 0 1.25rem;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid #F26322;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.woocommerce-account .woocommerce-form-login::before {
	content: "";
}

.woocommerce-account .u-column1 > h2::before {
	content: "\f4da"; /* bi-person-circle */
	font-family: "bootstrap-icons";
	color: #F26322;
}

.woocommerce-account .u-column2 > h2::before {
	content: "\f4fa"; /* bi-person-plus-fill */
	font-family: "bootstrap-icons";
	color: #F26322;
}

/* Form rows — Bootstrap-ish input styling */
.woocommerce-account .woocommerce form .form-row,
.woocommerce-account .woocommerce-form-row {
	margin: 0 0 1rem;
	padding: 0;
	display: flex;
	flex-direction: column;
}

.woocommerce-account .woocommerce form .form-row label,
.woocommerce-account .woocommerce-form-row label {
	font-size: 0.85rem;
	font-weight: 600;
	color: #4b5563;
	margin-bottom: 0.375rem;
}

.woocommerce-account .woocommerce form .form-row input.input-text,
.woocommerce-account .woocommerce form .form-row input[type="text"],
.woocommerce-account .woocommerce form .form-row input[type="email"],
.woocommerce-account .woocommerce form .form-row input[type="tel"],
.woocommerce-account .woocommerce form .form-row input[type="password"],
.woocommerce-account .woocommerce form .form-row textarea,
.woocommerce-account .woocommerce form .form-row select,
.woocommerce-account .woocommerce-form-row input.input-text,
.woocommerce-account .woocommerce-form-row input[type="text"],
.woocommerce-account .woocommerce-form-row input[type="email"],
.woocommerce-account .woocommerce-form-row input[type="tel"],
.woocommerce-account .woocommerce-form-row input[type="password"] {
	width: 100%;
	padding: 0.625rem 0.875rem;
	border: 1px solid #d1d5db;
	border-radius: 0.375rem;
	font-size: 0.95rem;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.woocommerce-account .woocommerce form .form-row input.input-text:focus,
.woocommerce-account .woocommerce form .form-row input:focus,
.woocommerce-account .woocommerce form .form-row textarea:focus,
.woocommerce-account .woocommerce form .form-row select:focus,
.woocommerce-account .woocommerce-form-row input:focus {
	outline: none;
	border-color: #F26322;
	box-shadow: 0 0 0 3px rgba(242, 99, 34, 0.15);
}

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

@media (min-width: 576px) {
	.woocommerce-account .woocommerce form .form-row.form-row-first,
	.woocommerce-account .woocommerce form .form-row.form-row-last {
		flex-basis: calc(50% - 0.5rem);
		display: inline-flex;
	}

	.woocommerce-account .woocommerce form {
		display: flex;
		flex-wrap: wrap;
		gap: 0 1rem;
	}

	.woocommerce-account .woocommerce form .form-row.form-row-wide,
	.woocommerce-account .woocommerce form > p {
		flex-basis: 100%;
	}
}

/* Remember me + lost password row */
.woocommerce-account .woocommerce-form__label-for-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9rem;
	color: #4b5563;
}

.woocommerce-account .woocommerce-LostPassword {
	margin-top: 0.5rem;
	font-size: 0.9rem;
}

.woocommerce-account .woocommerce-LostPassword a {
	color: #F26322;
	text-decoration: none;
	font-weight: 600;
}

.woocommerce-account .woocommerce-LostPassword a:hover {
	text-decoration: underline;
}

/* Primary WC button polish */
.woocommerce-account .woocommerce .button,
.woocommerce-account .woocommerce-button,
.woocommerce-account button.woocommerce-Button,
.woocommerce-account .woocommerce-form button[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.625rem 1.25rem;
	border: 0;
	border-radius: 0.375rem;
	background: #F26322;
	color: #fff;
	font-weight: 700;
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
	text-decoration: none;
}

.woocommerce-account .woocommerce .button:hover,
.woocommerce-account .woocommerce-button:hover,
.woocommerce-account button.woocommerce-Button:hover,
.woocommerce-account .woocommerce-form button[type="submit"]:hover {
	background: #d14d16;
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(242, 99, 34, 0.3);
}

/* "View" / "Cancel" / secondary order-action buttons */
.woocommerce-account .woocommerce-orders-table__cell-order-actions .button,
.woocommerce-account .woocommerce-MyAccount-content .button.view,
.woocommerce-account .woocommerce-MyAccount-content a.edit {
	background: transparent;
	color: #F26322;
	border: 1.5px solid #F26322;
	padding: 0.375rem 0.875rem;
	font-size: 0.8rem;
}

.woocommerce-account .woocommerce-orders-table__cell-order-actions .button:hover,
.woocommerce-account .woocommerce-MyAccount-content .button.view:hover,
.woocommerce-account .woocommerce-MyAccount-content a.edit:hover {
	background: #F26322;
	color: #fff;
}

/* ---------------------------------------------------------------------
 * Logged-in: dashboard grid (nav on left, content on right)
 * ------------------------------------------------------------------- */
.woocommerce-account .woocommerce-MyAccount-navigation {
	flex: 0 0 240px;
	padding: 0;
	margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-content {
	flex: 1 1 auto;
	min-width: 0;
	background: #fff;
	border-radius: 0.75rem;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
	padding: 2rem;
}

.woocommerce-account .woocommerce-MyAccount-content > h1,
.woocommerce-account .woocommerce-MyAccount-content > h2 {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 0 1.25rem;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid #F26322;
	display: inline-block;
}

.woocommerce-account .woocommerce-MyAccount-content > p:first-of-type {
	color: #4b5563;
	font-size: 0.95rem;
	line-height: 1.5;
}

.woocommerce-account .woocommerce-MyAccount-content a {
	color: #F26322;
	font-weight: 600;
}

.woocommerce-account .woocommerce-MyAccount-content a:hover {
	color: #d14d16;
}

/* Turn the account root into a flex grid. flex-wrap: nowrap is deliberate
 * — we want the nav always to the LEFT of the content, even at small
 * viewports. The nav narrows (icon-only) on <576px so content has room.
 * min-width: 0 on both children guarantees they can shrink below their
 * intrinsic content size when the viewport is tight. */
.woocommerce-account.logged-in .woocommerce {
	display: flex;
	flex-wrap: nowrap;
	gap: 1.5rem;
	align-items: flex-start;
}

.woocommerce-account.logged-in .woocommerce > * {
	min-width: 0;
}

/* The notices wrapper, if WC injects one as a flex sibling, gets a full
 * row on top so it doesn't compete for horizontal space with the nav. */
.woocommerce-account.logged-in .woocommerce > .woocommerce-notices-wrapper {
	order: -1;
	flex: 0 0 100%;
	min-width: 0;
}

/* ---------------------------------------------------------------------
 * Navigation: pill list with Bootstrap Icons
 * ------------------------------------------------------------------- */
.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation-link {
	background: #fff;
	border-radius: 0.5rem;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation-link a {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	color: #2d2d2d;
	text-decoration: none;
	font-weight: 500;
	font-size: 0.925rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation-link a::before {
	font-family: "bootstrap-icons";
	font-size: 1.05rem;
	color: #9ca3af;
	width: 1.25rem;
	text-align: center;
	transition: color 0.15s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation-link:hover {
	box-shadow: 0 4px 10px rgba(242, 99, 34, 0.15);
	transform: translateX(2px);
}

.woocommerce-account .woocommerce-MyAccount-navigation-link:hover a {
	color: #F26322;
}

.woocommerce-account .woocommerce-MyAccount-navigation-link:hover a::before {
	color: #F26322;
}

.woocommerce-account .woocommerce-MyAccount-navigation-link.is-active {
	background: #F26322;
	box-shadow: 0 4px 10px rgba(242, 99, 34, 0.25);
}

.woocommerce-account .woocommerce-MyAccount-navigation-link.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation-link.is-active a::before {
	color: #fff;
}

/* Icon map — WC emits --dashboard / --orders / etc. on each <li> */
.woocommerce-account .woocommerce-MyAccount-navigation-link--dashboard a::before         { content: "\f52d"; } /* bi-speedometer2 */
.woocommerce-account .woocommerce-MyAccount-navigation-link--orders a::before            { content: "\f3b9"; } /* bi-receipt */
.woocommerce-account .woocommerce-MyAccount-navigation-link--downloads a::before         { content: "\f30a"; } /* bi-download */
.woocommerce-account .woocommerce-MyAccount-navigation-link--edit-address a::before      { content: "\f3e7"; } /* bi-geo-alt-fill */
.woocommerce-account .woocommerce-MyAccount-navigation-link--payment-methods a::before   { content: "\f2c6"; } /* bi-credit-card */
.woocommerce-account .woocommerce-MyAccount-navigation-link--edit-account a::before      { content: "\f4da"; } /* bi-person-circle */
.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a::before   { content: "\f1c3"; } /* bi-box-arrow-right */
.woocommerce-account .woocommerce-MyAccount-navigation-link--subscriptions a::before     { content: "\f260"; } /* bi-arrow-repeat */

/* ---------------------------------------------------------------------
 * Orders table
 * ------------------------------------------------------------------- */
.woocommerce-account .woocommerce-orders-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border-radius: 0.5rem;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.woocommerce-account .woocommerce-orders-table thead th {
	background: #f3f4f6;
	padding: 0.75rem 1rem;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #6b7280;
	text-align: left;
	border-bottom: 1px solid #e5e7eb;
}

.woocommerce-account .woocommerce-orders-table tbody td {
	padding: 0.875rem 1rem;
	font-size: 0.925rem;
	color: #2d2d2d;
	border-bottom: 1px solid #f3f4f6;
	vertical-align: middle;
}

.woocommerce-account .woocommerce-orders-table tbody tr:last-child td {
	border-bottom: 0;
}

.woocommerce-account .woocommerce-orders-table tbody tr:hover {
	background: rgba(242, 99, 34, 0.04);
}

.woocommerce-account .woocommerce-orders-table__cell-order-number a {
	font-weight: 700;
	color: #F26322;
	text-decoration: none;
}

.woocommerce-account .woocommerce-orders-table__cell-order-status {
	text-transform: capitalize;
	font-weight: 600;
}

/* ---------------------------------------------------------------------
 * Addresses — two cards side-by-side
 * ------------------------------------------------------------------- */
.woocommerce-account .woocommerce-Addresses {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1rem;
	margin: 1rem 0 0;
}

.woocommerce-account .woocommerce-Address {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 0.625rem;
	padding: 1.25rem;
	width: auto;
	float: none;
}

.woocommerce-account .woocommerce-Address-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.75rem;
	padding-bottom: 0.625rem;
	border-bottom: 1px solid #e5e7eb;
}

.woocommerce-account .woocommerce-Address-title h2,
.woocommerce-account .woocommerce-Address-title h3 {
	font-size: 1rem;
	font-weight: 700;
	margin: 0;
}

.woocommerce-account .woocommerce-Address-title .edit {
	font-size: 0.8rem !important;
	padding: 0.25rem 0.75rem !important;
	text-decoration: none !important;
}

.woocommerce-account .woocommerce-Address address {
	font-style: normal;
	font-size: 0.9rem;
	color: #4b5563;
	line-height: 1.6;
	margin: 0;
}

/* ---------------------------------------------------------------------
 * Downloads
 * ------------------------------------------------------------------- */
.woocommerce-account .woocommerce-MyAccount-downloads {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border-radius: 0.5rem;
	overflow: hidden;
}

.woocommerce-account .woocommerce-MyAccount-downloads th,
.woocommerce-account .woocommerce-MyAccount-downloads td {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid #f3f4f6;
}

.woocommerce-account .woocommerce-MyAccount-downloads thead th {
	background: #f3f4f6;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	color: #6b7280;
}

/* ---------------------------------------------------------------------
 * Order details view
 * ------------------------------------------------------------------- */
.woocommerce-account .woocommerce-order-details,
.woocommerce-account .woocommerce-customer-details {
	margin-top: 2rem;
	background: #f9fafb;
	border-radius: 0.625rem;
	padding: 1.5rem;
}

.woocommerce-account .woocommerce-order-details h2,
.woocommerce-account .woocommerce-customer-details h2 {
	font-size: 1.125rem;
	font-weight: 700;
	margin: 0 0 1rem;
}

/* ---------------------------------------------------------------------
 * Responsive — layout stays side-by-side at every viewport. On smaller
 * screens the nav narrows (icon-only at <576px) so content keeps space
 * alongside it, and the orders table reflows as stacked rows.
 * ------------------------------------------------------------------- */
@media (max-width: 991.98px) {
	.woocommerce-account.logged-in .woocommerce {
		gap: 1rem;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation {
		flex: 0 0 200px;
	}

	.woocommerce-account .woocommerce-MyAccount-content {
		padding: 1.5rem;
	}
}

@media (max-width: 767.98px) {
	.woocommerce-account .woocommerce-MyAccount-content {
		padding: 1.25rem;
	}

	/* Login/register stack on small screens — they're full-width cards */
	.woocommerce-account .u-columns > .col-1,
	.woocommerce-account .u-columns > .col-2 {
		flex: 1 1 100%;
		padding: 1.25rem;
	}

	/* Orders: convert to stacked rows with data-title labels */
	.woocommerce-account .woocommerce-orders-table thead {
		display: none;
	}

	.woocommerce-account .woocommerce-orders-table tbody tr {
		display: block;
		margin-bottom: 1rem;
		background: #fff;
		border-radius: 0.5rem;
		box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
		padding: 0.75rem;
	}

	.woocommerce-account .woocommerce-orders-table tbody td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0.5rem 0.25rem;
		border-bottom: 1px solid #f3f4f6;
	}

	.woocommerce-account .woocommerce-orders-table tbody td:last-child {
		border-bottom: 0;
	}

	.woocommerce-account .woocommerce-orders-table tbody td::before {
		content: attr(data-title);
		font-size: 0.75rem;
		font-weight: 700;
		text-transform: uppercase;
		color: #6b7280;
		letter-spacing: 0.05em;
	}
}

/* Narrow (phone) — collapse nav to icon-only strip so content area
 * still gets ~240px+ width next to it. Labels return via title attr
 * hover on desktop; tapping the icon navigates as before. */
@media (max-width: 575.98px) {
	.woocommerce-account.logged-in .woocommerce {
		gap: 0.625rem;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation {
		flex: 0 0 52px;
		position: sticky;
		top: 1rem;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation ul {
		gap: 0.5rem;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation-link a {
		justify-content: center;
		padding: 0.75rem 0;
		gap: 0;
		position: relative;
	}

	/* Hide the text label — the anchor's text is a direct child text
	 * node, so we use font-size:0 + shift the ::before pseudo-element
	 * up to the full visible icon. */
	.woocommerce-account .woocommerce-MyAccount-navigation-link a {
		font-size: 0;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation-link a::before {
		font-size: 1.25rem;
		width: auto;
	}

	.woocommerce-account .woocommerce-MyAccount-content {
		padding: 1rem;
	}

	.woocommerce-account .woocommerce-MyAccount-content > h1,
	.woocommerce-account .woocommerce-MyAccount-content > h2 {
		font-size: 1.15rem;
	}
}
