/**
 * My Account — saved sandwiches, reorder, dashboard.
 *
 * Same brand tokens as the builder so the account area does not look like a
 * different site. Sized for a phone first: a factory regular reordering lunch
 * is standing on a shop floor, not at a desk.
 */

.jwmhm-acct {
	--hm-accent:      #B62A2A;
	--hm-accent-soft: #FBEFEC;
	--hm-tan:         #D7C185;
	--hm-ink:         #1C1B19;
	--hm-soft:        #6B6660;
	--hm-surface:     #ffffff;
	--hm-ground:      #FDF8F1;
	--hm-line:        #E6DED2;
	--hm-radius:      12px;

	color: var(--hm-ink);
}

.jwmhm-acct__hello {
	margin: 0 0 22px;
	font-size: 1.02rem;
	color: var(--hm-soft);
}

.jwmhm-acct__hello strong { color: var(--hm-ink); }

.jwmhm-acct__h {
	margin: 26px 0 12px;
	font-size: .74rem;
	font-weight: 800;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--hm-soft);
}

/* ---------------------------------------------------------------- cards */

.jwmhm-acct__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 14px;
}

.jwmhm-acct__card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	border: 1px solid var(--hm-line);
	border-radius: var(--hm-radius);
	background: var(--hm-surface);
	overflow: hidden;
}

.jwmhm-acct__card-body { padding: 15px 16px 12px; }

.jwmhm-acct__card h4 {
	margin: 0 0 3px;
	font-size: 1.02rem;
	line-height: 1.25;
	color: var(--hm-ink);
}

.jwmhm-acct__card-product {
	margin: 0 0 8px;
	font-size: .74rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--hm-accent);
	font-weight: 700;
}

.jwmhm-acct__card-build {
	margin: 0;
	font-size: .84rem;
	line-height: 1.5;
	color: var(--hm-soft);
}

.jwmhm-acct__card-foot {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 16px 15px;
	border-top: 1px solid var(--hm-line);
	background: var(--hm-ground);
}

/* --------------------------------------------------------------- orders */

.jwmhm-acct__orders { display: flex; flex-direction: column; gap: 10px; }

.jwmhm-acct__order {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	padding: 14px 16px;
	border: 1px solid var(--hm-line);
	border-radius: var(--hm-radius);
	background: var(--hm-surface);
}

.jwmhm-acct__order-main {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
	min-width: 0;
	flex: 1 1 260px;
}

.jwmhm-acct__order-when {
	font-size: .72rem;
	font-weight: 800;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--hm-soft);
	flex: none;
}

.jwmhm-acct__order-items { font-size: .9rem; }
.jwmhm-acct__order-total { font-weight: 700; color: var(--hm-accent); }
.jwmhm-acct__order-total .woocommerce-Price-amount { color: inherit; }

/* --------------------------------------------------------------- buttons */

.jwmhm-acct__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 11px 20px;
	border-radius: 999px;
	background: var(--hm-accent);
	color: #fff !important;
	font-size: .9rem;
	font-weight: 700;
	text-decoration: none !important;
	border: 0;
	cursor: pointer;
	white-space: nowrap;
	transition: transform .15s ease, opacity .15s ease;
}

