/*
 * GOLDLIGHT Care offer pop-up on the goldlight_v1 product page, v4 design
 * (product/care_popup.twig, dist/js/care-popup.js; dev_docs/new_features/care_warranty_v4/).
 * Uses the theme's .popup (fixed overlay, z-index, .active fade) and .popup__bg; everything
 * else is here. Desktop (>= 768 px): centred 760 px box, height = content, details in
 * popovers (only from the details buttons: hover or click; position: fixed, placed by the
 * script - no transform on the box, it would become their containing block). Mobile: bottom
 * sheet sliding up, the Care details as an accordion in the card, tap targets >= 44 px.
 * Tokens (design, mapped to the site): text #212529, secondary #555, muted #6b6b6b, borders
 * #dcdcdc / #eee, tint #f5f5f5, success #1b7a3e, not covered #b3261e; square corners; font
 * inherited (Rubik).
 */
/* the theme fades every property of .popup over .5 s, visibility too: the dialog would still
   be hidden when the script moves focus into it. Visible at once, hidden after the fade. */
.popup.popup--care {
	transition: opacity .25s, visibility 0s linear .25s;
}
.popup.popup--care.active {
	transition: opacity .25s, visibility 0s;
}
.popup--care .popup__bg {
	background: rgba(17, 17, 17, .45);
}
.gl-care {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	width: 760px;
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 80px);
	background: #fff;
	color: #212529;
	font-size: 15px;
	line-height: 1.45;
	text-align: left;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
}
.gl-care button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	margin: 0;
	padding: 0;
	text-align: left;
	cursor: pointer;
}
.gl-care button:focus-visible,
.gl-care a:focus-visible {
	outline: 2px solid #212529;
	outline-offset: 2px;
}
.gl-care [hidden] {
	display: none !important;
}

/* head */
.gl-care__handle {
	display: none;
}
.gl-care__head {
	flex: none;
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 28px 36px 22px;
	border-bottom: 1px solid #eee;
}
.gl-care__thumb {
	flex: none;
	width: 72px;
	height: 72px;
	object-fit: cover;
	background: #f3f3f3;
}
.gl-care__head-text {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.gl-care__added {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #1b7a3e;
}
.gl-care__added i {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border: 1.5px solid #1b7a3e;
	border-radius: 50%;
	font-size: 10px;
	font-style: normal;
	line-height: 1;
}
.gl-care__pname {
	font-size: 20px;
	line-height: 1.3;
}
.gl-care__pmeta {
	font-size: 13px;
	color: #6b6b6b;
}
.gl-care__brand {
	text-decoration: underline;
}
.gl-care .gl-care__close {
	flex: none;
	align-self: flex-start;
	width: 44px;
	height: 44px;
	margin: -8px -12px 0 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	line-height: 1;
	color: #555;
	text-align: center;
}

/* body */
.gl-care__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 26px 36px 30px;
}
.gl-care__title {
	margin: 0;
	font-size: 24px;
	font-weight: 400;
	line-height: 1.25;
	text-transform: none;
	letter-spacing: 0;
}
.gl-care__sub {
	margin: 4px 0 0;
	font-size: 14px;
	color: #555;
}

/* plan cards: .gl-care__opt is the card, its label the hit area (stretched over the whole
   card by :after, under the details button) */
.gl-care__plans {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
	gap: 12px;
	padding-top: 6px;
}
.gl-care__opt {
	position: relative;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px 20px;
	background: #fff;
	border: 1px solid #dcdcdc;
	transition: box-shadow .15s;
}
.gl-care__opt:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}
.gl-care__opt.is-checked {
	border: 2px solid #212529;
	padding: 17px 19px;
}
.gl-care__hit {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	font-weight: 400;
	cursor: pointer;
}
.gl-care__hit:after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
}
.gl-care__input {
	position: absolute;
	top: 0;
	left: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}
