/*
 * My Account styling — WooCommerce's default templates (login/register,
 * dashboard, orders, addresses, account details) render completely
 * unstyled on this theme, so this brings them in line with the rest of
 * the site: same green accent, card treatment and button style used on
 * the shop and contact pages. Scoped to body.woocommerce-account so it
 * can't leak onto any other page.
 */

body.woocommerce-account {
	--ibariki-account-primary: var(--wp--preset--color--primary, #1a7f37);
	--ibariki-account-text: var(--wp--preset--color--foreground, #1a1a1a);
	--ibariki-account-muted: #6b7280;
	--ibariki-account-border: #e5e7eb;
	--ibariki-account-surface: #f7f9f8;
	--ibariki-account-radius: 10px;
	--ibariki-account-font-heading: var(--wp--preset--font-family--heading, var(--e-global-typography-primary-font-family, inherit));
}

body.woocommerce-account .entry-title {
	font-family: var(--ibariki-account-font-heading);
	font-size: 2.25rem;
	font-weight: 800;
	color: var(--ibariki-account-text);
}

/* Sidebar nav + content, side by side */
body.woocommerce-account .woocommerce {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 32px;
	padding-bottom: 60px;
}

body.woocommerce-account .woocommerce-MyAccount-navigation {
	flex: 0 0 240px;
	background: var(--ibariki-account-surface);
	border: 1px solid var(--ibariki-account-border);
	border-radius: var(--ibariki-account-radius);
	padding: 12px;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link a {
	display: block;
	padding: 10px 16px;
	border-radius: 8px;
	color: var(--ibariki-account-text);
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link a:hover {
	background: rgba(26, 127, 55, 0.08);
	color: var(--ibariki-account-primary);
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link.is-active a {
	background: var(--ibariki-account-primary);
	color: #fff;
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout {
	margin-top: 6px;
	padding-top: 6px;
	border-top: 1px solid var(--ibariki-account-border);
}

body.woocommerce-account .woocommerce-MyAccount-content {
	flex: 1 1 420px;
	min-width: 0;
	background: #fff;
	border: 1px solid var(--ibariki-account-border);
	border-radius: var(--ibariki-account-radius);
	padding: 32px;
}

body.woocommerce-account .woocommerce-MyAccount-content p {
	color: var(--ibariki-account-muted);
	line-height: 1.7;
}

body.woocommerce-account .woocommerce-MyAccount-content a {
	color: var(--ibariki-account-primary);
	font-weight: 600;
}

/* Notices */
body.woocommerce-account .woocommerce-message,
body.woocommerce-account .woocommerce-info,
body.woocommerce-account .woocommerce-error {
	list-style: none;
	margin: 0 0 24px;
	padding: 14px 18px;
	border-radius: 8px;
	font-size: 0.95rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
}

body.woocommerce-account .woocommerce-error li {
	list-style: none;
}

body.woocommerce-account .woocommerce-message {
	background: rgba(26, 127, 55, 0.08);
	border: 1px solid rgba(26, 127, 55, 0.25);
	color: #14532d;
}

body.woocommerce-account .woocommerce-info {
	background: #eef4ff;
	border: 1px solid #cfe0fb;
	color: #1e3a8a;
}

body.woocommerce-account .woocommerce-error {
	background: #fdecea;
	border: 1px solid #f3c2bd;
	color: #b3261e;
}

/* Buttons */
body.woocommerce-account .button,
body.woocommerce-account .woocommerce-Button {
	display: inline-block;
	background: var(--ibariki-account-primary);
	color: #fff !important;
	border: 1px solid var(--ibariki-account-primary);
	border-radius: 8px;
	padding: 12px 24px;
	font-weight: 700;
	font-size: 0.95rem;
	line-height: 1.3;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

body.woocommerce-account .button:hover,
body.woocommerce-account .woocommerce-Button:hover {
	background: #fff !important;
	color: var(--ibariki-account-primary) !important;
}

/* Forms — login/register/lost-password/edit-account/edit-address */
body.woocommerce-account form .form-row label {
	display: block;
	margin-bottom: 8px;
	color: var(--ibariki-account-muted);
	font-size: 0.9rem;
	font-weight: 600;
}

body.woocommerce-account form .form-row {
	margin-bottom: 18px;
}

body.woocommerce-account form input.input-text,
body.woocommerce-account form input[type="text"],
body.woocommerce-account form input[type="email"],
body.woocommerce-account form input[type="password"],
body.woocommerce-account form input[type="tel"],
body.woocommerce-account form select,
body.woocommerce-account form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--ibariki-account-border);
	border-radius: 8px;
	font-size: 0.95rem;
	color: var(--ibariki-account-text);
	background: #fff;
	transition: border-color 0.15s ease;
}

body.woocommerce-account form input:focus,
body.woocommerce-account form select:focus,
body.woocommerce-account form textarea:focus {
	outline: none;
	border-color: var(--ibariki-account-primary);
}

body.woocommerce-account .woocommerce-form-login__rememberme {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.9rem;
	color: var(--ibariki-account-muted);
	font-weight: 400;
}

body.woocommerce-account .woocommerce-LostPassword {
	margin-top: 16px;
}

body.woocommerce-account .woocommerce-LostPassword a,
body.woocommerce-account .lost_password a {
	color: var(--ibariki-account-primary);
	font-weight: 600;
}

/* Login / register two-column layout */
body.woocommerce-account .u-columns {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
}

body.woocommerce-account .u-column1,
body.woocommerce-account .u-column2 {
	flex: 1 1 320px;
}

body.woocommerce-account .woocommerce-form-login,
body.woocommerce-account .woocommerce-form-register {
	border: 1px solid var(--ibariki-account-border);
	border-radius: var(--ibariki-account-radius);
	padding: 28px;
	background: var(--ibariki-account-surface);
}

/* Orders table */
body.woocommerce-account table.woocommerce-orders-table,
body.woocommerce-account table.shop_table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

body.woocommerce-account table.woocommerce-orders-table thead th {
	text-align: left;
	padding: 12px 14px;
	background: var(--ibariki-account-surface);
	color: var(--ibariki-account-text);
	font-weight: 700;
	border-bottom: 2px solid var(--ibariki-account-border);
}

body.woocommerce-account table.woocommerce-orders-table td {
	padding: 14px;
	border-bottom: 1px solid var(--ibariki-account-border);
	color: var(--ibariki-account-text);
}

body.woocommerce-account table.woocommerce-orders-table tbody tr:hover {
	background: rgba(26, 127, 55, 0.04);
}

body.woocommerce-account .woocommerce-orders-table__cell-order-actions .button {
	padding: 8px 14px;
	font-size: 0.82rem;
	margin: 2px;
}

body.woocommerce-account .order-status {
	font-weight: 700;
	color: var(--ibariki-account-primary);
}

/* Pagination */
body.woocommerce-account .woocommerce-pagination {
	margin-top: 20px;
}

body.woocommerce-account .woocommerce-pagination a,
body.woocommerce-account .woocommerce-pagination .button {
	margin-right: 6px;
	padding: 8px 14px;
	font-size: 0.85rem;
}

/* Addresses */
body.woocommerce-account .woocommerce-Addresses {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}

body.woocommerce-account .woocommerce-Address {
	flex: 1 1 280px;
	border: 1px solid var(--ibariki-account-border);
	border-radius: var(--ibariki-account-radius);
	padding: 22px;
	background: var(--ibariki-account-surface);
}

body.woocommerce-account .woocommerce-Address-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

body.woocommerce-account .woocommerce-Address-title :is(h2, h3) {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--ibariki-account-text);
}

body.woocommerce-account .woocommerce-Address-title .edit {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--ibariki-account-primary);
}

body.woocommerce-account .woocommerce-Address address {
	font-style: normal;
	color: var(--ibariki-account-muted);
	line-height: 1.7;
}

/* Account details — password fieldset */
body.woocommerce-account fieldset {
	border: 1px solid var(--ibariki-account-border);
	border-radius: var(--ibariki-account-radius);
	padding: 20px;
	margin-top: 8px;
}

body.woocommerce-account fieldset legend {
	padding: 0 8px;
	font-weight: 700;
	color: var(--ibariki-account-text);
}

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

	body.woocommerce-account .woocommerce-MyAccount-navigation {
		width: 100%;
	}

	body.woocommerce-account .woocommerce-MyAccount-content {
		padding: 20px;
	}

	body.woocommerce-account .u-columns {
		flex-direction: column;
	}
}
