/* Anchor both screens and the launcher to the lower-left corner. */
#bulk-cc {
	position: fixed;
	left: max(1rem, env(safe-area-inset-left));
	bottom: max(1rem, env(safe-area-inset-bottom));
	z-index: 99999;
	display: flex;
	flex-direction: column-reverse;
	align-items: flex-start;
	gap: .65rem;
	color: #191816;
	font: 400 1rem/1.45 system-ui, sans-serif;
}
#bulk-cc, #bulk-cc * { box-sizing: border-box; }

/* Give the hidden attribute priority over theme styles. */
#bulk-cc[hidden], #bulk-cc [hidden] { display: none !important; }

#bulk-cc .bulk-cc-card {
	width: min(28rem, calc(100vw - 2rem));
	max-height: calc(100vh - 5rem);
	max-height: calc(100dvh - 5rem);
	padding: 1.25rem;
	overflow: auto;
	border: 1px solid #dedbd5;
	border-radius: .8rem;
	background: #fcfbf8;
	box-shadow: 0 10px 36px rgb(0 0 0 / 18%);
}

/* Scroll the settings content while keeping the action buttons visible. */
#bulk-cc-panel.bulk-cc-card {
	display: flex;
	flex-direction: column;
	width: min(37rem, calc(100vw - 2rem));
	overflow: hidden;
}
#bulk-cc .bulk-cc-body { min-height: 0; overflow: auto; padding: .25rem; }
#bulk-cc .bulk-cc-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	margin-bottom: .65rem;
}
#bulk-cc h2 { margin: 0 0 .5rem; color: inherit; font: 700 1.25rem/1.2 system-ui, sans-serif; }
#bulk-cc .bulk-cc-heading h2 { margin: 0; }
#bulk-cc p { margin: 0 0 .65rem; font-size: .9rem; }
#bulk-cc a { color: inherit; font-size: .85rem; text-decoration: underline; }
#bulk-cc details, #bulk-cc .bulk-cc-category { padding: .65rem 0; border-top: 1px solid #dedbd5; }
#bulk-cc summary { cursor: pointer; }
#bulk-cc summary + p, #bulk-cc label + p { margin: .45rem 0; }
#bulk-cc .bulk-cc-status { margin-left: .45rem; color: #315c43; font-size: .8rem; }
#bulk-cc label { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin: 0; }
#bulk-cc input[type="checkbox"] { appearance: auto; width: 1.25rem; height: 1.25rem; accent-color: #191816; }
#bulk-cc .bulk-cc-cookie { margin-top: .45rem; padding: .65rem; border-radius: .45rem; background: #efede7; overflow-wrap: anywhere; }
#bulk-cc .bulk-cc-cookie code { color: inherit; }
#bulk-cc dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem .65rem; margin: .3rem 0 0; font-size: .8rem; }
#bulk-cc dd { margin: 0; }

/* Match the visual weight of the accept and reject actions. */
#bulk-cc .bulk-cc-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; margin-top: .8rem; }
#bulk-cc button {
	min-height: 44px;
	margin: 0;
	padding: .45rem .55rem;
	border: 1px solid #191816;
	border-radius: .4rem;
	background: transparent;
	color: #191816;
	font: 600 .82rem/1.25 system-ui, sans-serif;
	cursor: pointer;
}
/* Keep the icon centered in a circular touch target. */
#bulk-cc .bulk-cc-launch {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border-radius: 50%;
	background: #191816;
	color: #fff;
}
#bulk-cc .bulk-cc-launch svg { display: block; width: 24px; height: 24px; }
#bulk-cc [data-view="close"] { min-width: 44px; font-size: 1.3rem; }
#bulk-cc :focus-visible { outline: 2px solid #315c43; outline-offset: 2px; }

@media (max-width: 360px) {
	#bulk-cc .bulk-cc-actions { grid-template-columns: 1fr; }
}
