/*
 * Student details (block checkout). Mobile first.
 * Breakpoints follow the theme (Step): tablet >= 768px, desktop >= 1024px.
 */

.qsc-students-group {
	padding-top: 16px;
}

.qsc-students-group + .qsc-students-group {
	margin-top: 2em;
}

/* Step title (h2) is 22px / 500 (WooCommerce .wc-block-components-title); keep these below it.
   Doubled class to beat theme heading styles, same trick WooCommerce uses. */
.qsc-students-group__title.qsc-students-group__title {
	margin: 0 0 0.75em;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.4;
}

.qsc-student {
	margin: 0 0 1.25em;
	padding: 12px;
	border: 1px solid var(--wc-separator-color, color-mix(in srgb, currentColor 20%, transparent));
	border-radius: 4px;
}

.qsc-student__title.qsc-student__title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
}

/* Mobile: one column. */
.qsc-student__fields {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
	margin-top: 4px;
}

/* WooCommerce adds its own top margin to inputs; the grid gap handles spacing. */
.qsc-student__cell .wc-block-components-text-input {
	margin-top: 0;
}

.qsc-student-field__label {
	display: block;
	margin-bottom: 4px;
	font-size: 0.875em;
}

.qsc-student .wc-block-components-textarea {
	width: 100%;
	box-sizing: border-box;
}

.qsc-student-field.has-error textarea {
	border-color: #cc1818;
}

/* Tablet and up: two columns; textareas span the full row. */
@media (min-width: 768px) {
	.qsc-student {
		padding: 16px;
	}

	.qsc-student__fields {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.qsc-student__cell--full {
		grid-column: 1 / -1;
	}
}
