/* Shared by the signup and settings pages: sectioned forms and the colour picker. */

.team-form {
	display: grid;
	gap: 20px;
	width: min(100%, 760px);
}

/* The theme gives .control-group display:flex, which would override [hidden]. */
.control-group[hidden] {
	display: none;
}

.form-section {
	display: grid;
	gap: 16px;
	padding: 24px;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--surface);
}

.form-section h2 {
	margin: 0;
	font-size: 1.15rem;
}

.form-section > p,
.section-note {
	margin: 0;
	color: var(--text-muted);
	font-size: 0.92rem;
	line-height: 1.55;
}

.field-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.field-note {
	min-height: 1.3em;
	margin: 0;
	color: var(--text-muted);
	font-size: 0.85rem;
}

.field-note.bad,
.form-message.bad,
.color-message {
	color: var(--ms-red);
	font-weight: 600;
}

.field-note.good,
.form-message.good {
	color: var(--ms-green);
	font-weight: 600;
}

.form-message {
	min-height: 1.4em;
	margin: 0;
	font-size: 0.92rem;
}

/* ----- colour picker ----- */

.preset-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.preset {
	display: inline-flex;
	align-items: stretch;
	gap: 0;
	width: 52px;
	min-height: 36px;
	height: 36px;
	padding: 3px;
	overflow: hidden;
	border: 2px solid var(--border-strong);
	border-radius: 999px;
	background: var(--surface-2);
}

.preset i {
	flex: 1;
}

.preset i:first-child {
	border-radius: 999px 0 0 999px;
}

.preset i:last-child {
	border-radius: 0 999px 999px 0;
}

.preset[aria-pressed="true"] {
	border-color: var(--text);
}

.color-inputs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.color-field {
	display: grid;
	gap: 8px;
}

.color-field small {
	color: var(--text-faint);
	letter-spacing: 0;
	text-transform: none;
}

.color-field input[type="color"] {
	padding: 4px;
	cursor: pointer;
}

.color-message {
	min-height: 1.3em;
	margin: 0;
	font-size: 0.85rem;
}

/* ----- sheet instructions ----- */

.steps {
	display: grid;
	gap: 10px;
	margin: 0;
	padding-left: 22px;
	color: var(--text-muted);
	font-size: 0.92rem;
	line-height: 1.55;
}

.steps strong {
	color: var(--text);
}

.copy-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
}

.copy-row code {
	flex: 1;
	min-width: 0;
	overflow-wrap: anywhere;
	padding: 8px 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--field);
	color: var(--text);
	font-size: 0.82rem;
}

.small-button {
	min-height: 36px;
	padding: 0 14px;
	font-size: 0.85rem;
}

@media (max-width: 620px) {
	.field-row,
	.color-inputs {
		grid-template-columns: 1fr;
	}

	.form-section {
		padding: 18px;
	}
}
