/**
 * Storefront. Scoped to .hippo-sdd. Colors, type, and spacing come from theme.json.
 */
.hippo-sdd {
	--hippo-sdd-border: color-mix(in srgb, var(--wp--preset--color--contrast, currentColor) 18%, transparent);
	--hippo-sdd-muted: color-mix(in srgb, var(--wp--preset--color--contrast, currentColor) 8%, var(--wp--preset--color--base, Canvas));
	--hippo-sdd-radius: 12px;
	color: var(--wp--preset--color--contrast, inherit);
	font-family: var(--wp--preset--font-family--body, inherit);
	font-size: var(--wp--preset--font-size--medium, 1rem);
	line-height: 1.5;
}

.hippo-sdd ul,
.hippo-sdd ol {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hippo-sdd-label {
	display: block;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	font-weight: 600;
	margin-block-end: var(--wp--preset--spacing--20, 0.35rem);
}

.hippo-sdd input[type="search"],
.hippo-sdd input[type="text"],
.hippo-sdd input[type="email"],
.hippo-sdd input[type="password"],
.hippo-sdd select {
	width: 100%;
	max-width: 100%;
	padding: 0.65rem 0.8rem;
	border: 1px solid var(--hippo-sdd-border);
	border-radius: 8px;
	background: var(--wp--preset--color--base, Canvas);
	color: inherit;
	font: inherit;
}

.hippo-sdd-button,
.hippo-sdd .wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.65rem 1.1rem;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.hippo-sdd-button.is-disabled {
	opacity: 0.55;
	pointer-events: none;
}

.hippo-sdd-library__toolbar,
.hippo-sdd-filters,
.hippo-sdd-library__search {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	gap: var(--wp--preset--spacing--30, 0.75rem);
	margin-block-end: var(--wp--preset--spacing--40, 1rem);
}

.hippo-sdd-library__search {
	align-items: stretch;
}

.hippo-sdd-library__search .hippo-sdd-label {
	flex: 1 1 16rem;
}

.hippo-sdd-chip,
.hippo-sdd-filters a,
.hippo-sdd-filters button {
	display: inline-flex;
	align-items: center;
	padding: 0.35rem 0.8rem;
	border: 1px solid var(--hippo-sdd-border);
	border-radius: 999px;
	background: var(--wp--preset--color--base, Canvas);
	color: inherit;
	text-decoration: none;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
}

.hippo-sdd-chip.is-active,
.hippo-sdd-filters a.is-active,
.hippo-sdd-tabs a[aria-selected="true"] {
	background: var(--wp--preset--color--contrast, CanvasText);
	color: var(--wp--preset--color--base, Canvas);
	border-color: transparent;
}

.hippo-sdd-grid,
.hippo-sdd-plan-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	gap: var(--wp--preset--spacing--40, 1.25rem);
}

.hippo-sdd-card,
.hippo-sdd-plan,
.hippo-sdd-asset,
.hippo-sdd-login form {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30, 0.75rem);
	padding: var(--wp--preset--spacing--40, 1.25rem);
	border: 1px solid var(--hippo-sdd-border);
	border-radius: var(--hippo-sdd-radius);
	background: var(--wp--preset--color--base, Canvas);
	box-shadow: 0 1px 2px color-mix(in srgb, var(--wp--preset--color--contrast, currentColor) 8%, transparent);
}

.hippo-sdd-card__media,
.hippo-sdd-card__image,
.hippo-sdd-asset__media {
	display: grid;
	place-items: center;
	width: 100%;
	aspect-ratio: 16 / 10;
	border-radius: 8px;
	overflow: hidden;
	background: var(--hippo-sdd-muted);
	color: var(--wp--preset--color--accent-1, currentColor);
	font-size: var(--wp--preset--font-size--x-large, 2rem);
	font-weight: 700;
}

.hippo-sdd-card__image,
.hippo-sdd-asset__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hippo-sdd-card__title,
.hippo-sdd-plan__name,
.hippo-sdd-asset h2 {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-size: var(--wp--preset--font-size--large, 1.4rem);
	line-height: 1.2;
}

