/* Pearstec Wishlist - frontend styles */

.pearstec-wishlist-btn {
	/* Colors, border, background-color, border-radius, font-size and
	   font-weight are set inline per button from the admin settings - this
	   stylesheet only handles layout/sizing so the button never stretches
	   full-width or gets clipped inside a theme's product card. */
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 6px;
	cursor: pointer;
	line-height: 1;
	padding: 0.65em 1.1em;
	width: auto !important;
	max-width: none !important;
	min-width: max-content;
	overflow: visible !important;
	box-sizing: border-box;
	font-family: inherit;
	/* Prevents theme flex/grid containers (align-items: stretch by default)
	   from forcing this button to the full width of its parent. */
	align-self: flex-start !important;
	justify-self: start !important;
	flex-grow: 0 !important;
	flex-shrink: 0 !important;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.pearstec-wishlist-btn:hover {
	opacity: 0.88;
}

.pearstec-wishlist-btn:disabled {
	opacity: 0.5;
	cursor: default;
}

.pearstec-heart-icon {
	flex-shrink: 0;
	transition: transform 0.15s ease;
}

.pearstec-wishlist-btn.in-wishlist .pearstec-heart-icon {
	transform: scale(1.1);
}

/* Heart icon always matches the button's current text color (which is set
   inline), so it automatically stays correct across all shapes/states. */
.pearstec-heart-icon path {
	stroke: currentColor;
	fill: none;
	transition: fill 0.2s ease, stroke 0.2s ease;
}

.pearstec-wishlist-btn.in-wishlist .pearstec-heart-icon path {
	fill: currentColor;
}

.pearstec-wishlist-text {
	line-height: 1;
	white-space: nowrap;
}

.pearstec-context-loop {
	margin: 6px 0 10px;
	overflow: visible !important;
}

.pearstec-context-single {
	margin: 10px 0;
	overflow: visible !important;
}

/* ---------- Inline layout ---------- */
/* Used when "Layout" is set to "Inline" in the settings page: the wishlist
   button gets wrapped (via JS) alongside the Add to Cart / Select options /
   Buy Now button so they sit on the same row instead of stacking. */

.pearstec-inline-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 10px 0;
}

.pearstec-inline-row > * {
	width: auto !important;
	max-width: 100%;
	margin: 0 !important;
	flex: 0 0 auto;
}

.pearstec-inline-form.cart {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.pearstec-inline-form.cart > * {
	margin: 0 !important;
}

/* Wishlist page / shortcode table */

.pearstec-wishlist-wrap {
	overflow-x: auto;
}

.pearstec-wishlist-table {
	width: 100%;
	border-collapse: collapse;
}

.pearstec-wishlist-table th,
.pearstec-wishlist-table td {
	padding: 12px 10px;
	text-align: left;
	border-bottom: 1px solid #e5e5e5;
	vertical-align: middle;
}

.pearstec-wl-img img {
	width: 60px;
	height: auto;
	display: block;
}

.pearstec-wl-name a {
	font-weight: 600;
	text-decoration: none;
}

.pearstec-wl-actions {
	white-space: nowrap;
	text-align: right;
}

.pearstec-wl-remove {
	background: #f2f2f2;
	border: none;
	padding: 8px 12px;
	cursor: pointer;
	border-radius: 3px;
	font-size: 13px;
}

.pearstec-wl-remove:hover {
	background: #e2264d;
	color: #fff;
}

.pearstec-wl-addcart {
	margin-right: 6px;
}

.pearstec-wishlist-empty {
	font-style: italic;
	color: #666;
	padding: 16px 0;
}
