/**
 * Brand styling for the TI WooCommerce Wishlist plugin (TemplateInvaders).
 * Loaded only when that plugin is active (see G4L_Storefront::enqueue_assets).
 *
 * The live wishlist renders as table.tinvwl-table-manage-list with the columns
 * product-cb / product-remove / product-thumbnail / product-name / product-price
 * / product-date / product-stock / product-action, a tfoot of bulk actions, and
 * TI modal pop-ups. This sheet gives it a clean, carded, responsive look, hides
 * the pieces we don't want (checkbox + bulk "add to cart" footer, stock + date),
 * and modernises the notices / pop-ups to match the store.
 *
 * Palette: teal #3ec9d6 / #257a9e, ink #1f2d3d, line #eef2f5.
 */

/* ----------------------------------------------------- Add-to-wishlist link */

.tinv-wishlist a.tinvwl_add_to_wishlist_button,
a.tinvwl_add_to_wishlist_button,
.tinvwl-loop .tinvwl_add_to_wishlist_button {
	font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
	font-weight: 600;
	color: #257a9e;
	letter-spacing: normal;
	transition: color .15s ease;
}

.tinvwl_add_to_wishlist_button:hover,
.tinvwl_add_to_wishlist_button:focus {
	color: #1d6480;
}

/* The heart icon (icon font) */
.tinvwl_add_to_wishlist_button .tinvwl-icon,
.tinvwl_add_to_wishlist_button i,
.tinv-wishlist .tinvwl-icon-heart {
	color: #257a9e;
}

/* Already-in-wishlist state reads as a warm "saved" accent */
.tinvwl_add_to_wishlist_button.tinvwl-product-in-list,
.tinvwl_add_to_wishlist_button.tinvwl-product-make-remove,
.tinvwl_add_to_wishlist_button.added {
	color: #c8202f;
}
.tinvwl_add_to_wishlist_button.tinvwl-product-in-list .tinvwl-icon,
.tinvwl_add_to_wishlist_button.added .tinvwl-icon {
	color: #c8202f;
}

/* On the single-product summary, give it a little breathing room under the CTA */
.single-product .tinvwl_add_to_wishlist_button {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: 10px;
}

/* ============================================================ Wishlist page */

.tinv-wishlist {
	font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
	color: #1f2d3d;
}

/* Heading ("Course Wishlist") */
.tinv-wishlist .tinv-header h2,
.tinv-wishlist h2,
.tinv-wishlist .tinvwl-title {
	font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
	color: #1f2d3d;
	font-weight: 700;
	font-size: 1.5rem;
	margin: 0 0 18px;
}

/* ------------------------------------------------- Columns we don't want */

/* #2 bulk "Add selected to cart" + "Add all to cart" footer, and its now-unused
   selection checkbox column. #3 stock status + date added. */
.tinv-wishlist table.tinvwl-table-manage-list tfoot,
.tinv-wishlist table.tinvwl-table-manage-list .product-cb,
.tinv-wishlist table.tinvwl-table-manage-list .product-date,
.tinv-wishlist table.tinvwl-table-manage-list .product-stock {
	display: none !important;
}

/* ---------------------------------------------------------- The table card */

.tinv-wishlist table.tinvwl-table-manage-list {
	width: 100%;
	border: 1px solid #eef2f5;
	border-radius: 16px;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
	margin: 0;
}

.tinv-wishlist table.tinvwl-table-manage-list thead th {
	background: #f6f9fb;
	color: #5b6b7b;
	font-weight: 700;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .04em;
	padding: 14px 16px;
	text-align: left;
	border: none;
	border-bottom: 1px solid #eef2f5;
}

.tinv-wishlist table.tinvwl-table-manage-list tbody td {
	padding: 16px;
	vertical-align: middle;
	border: none;
	border-bottom: 1px solid #f1f5f8;
	background: #fff;
}

.tinv-wishlist table.tinvwl-table-manage-list tbody tr:last-child td {
	border-bottom: none;
}

.tinv-wishlist table.tinvwl-table-manage-list tbody tr.wishlist_item:hover td {
	background: #fafdff;
}

