/* Research Stack – Bundle Builder
 * Navy / gold theme matching the reference design.
 * Override colours by redefining the variables on .rs-bundle.
 */

.rs-bundle {
	--rs-gold: var(--e-global-color-primary, #a68a40);
	--rs-navy: #1a2037;
	--rs-skel: #fafafa;
	color: var(--rs-gold);
	font-family: Inter, sans-serif;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

/* Optional card wrapper (use if your Elementor container isn't already styled) */
.rs-bundle--card {
	background: var(--rs-navy);
	border: 2px solid var(--rs-gold);
	border-radius: 20px;
	padding: 30px;
	position: sticky;
	top: 140px;
}

.rs-bundle__head { display: grid; gap: 10px; }

.rs-bundle__title {
	margin: 0;
	font-size: 44px;
	line-height: 1;
	font-weight: 700;
	letter-spacing: -1.2px;
	color: var(--rs-gold);
	word-break: break-word;
}

/* ------------------------------------------------------------------ */
/* Progress bar (works with your existing .free-shipping-bar widget)   */
/* Replace your old progress-bar CSS with this block.                  */
/* ------------------------------------------------------------------ */

.free-shipping-bar { width: 100%; }

.free-shipping-bar progress-bar[data-product-bundle-progress-bar] {
	display: block;
	width: 100% !important;
	height: 0.375rem;
	border-radius: 25px;
	background-color: rgba(166, 138, 64, 0.08);
	overflow: hidden;
}

.free-shipping-bar progress-bar[data-product-bundle-progress-bar]::before {
	content: "";
	display: block;
	height: inherit;
	border-radius: inherit;
	background-color: var(--rs-gold, var(--e-global-color-primary, #a68a40));
	transform: scaleX(var(--progress, 0%));
	transform-origin: left;
	transition: transform 0.7s cubic-bezier(0.7, 0, 0.3, 1) 0.1s;
}

/* ------------------------------------------------------------------ */
/* Items list                                                          */
/* ------------------------------------------------------------------ */

.rs-bundle__items {
	display: flex;
	flex-direction: column;
	gap: 20px;
	max-height: 400px;
	overflow-y: auto;
	padding-right: 10px;
	margin-right: -10px;
	scroll-behavior: smooth;
	scrollbar-width: thin;
	scrollbar-color: rgba(166, 138, 64, 0.35) transparent;
}
.rs-bundle__items::-webkit-scrollbar { width: 6px; }
.rs-bundle__items::-webkit-scrollbar-thumb {
	background: rgba(166, 138, 64, 0.35);
	border-radius: 999px;
}

.rs-row {
	display: flex;
	align-items: center;
	gap: 12px;
}

.rs-row--enter { animation: rsRowUp 0.45s cubic-bezier(0.3, 1, 0.3, 1); }
@keyframes rsRowUp {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: none; }
}

.rs-row__media {
	flex: 0 0 6rem;
	width: 6rem;
	aspect-ratio: 1 / 1;
	margin: 0;
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

@media only screen and (max-width: 1024px){
	.rs-row__media {
		flex: 0 1 5rem;
	}
}


.rs-row__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 4px;
	display: block;
}

.rs-row__body { flex: 1 1 auto; min-width: 0; }

.rs-row__title {
	margin: 0 0 8px;
	font-size: 14px;
	line-height: 1.45;
	font-weight: 600;
	color: var(--rs-gold);
	word-break: break-word;
}
.rs-row__price {
	margin: 0;
	font-size: 13px;
	font-weight: 400;
	color: var(--rs-gold);
	opacity: 0.95;
}

.rs-row__controls {
	margin-left: auto;
	flex: 0 0 auto;
	display: grid;
	gap: 10px;
	justify-items: end;
}

/* Quantity stepper */
.rs-qty { position: relative; width: 4.5rem; height: 48px; }

.rs-qty input {
    width: 100% !important;
    height: 100% !important;
    text-align: center;
    padding: 0 20px 0 8px !important;
    background: #a68a4006 !important;
    border: 0 !important;
    border-radius: 8px;
    color: var(--rs-gold);
    font: 400 14px/1 Inter, sans-serif;
    appearance: textfield;
    -moz-appearance: textfield;
}

.rs-qty input:focus { outline: 1px solid rgba(166, 138, 64, 0.5); }
.rs-qty input::-webkit-outer-spin-button,
.rs-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.rs-qty__btns {
	position: absolute;
	right: 4px;
	top: 0;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.rs-qty__btns button {
    background: none !important;
    border: 0 !important;
    color: var(--rs-gold) !important;
    cursor: pointer !important;
    padding: 3px 6px !important;
    line-height: 0;
    opacity: 0.9;
}

.rs-qty__btns button:hover:not(:disabled) { opacity: 1; }
.rs-qty__btns button:disabled { opacity: 0.3; cursor: default; }
.rs-qty__btns svg { width: 8px; height: 6px; display: block; stroke-width: 1px; }

.rs-remove {
    background: none !important;
    border: 0 !important;
    padding: 0 !important;
    color: var(--rs-gold) !important;
    font: 400 12px/1.4 Inter, sans-serif;
    cursor: pointer !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.rs-remove:hover { opacity: 0.7; }

/* Skeleton placeholders */
.rs-skel { pointer-events: none; }
.rs-skel__media {
	flex: 0 0 6rem;
	width: 6rem;
	aspect-ratio: 1 / 1;
	border-radius: 8px;
	background: var(--rs-skel);
}
.rs-skel__lines { flex: 1 1 auto; display: grid; gap: 10px; }
.rs-skel__line {
	height: 16px;
	border-radius: 999px;
	background: var(--rs-skel);
}
.rs-skel__line--short { width: 40%; }
.rs-skel__media,
.rs-skel__line { animation: rsPulse 2.4s ease-in-out infinite; }
@keyframes rsPulse { 50% { opacity: 0.6; } }

/* ------------------------------------------------------------------ */
/* Footer: total / button / note / alert                               */
/* ------------------------------------------------------------------ */

.rs-bundle__footer {
	display: grid;
	gap: 14px;
	padding-top: 14px;
	border-top: 1px solid rgba(166, 138, 64, 0.15);
}

.rs-bundle__total-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
}
.rs-bundle__total-label,
.rs-bundle__total {
	font-size: 20px;
	line-height: 1.6;
	font-weight: 700;
	letter-spacing: -0.6px;
	color: var(--rs-gold);
}

.rs-bundle__submit {
	position: relative;
	width: 100%;
	border: 0;
	border-radius: 60px;
	background: var(--rs-gold);
	color: var(--rs-navy);
	font: 500 16px/1 Inter, sans-serif;
	padding: 22px 28px;
	cursor: pointer;
	overflow: hidden;
	transition: opacity 0.3s cubic-bezier(0.7, 0, 0.3, 1), filter 0.3s ease;
}
.rs-bundle__submit:hover:not(:disabled) { filter: brightness(1.08); }
.rs-bundle__submit:disabled { opacity: 0.6; cursor: not-allowed; }
.rs-bundle__submit.is-success { opacity: 1 !important; }
.rs-bundle__submit.is-loading .rs-bundle__submit-label { opacity: 0; }

.rs-bundle__submit-label { position: relative; z-index: 1; transition: opacity 0.2s ease; }

.rs-dots {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}
.rs-bundle__submit.is-loading .rs-dots { opacity: 1; }
.rs-dots span {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--rs-navy);
	animation: rsDot 1s infinite ease-in-out;
}
.rs-dots span:nth-child(2) { animation-delay: 0.15s; }
.rs-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes rsDot {
	0%, 100% { transform: translateY(0); opacity: 0.4; }
	50%      { transform: translateY(-4px); opacity: 1; }
}

.rs-bundle__note {
	margin: 0;
	text-align: center;
	font-size: 12px;
	line-height: 1.6;
	color: rgba(166, 138, 64, 0.6);
}

.rs-bundle__alert {
	color: #be123c;
	background: #fff1f2;
	border-radius: 60px;
	padding: 16px 20px;
	font-size: 14px;
	line-height: 1.25;
	font-weight: 500;
	text-align: center;
}

/* Subtle pulse on the holder when an item lands in it */
/*.rs-flash { animation: rsFlash 0.6s ease; }
@keyframes rsFlash {
	0%   { box-shadow: 0 0 0 0 rgba(166, 138, 64, 0.45); }
	100% { box-shadow: 0 0 0 14px rgba(166, 138, 64, 0); }
}*/

/* ------------------------------------------------------------------ */
/* Default "Add to Stack" button (restyle freely in Elementor)         */
/* ------------------------------------------------------------------ */

.rs-add-btn {
	background: var(--e-global-color-primary, #a68a40);
	color: #1a2037;
	border: 0;
	border-radius: 60px;
	padding: 14px 26px;
	font: 500 14px/1 Inter, sans-serif;
	cursor: pointer;
	transition: filter 0.25s ease, transform 0.25s ease;
}
.rs-add-btn:hover { filter: brightness(1.08); }
.rs-add-btn--ping { animation: rsPing 0.45s cubic-bezier(0.3, 1, 0.3, 1); }
@keyframes rsPing {
	0%   { transform: scale(1); }
	40%  { transform: scale(0.94); }
	100% { transform: scale(1); }
}
