/**
 * TSKLuxe Features Styles
 *
 * Styles for:
 * - Cart upsells (19.3)
 * - Sticky add-to-cart bar (21.2)
 * - Product badges: SALE, NEW, BESTSELLER (22.2)
 * - Trust badges (23.1)
 * - Announcement bar (23.2)
 * - Exit-intent popup (23.3)
 * - Delivery estimates (28.2)
 * - Usage guide tab (28.3)
 * - Header account link (25.1)
 *
 * @package TSKLuxe
 */

/* =========================================================================
   Cart Upsells (19.3)
   ========================================================================= */

.tskluxe-cart-upsells {
	margin: 2rem 0;
	padding: 1.5rem;
	background: #fdf2f5;
	border-radius: 8px;
}

.tskluxe-cart-upsells h3 {
	margin: 0 0 1rem;
	font-size: 1.2rem;
	color: #F178AE;
}

.tskluxe-cart-upsells__list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 1rem;
}

.tskluxe-cart-upsells__item {
	background: #fff;
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow 0.2s;
}

.tskluxe-cart-upsells__item:hover {
	box-shadow: 0 2px 12px rgba(241, 120, 174, 0.15);
}

.tskluxe-cart-upsells__link {
	display: block;
	text-decoration: none;
	padding: 0.75rem;
	text-align: center;
}

.tskluxe-cart-upsells__link img {
	width: 100%;
	height: auto;
	border-radius: 4px;
	margin-bottom: 0.5rem;
}

.tskluxe-cart-upsells__name {
	display: block;
	font-size: 0.9rem;
	color: #333;
	margin-bottom: 0.25rem;
}

.tskluxe-cart-upsells__price {
	display: block;
	font-weight: 700;
	color: #F178AE;
	font-size: 0.95rem;
}

/* =========================================================================
   Sticky Add-to-Cart Bar (21.2)
   ========================================================================= */

.tskluxe-sticky-cart {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	background: #fff;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(100%);
	transition: transform 0.3s ease;
	padding: 0.75rem 1rem;
}

.tskluxe-sticky-cart--visible {
	transform: translateY(0);
}

.tskluxe-sticky-cart__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1200px;
	margin: 0 auto;
	gap: 1rem;
}

.tskluxe-sticky-cart__product {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex: 1;
	min-width: 0;
}

.tskluxe-sticky-cart__name {
	font-weight: 600;
	font-size: 0.95rem;
	color: #333;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tskluxe-sticky-cart__price {
	font-weight: 700;
	color: #F178AE;
	white-space: nowrap;
}

.tskluxe-sticky-cart__btn {
	white-space: nowrap;
	padding: 0.6rem 1.5rem;
	font-size: 0.9rem;
}

/* Mobile adjustments for sticky bar */
@media (max-width: 600px) {
	.tskluxe-sticky-cart__inner {
		flex-direction: column;
		gap: 0.5rem;
	}

	.tskluxe-sticky-cart__product {
		width: 100%;
		justify-content: center;
		text-align: center;
	}

	.tskluxe-sticky-cart__action {
		width: 100%;
	}

	.tskluxe-sticky-cart__btn {
		width: 100%;
		text-align: center;
	}
}

/* =========================================================================
   Product Badges (22.2)
   ========================================================================= */

.tskluxe-badges {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 10;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.tskluxe-badge {
	display: inline-block;
	padding: 4px 10px;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-radius: 3px;
	line-height: 1.3;
}

.tskluxe-badge--sale {
	background: #F178AE;
	color: #fff;
}

.tskluxe-badge--new {
	background: #fff;
	color: #F178AE;
	border: 1.5px solid #F178AE;
}

.tskluxe-badge--bestseller {
	background: #FFD700;
	color: #333;
}

/* Ensure product loop items have relative positioning for badge placement */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	position: relative;
}

.woocommerce div.product {
	position: relative;
}

/* =========================================================================
   Trust Badges (23.1)
   ========================================================================= */

.tskluxe-trust-badges {
	margin: 1.5rem 0;
	padding: 1.25rem;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	text-align: center;
}

