/**
 * EGP Shop account-area styles.
 *
 * Fixes and additions for the My Account experience:
 *  1. Menu icons for endpoints that showed a blank square (credits, courses,
 *     favorites, refer-a-friend, subscriptions). Icons are inline SVG masks
 *     colored with currentColor, so they match the menu text automatically.
 *     Selectors use [class*=""] so they survive small slug differences.
 *  2. Dashboard quick buttons (rendered by EGP_Account::dashboard_buttons).
 *  3. Mobile: content (Welcome back) first, menu below.
 */

/* ---------- 1. Menu icons ---------- */

.woocommerce-MyAccount-navigation li[class*="credit"] > a::before,
.woocommerce-MyAccount-navigation li[class*="course"] > a::before,
.woocommerce-MyAccount-navigation li[class*="favorite"] > a::before,
.woocommerce-MyAccount-navigation li[class*="refer"] > a::before,
.woocommerce-MyAccount-navigation li[class*="subscription"] > a::before {
	content: "" !important;
	display: inline-block !important;
	width: 1.15em !important;
	height: 1.15em !important;
	margin-right: .55em !important;
	vertical-align: -0.18em !important;
	background: currentColor !important;
	border-radius: 0 !important;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

/* Credits: four-point spark (matches the freebie/credit motif). */
.woocommerce-MyAccount-navigation li[class*="credit"] > a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1l2.6 8.4L23 12l-8.4 2.6L12 23l-2.6-8.4L1 12l8.4-2.6z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1l2.6 8.4L23 12l-8.4 2.6L12 23l-2.6-8.4L1 12l8.4-2.6z'/%3E%3C/svg%3E");
}

/* Courses: graduation cap. */
.woocommerce-MyAccount-navigation li[class*="course"] > a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3L1 8l11 5 9-4.09V15h2V8L12 3zM5 12.18V16c0 1.5 3.13 3 7 3s7-1.5 7-3v-3.82l-7 3.18-7-3.18z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3L1 8l11 5 9-4.09V15h2V8L12 3zM5 12.18V16c0 1.5 3.13 3 7 3s7-1.5 7-3v-3.82l-7 3.18-7-3.18z'/%3E%3C/svg%3E");
}

/* Favorites: heart. */
.woocommerce-MyAccount-navigation li[class*="favorite"] > a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.9-10-9.2C.4 8.6 2 5 5.5 5c2 0 3.4 1.1 4.2 2.4L12 9l2.3-1.6C15.1 6.1 16.5 5 18.5 5 22 5 23.6 8.6 22 11.8 19.5 16.1 12 21 12 21z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.9-10-9.2C.4 8.6 2 5 5.5 5c2 0 3.4 1.1 4.2 2.4L12 9l2.3-1.6C15.1 6.1 16.5 5 18.5 5 22 5 23.6 8.6 22 11.8 19.5 16.1 12 21 12 21z'/%3E%3C/svg%3E");
}

/* Refer a friend: gift. */
.woocommerce-MyAccount-navigation li[class*="refer"] > a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 7h-2.2c.13-.31.2-.65.2-1a3 3 0 0 0-5.4-1.8L12 5.6l-.6-1.4A3 3 0 0 0 6 6c0 .35.07.69.2 1H4a2 2 0 0 0-2 2v2h9V7h2v4h9V9a2 2 0 0 0-2-2zM9 6a1 1 0 1 1 2 0c0 .55-.45 1-1 1H9.18A1 1 0 0 1 9 6zm6 1c-.55 0-1-.45-1-1a1 1 0 1 1 2 0 1 1 0 0 1-1 1zM2 13v7a2 2 0 0 0 2 2h7v-9H2zm11 9h7a2 2 0 0 0 2-2v-7h-9v9z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 7h-2.2c.13-.31.2-.65.2-1a3 3 0 0 0-5.4-1.8L12 5.6l-.6-1.4A3 3 0 0 0 6 6c0 .35.07.69.2 1H4a2 2 0 0 0-2 2v2h9V7h2v4h9V9a2 2 0 0 0-2-2zM9 6a1 1 0 1 1 2 0c0 .55-.45 1-1 1H9.18A1 1 0 0 1 9 6zm6 1c-.55 0-1-.45-1-1a1 1 0 1 1 2 0 1 1 0 0 1-1 1zM2 13v7a2 2 0 0 0 2 2h7v-9H2zm11 9h7a2 2 0 0 0 2-2v-7h-9v9z'/%3E%3C/svg%3E");
}