.jwmhm-acct__btn:hover { transform: translateY(-1px); opacity: .95; color: #fff !important; }

.jwmhm-acct__link {
	font-size: .84rem;
	color: var(--hm-soft) !important;
	text-decoration: underline;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}

.jwmhm-acct__link:hover { color: var(--hm-accent) !important; }

.jwmhm-acct__again { margin: 20px 0 0; }

/* ----------------------------------------------------------- empty state */

.jwmhm-acct__empty {
	padding: 30px 24px;
	border: 1px dashed var(--hm-line);
	border-radius: var(--hm-radius);
	background: var(--hm-ground);
	text-align: center;
}

.jwmhm-acct__empty p { margin: 0 0 10px; color: var(--hm-soft); }
.jwmhm-acct__empty p strong { color: var(--hm-ink); }
.jwmhm-acct__empty p:last-child { margin: 16px 0 0; }

/* ------------------------------------------------------- save from cart */

.jwmhm-acct__save {
	margin: 22px 0 0;
	padding: 16px 18px;
	border: 1px solid var(--hm-line);
	border-radius: var(--hm-radius);
	background: var(--hm-ground);
}

.jwmhm-acct__save--guest p { margin: 0; font-size: .92rem; color: var(--hm-soft); }
.jwmhm-acct__save--guest a { color: var(--hm-accent); font-weight: 700; }

.jwmhm-acct__save-title { margin: 0 0 10px; }

.jwmhm-acct__save-row {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	margin: 0 0 8px;
}

.jwmhm-acct__save-row input[type="text"] {
	flex: 1 1 200px;
	min-height: 44px;
	padding: 10px 14px;
	font-size: 16px;
	border: 1px solid var(--hm-line);
	border-radius: 8px;
	background: #fff;
}

.jwmhm-acct__save-row input[type="text"]:focus {
	border-color: var(--hm-accent);
	outline: none;
	box-shadow: 0 0 0 3px var(--hm-accent-soft);
}

/* ------------------------------------------------ thank-you page nudge */

.jwmhm-acct__nudge {
	margin: 26px 0;
	padding: 22px 24px;
	border: 1px solid var(--hm-line, #E6DED2);
	border-left: 4px solid var(--hm-accent, #B62A2A);
	border-radius: var(--hm-radius, 12px);
	background: var(--hm-ground, #FDF8F1);
}

.jwmhm-acct__nudge p { margin: 0 0 10px; color: var(--hm-soft, #6B6660); }
.jwmhm-acct__nudge-title { font-size: 1.05rem; color: var(--hm-ink, #1C1B19) !important; }
.jwmhm-acct__nudge p:last-child { margin: 16px 0 0; }

/* ------------------------------------------------------------- account nav */

.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; }

.woocommerce-MyAccount-navigation li a {
	display: block;
	padding: 11px 14px;
	border-radius: 8px;
	text-decoration: none;
	color: #1C1B19;
	font-weight: 600;
}

.woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-MyAccount-navigation li a:hover {
	background: #FBEFEC;
	color: #B62A2A;
}

@media (max-width: 560px) {
	.jwmhm-acct__grid { grid-template-columns: 1fr; }
	.jwmhm-acct__order { flex-direction: column; align-items: stretch; }

	/* Once the row stacks, flex-basis is a HEIGHT, not a width — leaving the
	   260px basis on opens a 200px hole above the button. */
	.jwmhm-acct__order-main { flex: 0 0 auto; }

	.jwmhm-acct__btn { width: 100%; }
	.jwmhm-acct__card-foot { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
	.jwmhm-acct__link { justify-content: center; }

	/* Stacked, the eight account links push the saved sandwiches a full screen
	   down. On a phone they become one scrollable row of chips instead. */
	.woocommerce-MyAccount-navigation ul {
		display: flex;
		gap: 8px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 4px;
		margin-bottom: 18px;
	}

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

	.woocommerce-MyAccount-navigation li { flex: none; }

	.woocommerce-MyAccount-navigation li a {
		white-space: nowrap;
		padding: 9px 14px;
		border: 1px solid #E6DED2;
		border-radius: 999px;
		font-size: .88rem;
	}

	.woocommerce-MyAccount-navigation li.is-active a { border-color: #B62A2A; }
}

/* --------------------------------------------------------- delete account */

.jwmhm-acct__danger {
	max-width: 560px;
	padding: 22px 24px;
	border: 1px solid #E9C9C9;
	border-radius: var(--hm-radius, 12px);
	background: #FDF6F5;
}

.jwmhm-acct__danger h3 { margin: 0 0 12px; font-size: 1.1rem; color: var(--hm-ink, #1C1B19); }
.jwmhm-acct__danger p  { margin: 0 0 12px; font-size: .92rem; color: var(--hm-soft, #6B6660); }

.jwmhm-acct__danger label { display: block; margin: 0 0 6px; font-size: .88rem; }

.jwmhm-acct__danger input[type="text"] {
	width: 100%;
	max-width: 220px;
	min-height: 44px;
	padding: 10px 14px;
	font-size: 16px;
	letter-spacing: .08em;
	border: 1px solid var(--hm-line, #E6DED2);
	border-radius: 8px;
	background: #fff;
}

.jwmhm-acct__btn--danger { background: #9B2222; }