.gl-care__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.gl-care__name {
	font-size: 18px;
	font-weight: 500;
	line-height: 1.3;
}
.gl-care__radio {
	flex: none;
	width: 22px;
	height: 22px;
	border: 1px solid #bbb;
	border-radius: 50%;
	background: #fff;
}
.gl-care__input:checked ~ .gl-care__top .gl-care__radio {
	border: 7px solid #212529;
}
.gl-care__input:focus-visible ~ .gl-care__top .gl-care__radio {
	outline: 2px solid #212529;
	outline-offset: 3px;
}
.gl-care__desc {
	min-height: 38px;
	font-size: 13px;
	line-height: 1.45;
	color: #555;
}
.gl-care__price {
	font-size: 20px;
	font-weight: 500;
	white-space: nowrap;
}
.gl-care .gl-care__more {
	position: relative;
	z-index: 1;
	align-self: flex-start;
	min-height: 24px;
	font-size: 12px;
	text-decoration: underline;
}
.gl-care__more-close,
.gl-care__chev {
	display: none;
}
.gl-care__badge {
	position: absolute;
	top: -11px;
	left: 18px;
	padding: 3px 8px;
	background: #212529;
	color: #fff;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: .06em;
	text-transform: uppercase;
	white-space: nowrap;
}
.gl-care__opt.is-checked .gl-care__badge {
	top: -12px;
	left: 17px;
}

/* ✓ / × lists (popovers, accordion, strip) */
.gl-care__list,
.gl-care .care-services__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.gl-care__list li,
.gl-care .care-services__list li {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 0;
}
.gl-care__list li:before,
.gl-care .care-services__list li:before {
	content: '\2713';
	flex: none;
}
.gl-care .gl-care__list--not li:before {
	content: '\00D7';
	color: #b3261e;
}

/* popovers (desktop): always below the card (design v4), the arrow on top; when the window
   is too short the inner box scrolls (the outer one keeps the arrow visible) */
.gl-care__pop {
	display: none;
	position: fixed;
	z-index: 5;
	box-sizing: border-box;
	max-width: calc(100vw - 16px);
	padding: 0;
	background: #fff;
	border: 1px solid #212529;
	box-shadow: 0 12px 32px rgba(0, 0, 0, .16);
	font-size: 13px;
	line-height: 1.45;
	color: #333;
	text-align: left;
	cursor: default;
}
.gl-care__pop.is-open {
	display: block;
}
.gl-care__pop-in {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px 20px;
	overflow-y: auto;
	overscroll-behavior: contain;
}
/* more to scroll below: a fade over the last lines */
.gl-care__pop.has-more:after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 40px;
	background: linear-gradient(rgba(255, 255, 255, 0), #fff);
	pointer-events: none;
}
/* lifted over the card in a very short window: the arrow would point nowhere */
.gl-care__pop.is-lifted:before {
	display: none;
}
.gl-care__pop:before {
	content: '';
	position: absolute;
	top: -6px;
	left: var(--gl-care-arrow, 28px);
	width: 10px;
	height: 10px;
	background: #fff;
	border-left: 1px solid #212529;
	border-top: 1px solid #212529;
	transform: rotate(45deg);
}
.gl-care__pop--none {
	width: 320px;
}
.gl-care__pop--care {
	width: 640px;
}
.gl-care__pop-title {
	font-size: 15px;
	font-weight: 500;
	color: #212529;
}
.gl-care__vt {
	display: none;
}
.gl-care--gold .gl-care__vt--gold,
.gl-care--silver .gl-care__vt--silver,
.gl-care--any .gl-care__vt--any {
	display: inline;
}
.gl-care .care-services {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px 20px;
}
.gl-care .care-services__group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.gl-care .care-services__section,
.gl-care__not-label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #6b6b6b;
}
.gl-care .care-services__list + .care-services__section {
	margin-top: 6px;
}
/* gold-only services (rhodium, resizing, shape, chain, pearls) */
.gl-care:not(.gl-care--gold) .care-services__gold {
	display: none;
}
.gl-care__not {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding-top: 12px;
	border-top: 1px solid #eee;
}
.gl-care .gl-care__not-toggle {
	display: none;
}
.gl-care__not .gl-care__list--not {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 4px 20px;
}
.gl-care__fine {
	margin: 0;
	font-size: 12px;
	color: #6b6b6b;
}
.gl-care__fine--line {
	padding-top: 8px;
	border-top: 1px solid #eee;
}

/* benefits strip: only with GOLDLIGHT Care chosen */
.gl-care__benefits.gl-care__list {
	display: none;
	grid-template-columns: 1fr 1fr;
	gap: 8px 24px;
	padding: 14px 18px;
	background: #f5f5f5;
	font-size: 13px;
	color: #333;
}
.gl-care--with-care .gl-care__benefits.gl-care__list {
	display: grid;
}
.gl-care--gold .gl-care__benefits .gl-care__b-plain,
.gl-care:not(.gl-care--gold) .gl-care__benefits .gl-care__b-gold {
	display: none;
}

