/**
 * C6.5.2 — PGSC Side Cart / Side Checkout responsive containment.
 *
 * Theme bridge overrides for productive PGSC drawer CSS.
 * Does not change PGSC PHP/JS logic. Scoped to #pgsc-side-cart only.
 *
 * @package PasionGift_App
 * @see docs/C6.5.1-SIDE-RESPONSIVE-AUDIT.md
 * @see docs/C6.5.2-SIDE-RESPONSIVE-FIX.md
 */

/* -------------------------------------------------------------------------
   1. Box-sizing — prevent width:100% + padding overflow (A3)
   ------------------------------------------------------------------------- */

#pgsc-side-cart,
#pgsc-side-cart *,
#pgsc-side-cart *::before,
#pgsc-side-cart *::after {
	box-sizing: border-box;
}

#pgsc-side-cart .pgsc-checkout__step {
	max-width: 100%;
}

#pgsc-side-cart .pgsc-checkout__mount,
#pgsc-side-cart .pgsc-checkout__shell,
#pgsc-side-cart .pgsc-checkout__steps,
#pgsc-side-cart .pgsc-side-cart__panel,
#pgsc-side-cart .pgsc-side-cart__body,
#pgsc-side-cart .pgsc-side-cart__products,
#pgsc-side-cart .pgsc-side-cart__content {
	max-width: 100%;
	min-width: 0;
}

/* -------------------------------------------------------------------------
   2. Steps — contain translateX(±18px) without killing motion (A1)
   ------------------------------------------------------------------------- */

#pgsc-side-cart .pgsc-checkout__steps {
	overflow-x: hidden;
	overflow-y: visible;
}

/* -------------------------------------------------------------------------
   3. Progress — clip connectors at ≤420px (A2)
   ------------------------------------------------------------------------- */

#pgsc-side-cart .pgsc-checkout__progress,
#pgsc-side-cart .pgsc-checkout__progress-list,
#pgsc-side-cart .pgsc-checkout__progress-list--premium {
	max-width: 100%;
	min-width: 0;
	overflow-x: hidden;
}

@media screen and (max-width: 420px) {
	#pgsc-side-cart .pgsc-checkout__progress-connector {
		/* Keep motion; tighten projection into neighbor */
		left: calc(50% + 16px);
		width: calc(100% - 32px);
		max-width: 100%;
	}

	#pgsc-side-cart .pgsc-checkout__progress-item:last-child .pgsc-checkout__progress-connector {
		display: none;
	}
}

/* -------------------------------------------------------------------------
   4. Local containment — panel / cart list only (not body)
   ------------------------------------------------------------------------- */

#pgsc-side-cart .pgsc-side-cart__panel {
	overflow-x: hidden;
}

#pgsc-side-cart .pgsc-side-cart__products,
#pgsc-side-cart .pgsc-side-cart__content,
#pgsc-side-cart .pgsc-checkout__mount {
	overflow-x: hidden;
	min-width: 0;
}

#pgsc-side-cart .pgsc-side-cart__item-card,
#pgsc-side-cart .pgsc-side-cart__item-details,
#pgsc-side-cart .pgsc-checkout__contact-row,
#pgsc-side-cart .pgsc-checkout__field,
#pgsc-side-cart .pgsc-checkout__nav {
	max-width: 100%;
	min-width: 0;
}
