/**
 * My Account: black/white theme styling
 * Scoped to .tbs-myaccount-wrapper and WooCommerce My Account classes.
 */

/* Override WooCommerce layout (woocommerce-layout.css): no float/percentage widths; our .site-shell controls layout */
.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content {
	width: 100%;
	float: none;
}

.tbs-myaccount-wrapper {
	--myaccount-nav-bg: var(--site-bg);
	--myaccount-nav-border: var(--site-border);
	--myaccount-nav-text: var(--site-text);
	--myaccount-nav-active-bg: var(--site-bg-dark);
	--myaccount-nav-active-text: var(--site-text-light);
	--myaccount-content-bg: #ffffff;
	--myaccount-content-text: var(--site-text);
	--myaccount-content-border: var(--site-border);
	--myaccount-link: var(--site-text);
	--myaccount-link-hover: var(--site-bg-dark);
	font-family: var(--font-primary, inherit);
}

/* Navigation list */
.tbs-myaccount-wrapper .tbs-myaccount-nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--myaccount-nav-border);
	border-radius: 4px;
	background: var(--myaccount-nav-bg);
}

.tbs-myaccount-wrapper .tbs-myaccount-nav-item {
	margin: 0;
	border-bottom: 1px solid var(--myaccount-nav-border);
}

.tbs-myaccount-wrapper .tbs-myaccount-nav-item:last-child {
	border-bottom: none;
}