.gl-care__msg {
	color: #b3261e;
	font-size: 14px;
}
.gl-care__msg:empty {
	display: none;
}

/* footer */
.gl-care__foot {
	flex: none;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px 36px;
	border-top: 1px solid #eee;
	background: #fff;
}
.gl-care__total {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.gl-care__total small {
	overflow: hidden;
	font-size: 13px;
	color: #6b6b6b;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.gl-care__total b {
	font-size: 22px;
	font-weight: 500;
	white-space: nowrap;
}
.gl-care__lbl-mob,
.gl-care__lbl-care {
	display: none;
}
.gl-care--with-care .gl-care__lbl-care {
	display: inline;
}
.gl-care .gl-care__btn {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 54px;
	padding: 0 28px;
	border: 1px solid #212529;
	border-radius: 0;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}
.gl-care .gl-care__btn--outline {
	background: #fff;
	color: #212529;
}
.gl-care .gl-care__btn--outline:hover {
	background: #f5f5f5;
}
.gl-care .gl-care__btn--fill,
.gl-care .gl-care__btn--fill:hover,
.gl-care .gl-care__btn--fill:focus {
	padding: 0 32px;
	background: #212529;
	color: #fff;
	text-decoration: none;
}
.gl-care .gl-care__btn--fill:hover {
	background: #000;
}
.gl-care .gl-care__btn.is-busy {
	opacity: .6;
	cursor: wait;
}

/* side bag care line (common/cart.twig) */
.products__care {
	color: #212529;
}

/* mobile: bottom sheet */
@media (max-width: 767px) {
	html.gl-care-open,
	html.gl-care-open body {
		overflow: hidden;
	}
	.popup--care {
		align-items: flex-end;
	}
	.gl-care {
		width: 100%;
		max-width: 100%;
		max-height: calc(100vh - 36px);
		max-height: calc(100dvh - 36px);
		border-radius: 16px 16px 0 0;
		box-shadow: 0 -8px 30px rgba(0, 0, 0, .15);
		transform: translateY(100%);
		transition: transform .3s ease;
	}
	.popup--care.active .gl-care {
		transform: none;
	}
	.gl-care.is-dragging {
		transition: none;
	}
	.gl-care__handle {
		flex: none;
		display: flex;
		justify-content: center;
		padding: 8px;
	}
	.gl-care__handle span {
		width: 40px;
		height: 4px;
		border-radius: 2px;
		background: #ccc;
	}
	.gl-care__head {
		gap: 12px;
		padding: 4px 18px 14px;
	}
	.gl-care__thumb {
		width: 52px;
		height: 52px;
	}
	.gl-care__head-text {
		gap: 2px;
	}
	.gl-care__added {
		gap: 6px;
		font-size: 12px;
	}
	.gl-care__added i {
		width: 15px;
		height: 15px;
		font-size: 9px;
	}
	.gl-care__pname {
		font-size: 15px;
	}
	.gl-care__pmeta {
		font-size: 12px;
	}
	.gl-care .gl-care__close {
		margin: 0 -10px 0 0;
		align-self: center;
		font-size: 24px;
	}
	.gl-care__body {
		gap: 10px;
		padding: 14px 18px 18px;
	}
	.gl-care__title {
		font-size: 19px;
	}
	.gl-care__sub {
		margin-top: 2px;
		font-size: 12px;
		color: #666;
	}
	.gl-care__plans {
		display: flex;
		flex-direction: column;
		gap: 10px;
		padding-top: 0;
	}
	.gl-care__opt,
	.gl-care__opt.is-checked {
		gap: 0;
		padding: 0;
	}
	.gl-care__opt:hover {
		box-shadow: none;
	}
	/* row: radio · name + description · price */
	.gl-care__hit {
		display: grid;
		grid-template-columns: 22px minmax(0, 1fr) auto;
		align-items: center;
		column-gap: 12px;
		row-gap: 2px;
		min-height: 44px;
		padding: 14px;
	}
	.gl-care__opt.is-checked .gl-care__hit {
		padding: 13px;
	}
	.gl-care__top {
		display: contents;
	}
	.gl-care__radio {
		grid-column: 1;
		grid-row: 1 / span 2;
	}
	.gl-care__name {
		grid-column: 2;
		grid-row: 1;
		font-size: 16px;
	}
	.gl-care__desc {
		grid-column: 2;
		grid-row: 2;
		min-height: 0;
		font-size: 12px;
		color: #666;
	}
	.gl-care__price {
		grid-column: 3;
		grid-row: 1 / span 2;
		font-size: 16px;
	}
	.gl-care__badge,
	.gl-care__opt.is-checked .gl-care__badge {
		position: static;
		display: inline-block;
		margin-left: 8px;
		padding: 2px 6px;
		font-size: 9px;
		vertical-align: 2px;
	}
	/* "What is included" bar under the Care row; No Care has no details on mobile */
	.gl-care__opt--none .gl-care__more {
		display: none;
	}
	.gl-care .gl-care__opt--care .gl-care__more {
		display: flex;
		align-items: center;
		justify-content: space-between;
		align-self: stretch;
		width: 100%;
		min-height: 44px;
		padding: 0 14px;
		border-top: 1px solid #eee;
		font-size: 13px;
		text-decoration: none;
	}
	.gl-care__more-open,
	.gl-care__more-close {
		text-decoration: underline;
	}
	.gl-care__more[aria-expanded="true"] .gl-care__more-open {
		display: none;
	}
	.gl-care__more[aria-expanded="true"] .gl-care__more-close {
		display: inline;
	}
	.gl-care__chev {
		display: block;
		width: 8px;
		height: 8px;
		margin: -4px 4px 0 0;
		border-right: 1.5px solid #212529;
		border-bottom: 1.5px solid #212529;
		transform: rotate(45deg);
	}
	.gl-care__more[aria-expanded="true"] .gl-care__chev {
		margin-top: 4px;
		transform: rotate(-135deg);
	}
	/* the Care details: an accordion inside the card */
	.gl-care__pop,
	.gl-care__pop.is-open {
		display: none;
		position: static;
		width: auto;
		max-width: none;
		padding: 0;
		border: 0;
		box-shadow: none;
		font-size: 12px;
		line-height: 1.4;
	}
	.gl-care__pop-in {
		gap: 10px;
		max-height: none !important;
		padding: 0 14px 14px;
		overflow: visible;
	}
	.gl-care__pop:before,
	.gl-care__pop:after,
	.gl-care__pop-title {
		display: none;
	}
	.gl-care__opt--care.is-expanded .gl-care__pop--care {
		display: block;
	}
	.gl-care .care-services {
		display: flex;
		flex-direction: column;
		gap: 10px;
	}
	.gl-care__not {
		padding-top: 0;
		border-top: 0;
	}
	.gl-care__not-label {
		display: none;
	}
	.gl-care .gl-care__not-toggle {
		display: flex;
		align-items: center;
		min-height: 44px;
		font-size: 12px;
		text-decoration: underline;
	}
	.gl-care__not .gl-care__list--not {
		display: none;
	}
	.gl-care__not.is-open .gl-care__list--not {
		display: flex;
	}
	.gl-care--with-care .gl-care__benefits.gl-care__list {
		display: none;
	}
	.gl-care__foot {
		display: grid;
		grid-template-columns: 1fr 1.3fr;
		gap: 10px 8px;
		padding: 12px 18px calc(20px + env(safe-area-inset-bottom));
	}
	.gl-care__total {
		grid-column: 1 / -1;
		flex-direction: row;
		align-items: baseline;
		justify-content: space-between;
		gap: 12px;
	}
	.gl-care__total small {
		font-size: 12px;
	}
	.gl-care__total b {
		font-size: 18px;
	}
	.gl-care__lbl-desk {
		display: none;
	}
	.gl-care__lbl-mob {
		display: inline;
	}
	.gl-care .gl-care__btn,
	.gl-care .gl-care__btn--fill,
	.gl-care .gl-care__btn--fill:hover,
	.gl-care .gl-care__btn--fill:focus {
		height: 48px;
		padding: 0 8px;
		font-size: 14px;
		white-space: normal;
	}
	.gl-care .gl-care__btn--outline {
		font-size: 13px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.gl-care,
	.gl-care__opt,
	.gl-care .gl-care__btn {
		transition: none;
	}
}
