.livs-family {
	margin-top: 1.5rem;
}

/*
  We deliberately lean on WooCommerce / theme styling ("woocommerce" wrapper + "shop_table" + "button").
  This CSS only handles the custom "add family member" form layout.
*/

.livs-family__table {
	margin: 1rem 0 2rem;
}

.livs-family__table td,
.livs-family__table th {
	vertical-align: top;
}

.livs-family__form {
	margin-top: 0.75rem;
}

.livs-family__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
	gap: 12px;
	align-items: end;
}

.livs-family__field label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
}

.livs-family__field input {
	width: 100%;
	box-sizing: border-box;
}






@media (max-width: 782px) {
	.livs-family__instagram-form .livs-family__grid,
	.livs-family__form .livs-family__grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.livs-family__instagram-form .livs-family__field,
	.livs-family__form .livs-family__field,
	.livs-family__instagram-form .woocommerce-input-wrapper,
	.livs-family__form .woocommerce-input-wrapper {
		width: 100%;
		min-width: 0;
	}

	.livs-family__instagram-form input.input-text,
	.livs-family__form input.input-text {
		width: 100%;
		box-sizing: border-box;
	}

	
	
	.livs-family__table.shop_table_responsive thead {
		display: none;
	}

	.livs-family__table.shop_table_responsive tbody tr {
		display: block;
		border: 1px solid rgba(18, 18, 18, 0.11);
		border-radius: 12px;
		padding: 10px 12px;
		margin: 0 0 12px;
		background: transparent;
	}

	.livs-family__table.shop_table_responsive tbody td {
		display: grid !important;
		grid-template-columns: minmax(4.4rem, 5.2rem) minmax(0, 1fr);
		align-items: start;
		column-gap: 10px;
		row-gap: 0;
		width: 100%;
		padding: 7px 0 !important;
		border: 0 !important;
		font-size: 0.92em;
		line-height: 1.4;
	}

	.livs-family__table.shop_table_responsive tbody td::before {
		content: attr(data-title) !important;
		font-weight: 600;
		opacity: 1;
		color: inherit;
		margin: 0 !important;
		padding: 0 !important;
		float: none !important;
		text-align: left !important;
		min-width: 0 !important;
	}

	.livs-family__table.shop_table_responsive tbody td > * {
		min-width: 0;
	}

	.livs-family__table.shop_table_responsive tbody td,
	.livs-family__table.shop_table_responsive tbody td a,
	.livs-family__table.shop_table_responsive tbody td span {
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	.livs-family__table.shop_table_responsive tbody td:last-child {
		padding-bottom: 0 !important;
	}

	.livs-family__table.shop_table_responsive tbody td:first-child {
		padding-top: 0 !important;
	}

	.livs-family__table.shop_table_responsive tbody tr.livs-family__empty td {
		display: block !important;
	}

	.livs-family__table.shop_table_responsive tbody tr.livs-family__empty td::before {
		display: none !important;
		content: none !important;
	}
}


















/* Desktop button alignment: keep theme button styling, but place the action cell on the same baseline as inputs. */
.livs-family__actions {
	align-self: end;
}

.livs-family__actions.wp-block-buttons {
	display: flex;
	align-items: flex-end;
	justify-content: flex-start;
	margin: 0;
	padding: 0;
}

.livs-family__actions .wp-block-button {
	margin: 0;
}

.livs-family__actions .wp-block-button__link.wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	box-sizing: border-box;
	margin: 0;
}

/* Mobile: stack buttons under inputs and let them take full width. */
@media (max-width: 782px) {
	.livs-family__actions {
		align-self: auto;
		width: 100%;
	}

	.livs-family__actions.wp-block-buttons {
		display: block;
	}

	.livs-family__actions .wp-block-button {
		width: 100%;
	}

	.livs-family__actions .wp-block-button__link.wp-element-button {
		width: 100%;
		justify-content: center;
	}
}
