/* BytesPulse UI — My Account card layout
 * Loaded only when body.bphs-mau-active is present
 * (i.e. only on /my-account/ and only when the BytesPulse UI mode is selected).
 */

body.bphs-mau-active {
	--bphs-mau-bg: #f6f7fb;
	--bphs-mau-card-bg: #ffffff;
	--bphs-mau-border: #e6e8f0;
	--bphs-mau-text: #1f2430;
	--bphs-mau-muted: #6b7280;
	--bphs-mau-accent: #4f46e5;
	--bphs-mau-accent-soft: #eef0ff;
	--bphs-mau-radius: 14px;
	--bphs-mau-shadow: 0 2px 10px rgba(20, 20, 43, 0.06);
	--bphs-mau-shadow-hover: 0 8px 24px rgba(20, 20, 43, 0.10);
}

body.bphs-mau-active .woocommerce-MyAccount-content,
body.bphs-mau-active .woocommerce-account .woocommerce {
	background: transparent;
}

body.bphs-mau-active .woocommerce-account {
	background: var(--bphs-mau-bg);
	padding: 24px 0;
}

/* Layout: nav as a horizontal row of cards on top, content full width below.
 * .bphs-mau-layout is a wrapper our JS creates around the nav + content elements
 * at runtime, so this works regardless of what markup the active theme or page
 * builder normally puts around .woocommerce-MyAccount-navigation / -content.
 * Deliberately simple (plain block flow, no float/flex on the wrapper itself)
 * so it can't be fought over by theme/page-builder column or flex rules. */
body.bphs-mau-active .bphs-mau-layout {
	display: block !important;
	width: 100% !important;
}

body.bphs-mau-active .bphs-mau-layout .woocommerce-MyAccount-navigation {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	margin: 0 0 24px 0 !important;
}

body.bphs-mau-active .bphs-mau-layout .woocommerce-MyAccount-content {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	clear: both !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* ------------------------------------------------------------------ */
/* Navigation cards — horizontal row, wraps on narrow screens          */
/* ------------------------------------------------------------------ */

.bphs-mau-nav-grid {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 16px;
}

.bphs-mau-nav-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 12px;
	min-height: 150px;
	background: var(--bphs-mau-card-bg);
	border: 1px solid var(--bphs-mau-border);
	border-radius: var(--bphs-mau-radius);
	padding: 24px 16px;
	text-decoration: none;
	color: var(--bphs-mau-text);
	font-weight: 500;
	font-size: 15px;
	box-shadow: var(--bphs-mau-shadow);
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.bphs-mau-nav-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--bphs-mau-shadow-hover);
	color: var(--bphs-mau-text);
}

.bphs-mau-nav-card.is-active {
	background: var(--bphs-mau-accent-soft);
	border-color: var(--bphs-mau-accent);
	color: var(--bphs-mau-accent);
}

.bphs-mau-nav-icon {
	font-size: 34px;
	line-height: 1;
}

.bphs-mau-nav-icon img.emoji {
	width: 34px;
	height: 34px;
}

.bphs-mau-nav-label {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-height: 1.3;
}

/* ------------------------------------------------------------------ */
/* Dashboard                                                           */
/* ------------------------------------------------------------------ */

.bphs-mau-welcome-card {
	background: linear-gradient(135deg, var(--bphs-mau-accent), #7c6df2);
	color: #fff;
	border-radius: var(--bphs-mau-radius);
	padding: 28px 24px;
	margin-bottom: 20px;
	box-shadow: var(--bphs-mau-shadow);
}

.bphs-mau-welcome-card h2 {
	margin: 0 0 8px 0;
	color: #fff;
	font-size: 22px;
}

.bphs-mau-welcome-card h2 span {
	font-weight: 700;
}

.bphs-mau-welcome-card p {
	margin: 0;
	opacity: 0.9;
	font-size: 14px;
}

.bphs-mau-cards-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}

@media (min-width: 576px) {
	.bphs-mau-cards-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 1200px) {
	.bphs-mau-cards-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.bphs-mau-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	background: var(--bphs-mau-card-bg);
	border: 1px solid var(--bphs-mau-border);
	border-radius: var(--bphs-mau-radius);
	padding: 18px;
	text-decoration: none;
	color: var(--bphs-mau-text);
	box-shadow: var(--bphs-mau-shadow);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	position: relative;
}

.bphs-mau-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--bphs-mau-shadow-hover);
	color: var(--bphs-mau-text);
}

.bphs-mau-card-icon {
	font-size: 26px;
	line-height: 1;
}

.bphs-mau-card-title {
	font-weight: 600;
	font-size: 14px;
}

.bphs-mau-card-arrow {
	position: absolute;
	top: 16px;
	right: 16px;
	color: var(--bphs-mau-muted);
	font-size: 16px;
}

/* ------------------------------------------------------------------ */
/* Restyle remaining default WooCommerce content (orders table, forms,
   addresses, etc.) into the same card language, without touching the
   markup WooCommerce/BP Host Services renders for them.             */
/* ------------------------------------------------------------------ */

body.bphs-mau-active .woocommerce-MyAccount-content > *:empty {
	display: none !important;
}

body.bphs-mau-active .woocommerce-MyAccount-content > *:not(.bphs-mau-dashboard) {
	background: var(--bphs-mau-card-bg);
	border: 1px solid var(--bphs-mau-border);
	border-radius: var(--bphs-mau-radius);
	padding: 20px;
	box-shadow: var(--bphs-mau-shadow);
}

body.bphs-mau-active table.woocommerce-orders-table,
body.bphs-mau-active table.shop_table {
	border: none;
}

body.bphs-mau-active .woocommerce-MyAccount-content .button,
body.bphs-mau-active .woocommerce-MyAccount-content button[type="submit"],
body.bphs-mau-active .woocommerce-MyAccount-content input[type="submit"] {
	border-radius: 10px;
}

@media (max-width: 575px) {
	body.bphs-mau-active .woocommerce-MyAccount-content > *:not(.bphs-mau-dashboard) {
		padding: 14px;
	}
}
