/**
 * Wishlist — YITH WooCommerce Wishlist ([yith_wcwl_wishlist]).
 *
 * Classic table markup, so this styles YITH's own class names. The plugin's
 * icons (heart glyph, remove ×) are left exactly as configured in
 * inc/yith-wishlist.php — only colour and size are set here.
 *
 * Builds on wc-page.css, which already frames `table.shop_table`.
 */

.wc-page--wishlist .yith-wcwl-form {
	width: 100%;
}

/*
 * YITH prints its own <h2>My wishlist</h2> above the table, which repeats the
 * banner heading verbatim. Safe to drop: the free plugin cannot rename a
 * wishlist (`can_user_edit_title: false`), so this string is always the
 * default, and the banner is the page's real <h1>.
 */
.wc-page--wishlist .wishlist-title-container {
	display: none;
}

/* --------------------------------------------------------------- table --- */

.wc-page--wishlist .wishlist_table {
	table-layout: auto;
}

.wc-page--wishlist .wishlist_table th {
	white-space: nowrap;
}

.wc-page--wishlist .wishlist_table td.product-thumbnail {
	width: calc(var(--wc-thumb-size) + 36px);
}

.wc-page--wishlist .wishlist_table td.product-thumbnail img {
	display: block;
	width: var(--wc-thumb-size);
	height: auto;
	border-radius: var(--radius-category-card);
	background: var(--color-bg-product-image);
}

.wc-page--wishlist .wishlist_table td.product-name a {
	font-family: var(--font-body);
	font-size: 15px;
	font-weight: 500;
	line-height: 24px;
	color: var(--color-product-name);
	text-decoration: none;
}

.wc-page--wishlist .wishlist_table td.product-name a:hover {
	color: var(--color-accent);
}

.wc-page--wishlist .wishlist_table td.product-price {
	font-weight: 600;
	color: var(--color-product-price);
}

.wc-page--wishlist .wishlist_table td.product-price del {
	font-weight: 400;
	color: var(--color-wc-muted);
}

/* ------------------------------------------------------- stock + dates --- */

.wc-page--wishlist .wishlist-in-stock {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	color: var(--color-wc-success);
}

/* The same dot the PDP uses for "In Stock". */
.wc-page--wishlist .wishlist-in-stock::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
}

.wc-page--wishlist .wishlist-out-of-stock {
	font-size: 14px;
	color: var(--color-wc-danger);
}

.wc-page--wishlist .dateadded {
	display: block;
	font-size: 13px;
	line-height: 20px;
	color: var(--color-wc-muted);
}

/* -------------------------------------------------------------- remove --- */

/* YITH's own × glyph, recoloured only. */
.wc-page--wishlist .wishlist_table td.product-remove a.remove_from_wishlist {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: transparent;
	font-size: 18px;
	line-height: 1;
	color: var(--color-icon-muted);
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.wc-page--wishlist .wishlist_table td.product-remove a.remove_from_wishlist:hover {
	background: var(--color-bg-cream-2);
	color: var(--color-wc-danger);
}

/* -------------------------------------------------------- add to cart --- */

.wc-page--wishlist .wishlist_table td.product-add-to-cart {
	text-align: right;
	white-space: nowrap;
}

/*
 * Styled by cell rather than by class. YITH renders this action through
 * WooCommerce's loop add-to-cart link, which arrives as
 * `product_type_variable add_to_cart_button add_to_cart alt` — with no
 * `.button` class at all, so the shared button rule in wc-page.css never
 * matches it and it falls back to looking like a plain gold link. Targeting
 * the cell's anchor covers every product type ("Add to cart", "Select
 * options", "Read more") whatever classes YITH puts on it.
 */
.wc-page--wishlist .wishlist_table td.product-add-to-cart > a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 8px 20px;
	box-sizing: border-box;
	background: var(--color-accent);
	border: 1px solid var(--color-accent);
	border-radius: var(--wc-btn-radius);
	font-family: var(--font-body);
	font-size: 13px;
	font-weight: var(--button-text-weight);
	line-height: 20px;
	letter-spacing: var(--button-letter-spacing);
	text-transform: uppercase;
	text-decoration: none;
	color: var(--color-white);
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.wc-page--wishlist .wishlist_table td.product-add-to-cart > a:hover,
.wc-page--wishlist .wishlist_table td.product-add-to-cart > a:focus-visible {
	background: var(--color-accent-hover);
	border-color: var(--color-accent-hover);
	color: var(--color-white);
	text-decoration: none;
	outline: none;
}

/* Post-add "Browse wishlist"/"View cart" links WooCommerce appends inline. */
.wc-page--wishlist .wishlist_table td.product-add-to-cart > a.added_to_cart {
	background: transparent;
	border-color: var(--color-accent);
	color: var(--color-accent);
	margin-left: 8px;
}

/* --------------------------------------------------------------- empty --- */

.wc-page--wishlist .wishlist-empty {
	margin: 0;
	padding: 48px var(--wc-panel-pad);
	text-align: center;
	background: var(--color-white);
	border: 1px solid var(--color-border-card);
	border-radius: var(--wc-panel-radius);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 28px;
	color: var(--color-wc-muted);
}

/* Return-to-shop lives directly under the empty state. */
.wc-page--wishlist .wishlist-empty + .yith-wcwl-share,
.wc-page--wishlist .hidden-title-form + .wishlist-empty {
	margin-top: var(--wc-panel-gap);
}

/* --------------------------------------------------------------- share --- */

.wc-page--wishlist .yith-wcwl-share {
	margin-top: var(--wc-panel-gap);
	padding-top: var(--wc-panel-gap);
	border-top: 1px solid var(--color-border-light);
}

.wc-page--wishlist .yith-wcwl-share h4.yith-wcwl-share-title {
	margin: 0 0 12px;
	font-family: var(--font-heading);
	font-size: 18px;
	font-weight: 400;
	color: var(--color-heading);
}

.wc-page--wishlist .yith-wcwl-share ul {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---------------------------------------------------------- responsive --- */

/*
 * YITH ships a `.responsive` mode that reflows the table into stacked cards
 * below 768px using its own generated labels. Left in place — this only tidies
 * the spacing it produces.
 */
@media (max-width: 768px) {
	.wc-page--wishlist .wishlist_table.responsive td {
		padding: 12px 14px;
	}

	.wc-page--wishlist .wishlist_table td.product-add-to-cart,
	.wc-page--wishlist .wishlist_table td.product-add-to-cart .button {
		width: 100%;
		text-align: center;
	}
}