.tbs-myaccount-wrapper .tbs-myaccount-nav-item a {
	display: block;
	padding: 12px 16px;
	color: var(--myaccount-nav-text);
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.tbs-myaccount-wrapper .tbs-myaccount-nav-item a:hover {
	background: var(--myaccount-nav-active-bg);
	color: var(--myaccount-nav-active-text);
}

.tbs-myaccount-wrapper .tbs-myaccount-nav-item.is-active a,
.tbs-myaccount-wrapper .tbs-myaccount-nav-item a[aria-current="page"] {
	background: var(--myaccount-nav-active-bg);
	color: var(--myaccount-nav-active-text);
	font-weight: var(--font-weight-semibold, 600);
}

/* Content area */
.tbs-myaccount-wrapper .woocommerce-MyAccount-content {
	background: var(--myaccount-content-bg);
	color: var(--myaccount-content-text);
	padding: 24px;
	border: 1px solid var(--myaccount-content-border);
	border-radius: 4px;
}

/* Typography */
.tbs-myaccount-wrapper .woocommerce-MyAccount-content h2,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content h3,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .woocommerce-Address-title h3 {
	color: var(--myaccount-content-text);
	font-weight: var(--font-weight-semibold, 600);
	margin: 0 0 1rem;
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-wishlist-account-title {
	margin: 0 0 1rem;
	font-size: var(--text-lg, 1.125rem);
}

/* Inline links (orders table actions, address edit, etc.) — not dashboard cards/buttons */
.tbs-myaccount-wrapper .woocommerce-MyAccount-content a:not(.button):not(.woocommerce-Button):not(.tbs-account-stat__link) {
	color: var(--myaccount-link);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content a:not(.button):not(.woocommerce-Button):not(.tbs-account-stat__link):hover,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content a:not(.button):not(.woocommerce-Button):not(.tbs-account-stat__link):focus {
	color: var(--myaccount-link-hover);
}

/* Primary buttons */
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .button,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content button[type="submit"],
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .woocommerce-Button {
	background: var(--site-bg-dark);
	color: var(--site-text-light);
	border: 1px solid var(--site-bg-dark);
	padding: 10px 20px;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .button:hover,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .button:focus,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content button[type="submit"]:hover,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content button[type="submit"]:focus,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .woocommerce-Button:hover,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .woocommerce-Button:focus {
	background-color: #000000;
	border-color: #000000;
	color: var(--site-text-light);
}

/* Secondary buttons (Clear wishlist) */
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-wishlist-clear-btn {
	background: #ffffff;
	color: var(--site-text);
	border: 1px solid var(--site-bg-dark);
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-wishlist-clear-btn:hover,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-wishlist-clear-btn:focus {
	background-color: #000000;
	border-color: #000000;
	color: var(--site-text-light);
}

/* Forms */
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .form-row label {
	color: var(--myaccount-content-text);
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content input[type="text"],
.tbs-myaccount-wrapper .woocommerce-MyAccount-content input[type="email"],
.tbs-myaccount-wrapper .woocommerce-MyAccount-content input[type="password"],
.tbs-myaccount-wrapper .woocommerce-MyAccount-content select,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content textarea {
	border: 1px solid var(--myaccount-content-border);
	border-radius: 4px;
	color: var(--myaccount-content-text);
	background: #fff;
}

/* Tables (orders, addresses, payment methods) */
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .shop_table {
	border: 1px solid var(--myaccount-content-border);
	border-collapse: collapse;
	width: 100%;
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .shop_table th,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .shop_table td {
	padding: 12px 16px;
	border-bottom: 1px solid var(--myaccount-content-border);
	text-align: left;
	color: var(--myaccount-content-text);
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .shop_table th {
	background: var(--site-bg-dark);
	color: var(--site-text-light);
	font-weight: var(--font-weight-semibold, 600);
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .shop_table th.woocommerce-orders-table__cell-order-number,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .shop_table tbody th[scope="row"] {
	color: var(--site-text-light, #ffffff);
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .shop_table th a:not(.button):not(.woocommerce-Button):not(.tbs-account-stat__link) {
	color: var(--site-text-light, #ffffff);
	text-decoration: none;
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .shop_table th a:not(.button):not(.woocommerce-Button):not(.tbs-account-stat__link):hover,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .shop_table th a:not(.button):not(.woocommerce-Button):not(.tbs-account-stat__link):focus {
	color: var(--site-text-light, #ffffff);
	text-decoration: underline;
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .shop_table tr.mmm-inv-order-shipment-group-header > td[colspan],
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .shop_table tr.mmm-inv-order-shipment-header > td[colspan] {
	width: 100%;
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .shop_table tr:last-child td {
	border-bottom: none;
}

/* Notices – FA icon from woocommerce-fa-icons.css; left padding for icon */
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .woocommerce-message,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .woocommerce-info,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .woocommerce-error {
	border-top: 0;
	border-left: 4px solid var(--site-border);
	padding: 0.75em 1em 0.75em 2.5em;
	margin-bottom: 16px;
	background: #ffffff;
	color: var(--myaccount-content-text);
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .woocommerce-message::before,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .woocommerce-info::before,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .woocommerce-error::before {
	left: 0.75em;
	top: 0.85em;
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .woocommerce-message {
	border-left-color: #46b450;
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .woocommerce-info {
	border-left-color: var(--site-text);
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .woocommerce-info::before {
	color: var(--tbs-wc-subtext);
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .woocommerce-error {
	border-left-color: #dc3232;
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .woocommerce-info .woocommerce-Button,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .woocommerce-message .woocommerce-Button,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .woocommerce-error .woocommerce-Button {
	float: right;
	margin-left: 1em;
}

/* TBS Privacy endpoint */
.tbs-myaccount-wrapper .tbs-am-privacy-section {
	margin-bottom: 2em;
	padding-bottom: 2em;
	border-bottom: 1px solid var(--myaccount-content-border);
}

.tbs-myaccount-wrapper .tbs-am-privacy-section:last-of-type {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.tbs-myaccount-wrapper .tbs-am-privacy-title {
	margin: 0 0 0.5em;
	font-size: var(--text-lg, 1.125rem);
	color: var(--myaccount-content-text);
}

.tbs-myaccount-wrapper .tbs-am-privacy-desc {
	margin: 0 0 1em;
	color: var(--myaccount-content-text);
	opacity: 0.9;
}

.tbs-myaccount-wrapper .tbs-am-privacy-form {
	margin: 0;
}

/* Dashboard overview */
.tbs-myaccount-wrapper .tbs-account-dashboard {
	display: grid;
	gap: 28px;
	margin-top: 8px;
}

.tbs-myaccount-wrapper .tbs-account-dashboard__title {
	margin: 0;
	font-size: var(--text-xl, 1.25rem);
}

.tbs-myaccount-wrapper .tbs-account-dashboard__intro {
	margin: 0 0 4px;
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-dashboard__intro a:not(.button):not(.woocommerce-Button),
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-dashboard a:not(.button):not(.woocommerce-Button) {
	color: var(--myaccount-content-text);
	text-decoration: none;
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-dashboard__intro a:not(.button):not(.woocommerce-Button):hover,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-dashboard__intro a:not(.button):not(.woocommerce-Button):focus,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-dashboard a:not(.button):not(.woocommerce-Button):hover,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-dashboard a:not(.button):not(.woocommerce-Button):focus {
	text-decoration: none;
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-dashboard__intro a:hover,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-dashboard__intro a:focus {
	color: var(--myaccount-link-hover);
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-dashboard__empty a:hover,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-dashboard__empty a:focus,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-recent-order__row dd a:hover,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-recent-order__row dd a:focus,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-dashboard__text-link:hover,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-dashboard__text-link:focus {
	color: var(--myaccount-link-hover);
}

.tbs-myaccount-wrapper .tbs-account-dashboard__stats {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.tbs-myaccount-wrapper .tbs-account-stat {
	margin: 0;
}

.tbs-myaccount-wrapper .tbs-account-stat__link {
	background: var(--site-bg, #f5f5f5);
	border: 1px solid var(--myaccount-content-border);
	border-radius: 4px;
	color: var(--myaccount-content-text);
	display: flex;
	flex-direction: column;
	gap: 6px;
	height: 100%;
	padding: 16px;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-stat__link:hover,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-stat__link:focus {
	background: #ffffff;
	border-color: var(--site-bg-dark);
	box-shadow: 0 0 0 1px var(--site-bg-dark);
	color: var(--myaccount-content-text);
	text-decoration: none;
}

.tbs-myaccount-wrapper .tbs-account-stat__label {
	color: var(--tbs-wc-subtext, #767676);
	font-size: var(--text-sm, 0.875rem);
	font-weight: var(--font-weight-semibold, 600);
}

.tbs-myaccount-wrapper .tbs-account-stat__value {
	font-size: var(--text-2xl, 1.5rem);
	font-weight: var(--font-weight-bold, 700);
	line-height: 1.2;
}

.tbs-myaccount-wrapper .tbs-account-stat__note {
	color: var(--tbs-wc-subtext, #767676);
	font-size: var(--text-xs, 0.75rem);
}

.tbs-myaccount-wrapper .tbs-account-dashboard__section-title {
	font-size: var(--text-lg, 1.125rem);
	margin: 0 0 12px;
}

.tbs-myaccount-wrapper .tbs-account-dashboard__empty {
	margin: 0;
}

.tbs-myaccount-wrapper .tbs-account-recent-order {
	border: 1px solid var(--myaccount-content-border);
	border-radius: 4px;
	padding: 16px;
}

.tbs-myaccount-wrapper .tbs-account-recent-order__details {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	margin: 0;
}

.tbs-myaccount-wrapper .tbs-account-recent-order__row {
	margin: 0;
}

.tbs-myaccount-wrapper .tbs-account-recent-order__row dt {
	color: var(--tbs-wc-subtext, #767676);
	font-size: var(--text-sm, 0.875rem);
	font-weight: var(--font-weight-semibold, 600);
	margin: 0 0 4px;
}

.tbs-myaccount-wrapper .tbs-account-recent-order__row dd {
	margin: 0;
}

.tbs-myaccount-wrapper .tbs-account-order-status {
	display: inline-block;
	font-weight: var(--font-weight-semibold, 600);
}

.tbs-myaccount-wrapper .tbs-account-recent-order__actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	margin: 16px 0 0;
}

.tbs-myaccount-wrapper .tbs-account-dashboard__text-link {
	font-weight: var(--font-weight-semibold, 600);
	text-decoration: none;
}

.tbs-myaccount-wrapper .tbs-account-dashboard__link-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 16px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tbs-myaccount-wrapper .tbs-account-dashboard__link-list a {
	background: #ffffff;
	border: 1px solid var(--site-bg-dark);
	border-radius: 4px;
	color: var(--site-text);
	display: inline-block;
	font-weight: var(--font-weight-semibold, 600);
	padding: 8px 14px;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-dashboard__link-list a:hover,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-dashboard__link-list a:focus {
	background: var(--site-bg, #f5f5f5);
	border-color: var(--site-bg-dark);
	color: var(--site-text);
	text-decoration: none;
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-recent-order__actions .button {
	color: var(--site-text-light);
}

.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-recent-order__actions .button:hover,
.tbs-myaccount-wrapper .woocommerce-MyAccount-content .tbs-account-recent-order__actions .button:focus {
	background-color: #000000;
	border-color: #000000;
	color: var(--site-text-light);
	text-decoration: none;
}

/* Responsive: stack nav above content on small screens (theme already does .site-shell column) */
@media (max-width: 1024px) {
	.tbs-myaccount-wrapper .site-left-nav {
		order: 1;
	}

	.tbs-myaccount-wrapper .site-main {
		order: 2;
	}
}
