/* gst/tool-card — compact card: mini UI visual, title, one-line desc, link */

/* Tile spacing via the GUTTER method — no reliance on grid gap at all.
   The grid gap is zeroed and each li carries 12px padding on every side,
   giving a constant 24px between card borders (rows AND columns) that no
   WP container rule, theme rule, or blockGap setting can take away. */
.wp-block-post-template.is-layout-grid:has(.gst-toolcard) {
	gap: 0 !important;
	margin-top: -12px !important;
	margin-bottom: -12px !important;
}
.wp-block-post-template.is-layout-grid > .wp-block-post:has(.gst-toolcard) {
	padding: 12px !important;
	box-sizing: border-box;
}

/* height MUST be fit-content, not 100%: theme.css makes the parent li a
   flex container, and a percentage height there creates a circular
   reference during grid row sizing — rows come out shorter than the card
   and tiles overlap (user-found fix, 2026-08-20). */
.gst-toolcard { width: 100%; height: fit-content; }
.gst-tc-link {
	display: flex; flex-direction: column; height: 100%;
	background: #fff; border: 1px solid var(--wp--preset--color--border, #E5E7EB);
	border-radius: var(--wp--custom--radius--md, 12px);
	box-shadow: var(--wp--custom--shadow--sm, 0 1px 2px rgba(17,24,39,.05));
	padding: 18px; text-decoration: none;
	transition: box-shadow .15s ease, transform .15s ease;
}
.gst-tc-link:hover { box-shadow: var(--wp--custom--shadow--md, 0 4px 16px rgba(17,24,39,.06)); transform: translateY(-2px); }

/* mini UI visual — same mockups as the hero slides (tool-visuals.css),
   scaled down to card size by .gst-tc-stage */
.gst-tc-visual {
	position: relative; display: flex; align-items: center; justify-content: center;
	background: linear-gradient(180deg, #F8FAFF, #EFF4FF);
	border: 1px solid #DBEAFE; border-radius: 10px;
	height: 150px; margin-bottom: 14px; overflow: hidden;
}
/* Absolutely positioned so the 300px mockup adds NOTHING to the card's
   intrinsic width — otherwise grid tracks inflate and the tiles lose
   their gap / overflow the container. */
.gst-tc-stage {
	position: absolute; top: 50%; left: 50%;
	display: flex; align-items: center; justify-content: center;
	width: 300px; transform: translate(-50%, -50%) scale(.58);
}
.gst-tc-stage .gst-qr-float { right: 22px; bottom: -8px; }

/* skeleton placeholder for future tools without a mockup */
.gst-tc-visual .tcv-doc {
	background: #fff; border: 1px solid var(--wp--preset--color--border, #E5E7EB);
	border-radius: 6px; box-shadow: 0 3px 10px rgba(17,24,39,.07);
	width: 100px; padding: 10px; display: block; position: relative;
}
.gst-tc-visual .l {
	display: block; height: 5px; border-radius: 3px;
	background: var(--wp--preset--color--light, #F3F4F6); margin-bottom: 6px;
}
.gst-tc-visual .l:last-child { margin-bottom: 0; }
.gst-tc-visual .w40 { width: 40%; } .gst-tc-visual .w60 { width: 60%; }
.gst-tc-visual .w70 { width: 70%; } .gst-tc-visual .w80 { width: 80%; }

/* text */
.gst-tc-title {
	font-family: var(--wp--preset--font-family--heading, sans-serif);
	font-weight: 600; font-size: 16px; color: var(--wp--preset--color--dark, #111827);
	margin-bottom: 4px;
}
.gst-tc-desc {
	font-size: 13.5px; color: var(--wp--preset--color--medium, #6B7280); line-height: 1.5;
	margin-bottom: 12px;
}
.gst-tc-cta {
	margin-top: auto; font-weight: 600; font-size: 13.5px;
	color: var(--wp--preset--color--primary, #2563EB);
}
.gst-tc-link:hover .gst-tc-cta { color: var(--wp--preset--color--primary-dark, #1D4ED8); }
