/* Gift pack picker. Everything is scoped to .ccgp-panel; grid tiles keep the theme's .rc-* styles. */
.ccgp-panel {
	margin: 0 0 1em;
}
.ccgp-panel [hidden] {
	display: none !important;
}

/* Mode switch: a two-way segmented control. The radios stay in the markup (keyboard, screen
   readers) but are visually hidden; the checked half is filled. */
.ccgp-panel .ccgp-modes {
	display: flex;
	width: 100%;
	max-width: 420px;
	margin: 0 0 12px;
	padding: 3px;
	border: 2px solid #007185;
	border-radius: 999px;
	background: #fff;
	box-sizing: border-box;
}
.ccgp-panel .ccgp-mode {
	position: relative;
	flex: 1 1 0;
	display: flex;
	margin: 0;
	color: #007185;
	font-weight: 600;
	font-size: .92em;
	line-height: 1.2;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
}
.ccgp-panel .ccgp-mode input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}
/* The span fills the half and carries the checked state via a sibling selector, not :has(), so
   the selected mode still shows on browsers without :has() (the radio itself is invisible). */
.ccgp-panel .ccgp-mode > span {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 6px 10px;
	border-radius: 999px;
	transition: background-color .15s ease, color .15s ease;
}
.ccgp-panel .ccgp-mode input:checked + span {
	background: #007185;
	color: #fff;
}
.ccgp-panel .ccgp-mode input:focus-visible + span {
	outline: 2px solid #007185;
	outline-offset: 2px;
}

/* Curated set cards. */
.ccgp-panel .ccgp-sets {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 6px;
}
/* 4+ scents fit on one line only at full width. */
.ccgp-panel:not([data-ccgp-size="2"]):not([data-ccgp-size="3"]) .ccgp-sets {
	grid-template-columns: 1fr;
}
.ccgp-panel .ccgp-set {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	padding: 6px 8px;
	background: #fff;
	border: 2px solid #d5d9d9;
	border-radius: 8px;
	cursor: pointer;
}
.ccgp-panel .ccgp-set:has(input:checked) {
	border-color: #007185;
	box-shadow: 0 0 0 1px #007185 inset;
}
.ccgp-panel .ccgp-set input {
	margin: .2em 0 0;
	flex: 0 0 auto;
}
.ccgp-panel .ccgp-set-body {
	display: block;
	min-width: 0;
}
.ccgp-panel .ccgp-set-name {
	display: block;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 4px;
}
.ccgp-panel .ccgp-set-items {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}
.ccgp-panel .ccgp-set-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	width: 64px;
	text-align: center;
}
/* Phones: one card per row, so put the name beside the scents instead of above them. */
@media (max-width: 600px) {
	.ccgp-panel[data-ccgp-size="2"] .ccgp-set-body,
	.ccgp-panel[data-ccgp-size="3"] .ccgp-set-body {
		display: flex;
		align-items: center;
		gap: 6px;
		flex: 1 1 auto;
	}
	.ccgp-panel[data-ccgp-size="2"] .ccgp-set-name,
	.ccgp-panel[data-ccgp-size="3"] .ccgp-set-name {
		flex: 1 1 0;
		min-width: 5.5em;
		margin: 0;
	}
	.ccgp-panel[data-ccgp-size="2"] .ccgp-set-items,
	.ccgp-panel[data-ccgp-size="3"] .ccgp-set-items {
		flex: 0 0 auto;
		flex-wrap: nowrap;
	}
	.ccgp-panel .ccgp-set input {
		align-self: center;
		margin: 0;
	}
}
.ccgp-panel .ccgp-set-item-name,
.ccgp-panel .ccgp-slot-name {
	font-size: .72em;
	line-height: 1.2;
	overflow-wrap: anywhere;
}

/* Thumbnails outside the grid tiles are smaller. */
.ccgp-panel .ccgp-set-item .rc-frag-thumb,
.ccgp-panel .ccgp-slot .rc-frag-thumb,
.ccgp-panel .ccgp-set-item .rc-frag-noimg,
.ccgp-panel .ccgp-slot .rc-frag-noimg {
	width: 60px;
	max-width: 60px;
}
.ccgp-panel .ccgp-slot .rc-frag-swatch {
	width: 40px;
	height: 40px;
	margin: 3px 0;
}
.ccgp-panel .ccgp-set-item .rc-frag-swatch {
	width: 28px;
	height: 28px;
	margin: 0;
}
.ccgp-panel .ccgp-set-item .rc-frag-thumb,
.ccgp-panel .ccgp-set-item .rc-frag-noimg {
	width: 48px;
	max-width: 48px;
}

/* Build-your-own tray. */
.ccgp-panel .ccgp-tray-head {
	margin: 0 0 6px;
}
.ccgp-panel .ccgp-count {
	color: #565959;
	font-size: .9em;
}
.ccgp-panel .ccgp-tray {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: 8px;
	margin: 0 0 8px;
	padding: 0;
	list-style: none;
}
.ccgp-panel .ccgp-slot {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: 96px;
	margin: 0;
	padding: 6px;
	background: #fff;
	border: 2px solid #007185;
	border-radius: 8px;
	text-align: center;
	box-sizing: border-box;
}
.ccgp-panel .ccgp-slot:not([data-slug]),
.ccgp-panel .ccgp-slot[data-slug=""] {
	background: #f7f8f8;
	border: 2px dashed #c0c4c4;
}
.ccgp-panel .ccgp-slot-empty {
	font-size: .8em;
	color: #8a8f8f;
}
.ccgp-panel .ccgp-slot-remove {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #232f3e;
	color: #fff;
	font-size: 16px;
	line-height: 24px;
	cursor: pointer;
}
.ccgp-panel .ccgp-notice {
	margin: 0 0 8px;
	color: #b12704;
	font-size: .9em;
}

/* "×2" badge on grid tiles already in the pack. */
.ccgp-panel .rc-frag-tile {
	position: relative;
}
.ccgp-panel .rc-frag-tile[data-ccgp-count]::after {
	content: attr(data-ccgp-count);
	position: absolute;
	top: 4px;
	right: 4px;
	padding: 1px 6px;
	border-radius: 999px;
	background: #007185;
	color: #fff;
	font-size: .7em;
	font-weight: 700;
}
.ccgp-panel .rc-frag-tile[data-ccgp-count] {
	border-color: #007185;
}

/* No-theme fallback: the bare select is the picker. */
.ccgp-panel > .ccgp-byo > select.ccgp-grid-select {
	width: 100%;
	font-size: 16px;
}

.ccgp-unavailable {
	font-weight: 600;
}
