/* KTheme Market account UI — monochrome shell with reserved primary emphasis. */
body.woocommerce-account {
	--ktheme-account-ink: #171717;
	--ktheme-account-muted: #6b7280;
	--ktheme-account-line: #dfe3e7;
	--ktheme-account-surface: #ffffff;
	--ktheme-account-subtle: #f5f6f7;
	--ktheme-account-primary: #34383d;
	--ktheme-wc-text: var(--ktheme-account-ink);
	--ktheme-wc-heading: #111111;
	--ktheme-wc-muted: var(--ktheme-account-muted);
	--ktheme-wc-surface: var(--ktheme-account-surface);
	--ktheme-wc-surface-muted: var(--ktheme-account-subtle);
	--ktheme-wc-component-bg: var(--ktheme-account-subtle);
	--ktheme-wc-component-border: var(--ktheme-account-line);
	--ktheme-wc-component-muted-bg: var(--ktheme-account-subtle);
	--ktheme-wc-primary: var(--ktheme-account-primary);
	--ktheme-wc-success: #3f4750;
	--ktheme-wc-danger: #b42318;
	color: var(--ktheme-account-ink);
}

body.woocommerce-account .sm-box-wrapper {
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	overflow: visible;
}

body.woocommerce-account .woocommerce-MyAccount-navigation {
	width: 15.25rem;
	margin: 0 1.75rem 0 0;
	padding: 0.75rem;
	border: 1px solid var(--ktheme-account-line);
	border-radius: 0.875rem;
	background: var(--ktheme-account-surface);
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
	display: grid;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li {
	margin: 0;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li::after {
	display: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation a {
	display: flex;
	align-items: center;
	min-height: 2.75rem;
	margin: 0;
	padding: 0.625rem 0.75rem;
	border: 1px solid transparent;
	border-radius: 0.625rem;
	color: #34383d;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
	transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

body.woocommerce-account .woocommerce-MyAccount-navigation a:hover,
body.woocommerce-account .woocommerce-MyAccount-navigation a:focus-visible {
	border-color: var(--ktheme-account-line);
	background: var(--ktheme-account-subtle);
	color: #111;
	outline: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
	border-color: #c7cdd4;
	background: #eceff1;
	color: #171717;
	box-shadow: inset 3px 0 0 var(--ktheme-account-primary);
}

body.woocommerce-account .woocommerce-MyAccount-content {
	width: calc(100% - 17rem);
	margin: 0;
	padding: clamp(1.25rem, 2.6vw, 2rem);
	border: 1px solid var(--ktheme-account-line);
	border-radius: 0.875rem;
	background: var(--ktheme-account-surface);
}

body.woocommerce-account .woocommerce-MyAccount-content > :first-child {
	margin-top: 0;
}

body.woocommerce-account .woocommerce-MyAccount-content h1,
body.woocommerce-account .woocommerce-MyAccount-content h2,
body.woocommerce-account .woocommerce-MyAccount-content h3 {
	margin-top: 0;
	color: #111;
	font-weight: 700;
	letter-spacing: -0.02em;
}

body.woocommerce-account .woocommerce-MyAccount-content h2 {
	margin-bottom: 1.25rem;
	font-size: clamp(1.35rem, 2vw, 1.75rem);
}

body.woocommerce-account .woocommerce-MyAccount-content .bg-light,
body.woocommerce-account .woocommerce-MyAccount-content .ktheme-wc-account-dashboard-card,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses address,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-customer-details address {
	border: 1px solid var(--ktheme-account-line) !important;
	border-radius: 0.75rem !important;
	background: var(--ktheme-account-subtle) !important;
	box-shadow: none !important;
}

body.woocommerce-account .woocommerce-MyAccount-content .user-info,
body.woocommerce-account .woocommerce-MyAccount-content .recent-orders,
body.woocommerce-account .woocommerce-MyAccount-content .user-activity {
	margin-top: 1rem !important;
	padding: clamp(1rem, 2vw, 1.5rem) !important;
}

body.woocommerce-account .woocommerce-MyAccount-content .user-info {
	margin-top: 0 !important;
}

body.woocommerce-account .woocommerce-MyAccount-content .user-info > a,
body.woocommerce-account .woocommerce-MyAccount-content .recent-orders a,
body.woocommerce-account .woocommerce-MyAccount-content .user-activity a {
	font-weight: 600;
}

/* The older dashboard holds the detailed activity; hide its redundant summary cards. */
body.woocommerce-account .ktheme-wc-account-dashboard {
	display: none;
}

body.woocommerce-account .woocommerce table.shop_table,
body.woocommerce-account .woocommerce table.woocommerce-table,
body.woocommerce-account .thlm-license-details,
body.woocommerce-account .thlm-license-list,
body.woocommerce-account .ktheme-account-products__group {
	margin: 0 0 1.5rem;
	border: 1px solid var(--ktheme-account-line);
	border-radius: 0.75rem;
	background: #fff;
	box-shadow: none;
	overflow: hidden;
}

body.woocommerce-account .woocommerce table.shop_table th,
body.woocommerce-account .woocommerce table.shop_table td,
body.woocommerce-account .woocommerce table.woocommerce-table th,
body.woocommerce-account .woocommerce table.woocommerce-table td {
	padding: 0.9375rem 1rem;
	border-color: var(--ktheme-account-line);
	vertical-align: middle;
}

body.woocommerce-account .woocommerce table.shop_table th,
body.woocommerce-account .woocommerce table.woocommerce-table th {
	color: #4b5563;
	background: var(--ktheme-account-subtle);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.035em;
	text-transform: uppercase;
}

body.woocommerce-account .woocommerce .button,
body.woocommerce-account .woocommerce button.button,
body.woocommerce-account .woocommerce input.button,
body.woocommerce-account .thlm-license-details .button.thlm-action-btn,
body.woocommerce-account .ktheme-account-products a.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.5rem;
	padding: 0.625rem 0.875rem;
	border: 1px solid #c7cdd4;
	border-radius: 0.5rem;
	background: #fff;
	color: #2f3337;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.1;
	text-decoration: none;
	box-shadow: none;
	transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

body.woocommerce-account .woocommerce .button:hover,
body.woocommerce-account .woocommerce .button:focus-visible,
body.woocommerce-account .thlm-license-details .button.thlm-action-btn:hover,
body.woocommerce-account .ktheme-account-products a.button:hover {
	border-color: #8a939d;
	background: #f5f6f7;
	color: #111;
	outline: none;
}

body.woocommerce-account .woocommerce form .form-row input.input-text,
body.woocommerce-account .woocommerce form .form-row textarea,
body.woocommerce-account .woocommerce form .form-row select,
body.woocommerce-account .woocommerce-EditAccountForm input,
body.woocommerce-account .woocommerce-EditAddressForm input,
body.woocommerce-account .woocommerce-EditAddressForm select {
	min-height: 2.75rem;
	border: 1px solid #c7cdd4;
	border-radius: 0.5rem;
	background: #fff;
	color: #171717;
	box-shadow: none;
}

body.woocommerce-account .woocommerce form .form-row textarea {
	min-height: 7rem;
}

body.woocommerce-account .woocommerce form .form-row input:focus,
body.woocommerce-account .woocommerce form .form-row textarea:focus,
body.woocommerce-account .woocommerce form .form-row select:focus {
	border-color: #9ca3af;
	box-shadow: 0 0 0 3px rgba(52, 56, 61, 0.14);
	outline: 0;
}

body.woocommerce-account .woocommerce-EditAccountForm button[type='submit'],
body.woocommerce-account .woocommerce-EditAddressForm button[type='submit'],
body.woocommerce-account .woocommerce form.login button[type='submit'],
body.woocommerce-account .woocommerce form.lost_reset_password button[type='submit'],
body.woocommerce-account .woocommerce .checkout-button,
body.woocommerce-account .woocommerce input[type='submit'].button {
	border-color: var(--ktheme-account-primary);
	background: var(--ktheme-account-primary);
	color: #fff;
}

body.woocommerce-account .woocommerce-EditAccountForm button[type='submit']:hover,
body.woocommerce-account .woocommerce-EditAddressForm button[type='submit']:hover,
body.woocommerce-account .woocommerce form.login button[type='submit']:hover,
body.woocommerce-account .woocommerce form.lost_reset_password button[type='submit']:hover,
body.woocommerce-account .woocommerce input[type='submit'].button:hover {
	border-color: #1f2428;
	background: #1f2428;
	color: #fff;
}

body.woocommerce-account .woocommerce-MyAccount-content .thlm-license-details .thlm-license-status,
body.woocommerce-account .woocommerce-MyAccount-content .thlm-license-details .thlm-license-activation-status,
body.woocommerce-account .ktheme-account-products__status,
body.woocommerce-account .ktheme-account-products__status.is-active {
	border: 1px solid #c7cdd4;
	border-radius: 999px;
	background: #f5f6f7;
	color: #34383d;
	font-weight: 700;
}

body.woocommerce-account .ktheme-account-products__status.is-active::before {
	background: #6b7280;
}

body.woocommerce-account .ktheme-account-products__meta-value--never {
	font-size: 0;
}

body.woocommerce-account .ktheme-account-products__meta-value--never::after {
	content: '기간 제한 없음';
	font-size: 0.9375rem;
}

body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-message,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-error {
	margin: 0 0 1.25rem;
	border: 1px solid var(--ktheme-account-line);
	border-left: 3px solid var(--ktheme-account-primary);
	border-radius: 0.625rem;
	background: #fff;
	color: #34383d;
}

body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-error {
	border-left-color: #b42318;
}

/* Match the starter account selector specificity so legacy purple button rules cannot win. */
body.woocommerce-account.ktheme-wc-account .woocommerce button.button,
body.woocommerce-account.ktheme-wc-account .woocommerce a.button,
body.woocommerce-account.ktheme-wc-account .woocommerce input.button,
body.woocommerce-account.ktheme-wc-account .woocommerce .button,
body.woocommerce-account.ktheme-wc-account .thlm-license-details .button.thlm-action-btn,
body.woocommerce-account.ktheme-wc-account .ktheme-account-products a.button {
	min-height: 2.5rem;
	padding: 0.625rem 0.875rem;
	border: 1px solid #c7cdd4;
	border-radius: 0.5rem;
	background: #fff;
	color: #2f3337;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.1;
	box-shadow: none;
}

body.woocommerce-account.ktheme-wc-account .woocommerce button.button:hover,
body.woocommerce-account.ktheme-wc-account .woocommerce a.button:hover,
body.woocommerce-account.ktheme-wc-account .woocommerce input.button:hover,
body.woocommerce-account.ktheme-wc-account .woocommerce .button:hover {
	border-color: #8a939d;
	background: #f5f6f7;
	color: #111;
}

body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-navigation .is-active a {
	border-color: #c7cdd4;
	background: #eceff1;
	color: #171717;
	box-shadow: inset 3px 0 0 var(--ktheme-account-primary);
}

body.woocommerce-account.ktheme-wc-account .woocommerce-EditAccountForm button[type='submit'],
body.woocommerce-account.ktheme-wc-account .woocommerce-EditAddressForm button[type='submit'],
body.woocommerce-account.ktheme-wc-account .woocommerce form.login button[type='submit'],
body.woocommerce-account.ktheme-wc-account .woocommerce form.lost_reset_password button[type='submit'],
body.woocommerce-account.ktheme-wc-account .woocommerce input[type='submit'].button {
	border-color: var(--ktheme-account-primary);
	background: var(--ktheme-account-primary);
	color: #fff;
}

/* Fixed tab geometry prevents text from shifting between default, hover, and active states. */
body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-navigation a,
body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-navigation .is-active a {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	min-height: 2.75rem;
	height: 2.75rem;
	margin: 0;
	padding: 0.625rem 0.75rem;
	border: 0;
	border-radius: 0.625rem;
	line-height: 1.25;
	transform: none;
}

body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-navigation a br {
	display: none;
}

body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-navigation a:hover,
body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-navigation a:focus-visible {
	border: 0;
	background: #f1f3f5;
	color: #171717;
	box-shadow: none;
}

body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-navigation .is-active a,
body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-navigation .is-active a:hover,
body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-navigation .is-active a:focus-visible {
	border: 0;
	background: #e9ecef;
	color: #171717;
	box-shadow: none;
}

/* Account shell: white surfaces separated only by neutral borders. */
body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-navigation,
body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-content {
	background: #fff;
	border-color: #dfe3e7;
}

/* One readable, neutral action style for legacy Bootstrap and WooCommerce controls. */
body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-content .btn,
body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-content .btn.btn-dark,
body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-content .btn.btn-info,
body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-content .btn.btn-success,
body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-content .btn.btn-primary,
body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-content .btn.btn-secondary,
body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-content .btn.btn-danger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.5rem;
	padding: 0.625rem 0.875rem;
	border: 1px solid #c7cdd4 !important;
	border-radius: 0.5rem !important;
	background: #fff !important;
	color: #2f3337 !important;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.1;
	text-decoration: none;
	box-shadow: none !important;
}

body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-content .btn:hover,
body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-content .btn:focus-visible {
	border-color: #8a939d !important;
	background: #f1f3f5 !important;
	color: #171717 !important;
	outline: 0;
	box-shadow: none !important;
}

/* Replace legacy text chevrons with a compact, consistent icon. */
body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-navigation a::after {
	content: '';
	flex: 0 0 auto;
	width: 0.75rem;
	height: 0.75rem;
	margin-left: auto;
	background: #6b7280;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M6 3.2 10.8 8 6 12.8 7.2 14 13.2 8 7.2 2z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M6 3.2 10.8 8 6 12.8 7.2 14 13.2 8 7.2 2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-navigation .is-active a::after,
body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-navigation a:hover::after {
	background: #34383d;
}

@media (max-width: 767.98px) {
	body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-navigation ul {
		display: flex;
		gap: 0.375rem;
		overflow-x: auto;
		padding-bottom: 0.125rem;
		scrollbar-width: thin;
	}

	body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-navigation li {
		flex: 0 0 auto;
		width: auto;
	}

	body.woocommerce-account.ktheme-wc-account .woocommerce-MyAccount-navigation a {
		min-height: 2.5rem;
		padding: 0.5rem 0.75rem;
		white-space: nowrap;
	}

	body.woocommerce-account .woocommerce-MyAccount-navigation,
	body.woocommerce-account .woocommerce-MyAccount-content {
		float: none;
		width: 100%;
	}

	body.woocommerce-account .woocommerce-MyAccount-navigation {
		margin: 0 0 1rem;
		padding: 0.5rem;
		border-radius: 0.75rem;
	}

	body.woocommerce-account .woocommerce-MyAccount-navigation ul {
		display: flex;
		gap: 0.375rem;
		overflow-x: auto;
		padding-bottom: 0.125rem;
		scrollbar-width: thin;
	}

	body.woocommerce-account .woocommerce-MyAccount-navigation li {
		flex: 0 0 auto;
	}

	body.woocommerce-account .woocommerce-MyAccount-navigation a {
		min-height: 2.5rem;
		padding: 0.5rem 0.75rem;
		white-space: nowrap;
	}

	body.woocommerce-account .woocommerce-MyAccount-content {
		padding: 1rem;
		border-radius: 0.75rem;
	}

	body.woocommerce-account .woocommerce table.shop_table,
	body.woocommerce-account .woocommerce table.woocommerce-table {
		border: 0;
		border-radius: 0;
	}

	body.woocommerce-account .woocommerce table.shop_table thead,
	body.woocommerce-account .woocommerce table.woocommerce-table thead {
		display: none;
	}

	body.woocommerce-account .woocommerce table.woocommerce-orders-table tbody tr {
		display: block;
		margin: 0 0 0.75rem;
		border: 1px solid var(--ktheme-account-line);
		border-radius: 0.625rem;
		background: #fff;
		overflow: hidden;
	}

	body.woocommerce-account .woocommerce table.woocommerce-orders-table tbody th.woocommerce-orders-table__cell-order-number,
	body.woocommerce-account .woocommerce table.woocommerce-orders-table tbody td.woocommerce-orders-table__cell-order-number {
		display: block !important;
		width: auto !important;
		height: auto !important;
		padding: 0.875rem 1rem !important;
		border: 0 !important;
		border-bottom: 1px solid var(--ktheme-account-line) !important;
		background: var(--ktheme-account-subtle);
		color: #111;
		font-size: 1rem;
		font-weight: 700;
	}

	body.woocommerce-account .woocommerce table.woocommerce-orders-table tbody td {
		display: flex;
		justify-content: space-between;
		gap: 1rem;
		width: auto;
		padding: 0.75rem 1rem;
		border: 0;
		border-bottom: 1px solid var(--ktheme-account-line);
		text-align: right !important;
	}

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

	body.woocommerce-account .woocommerce table.woocommerce-orders-table tbody td::before {
		float: none;
		color: var(--ktheme-account-muted);
		font-size: 0.75rem;
		font-weight: 700;
		letter-spacing: 0.035em;
		text-transform: uppercase;
	}

	body.woocommerce-account .woocommerce table.woocommerce-table--order-licenses tbody tr,
	body.woocommerce-account .thlm-license-list tbody tr {
		display: grid;
		grid-template-columns: 1fr;
		margin: 0 0 0.75rem;
		border: 1px solid var(--ktheme-account-line);
		border-radius: 0.625rem;
		background: #fff;
		overflow: hidden;
	}

	body.woocommerce-account .woocommerce table.woocommerce-table--order-licenses tbody td,
	body.woocommerce-account .thlm-license-list tbody td {
		display: flex;
		justify-content: space-between;
		gap: 1rem;
		width: auto;
		padding: 0.75rem 1rem;
		border: 0;
		border-bottom: 1px solid var(--ktheme-account-line);
		text-align: right !important;
	}

	body.woocommerce-account .woocommerce table.woocommerce-table--order-licenses tbody td:last-child,
	body.woocommerce-account .thlm-license-list tbody td:last-child {
		border-bottom: 0;
	}

	body.woocommerce-account .woocommerce table.woocommerce-table--order-licenses tbody td::before,
	body.woocommerce-account .thlm-license-list tbody td::before {
		float: none !important;
		color: var(--ktheme-account-muted);
		font-size: 0.75rem;
		font-weight: 700;
		letter-spacing: 0.035em;
		text-transform: uppercase;
	}

	body.woocommerce-account .woocommerce table.woocommerce-table--order-licenses tbody td:nth-child(1)::before,
	body.woocommerce-account .thlm-license-list tbody td:nth-child(1)::before { content: '주문'; }
	body.woocommerce-account .woocommerce table.woocommerce-table--order-licenses tbody td:nth-child(2)::before,
	body.woocommerce-account .thlm-license-list tbody td:nth-child(2)::before { content: '상품'; }
	body.woocommerce-account .woocommerce table.woocommerce-table--order-licenses tbody td:nth-child(3)::before,
	body.woocommerce-account .thlm-license-list tbody td:nth-child(3)::before { content: '상태'; }
	body.woocommerce-account .woocommerce table.woocommerce-table--order-licenses tbody td:nth-child(4)::before,
	body.woocommerce-account .thlm-license-list tbody td:nth-child(4)::before { content: '동작'; }

	body.woocommerce-account .woo-multi-currency,
	body.woocommerce-account .wmc-currency-wrapper {
		z-index: 4;
	}
}
