/*
 * TrueHugz My Account.
 *
 * Brand tokens taken from the live theme's Creative Elements globals:
 *   primary #F17100 · accent #1EB0C2 · accent-dark #058696 · tint #E9F6F8
 *   headings "Salsa" · body "Poppins"
 */

.woocommerce-account .woocommerce {
	--thma-primary: #f17100;
	--thma-accent: #1eb0c2;
	--thma-accent-dark: #058696;
	--thma-tint: #e9f6f8;
	--thma-warn: #fdf3e7;
	--thma-danger: #c0392b;
	--thma-text: #333;
	--thma-muted: #777;
	--thma-border: #e3e3e3;
	--thma-radius: 4px;

	color: var(--thma-text);
	font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* ---- Two-column shell ----
 *
 * Flex rather than floats with percentage widths: a percentage column is
 * whatever the theme's container happens to be, and at OceanWP's content width
 * 28% left too little room once an icon was added, so labels wrapped four lines
 * deep and were clipped. A fixed basis is predictable, and min-width:0 on the
 * content column stops long tables forcing an overflow.
 */

.woocommerce-account .woocommerce {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0 32px;
}

/* Notices must span the row, not sit in the column gap. */
.woocommerce-account .woocommerce > .woocommerce-notices-wrapper {
	flex: 1 0 100%;
}

.woocommerce-account .woocommerce-MyAccount-navigation {
	flex: 0 0 260px;
	max-width: 100%;
	float: none;
	width: auto;
	margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-content {
	flex: 1 1 0;
	min-width: 0;
	float: none;
	width: auto;
}

/* ---- Navigation ----
 *
 * OceanWP styles this list at `.woocommerce-MyAccount-navigation ul li a`
 * (0,1,3) with `padding:12px 0`, and paints its own simple-line-icon in
 * `a:before` (0,1,4) floated right. Both outrank a shorter selector, which is
 * why the text sat flush against the border and no icon appeared. Every rule
 * below is scoped through `.woocommerce-account` to outweigh them, and the
 * theme's ::before is explicitly reset rather than merely overridden.
 */

.woocommerce-account .woocommerce-MyAccount-navigation ul {
	margin: 0;
	padding: 0;
	list-style: none;
	background: #fff;
	border: 1px solid var(--thma-border);
	border-radius: var(--thma-radius);
	overflow: hidden;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
	margin: 0;
	padding: 0;
	list-style: none;
	border: 0;
	position: relative;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li + li {
	border-top: 1px solid var(--thma-border);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
	display: block;
	position: relative;
	padding: 14px 16px 14px 48px;
	color: var(--thma-text);
	font-size: 16px;
	line-height: 1.35;
	text-decoration: none;
	overflow-wrap: break-word;
	transition: background-color .15s ease, color .15s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
	background: var(--thma-tint);
	color: var(--thma-accent-dark);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
	background: var(--thma-tint);
	color: var(--thma-accent-dark);
	font-weight: 600;
	box-shadow: inset 3px 0 0 var(--thma-accent);
}

/* Reset the theme's floated icon before drawing our own. */
.woocommerce-account .woocommerce-MyAccount-navigation ul li a::before {
	float: none;
	position: static;
	margin: 0;
	width: auto;
	text-align: left;
	line-height: 1;
	opacity: 1;
	color: inherit;
	content: none;
	transition: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.thma-nav-item a::before {
	position: absolute;
	top: 14px;
	left: 16px;
	width: 20px;
	font-family: dashicons;
	font-size: 20px;
	text-align: center;
	speak: never;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.thma-icon-dashboard a::before         { content: "\f226"; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li.thma-icon-admin-users a::before       { content: "\f110"; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li.thma-icon-location a::before          { content: "\f230"; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li.thma-icon-calendar-alt a::before      { content: "\f508"; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li.thma-icon-media-spreadsheet a::before { content: "\f495"; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li.thma-icon-tag a::before               { content: "\f323"; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li.thma-icon-media-text a::before        { content: "\f491"; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li.thma-icon-trash a::before             { content: "\f182"; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li.thma-icon-admin-comments a::before    { content: "\f101"; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li.thma-icon-awards a::before            { content: "\f313"; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li.thma-icon-heart a::before             { content: "\f487"; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li.thma-icon-exit a::before              { content: "\f14c"; }

/* ---- Content ---- */

.woocommerce-MyAccount-content h2,
.woocommerce-MyAccount-content h3 {
	font-family: "Poppins", sans-serif;
	color: var(--thma-text);
}

.woocommerce-MyAccount-content > h2:first-child {
	margin-top: 0;
	font-size: 22px;
	font-weight: 700;
}

.thma-empty,
.thma-note {
	color: var(--thma-muted);
	font-size: 15px;
}

.thma-table {
	width: 100%;
	margin: 0 0 20px;
	border-collapse: collapse;
	font-size: 15px;
	background: #fff;
}

.thma-table th,
.thma-table td {
	padding: 12px 14px;
	text-align: left;
	border-bottom: 1px solid var(--thma-border);
}

.thma-table th {
	font-weight: 700;
	background: #fafafa;
}

.thma-table a { color: var(--thma-accent-dark); }

.thma-table code {
	padding: 2px 7px;
	background: var(--thma-tint);
	border-radius: 3px;
	font-size: 14px;
	letter-spacing: .5px;
}

.thma-card {
	margin: 0 0 20px;
	padding: 18px 20px;
	background: var(--thma-tint);
	border-radius: var(--thma-radius);
}

.thma-card--warn { background: var(--thma-warn); }

.thma-card h3 {
	margin: 0 0 10px;
	font-size: 16px;
	font-weight: 700;
}

.thma-list {
	margin: 0;
	padding-left: 20px;
	font-size: 15px;
	line-height: 1.7;
}

.thma-form { margin: 0 0 20px; }

.thma-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 15px;
	cursor: pointer;
}

.thma-checkbox input[type="checkbox"] {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin: 4px 0 0;
	accent-color: var(--thma-accent);
}

.woocommerce-MyAccount-content .thma-btn {
	display: inline-flex;
	align-items: center;
	padding: 11px 22px;
	background: var(--thma-accent);
	border: 2px solid var(--thma-accent);
	border-radius: var(--thma-radius);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease;
}

.woocommerce-MyAccount-content .thma-btn:hover {
	background: var(--thma-accent-dark);
	border-color: var(--thma-accent-dark);
	color: #fff;
}

.woocommerce-MyAccount-content .thma-btn--danger {
	background: var(--thma-danger);
	border-color: var(--thma-danger);
}

.woocommerce-MyAccount-content .thma-btn--danger:hover {
	background: #a5301f;
	border-color: #a5301f;
}

/* Bring WooCommerce's own account buttons into the palette. */
.woocommerce-MyAccount-content .woocommerce-Button,
.woocommerce-MyAccount-content button.button,
.woocommerce-MyAccount-content a.button {
	background: var(--thma-accent);
	border-radius: var(--thma-radius);
	color: #fff;
	font-weight: 600;
}

.woocommerce-MyAccount-content .woocommerce-Button:hover,
.woocommerce-MyAccount-content button.button:hover,
.woocommerce-MyAccount-content a.button:hover {
	background: var(--thma-accent-dark);
	color: #fff;
}

/* ---- Reviews ---- */

.thma-reviews {
	margin: 0;
	padding: 0;
	list-style: none;
}

.thma-review {
	padding: 16px 0;
	border-bottom: 1px solid var(--thma-border);
}

.thma-review h3 { margin: 0 0 4px; font-size: 16px; }
.thma-review h3 a { color: var(--thma-text); text-decoration: none; }
.thma-review h3 a:hover { color: var(--thma-primary); }

.thma-rating { margin: 0 0 4px; color: #f9b50b; font-size: 16px; letter-spacing: 2px; }
.thma-review-date { margin: 0 0 8px; color: var(--thma-muted); font-size: 13px; }
.thma-review-body { font-size: 15px; }
.thma-review-body p { margin: 0 0 8px; }

/* ---- Bare account screens ---- */

body.thma-bare .page-header,
body.thma-bare .site-breadcrumbs,
body.thma-bare #footer-bottom {
	display: none;
}

body.thma-bare #content-wrap,
body.thma-bare .content-area {
	padding-top: 40px;
	padding-bottom: 56px;
}

/* ---- Responsive ---- */

@media (max-width: 900px) {
	.woocommerce-account .woocommerce-MyAccount-navigation,
	.woocommerce-account .woocommerce-MyAccount-content {
		flex: 1 0 100%;
		max-width: 100%;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation {
		margin-bottom: 28px;
	}
}

@media (max-width: 600px) {
	body.thma-bare #content-wrap,
	body.thma-bare .content-area {
		padding-top: 24px;
		padding-bottom: 32px;
	}

	.thma-table,
	.thma-table thead,
	.thma-table tbody,
	.thma-table th,
	.thma-table td,
	.thma-table tr {
		display: block;
	}

	.thma-table thead { display: none; }

	.thma-table tr {
		margin-bottom: 14px;
		border: 1px solid var(--thma-border);
		border-radius: var(--thma-radius);
	}

	.thma-table td {
		border: 0;
		border-bottom: 1px solid #f0f0f0;
		padding: 10px 14px;
	}

	.thma-table td:last-child { border-bottom: 0; }
}
