/**
 * PC Configurator — Bundle product page styles.
 *
 * Covers:
 *   1. Summary form (inside .summary): price, ATC, customise button
 *   2. Full-width configurator section (below product summary): collapsible
 *      slot sections with product grids
 *
 * Card / filter / loading / empty styles come from pcc-builder.css (shared).
 */

[x-cloak] {
	display: none !important;
}

/* ==========================================================================
   1. Bundle summary form (inside .summary)
   ========================================================================== */

.pcc-bundle-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.pcc-bundle-form__price {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	font-size: 1.25rem;
}

.pcc-bundle-form__price-label {
	font-weight: 500;
	color: var(--pcc-text-muted, #6b7280);
}

.pcc-bundle-form__price-amount {
	font-weight: 700;
	font-size: 1.5rem;
	color: var(--pcc-text, #1f2937);
}

.pcc-bundle-form__assembly {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: var(--pcc-text-muted, #6b7280);
}

.pcc-bundle-form__actions {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.pcc-bundle-form {
	margin-bottom: 16px;
}

.pcc-bundle-form .btn-add-cart,
.pcc-bundle-form .single_add_to_cart_button {
	padding: 10px 24px;
	font-size: 14px;
}

/* ==========================================================================
   1b. Bundle component recap
   ========================================================================== */

.pcc-bundle-recap {
	margin-top: 0.75rem;
}

.pcc-bundle-recap__list {
	margin: 0;
	padding: 0;
	font-size: 0.85rem;
	line-height: 1.6;
}

.pcc-bundle-recap__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 4px 0;
}

.pcc-bundle-recap__label {
	flex-shrink: 0;
	font-weight: 600;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	color: var(--text-muted, #6B7280);
}

.pcc-bundle-recap__name {
	text-align: right;
	color: var(--text-primary, #FFFFFF);
	font-size: 0.83rem;
}

.pcc-bundle-recap__oos {
	display: inline-block;
	font-size: 0.65rem;
	font-weight: 600;
	color: #dc2626;
	background: #fef2f2;
	padding: 1px 6px;
	border-radius: 3px;
	margin-left: 4px;
	vertical-align: middle;
}

.pcc-bundle-recap__edit-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin-top: 14px;
	padding: 10px 18px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--cyan, #00F0FF);
	text-decoration: none;
	border: 1px solid rgba(0, 240, 255, 0.3);
	border-radius: 8px;
	background: rgba(0, 240, 255, 0.06);
	transition: all 0.2s;
	letter-spacing: 0.3px;
	box-sizing: border-box;
}

.pcc-bundle-recap__edit-btn:hover {
	background: rgba(0, 240, 255, 0.12);
	border-color: rgba(0, 240, 255, 0.5);
	color: var(--cyan, #00F0FF);
	box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
}

/* ==========================================================================
   2. Full-width configurator section
   ========================================================================== */

.pcc-cfg {
	/* Break out of the WC content container to go full-width. */
	width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	padding: 2rem 0;
	background: var(--pcc-sidebar-bg, #f9fafb);
}

.pcc-cfg__inner {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

/* ==========================================================================
   Slot (collapsible section)
   ========================================================================== */

.pcc-cfg__slot {
	background: var(--pcc-bg, #ffffff);
	border: 1px solid var(--pcc-border, #e5e7eb);
	border-radius: var(--pcc-card-radius, 8px);
	overflow: hidden;
	transition: box-shadow 0.2s;
}

.pcc-cfg__slot.is-open {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ---------- Slot header (clickable) ---------- */

.pcc-cfg__slot-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	width: 100%;
	padding: 1rem 1.25rem;
	border: none;
	background: none;
	cursor: pointer;
	text-align: left;
	transition: background 0.15s;
}

.pcc-cfg__slot-header:hover {
	background: rgba(0, 0, 0, 0.02);
}

.pcc-cfg__slot-label {
	font-size: 1rem;
	font-weight: 700;
	margin: 0;
	flex-shrink: 0;
	color: var(--pcc-text, #1f2937);
}

.pcc-cfg__slot-required {
	color: #ef4444;
	margin-left: 0.125rem;
}

.pcc-cfg__slot-selection {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	flex: 1;
	min-width: 0;
	justify-content: flex-end;
}

.pcc-cfg__slot-selection-name {
	font-size: 0.875rem;
	color: var(--pcc-text-muted, #6b7280);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pcc-cfg__slot-selection-price {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--pcc-text, #1f2937);
	white-space: nowrap;
}

.pcc-cfg__slot-chevron {
	flex-shrink: 0;
	color: var(--pcc-text-muted, #6b7280);
	transition: transform 0.25s ease;
}

.pcc-cfg__slot.is-open .pcc-cfg__slot-chevron {
	transform: rotate(180deg);
}

/* ---------- Slot body (collapsible content) ---------- */

.pcc-cfg__slot-body {
	padding: 0 1.25rem 1.25rem;
}

/* ---------- Toolbar (filters + sort) ---------- */

.pcc-cfg__toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--pcc-border, #e5e7eb);
}

.pcc-cfg__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	flex: 1;
}

.pcc-cfg__sort select {
	padding: 0.375rem 0.75rem;
	border: 1px solid var(--pcc-border, #e5e7eb);
	border-radius: 6px;
	font-size: 0.875rem;
	background: var(--pcc-bg, #ffffff);
}

/* ---------- Product grid ---------- */

.pcc-cfg__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.5rem;
}

/* ---------- Scroll sentinel ---------- */

.pcc-cfg__scroll-sentinel {
	display: flex;
	justify-content: center;
	padding: 1.5rem 0;
}

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

@media (max-width: 768px) {
	.pcc-cfg {
		padding: 1rem 0;
	}

	.pcc-cfg__inner {
		padding: 0 1rem;
	}

	.pcc-cfg__slot-header {
		padding: 0.75rem 1rem;
		flex-wrap: wrap;
	}

	.pcc-cfg__slot-selection {
		flex-basis: 100%;
		justify-content: flex-start;
		margin-top: 0.25rem;
	}

	.pcc-cfg__slot-body {
		padding: 0 1rem 1rem;
	}

	.pcc-cfg__grid {
		grid-template-columns: 1fr;
	}

	.pcc-cfg__toolbar {
		flex-direction: column;
	}
}