/* Thumbnail */
.tinv-wishlist .product-thumbnail {
	width: 92px;
}
.tinv-wishlist .product-thumbnail img {
	width: 72px;
	height: 72px;
	object-fit: contain;
	border: 1px solid #eef2f5;
	border-radius: 12px;
	background: #f7fafb;
	padding: 6px;
	mix-blend-mode: multiply;
}

/* Name */
.tinv-wishlist .product-name {
	min-width: 220px;
}
.tinv-wishlist .product-name a {
	color: #1f2d3d;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.4;
	text-decoration: none;
}
.tinv-wishlist .product-name a:hover {
	color: #257a9e;
}

/* Price */
.tinv-wishlist .product-price {
	white-space: nowrap;
}
.tinv-wishlist .amount,
.tinv-wishlist .product-price .amount {
	color: #257a9e;
	font-weight: 700;
}
.tinv-wishlist del .amount {
	color: #9aa7b2;
	font-weight: 500;
}

/* Remove (×) button — quiet, turns red on hover */
.tinv-wishlist .product-remove {
	width: 44px;
}
.tinv-wishlist .product-remove button,
.tinv-wishlist .product-remove .button {
	background: #f4f7f9 !important;
	color: #8a99a7 !important;
	border: none !important;
	border-radius: 50% !important;
	width: 30px;
	height: 30px;
	line-height: 30px;
	padding: 0 !important;
	box-shadow: none !important;
	transition: background .15s ease, color .15s ease;
}
.tinv-wishlist .product-remove button:hover,
.tinv-wishlist .product-remove .button:hover {
	background: #fdecec !important;
	color: #c8202f !important;
}

/* Action column */
.tinv-wishlist .product-action {
	text-align: right;
	white-space: nowrap;
}

/* --------------------------------------------------------- Wishlist buttons */

.tinv-wishlist table.tinvwl-table-manage-list .product-action button.button,
.tinv-wishlist table.tinvwl-table-manage-list .product-action .button,
.tinv-wishlist .tinvwl-btn,
.tinv-wishlist button.button,
.tinv-wishlist a.button,
.tinv-wishlist input[type="submit"].button,
.tinvwl-btn.btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: linear-gradient(135deg, #3ec9d6, #257a9e) !important;
	background-color: #257a9e !important;
	color: #fff !important;
	border: none !important;
	border-radius: 999px !important;
	padding: 10px 20px !important;
	font-family: 'Poppins', 'Segoe UI', Arial, sans-serif !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	letter-spacing: normal !important;
	box-shadow: 0 4px 12px rgba(37, 122, 158, .22) !important;
	transition: filter .15s ease, transform .1s ease;
	cursor: pointer;
}

.tinv-wishlist .product-action button.button:hover,
.tinv-wishlist .tinvwl-btn:hover,
.tinv-wishlist button.button:hover,
.tinv-wishlist a.button:hover,
.tinvwl-btn.btn:hover {
	filter: brightness(1.07);
	transform: translateY(-1px);
	color: #fff !important;
}

.tinv-wishlist .product-action button.button .ftinvwl,
.tinv-wishlist .product-action button.button i {
	color: #fff !important;
}

/* Secondary / ghost buttons */
.tinv-wishlist .tinvwl-btn.white,
.tinv-wishlist .tinvwl-btn.ghost {
	background: #fff !important;
	color: #257a9e !important;
	border: 2px solid #257a9e !important;
	box-shadow: none !important;
}

/* ================================================= Notices & pop-ups (modern) */

/* Empty-wishlist banner + any WooCommerce info/message inside the wishlist.
   Replaces the flat navy bar with a soft, branded card. */
