/**
 * Frontend Bundle Display Styles
 *
 * @package WooBundles
 * @since 1.0.0
 */

/* ==========================================================================
   Bundle Wrapper
   ========================================================================== */

.nb-bundle-wrapper {
	margin: 20px 0;
	width: 100%;
	box-sizing: border-box;
}

.nb-bundle-block-title {
	font-family: 'Inter', sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 24px;
	color: #000;
	margin-bottom: 16px;
	padding: 12px 16px;
	background: #fff;
	border: 1px solid #ebebeb;
	border-radius: 6px;
}

.nb-bundle-container {
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
}

/* ==========================================================================
   Bundle Offer
   ========================================================================== */

.nb-bundle-offer {
	position: relative;
	background: #fff;
	border: 1px solid #dcdcdc;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
	box-sizing: border-box;
}

.nb-bundle-offer:hover {
	border-color: #000;
}

.nb-bundle-offer.selected {
	border-color: #000;
	border-width: 2px;
}

.nb-bundle-offer-content {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px;
	position: relative;
}

/* ==========================================================================
   Radio Button
   ========================================================================== */

.nb-bundle-radio {
	flex-shrink: 0;
}

.nb-bundle-radio input[type="radio"] {
	appearance: none;
	width: 20px;
	height: 20px;
	border: 2px solid #dcdcdc;
	border-radius: 50%;
	cursor: pointer;
	position: relative;
	background: #fff;
	transition: all 0.2s ease;
}

.nb-bundle-radio input[type="radio"]:checked {
	border-color: #000;
}

.nb-bundle-radio input[type="radio"]:checked::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 10px;
	height: 10px;
	background: #000;
	border-radius: 50%;
}

.nb-bundle-radio label {
	display: none;
}

/* ==========================================================================
   Image
   ========================================================================== */

.nb-bundle-image {
	flex-shrink: 0;
	width: 60px;
	height: 60px;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid #ebebeb;
}

.nb-bundle-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ==========================================================================
   Info
   ========================================================================== */

.nb-bundle-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
	min-width: 0;
}

.nb-bundle-label {
	font-family: 'Inter', sans-serif;
	font-size: 10px;
	font-weight: 600;
	line-height: 16px;
	color: #fff;
	background: #000;
	padding: 2px 6px;
	border-radius: 3px;
	width: fit-content;
}

.nb-bundle-title {
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	color: #000;
}

.nb-bundle-subtitle {
	font-family: 'Inter', sans-serif;
	font-size: 12px;
	font-weight: 400;
	line-height: 18px;
	color: #666;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ==========================================================================
   Prices
   ========================================================================== */

.nb-bundle-prices {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 4px;
}

.nb-bundle-price-row {
	display: flex;
	flex-direction: row;
	align-items: baseline;
	gap: 4px;
}

.nb-bundle-price-current {
	font-family: 'Inter', sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 24px;
	color: #000;
}

.nb-bundle-price-label {
	font-family: 'Inter', sans-serif;
	font-size: 12px;
	font-weight: 400;
	line-height: 16px;
	color: #666;
}

.nb-bundle-price-original {
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
	color: #999;
	text-decoration: line-through;
}

.nb-bundle-price-original-small {
	font-family: 'Inter', sans-serif;
	font-size: 12px;
	font-weight: 400;
	line-height: 16px;
	color: #999;
	text-decoration: line-through;
}

/* ==========================================================================
   Badge
   ========================================================================== */

.nb-bundle-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	background: #000;
	color: #fff;
	padding: 4px 8px;
	border-radius: 3px;
	font-family: 'Inter', sans-serif;
	font-size: 10px;
	font-weight: 600;
	line-height: 16px;
	z-index: 1;
}

.nb-bundle-badge img {
	display: block;
	max-width: 60px;
	max-height: 30px;
	object-fit: contain;
}

/* ==========================================================================
   Free Gift
   ========================================================================== */

.nb-bundle-free-gift {
	background: #e1e1e1;
	color: #000;
	padding: 8px 16px;
	border-radius: 0 0 6px 6px;
	margin: -16px -16px 0 -16px;
	margin-top: 0;
	font-family: 'Inter', sans-serif;
	font-size: 12px;
	font-weight: 500;
	line-height: 18px;
	text-align: center;
}

.nb-bundle-offer.selected .nb-bundle-free-gift {
	margin-bottom: -2px;
	border-radius: 0 0 4px 4px;
}

/* ==========================================================================
   Layout: Horizontal
   ========================================================================== */

