/*
 * GTC Affinity — frontend block styles.
 * Logical properties throughout so the same rules work LTR (English) and
 * RTL (Arabic) with no separate stylesheet. Minimal + theme-deferential:
 * product cards inherit WooCommerce/WoodMart styling; we only frame the block.
 */

.gtca-block {
	margin-block: clamp( 1.5rem, 4vw, 2.75rem );
	clear: both;
}

.gtca-block__title {
	margin-block-end: 1rem;
	font-size: clamp( 1.05rem, 2.5vw, 1.35rem );
	font-weight: 600;
	text-align: start;
}

/* Reserve space so async blocks do not cause layout shift while loading. */
.gtca-async {
	min-block-size: 1px;
}

/* ---- Reorder list -------------------------------------------------------- */
.gtca-reorder__list {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 220px, 1fr ) );
	gap: clamp( 0.75rem, 2vw, 1.25rem );
	margin: 0;
	padding: 0;
	list-style: none;
}

.gtca-reorder__item {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	padding: 0.75rem;
	border: 1px solid rgba( 0, 0, 0, 0.08 );
	border-radius: 8px;
	background: #fff;
}

.gtca-reorder__image {
	flex: 0 0 64px;
	inline-size: 64px;
}

.gtca-reorder__image img {
	inline-size: 100%;
	block-size: auto;
	border-radius: 6px;
}

.gtca-reorder__body {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-inline-size: 0;
}

.gtca-reorder__name {
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
}

.gtca-reorder__price {
	font-size: 0.9em;
	opacity: 0.85;
}

.gtca-reorder__cta {
	align-self: flex-start;
	margin-block-start: 0.25rem;
}

/* ---- Message block ------------------------------------------------------- */
.gtca-message {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: clamp( 0.75rem, 2vw, 1rem ) clamp( 1rem, 3vw, 1.25rem );
	border-inline-start: 4px solid var( --gtca-accent, #0fa39a );
	border-radius: 6px;
	background: var( --gtca-message-bg, #f6fbfa );
	text-align: start;
}

.gtca-message__title {
	font-weight: 700;
}

.gtca-message__body {
	line-height: 1.5;
}

.gtca-message__body :is( p ):last-child {
	margin-block-end: 0;
}