.tinv-wishlist .woocommerce-info,
.tinv-wishlist .woocommerce-message,
.woocommerce-account .woocommerce-info.cart-empty,
.tinv-wishlist .cart-empty {
	position: relative;
	background: linear-gradient(135deg, #f0fbfc, #eaf4f8) !important;
	color: #1f2d3d !important;
	border: 1px solid #d4ecf1 !important;
	border-left: 4px solid #3ec9d6 !important;
	border-radius: 14px !important;
	padding: 18px 20px 18px 54px !important;
	font-family: 'Poppins', 'Segoe UI', Arial, sans-serif !important;
	font-weight: 500;
	box-shadow: 0 6px 18px rgba(16, 24, 40, .06) !important;
	list-style: none !important;
}

.tinv-wishlist .woocommerce-info::before,
.tinv-wishlist .woocommerce-message::before,
.woocommerce-account .woocommerce-info.cart-empty::before,
.tinv-wishlist .cart-empty::before {
	content: '♥';
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	width: 26px;
	height: 26px;
	line-height: 26px;
	text-align: center;
	border-radius: 50%;
	background: #3ec9d6;
	color: #fff;
	font-size: 14px;
}

.tinv-wishlist .woocommerce-message::before {
	content: '✓';
}

.tinv-wishlist .woocommerce-info a,
.tinv-wishlist .cart-empty a {
	color: #1d6480 !important;
	font-weight: 600;
}

/* The TI pop-up ("added to wishlist" / "cannot add another to cart") */
.tinv-modal .tinv-modal-inner {
	border-radius: 18px;
	overflow: hidden;
	font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
	box-shadow: 0 24px 70px rgba(16, 24, 40, .28);
	border: none;
}
.tinv-modal .tinv-modal-inner .icon_big_block,
.tinv-modal .tinv-modal-inner [class*="icon_"] {
	color: #257a9e;
}
.tinv-modal .tinv-modal-inner .tinvwl-txt,
.tinv-modal .tinv-modal-inner h2,
.tinv-modal .tinv-modal-inner p {
	font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
	color: #1f2d3d;
}
.tinv-modal.tinv-modal-open .tinv-modal-inner {
	animation: g4l-pop .22s ease;
}
@keyframes g4l-pop {
	from { opacity: 0; transform: translateY(14px) scale(.97); }
	to   { opacity: 1; transform: none; }
}

/* Links inside notices / "Browse wishlist" */
.tinv-wishlist a:not(.button):not(.tinvwl-btn) {
	color: #257a9e;
}
.tinv-wishlist a:not(.button):not(.tinvwl-btn):hover {
	color: #1d6480;
}

/* The "X items added" counter bubble, if shown */
.tinvwl-wishlist-counter,
.tinv-header .tinvwl-amount {
	background: #257a9e;
	color: #fff;
}

/* ============================================================== Responsive */

@media (max-width: 782px) {
	/* Stack each wishlist row into a tidy card (no horizontal scroll). */
	.tinv-wishlist table.tinvwl-table-manage-list,
	.tinv-wishlist table.tinvwl-table-manage-list tbody,
	.tinv-wishlist table.tinvwl-table-manage-list tbody tr.wishlist_item {
		display: block;
		width: 100%;
	}

	.tinv-wishlist table.tinvwl-table-manage-list thead {
		display: none;
	}

	.tinv-wishlist table.tinvwl-table-manage-list {
		border: none;
		box-shadow: none;
		background: transparent;
	}

	.tinv-wishlist table.tinvwl-table-manage-list tbody tr.wishlist_item {
		position: relative;
		border: 1px solid #eef2f5;
		border-radius: 16px;
		background: #fff;
		box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
		padding: 16px 16px 16px 104px;
		margin-bottom: 14px;
		min-height: 104px;
	}

	.tinv-wishlist table.tinvwl-table-manage-list tbody td {
		display: block;
		padding: 2px 0;
		border: none !important;
		background: transparent !important;
	}

	/* Thumbnail pinned top-left of the card */
	.tinv-wishlist table.tinvwl-table-manage-list tbody td.product-thumbnail {
		position: absolute;
		left: 16px;
		top: 16px;
		width: 72px;
		padding: 0;
	}

	.tinv-wishlist .product-name {
		min-width: 0;
		padding-right: 36px !important;
	}
	.tinv-wishlist .product-name a {
		font-size: 15px;
	}

	.tinv-wishlist .product-price {
		margin-top: 2px;
	}

	.tinv-wishlist td.product-action {
		text-align: left;
		margin-top: 12px;
	}
	.tinv-wishlist td.product-action button.button,
	.tinv-wishlist td.product-action .button {
		width: 100%;
		justify-content: center;
	}

	/* Remove (×) pinned top-right */
	.tinv-wishlist table.tinvwl-table-manage-list tbody td.product-remove {
		position: absolute;
		right: 12px;
		top: 14px;
		width: auto;
		padding: 0;
	}
}
