/* ============================================================
   My Account — restyles WooCommerce's default login/register and
   account-dashboard markup (no template override, same technique as
   cart-checkout.css). !important is used only where WooCommerce's own
   core CSS (.woocommerce ...) outranks a plain class selector.
   ============================================================ */

.woocommerce-account .ka-container{
	max-width:1200px;
	padding-block:24px 80px;
}
.woocommerce-account main h1{
	font-size:clamp(24px,3vw,32px);
	margin-bottom:28px;
}

/* ---- Login / Register (logged-out) ---- */
.woocommerce-account .u-columns.col2-set{
	display:flex;
	flex-wrap:wrap;
	gap:32px;
	align-items:flex-start;
}
.woocommerce-account .u-column1.col-1,
.woocommerce-account .u-column2.col-2{
	flex:1 1 320px;
	background:var(--ka-white);
	border-radius:var(--ka-radius);
	box-shadow:var(--ka-shadow-sm);
	padding:28px 26px;
}
.woocommerce-account .u-column1.col-1 h2,
.woocommerce-account .u-column2.col-2 h2{ font-size:19px; margin:0 0 20px; }
.woocommerce-account .form-row{ margin-bottom:16px; }
.woocommerce-account .form-row label{
	display:block;
	font-size:13.5px;
	font-weight:600;
	color:var(--ka-ink-soft);
	margin-bottom:6px;
}
.woocommerce-account .form-row .required{ color:#D6273C; text-decoration:none; }
.woocommerce-account input.input-text{
	width:100%;
	min-height:46px;
	border:1.5px solid var(--ka-green-100) !important;
	border-radius:var(--ka-radius-sm);
	padding:0 14px;
	font-family:var(--ka-font-bn);
	font-size:15px;
	background:var(--ka-white);
	box-sizing:border-box;
}
.woocommerce-account input.input-text:focus{ outline:none; border-color:var(--ka-green) !important; }
.woocommerce-account .woocommerce-form-login .form-row:has(input[type="checkbox"]){
	display:flex;
	align-items:center;
	gap:8px;
	margin-bottom:0;
}
.woocommerce-account button.woocommerce-button,
.woocommerce-account button.woocommerce-Button{
	background:var(--ka-green) !important;
	color:#fff !important;
	border:none !important;
	border-radius:999px !important;
	padding:0 26px !important;
	height:46px;
	font-weight:700 !important;
	font-family:var(--ka-font-bn);
	cursor:pointer;
	transition:background .2s ease, transform .2s ease;
}
.woocommerce-account button.woocommerce-button:hover{ background:var(--ka-green-700) !important; transform:translateY(-2px); }
.woocommerce-account .woocommerce-LostPassword{ margin-top:14px; font-size:13.5px; }
.woocommerce-account .woocommerce-LostPassword a{ color:var(--ka-green-700); font-weight:600; }
.woocommerce-account .woocommerce-privacy-policy-text{ font-size:12.5px; color:var(--ka-ink-soft); line-height:1.6; margin:14px 0; }
.woocommerce-account .show-password-input{ top:12px !important; }

/* ---- Account dashboard (logged-in) ---- */
.woocommerce-account .woocommerce-notices-wrapper .woocommerce-message{ margin-bottom:24px; }
.woocommerce-account .woocommerce-MyAccount-navigation{
	background:var(--ka-white);
	border-radius:var(--ka-radius);
	box-shadow:var(--ka-shadow-sm);
	padding:12px;
	float:none;
	width:auto;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul{ margin:0; padding:0; list-style:none; }
.woocommerce-account .woocommerce-MyAccount-navigation li{ border:none !important; }
.woocommerce-account .woocommerce-MyAccount-navigation li a{
	display:block;
	padding:12px 16px;
	border-radius:var(--ka-radius-sm);
	color:var(--ka-ink);
	font-weight:600;
	font-size:14.5px;
	text-decoration:none;
	transition:background .15s ease, color .15s ease;
}
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover{ background:var(--ka-green-50); }
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a{
	background:var(--ka-green);
	color:#fff !important;
}
.woocommerce-account .woocommerce-MyAccount-content{
	background:var(--ka-white);
	border-radius:var(--ka-radius);
	box-shadow:var(--ka-shadow-sm);
	padding:28px 26px;
	float:none;
	width:auto;
}
/* Scoped with :has() so this only applies to the logged-in dashboard (nav +
   content) — without it, the same .woocommerce wrapper on the logged-out
   Login/Register page was also being squeezed into a 220px first column,
   leaving Register with no room and wrapping below Login instead of beside it.
   Flexbox rather than Grid on purpose: with grid-template-columns:220px 1fr
   here, real-world testing showed the two children occasionally computing
   two auto ROWS (each sized to one item's own height) and landing in swapped
   columns instead of sharing a single row — reproducible outside this dev
   environment too, not just a tooling artifact. Flexbox with a fixed-width
   sidebar and a flexed content pane gives the identical visual result
   without that failure mode. */
.woocommerce-account.woocommerce-page .woocommerce:has(.woocommerce-MyAccount-navigation){
	display:flex;
	align-items:flex-start;
	gap:28px;
}
.woocommerce-account.woocommerce-page .woocommerce:has(.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-navigation{
	flex:0 0 220px;
}
.woocommerce-account.woocommerce-page .woocommerce:has(.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content{
	flex:1 1 auto;
	min-width:0;
}
.woocommerce-account .woocommerce-MyAccount-content > p:first-child{
	font-size:15px;
	color:var(--ka-ink-soft);
	line-height:1.8;
}
.woocommerce-account .woocommerce-MyAccount-content a{ color:var(--ka-green-700); font-weight:600; }

/* ---- Orders table / order details / payment methods table ---- */
.woocommerce-account table.shop_table{
	margin-top:16px;
	width:100%;
	border-collapse:collapse;
}
.woocommerce-account table.shop_table thead th{
	background:var(--ka-green-50);
	color:var(--ka-green-800);
	font-size:12.5px;
	font-weight:700;
	text-transform:uppercase;
	letter-spacing:.03em;
	padding:12px 14px;
	text-align:left;
}
.woocommerce-account table.shop_table tbody td,
.woocommerce-account table.shop_table tfoot td,
.woocommerce-account table.shop_table tfoot th{
	padding:12px 14px;
	border-bottom:1px solid var(--ka-green-100);
	font-size:14.5px;
}
.woocommerce-account table.shop_table tr:last-child td{ border-bottom:none; }
.woocommerce-account .order-status,
.woocommerce-account mark.order-status{
	display:inline-block;
	background:var(--ka-green-50);
	color:var(--ka-green-700);
	font-weight:700;
	font-size:12.5px;
	padding:4px 12px;
	border-radius:999px;
}
.woocommerce-account table.shop_table .button{
	background:var(--ka-white) !important;
	color:var(--ka-green-700) !important;
	border:1.5px solid var(--ka-green) !important;
	border-radius:999px !important;
	padding:6px 16px !important;
	font-size:13px !important;
	font-weight:700 !important;
}
.woocommerce-account table.shop_table .button:hover{ background:var(--ka-green-50) !important; }
.woocommerce-account .woocommerce-MyAccount-content fieldset{
	border:1.5px solid var(--ka-green-100);
	border-radius:var(--ka-radius-sm);
	padding:18px;
	margin-top:8px;
}
.woocommerce-account .woocommerce-MyAccount-content fieldset legend{ font-weight:700; padding:0 8px; }
.woocommerce-account .woocommerce-Address{ margin-bottom:24px; }
.woocommerce-account .woocommerce-Address-title h3{ font-size:17px; display:inline-block; margin:0 0 12px; }
.woocommerce-account .woocommerce-Address-title .edit{ float:right; color:var(--ka-green-700); font-weight:600; font-size:13.5px; }
.woocommerce-account .addresses .title::after{ content:""; display:block; clear:both; }

/* ---- Edit account details form ---- */
.woocommerce-account .woocommerce-EditAccountForm{ width:100%; max-width:520px; }
.woocommerce-account .woocommerce-EditAccountForm .form-row{ width:100%; margin-bottom:16px; }
.woocommerce-account .woocommerce-EditAccountForm .form-row-first,
.woocommerce-account .woocommerce-EditAccountForm .form-row-last{ width:calc(50% - 8px); display:inline-block; }
.woocommerce-account .woocommerce-EditAccountForm .form-row-first{ margin-right:16px; }
.woocommerce-account .woocommerce-EditAccountForm fieldset{ margin-top:20px; }
.woocommerce-account .woocommerce-EditAccountForm fieldset legend{ font-size:16px; margin-bottom:10px; }

/* ---- Single order view ---- */
.woocommerce-account .woocommerce-order-details__title,
.woocommerce-account .woocommerce-column__title{ font-size:18px; margin:24px 0 14px; }
.woocommerce-account .order-again{ margin-top:20px; }
.woocommerce-account .order-again .button{
	background:var(--ka-green) !important;
	color:#fff !important;
	border:none !important;
	border-radius:999px !important;
	padding:10px 24px !important;
	font-weight:700 !important;
}

/* ---- Order status timeline (view-order) ---- */
.woocommerce-account .ka-order-timeline{
	display:flex;
	align-items:flex-start;
	margin:20px 0 24px;
}
.woocommerce-account .ka-order-timeline-step{
	display:flex;
	flex-direction:column;
	align-items:center;
	gap:8px;
	flex:0 0 auto;
	width:110px;
	text-align:center;
}
.woocommerce-account .ka-order-timeline-dot{
	width:22px;
	height:22px;
	border-radius:50%;
	background:var(--ka-white);
	border:2.5px solid var(--ka-green-100);
	flex-shrink:0;
}
.woocommerce-account .ka-order-timeline-step.is-done .ka-order-timeline-dot{
	background:var(--ka-green);
	border-color:var(--ka-green);
}
.woocommerce-account .ka-order-timeline-step.is-current .ka-order-timeline-dot{
	background:var(--ka-white);
	border-color:var(--ka-green);
	box-shadow:0 0 0 4px var(--ka-green-50);
}
.woocommerce-account .ka-order-timeline-label{
	font-size:12.5px;
	font-weight:600;
	color:var(--ka-ink-soft);
}
.woocommerce-account .ka-order-timeline-step.is-done .ka-order-timeline-label{ color:var(--ka-green-700); }
.woocommerce-account .ka-order-timeline-line{
	flex:1 1 auto;
	height:2.5px;
	background:var(--ka-green-100);
	margin-top:10px;
}
.woocommerce-account .ka-order-timeline-line.is-done{ background:var(--ka-green); }
.woocommerce-account .ka-order-hold-note{
	background:#FFF3E0;
	color:#B45309;
	font-size:13.5px;
	font-weight:600;
	padding:10px 16px;
	border-radius:var(--ka-radius-sm);
	margin:0 0 20px;
}
.woocommerce-account .ka-order-alert{
	font-size:14px;
	font-weight:600;
	padding:14px 18px;
	border-radius:var(--ka-radius-sm);
	margin:0 0 20px;
}
.woocommerce-account .ka-order-alert-cancelled,
.woocommerce-account .ka-order-alert-failed{ background:#FEE2E2; color:#B91C1C; }
.woocommerce-account .ka-order-alert-refunded{ background:var(--ka-green-50); color:var(--ka-green-700); }

/* ---- Order notes/updates timeline (view-order) ---- */
.woocommerce-account .woocommerce-OrderUpdates{ list-style:none; margin:16px 0 0; padding:0; }
.woocommerce-account .woocommerce-OrderUpdate{
	background:var(--ka-green-50);
	border-radius:var(--ka-radius-sm);
	padding:14px 16px;
	margin-bottom:10px;
}
.woocommerce-account .woocommerce-OrderUpdate-meta{ font-size:12px; color:var(--ka-ink-soft); margin-bottom:6px; }
.woocommerce-account .woocommerce-OrderUpdate-description p{ margin:0; font-size:14px; }

@media (max-width:820px){
	.woocommerce-account.woocommerce-page .woocommerce:has(.woocommerce-MyAccount-navigation){ flex-direction:column; }
	.woocommerce-account.woocommerce-page .woocommerce:has(.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-navigation{ flex-basis:auto; width:100%; }
	.woocommerce-account .u-columns.col2-set{ gap:20px; }
	.woocommerce-account .ka-order-timeline-step{ width:auto; flex:1 1 0; }
	.woocommerce-account .ka-order-timeline-label{ font-size:11px; }
	.woocommerce-account table.shop_table.shop_table_responsive thead{ display:none; }
	.woocommerce-account table.shop_table.shop_table_responsive tr{ display:block; border-bottom:1px solid var(--ka-green-100); }
	.woocommerce-account table.shop_table.shop_table_responsive td{
		display:flex;
		justify-content:space-between;
		align-items:center;
		border-bottom:none;
		padding:8px 14px;
	}
	.woocommerce-account table.shop_table.shop_table_responsive td::before{
		content:attr(data-title);
		font-weight:700;
		color:var(--ka-ink-soft);
		font-size:12px;
		margin-right:12px;
	}
}
