/* Collapsible postage pill for store popups and store pages.
 * Version 1.0.2-20261111. Soft height, fade and chevron. Does not style
 * Product Search or homepage postage lines. */

.ios-postage-box {
	--ios-postage-ease: cubic-bezier(.22, .61, .36, 1);
	--ios-postage-dur: 360ms;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
	margin: 8px 0 12px;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: #eef4ff;
	font-family: 'Satoshi', 'Manrope', Arial, sans-serif;
	text-align: left;
}

.store_page_hold .ios-postage-box,
.ios-store-detail-page .ios-postage-box,
.ios-store-card .ios-postage-box {
	align-items: flex-start;
}

/* Visually hidden but still keyboard-focusable. */
.ios-postage-box__check {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ios-postage-box__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 7px 14px;
	border: 1px solid rgba(238, 124, 27, 0.7);
	border-radius: 999px;
	background: rgba(8, 14, 28, 0.92);
	color: #ff9a3c;
	font: inherit;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.06em;
	line-height: 1;
	text-transform: uppercase;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.ios-postage-box__toggle:hover,
.ios-postage-box__toggle:focus-visible,
.ios-postage-box__check:focus-visible + .ios-postage-box__toggle {
	border-color: #ff9a3c;
	outline: 0;
	box-shadow: 0 0 0 3px rgba(238, 124, 27, 0.25);
}

.ios-postage-box__toggle .ios-postage-box__title,
.ios-postage-box .ios-postage-box__title {
	margin: 0 !important;
	padding: 0;
	color: #ff9a3c;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.06em;
	line-height: 1;
	text-transform: uppercase;
	text-align: center;
}

.ios-postage-box__chevron {
	display: inline-block;
	width: 0.5em;
	height: 0.5em;
	margin: 0;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-0.12em) rotate(45deg);
	transform-origin: 50% 50%;
	transition: transform var(--ios-postage-dur) var(--ios-postage-ease);
}

.ios-postage-box__check:checked + .ios-postage-box__toggle .ios-postage-box__chevron,
.ios-postage-box.is-open .ios-postage-box__chevron {
	transform: translateY(0.08em) rotate(225deg);
}

/* Height is animated on the grid track. The clip layer has no padding,
 * so the card chrome cannot pop in or leak when the track is 0fr. */
.ios-postage-box__panel {
	display: grid;
	grid-template-rows: 0fr;
	width: 100%;
	transition: grid-template-rows var(--ios-postage-dur) var(--ios-postage-ease);
}

.ios-postage-box__check:checked ~ .ios-postage-box__panel,
.ios-postage-box.is-open .ios-postage-box__panel {
	grid-template-rows: 1fr;
}

.ios-postage-box__panel-inner {
	overflow: hidden;
	min-height: 0;
	min-width: 0;
	padding: 0;
	margin: 0;
	border: 0;
	box-sizing: border-box;
}

/* Padding, border and gap live on the body, always, so they are clipped
 * rather than toggling at the start or end of the animation. */
.ios-postage-box__body {
	box-sizing: border-box;
	margin: 8px 0 0;
	padding: 10px 12px;
	border-radius: 12px;
	background: rgba(8, 14, 28, 0.72);
	border: 1px solid rgba(238, 124, 27, 0.4);
	opacity: 0;
	transform: translateY(-4px);
	transition:
		opacity 280ms var(--ios-postage-ease),
		transform 280ms var(--ios-postage-ease);
}

.ios-postage-box__check:checked ~ .ios-postage-box__panel .ios-postage-box__body,
.ios-postage-box.is-open .ios-postage-box__body {
	opacity: 1;
	transform: translateY(0);
	transition-delay: 70ms;
}

.ios-postage-box__body ul,
.ios-store-popup .ios-postage-box ul,
.store_page_hold .ios-postage-box ul,
.ios-store-card .ios-postage-box ul {
	margin: 0;
	padding: 0 0 0 16px;
	font-size: 12px;
	line-height: 1.45;
	color: rgba(238, 244, 255, 0.9);
}

.ios-postage-box__body .ios-postage-box__note,
.ios-store-popup .ios-postage-box__note,
.store_page_hold .ios-postage-box__note,
.ios-store-card .ios-postage-box__note {
	margin: 8px 0 0;
	color: rgba(220, 230, 245, 0.58);
	font-size: 11px;
	line-height: 1.35;
}

@media (hover: hover) and (pointer: fine) {
	.ios-postage-box:hover .ios-postage-box__panel,
	.ios-postage-box:focus-within .ios-postage-box__panel {
		grid-template-rows: 1fr;
	}
	.ios-postage-box:hover .ios-postage-box__chevron,
	.ios-postage-box:focus-within .ios-postage-box__chevron {
		transform: translateY(0.08em) rotate(225deg);
	}
	.ios-postage-box:hover .ios-postage-box__body,
	.ios-postage-box:focus-within .ios-postage-box__body {
		opacity: 1;
		transform: translateY(0);
		transition-delay: 70ms;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ios-postage-box__panel,
	.ios-postage-box__body,
	.ios-postage-box__chevron {
		transition: none !important;
		transition-delay: 0ms !important;
	}
	.ios-postage-box__body {
		transform: none;
	}
}