.hippo-sdd-card__title a {
	color: inherit;
	text-decoration: none;
}

.hippo-sdd-card p,
.hippo-sdd-plan p {
	margin: 0;
}

.hippo-sdd-badge {
	display: inline-flex;
	align-self: flex-start;
	margin: 0;
	padding: 0.15rem 0.55rem;
	border-radius: 999px;
	background: var(--hippo-sdd-muted);
	font-size: var(--wp--preset--font-size--small, 0.8rem);
	font-weight: 700;
	letter-spacing: 0.02em;
}

.hippo-sdd-card.is-unlocked .hippo-sdd-badge {
	background: color-mix(in srgb, var(--wp--preset--color--accent-3, #386a20) 18%, var(--wp--preset--color--base, white));
}

.hippo-sdd-card.is-locked .hippo-sdd-badge {
	background: color-mix(in srgb, var(--wp--preset--color--accent-4, #8b3e3e) 16%, var(--wp--preset--color--base, white));
}

.hippo-sdd-card__actions,
.hippo-sdd-asset__actions {
	margin-top: auto;
}

.hippo-sdd-plan__price {
	font-size: var(--wp--preset--font-size--x-large, 2rem);
	font-weight: 700;
	line-height: 1;
}

.hippo-sdd-plan__interval {
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	font-weight: 500;
}

.hippo-sdd-plan__features li {
	padding-block: 0.35rem;
	border-bottom: 1px solid var(--hippo-sdd-border);
}

.hippo-sdd-pagination,
.hippo-sdd-tabs ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20, 0.5rem);
	align-items: center;
}

.hippo-sdd-tabs {
	margin-block-end: var(--wp--preset--spacing--40, 1rem);
	border-bottom: 1px solid var(--hippo-sdd-border);
}

.hippo-sdd-tabs a {
	display: inline-flex;
	padding: 0.7rem 1rem;
	border: 1px solid transparent;
	border-bottom: none;
	border-radius: 10px 10px 0 0;
	color: inherit;
	text-decoration: none;
	font-weight: 600;
}

.hippo-sdd-tabs a[aria-selected="true"] {
	border-color: var(--hippo-sdd-border);
	background: var(--wp--preset--color--base, Canvas);
	color: var(--wp--preset--color--contrast, CanvasText);
}

.hippo-sdd-account__panel,
.hippo-sdd-overview {
	padding: var(--wp--preset--spacing--40, 1rem) 0;
}

.hippo-sdd-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--wp--preset--color--base, Canvas);
	border: 1px solid var(--hippo-sdd-border);
	border-radius: var(--hippo-sdd-radius);
	overflow: hidden;
}

.hippo-sdd-table th,
.hippo-sdd-table td {
	padding: 0.75rem 0.9rem;
	border-bottom: 1px solid var(--hippo-sdd-border);
	text-align: start;
	vertical-align: middle;
}

.hippo-sdd-table th {
	background: var(--hippo-sdd-muted);
	font-size: var(--wp--preset--font-size--small, 0.85rem);
}

.hippo-sdd-notice,
.hippo-sdd-empty {
	padding: var(--wp--preset--spacing--30, 0.75rem) var(--wp--preset--spacing--40, 1rem);
	border-radius: 8px;
	background: var(--hippo-sdd-muted);
}

.hippo-sdd-login {
	max-width: 28rem;
}

.hippo-sdd-login h3 {
	margin-block: var(--wp--preset--spacing--50, 1.5rem) var(--wp--preset--spacing--30, 0.75rem);
}

@media (max-width: 640px) {
	.hippo-sdd-tabs ul {
		flex-direction: column;
	}

	.hippo-sdd-tabs {
		border-bottom: 0;
	}

	.hippo-sdd-tabs a {
		border: 1px solid var(--hippo-sdd-border);
		border-radius: 8px;
	}

	.hippo-sdd-table,
	.hippo-sdd-table thead,
	.hippo-sdd-table tbody,
	.hippo-sdd-table tr,
	.hippo-sdd-table th,
	.hippo-sdd-table td {
		display: block;
		width: 100%;
	}

	.hippo-sdd-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}
}