.tskluxe-trust-badges__icons {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.tskluxe-trust-badges__icon {
	display: inline-flex;
}

.tskluxe-trust-badges__messages {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem 1.5rem;
	font-size: 0.85rem;
	color: #374151;
}

.tskluxe-trust-badges__messages li {
	white-space: nowrap;
}

/* =========================================================================
   Announcement Bar (23.2)
   ========================================================================= */

.tskluxe-announcement-bar {
	width: 100%;
	text-align: center;
	font-size: 0.9rem;
	font-weight: 500;
	line-height: 1.4;
}

.tskluxe-announcement-bar,
.tskluxe-announcement-bar span,
.tskluxe-announcement-bar a,
.tskluxe-announcement-bar button {
	color: #FFFFFF !important;
}

.tskluxe-announcement-bar__inner {
	display: flex;
	align-items: center;
	padding: 0.6rem 2.5rem 0.6rem 0;
	position: relative;
	margin: 0 auto;
	overflow: hidden;
}

/* Scrolling marquee (Monday-style). */
.tskluxe-announcement-bar__marquee {
	flex: 1;
	overflow: hidden;
}

.tskluxe-announcement-bar__track {
	display: inline-flex;
	white-space: nowrap;
	will-change: transform;
	animation: tskluxe-announcement-scroll 22s linear infinite;
}

.tskluxe-announcement-bar__marquee:hover .tskluxe-announcement-bar__track {
	animation-play-state: paused;
}

.tskluxe-announcement-bar__item {
	display: inline-flex;
	align-items: center;
	padding: 0 1.75rem;
}

/* A dot separator after each message. */
.tskluxe-announcement-bar__item::after {
	content: "•";
	margin-left: 3.5rem;
	opacity: 0.55;
}

/* Move the track by half its width; markup duplicates the run so it loops. */
@keyframes tskluxe-announcement-scroll {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

/* Note: the marquee scrolls consistently on all devices. We intentionally do
   not disable it under prefers-reduced-motion because it is a gentle,
   non-flashing, purely decorative brand ticker; disabling it caused
   inconsistent behaviour between devices. */

.tskluxe-announcement-bar__link {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.tskluxe-announcement-bar__link:hover {
	opacity: 0.85;
}

.tskluxe-announcement-bar__close {
	position: absolute;
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: inherit;
	font-size: 1.3rem;
	cursor: pointer;
	padding: 0.25rem 0.5rem;
	line-height: 1;
	opacity: 0.8;
}

.tskluxe-announcement-bar__close:hover {
	opacity: 1;
}

/* =========================================================================
   Exit-Intent Popup (23.3)
   ========================================================================= */

.tskluxe-exit-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s, visibility 0.3s;
}

.tskluxe-exit-popup--visible {
	opacity: 1;
	visibility: visible;
}

.tskluxe-exit-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
}

.tskluxe-exit-popup__content {
	position: relative;
	background: #fff;
	border-radius: 12px;
	padding: 2.5rem 2rem;
	max-width: 420px;
	width: 90%;
	text-align: center;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	animation: tskluxe-popup-in 0.3s ease;
}

@keyframes tskluxe-popup-in {
	from {
		transform: scale(0.9) translateY(20px);
		opacity: 0;
	}
	to {
		transform: scale(1) translateY(0);
		opacity: 1;
	}
}

.tskluxe-exit-popup__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	background: none;
	border: none;
	font-size: 1.5rem;
	color: #666;
	cursor: pointer;
	padding: 0.25rem 0.5rem;
	line-height: 1;
}

.tskluxe-exit-popup__close:hover {
	color: #F178AE;
}

.tskluxe-exit-popup__heading {
	font-size: 1.5rem;
	color: #F178AE;
	margin: 0 0 0.75rem;
}

.tskluxe-exit-popup__message {
	font-size: 1rem;
	color: #555;
	margin: 0 0 1.25rem;
}

.tskluxe-exit-popup__code-box {
	background: #fdf2f5;
	border: 2px dashed #F178AE;
	border-radius: 6px;
	padding: 0.75rem;
	margin-bottom: 1.25rem;
}

.tskluxe-exit-popup__code-label {
	display: block;
	font-size: 0.8rem;
	color: #888;
	margin-bottom: 0.25rem;
}

.tskluxe-exit-popup__code {
	font-size: 1.3rem;
	color: #F178AE;
	letter-spacing: 2px;
}

.tskluxe-exit-popup__form {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
}

.tskluxe-exit-popup__input {
	flex: 1;
	padding: 0.6rem 0.75rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 0.9rem;
}

.tskluxe-exit-popup__input:focus {
	border-color: #F178AE;
	outline: none;
	box-shadow: 0 0 0 2px rgba(241, 120, 174, 0.2);
}

.tskluxe-exit-popup__submit {
	white-space: nowrap;
	padding: 0.6rem 1.25rem;
	font-size: 0.9rem;
}

.tskluxe-exit-popup__disclaimer {
	font-size: 0.75rem;
	color: #999;
	margin: 0;
}

/* Mobile popup adjustments */
@media (max-width: 480px) {
	.tskluxe-exit-popup__content {
		padding: 2rem 1.5rem;
	}

	.tskluxe-exit-popup__form {
		flex-direction: column;
	}

	.tskluxe-exit-popup__heading {
		font-size: 1.25rem;
	}
}

/* =========================================================================
   Delivery Estimates (28.2)
   ========================================================================= */

.tskluxe-delivery-estimates {
	margin: 1.5rem 0;
	padding: 1rem 1.25rem;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 6px;
	font-size: 0.9rem;
}

.tskluxe-delivery-estimates__title {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	color: #166534;
}

.tskluxe-delivery-estimates__list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.tskluxe-delivery-estimates__list li {
	padding: 0.25rem 0;
	color: #374151;
}

.tskluxe-checkout-delivery-note {
	margin: 0.5rem 0 0;
	color: #6b7280;
}

/* =========================================================================
   Usage Guide Tab (28.3)
   ========================================================================= */

.tskluxe-usage-guide {
	line-height: 1.7;
}

.tskluxe-usage-guide h2 {
	font-size: 1.3rem;
	margin-bottom: 1rem;
	color: #F178AE;
}

.tskluxe-usage-guide ol,
.tskluxe-usage-guide ul {
	padding-left: 1.5rem;
}

.tskluxe-usage-guide li {
	margin-bottom: 0.5rem;
}

/* =========================================================================
   Header Account Link (25.1)
   ========================================================================= */

.tskluxe-header-account {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.85rem;
	text-decoration: none;
	color: #F178AE;
	padding: 0.25rem 0.5rem;
}

.tskluxe-header-account:hover {
	color: #E85A96;
}

@media (max-width: 768px) {
	.tskluxe-header-account__text {
		display: none;
	}
}

/* =========================================================================
   Recently Viewed Products (19.4)
   ========================================================================= */

.woocommerce .woocommerce-recently-viewed-products {
	margin-top: 2rem;
}