/* Subscriptions: renewal arrows. */
.woocommerce-MyAccount-navigation li[class*="subscription"] > a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5V1L7 6l5 5V7a5 5 0 0 1 5 5c0 .88-.23 1.7-.62 2.42l1.46 1.46A6.96 6.96 0 0 0 19 12a7 7 0 0 0-7-7zm-5 7c0-.88.23-1.7.62-2.42L6.16 8.12A6.96 6.96 0 0 0 5 12a7 7 0 0 0 7 7v4l5-5-5-5v4a5 5 0 0 1-5-5z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5V1L7 6l5 5V7a5 5 0 0 1 5 5c0 .88-.23 1.7-.62 2.42l1.46 1.46A6.96 6.96 0 0 0 19 12a7 7 0 0 0-7-7zm-5 7c0-.88.23-1.7.62-2.42L6.16 8.12A6.96 6.96 0 0 0 5 12a7 7 0 0 0 7 7v4l5-5-5-5v4a5 5 0 0 1-5-5z'/%3E%3C/svg%3E");
}

/* ---------- 2. Dashboard quick buttons ---------- */

.egp-dash-buttons {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	margin: 22px 0 8px;
}

@media (min-width: 560px) {
	.egp-dash-buttons {
		grid-template-columns: 1fr 1fr;
	}
}

.egp-dbtn {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 16px 18px;
	border-radius: 14px;
	text-decoration: none !important;
	border: 1px solid rgba(26, 47, 74, 0.14);
}

.egp-dbtn__label {
	font-size: 0.66rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 700;
	opacity: 0.75;
}

.egp-dbtn__title {
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.2;
}

.egp-dbtn__title span {
	display: inline-block;
	transition: transform 0.15s ease;
}

.egp-dbtn:hover .egp-dbtn__title span {
	transform: translateX(4px);
}

/* Navy: the combined membership + credits button. */
.egp-dbtn--navy {
	background: #1a2f4a;
	border-color: #1a2f4a;
}

.egp-dbtn--navy .egp-dbtn__label {
	color: #c9a961;
	opacity: 1;
}

.egp-dbtn--navy .egp-dbtn__title {
	color: #faf6ef;
}

/* Gold: the attention buttons (courses, bulletin board). */
.egp-dbtn--gold {
	background: #c9a961;
	border-color: #c9a961;
}

.egp-dbtn--gold .egp-dbtn__label {
	color: #14243a;
}

.egp-dbtn--gold .egp-dbtn__title {
	color: #14243a;
}

.egp-dbtn:focus-visible {
	outline: 3px solid #c9a961;
	outline-offset: 2px;
}

/* ---------- 3. Mobile: content first, menu below ---------- */

@media (max-width: 768px) {
	.woocommerce-account .woocommerce {
		display: flex;
		flex-direction: column;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation {
		order: 2;
		margin-top: 28px;
	}

	.woocommerce-account .woocommerce-MyAccount-content {
		order: 1;
	}
}

/* ---------- Combined membership + credits page bits ---------- */

.egp-member-status {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0 0 16px;
}

.egp-member-status .egp-member-badge {
	margin: 0;
}

.egp-member-status__manage {
	font-size: 0.85rem;
	font-weight: 700;
	color: #b08d3e;
	text-decoration: none;
}

.egp-member-status__manage:hover {
	text-decoration: underline;
}

/* v2.3.1: activity log shows the change, not the running total */
.egp-credit-log .egp-log-plus strong{color:#2f7a34;}
.egp-credit-log .egp-log-minus strong{color:#9b2c2c;}
.egp-credit-log .egp-log-total{display:block;font-size:.78rem;color:#8a8a8a;margin-top:1px;}
