/* =============================================================================
   CM Registration Forms
   Mobile-first, responsive. Uses CSS custom properties from the koi.fan theme.
   ============================================================================= */

.cm-registration {
	max-width: 560px;
	margin: 0 auto;
	padding: 1.5rem 1rem;
	font-family: inherit;
}

.cm-registration__title {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 0 0.5rem;
}

.cm-registration__subtitle {
	color: #666;
	margin: 0 0 1.5rem;
	font-size: 0.95rem;
}

/* Steps indicator */
.cm-steps {
	display: flex;
	gap: 0.25rem;
	margin-bottom: 2rem;
	flex-wrap: wrap;
}

.cm-steps__item {
	flex: 1;
	text-align: center;
	font-size: 0.75rem;
	padding: 0.4rem 0.25rem;
	background: #f0f0f0;
	border-radius: 4px;
	color: #888;
	font-weight: 500;
	white-space: nowrap;
	min-width: 0;
}

.cm-steps__item--active {
	background: #0073aa;
	color: #fff;
}

.cm-steps__item--done {
	background: #46b450;
	color: #fff;
}

/* Form steps */
.cm-step--hidden {
	display: none;
}

/* Fields */
.cm-field {
	margin-bottom: 1.25rem;
}

.cm-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

@media ( max-width: 480px ) {
	.cm-field-row {
		grid-template-columns: 1fr;
	}
}

.cm-field__label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	margin-bottom: 0.35rem;
	color: #222;
}

.cm-field__required {
	color: #d63638;
	margin-left: 0.1em;
}

.cm-field__input,
.cm-field__select {
	display: block;
	width: 100%;
	padding: 0.65rem 0.75rem;
	font-size: 1rem;
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff;
	color: #111;
	box-sizing: border-box;
	transition: border-color 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.cm-field__input:focus,
.cm-field__select:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.cm-field__input.cm-field__input--error,
.cm-field__select.cm-field__select--error {
	border-color: #d63638;
}

.cm-field__hint {
	display: block;
	font-size: 0.8rem;
	color: #666;
	margin-top: 0.3rem;
}

/* Checkbox fields */
.cm-field--checkbox {
	margin-bottom: 1rem;
}

.cm-field__checkbox-label {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	font-size: 0.875rem;
	line-height: 1.4;
	cursor: pointer;
}

.cm-field__checkbox-label input[type="checkbox"] {
	flex-shrink: 0;
	margin-top: 0.1em;
	width: 1rem;
	height: 1rem;
	cursor: pointer;
}

/* Payout options */
.cm-payout-options {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
}

@media ( max-width: 480px ) {
	.cm-payout-options {
		grid-template-columns: 1fr;
	}
}

.cm-payout-option {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	padding: 0.85rem 1rem;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 0.15s ease;
}

.cm-payout-option:has(input:checked) {
	border-color: #0073aa;
	background: #f0f7fc;
}

.cm-payout-option input[type="radio"] {
	display: none;
}

.cm-payout-option__label {
	font-weight: 600;
	font-size: 0.9rem;
}

.cm-payout-option__hint {
	font-size: 0.8rem;
	color: #666;
}

.cm-payout-fields--hidden {
	display: none;
}

/* Multi-select checkboxes */
.cm-checkboxes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.cm-checkboxes__item {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.875rem;
	padding: 0.35rem 0.65rem;
	border: 1px solid #ddd;
	border-radius: 20px;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}

.cm-checkboxes__item:has(input:checked) {
	border-color: #0073aa;
	background: #e8f4fa;
}

.cm-checkboxes__item input[type="checkbox"] {
	display: none;
}

/* Buttons */
.cm-btn,
.cm-registration__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.5rem;
	font-size: 1rem;
	font-weight: 600;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	transition: background 0.15s ease;
	text-decoration: none;
}

.cm-btn--next,
.cm-registration__submit {
	background: #0073aa;
	color: #fff;
}

.cm-btn--next:hover,
.cm-registration__submit:hover {
	background: #005177;
}

.cm-btn--back {
	background: #f0f0f0;
	color: #444;
}

.cm-btn--back:hover {
	background: #e0e0e0;
}

.cm-step-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 1.5rem;
	gap: 1rem;
}

/* Error */
.cm-registration__error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-left: 4px solid #d63638;
	padding: 0.85rem 1rem;
	border-radius: 6px;
	margin-bottom: 1.25rem;
	font-size: 0.9rem;
	color: #7f1d1d;
}

/* Fee notice */
.cm-registration__fee-notice {
	background: #f0f7fc;
	border: 1px solid #bae0f5;
	padding: 0.85rem 1rem;
	border-radius: 6px;
	font-size: 0.875rem;
	color: #0369a1;
	margin-bottom: 1.25rem;
}

/* Login link */
.cm-registration__login-link {
	text-align: center;
	font-size: 0.875rem;
	margin-top: 1.25rem;
	color: #666;
}