.nb-bundle-layout-horizontal .nb-bundle-container {
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: space-between;
}

.nb-bundle-layout-horizontal .nb-bundle-offer {
	flex: 1;
	min-width: 200px;
	max-width: calc(33.333% - 11px);
}

.nb-bundle-layout-horizontal .nb-bundle-offer-content {
	flex-direction: column;
	text-align: center;
}

.nb-bundle-layout-horizontal .nb-bundle-prices {
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

/* ==========================================================================
   Layout: Grid
   ========================================================================== */

.nb-bundle-layout-grid .nb-bundle-container {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 12px;
}

.nb-bundle-layout-grid .nb-bundle-offer {
	flex: 0 0 calc(50% - 6px);
	max-width: calc(50% - 6px);
}

.nb-bundle-layout-grid .nb-bundle-offer-content {
	padding: 12px;
	gap: 12px;
}

.nb-bundle-layout-grid .nb-bundle-image {
	width: 50px;
	height: 50px;
}

.nb-bundle-layout-grid .nb-bundle-info {
	gap: 2px;
}

/* ==========================================================================
   Layout: List
   ========================================================================== */

.nb-bundle-layout-list .nb-bundle-offer {
	border: none;
	border-radius: 0;
	border-bottom: 1px solid #ebebeb;
	background: transparent;
}

.nb-bundle-layout-list .nb-bundle-offer:last-child {
	border-bottom: none;
}

.nb-bundle-layout-list .nb-bundle-offer-content {
	padding: 12px 0;
	flex-direction: row;
	align-items: center;
	gap: 12px;
}

.nb-bundle-layout-list .nb-bundle-image {
	display: none;
}

.nb-bundle-layout-list .nb-bundle-info {
	flex-direction: row;
	align-items: center;
	gap: 12px;
	flex: 1;
}

.nb-bundle-layout-list .nb-bundle-prices {
	margin-top: 0;
	margin-left: auto;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
}

.nb-bundle-layout-list .nb-bundle-subtitle {
	max-width: 150px;
}

.nb-bundle-layout-list .nb-bundle-badge {
	position: static;
	display: inline-block;
	margin-left: 8px;
}

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

@media screen and (max-width: 768px) {
	.nb-bundle-layout-horizontal .nb-bundle-offer {
		max-width: 100%;
		min-width: 100%;
	}

	.nb-bundle-layout-grid .nb-bundle-offer {
		flex: 0 0 100%;
		max-width: 100%;
	}
}

/* ==========================================================================
   Variant Selectors (Multiple Items)
   ========================================================================== */

.nb-variant-selectors {
	margin-top: 16px;
	padding: 16px;
	background: #f9f9f9;
	border-radius: 6px;
	border: 1px solid #ebebeb;
}

.nb-variant-selectors-title {
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 12px;
	color: #303030;
}

.nb-variant-selectors-grid {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* ============================================
   VARIANT SELECTORS
   All styles moved to dynamic CSS in class-bundle-styling.php
   ============================================ */

/* Hide default WooCommerce variation form when multiple variants enabled */
body.nb-hide-default-variations form.cart .variations {
	display: none !important;
}

/* ============================================
   GIFT ITEMS - Hide remove button
   ============================================ */
/* Classic Cart */
.woocommerce-cart-form tr.nb-gift-item td.product-remove,
.woocommerce-cart-form tr.nb-gift-item .product-remove,
table.cart tr.nb-gift-item td.product-remove,
table.cart tr.nb-gift-item .product-remove,
tr.nb-gift-item td.product-remove,
tr.nb-gift-item .product-remove,
.nb-gift-item td.product-remove,
.nb-gift-item .product-remove,
.cart_item.nb-gift-item td.product-remove,
.cart_item.nb-gift-item .product-remove {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	width: 0 !important;
	max-width: 0 !important;
	height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	pointer-events: none !important;
}

/* Cart Block */
.wc-block-cart-item.nb-gift-item .wc-block-cart-item__remove-link,
.wc-block-cart-items__row.nb-gift-item .wc-block-cart-item__remove-link,
.nb-gift-item .wc-block-cart-item__remove-link,
.wc-block-cart-item.nb-gift-item button[aria-label*="Remove"],
.wc-block-cart-items__row.nb-gift-item button[aria-label*="Remove"] {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	width: 0 !important;
	height: 0 !important;
	pointer-events: none !important;
	position: absolute !important;
	left: -9999px !important;
}
