/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* -------------------------------------------------------------------------
   V2 section grids: horizontal swipe / scroll-snap on mobile
   (!important beats Bricks global-class grid display / overflow)
   ------------------------------------------------------------------------- */
@media (max-width: 767px) {
	.kb-v2__icon-grid--6,
	.kb-v2__card-grid,
	.kb-v2__card-grid--4,
	.kb-v2__trust-bar {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		align-items: stretch !important;
		gap: var(--space-s);
		width: 100%;
		max-width: 100%;
		overflow-x: auto !important;
		overflow-y: hidden !important;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: var(--space-s, 1rem);
		-webkit-overflow-scrolling: touch;
		grid-template-columns: none !important;
		scrollbar-width: thin;
	}

	.kb-v2__icon-grid--6 > *,
	.kb-v2__card-grid > *,
	.kb-v2__card-grid--4 > *,
	.kb-v2__trust-bar > * {
		flex: 0 0 min(78vw, 18.5rem) !important;
		width: min(78vw, 18.5rem) !important;
		max-width: min(78vw, 18.5rem) !important;
		min-width: 0 !important;
		scroll-snap-align: start;
	}

	/* Compact icon tiles — peek the next card */
	.kb-v2__icon-grid--6 > * {
		flex-basis: min(46vw, 12.5rem) !important;
		width: min(46vw, 12.5rem) !important;
		max-width: min(46vw, 12.5rem) !important;
	}

	/* Trust bars: tight cells, still swipeable */
	.kb-v2__trust-bar {
		gap: 1px !important;
	}

	.kb-v2__trust-bar > * {
		flex-basis: min(72vw, 15rem) !important;
		width: min(72vw, 15rem) !important;
		max-width: min(72vw, 15rem) !important;
	}
}

/* Investor guide: success state replaces the form. The download link is not in the page until submit. */
.kb-contact__form:has(.message.success) > .form-group {
	display: none !important;
}

.kb-contact__form .message.success {
	background: var(--secondary-ultra-light);
	color: var(--primary);
}

.kb-contact__form .message.success .text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1rem;
	width: 100%;
}

.kb-contact__form .kb-guide-success__text,
.kb-contact__form .kb-guide-success__action {
	margin: 0;
}

.kb-contact__form .kb-guide-download {
	background-color: var(--secondary);
	color: var(--primary);
	text-decoration: none;
	padding: 0.85em 1.5em;
	min-height: 3.125rem;
	font-weight: 600;
}

/* The from/to line keeps the kb-stat-range type style. The low/high byline is quieter. */
.kb-stat-range .kb-stat-compare,
.kb-stat-range .kb-stat-byline {
	display: block;
}

.kb-stat-range .kb-stat-byline {
	margin-top: 0.35rem;
	font-size: var(--text-m);	
	line-height: 1.4;
	opacity: 0.8;
}
