/* Shippn LP — component styles that theme.json can't express.
   Values come from the Shippn design system (storybook.shippn.com) via theme.json presets. */

/* ---------- Buttons (Storybook: Button) ---------- */
.wp-block-button.is-style-secondary .wp-block-button__link {
	background: var(--wp--preset--color--gray-200);
	color: var(--wp--preset--color--text-primary);
}
.wp-block-button.is-style-secondary .wp-block-button__link:hover {
	background: var(--wp--preset--color--border-strong);
	color: var(--wp--preset--color--text-primary);
}
.wp-block-button.is-style-white .wp-block-button__link {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--text-primary);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--gray-200);
}
.wp-block-button.is-style-white .wp-block-button__link:hover {
	background: var(--wp--preset--color--gray-50);
	color: var(--wp--preset--color--text-primary);
}
.wp-block-button.is-style-ghost .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--text-primary);
	padding-left: 0;
	padding-right: 0;
}
.wp-block-button.is-style-ghost .wp-block-button__link:hover {
	background: transparent;
	color: var(--wp--preset--color--primary-600);
}
.wp-block-button .wp-block-button__link {
	transition: background-color var(--wp--custom--motion--fast) var(--wp--custom--motion--easing),
		color var(--wp--custom--motion--fast) var(--wp--custom--motion--easing);
}

/* ---------- Card surface (Storybook: Card) ---------- */
.wp-block-group.is-style-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--gray-200);
	border-radius: var(--wp--custom--radius--lg);
	box-shadow: var(--wp--preset--shadow--elevation-1);
	padding: var(--wp--preset--spacing--40);
}

/* ---------- Eyebrow (Storybook: PosterHero) ---------- */
p.is-style-eyebrow {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 700;
	letter-spacing: var(--wp--custom--letter-spacing--eyebrow);
	text-transform: uppercase;
	color: var(--wp--preset--color--text-secondary);
}
p.is-style-eyebrow::before {
	content: "";
	width: 20px;
	height: 2px;
	background: var(--wp--preset--color--primary-500);
	flex-shrink: 0;
}
p.is-style-eyebrow.has-text-align-center { justify-content: center; }

/* ---------- Footer ---------- */
.shippn-footer a { color: var(--wp--preset--color--text-secondary); text-decoration: none; }
.shippn-footer a:hover { color: var(--wp--preset--color--text-primary); }
.shippn-footer .wp-block-list { list-style: none; padding: 0; margin: 0; }
.shippn-footer .wp-block-list li { margin: 0 0 10px; }
.shippn-footer h2 { margin-bottom: 14px; }

/* Footer link columns: plain headings on desktop, accordion on mobile (same as the live site's footer).
   Details start open in the HTML; assets/js/footer.js closes them on small screens. */
.shippn-footer .ft-acc { border: 0; padding: 0; }
.shippn-footer .ft-acc > summary {
	display: block;
	cursor: default;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 700;
	color: var(--wp--preset--color--text-primary);
	margin-bottom: 14px;
}
.shippn-footer .ft-acc > summary { list-style: none; }
.shippn-footer .ft-acc > summary::-webkit-details-marker { display: none; }
.shippn-footer .ft-acc > summary::after { content: none; }
.shippn-footer .ft-acc > :not(summary) { margin-top: 0; }
@media (max-width: 781px) {
	.shippn-footer .ft-cols { row-gap: 0 !important; }
	.shippn-footer .ft-cols > .wp-block-column:first-child { margin-bottom: var(--wp--preset--spacing--50); }
	.shippn-footer .ft-acc { border-bottom: 1px solid #dfe1e6; }
	.shippn-footer .ft-acc > summary {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		cursor: pointer;
		padding: 16px 0;
		margin: 0;
		font-weight: 500;
	}
	.shippn-footer .ft-acc > summary::after {
		content: "";
		width: 16px;
		height: 16px;
		flex: none;
		background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / 16px;
		transition: transform var(--wp--custom--motion--fast) var(--wp--custom--motion--easing);
	}
	.shippn-footer .ft-acc[open] > summary::after { transform: rotate(180deg); }
	.shippn-footer .ft-acc .wp-block-list { padding: 4px 0 16px; }
}
@media (prefers-reduced-motion: reduce) { .shippn-footer .ft-acc > summary::after { transition: none; } }
/* App badges are white artwork; invert them on the light area (same as the live site). */
.shippn-footer .shippn-apps img { height: 38px; width: auto; display: block; filter: invert(1); }

/* Dark trust band at the bottom (live site: black band, grayscale logos). */
.shippn-footer .shippn-band a { color: var(--wp--preset--color--text-tertiary); }
.shippn-footer .shippn-band a:hover { color: var(--wp--preset--color--white); }
.shippn-footer .shippn-band-label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: var(--wp--custom--letter-spacing--eyebrow);
	text-transform: uppercase;
	margin: 0 0 12px;
}
.shippn-footer .shippn-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; filter: grayscale(1); }
.shippn-footer .shippn-logos figure { margin: 0; }
.shippn-footer .shippn-logos img { height: 20px; width: auto; display: block; }
.shippn-footer .shippn-logos img[src*="payment-visa"],
.shippn-footer .shippn-logos img[src*="discover-card"],
.shippn-footer .shippn-logos img[src*="google-pay"],
.shippn-footer .shippn-logos img[src*="payment-klarna"] { filter: brightness(0.8); }
.shippn-footer .shippn-social figure { margin: 0; }
.shippn-footer .shippn-social img { height: 16px; width: auto; display: block; opacity: .8; }
.shippn-footer .shippn-social a:hover img { opacity: 1; }
.shippn-footer .shippn-band p { margin: 0; }

/* ---------- Step badges (Storybook: Badge) ---------- */
.shippn-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: var(--wp--custom--radius--full);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 600;
	line-height: 1.5;
	background: var(--wp--preset--color--primary-50);
	color: var(--wp--preset--color--primary-700);
}

/* ---------- FAQ (Storybook: Accordion) ---------- */
.wp-block-details:not(.ft-acc) summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.wp-block-details:not(.ft-acc) summary::-webkit-details-marker { display: none; }
.wp-block-details:not(.ft-acc) summary::after { content: "+"; font-weight: 400; font-size: 1.25em; line-height: 1; color: var(--wp--preset--color--text-secondary); }
.wp-block-details:not(.ft-acc)[open] summary::after { content: "−"; }
.wp-block-details:not(.ft-acc) > :not(summary) { color: var(--wp--preset--color--text-secondary); margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
	.wp-block-button .wp-block-button__link { transition: none; }
}
