/**
 * Connection Card CSS
 * Mobile-optimized, thumb-friendly form styling
 *
 * @package Kingdom_Connect
 */

.kc-connection-card-container {
	max-width: 100%;
	margin: 20px auto;
	padding: 0 15px;
}

.kc-connection-card-form-wrapper {
	background: #fff;
	border-radius: 12px;
	padding: 30px 20px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	max-width: 500px;
	margin: 0 auto;
}

.kc-connection-card-title {
	margin: 0 0 10px 0;
	font-size: 28px;
	font-weight: 700;
	color: #23282d;
	text-align: center;
}

.kc-connection-card-description {
	margin: 0 0 30px 0;
	font-size: 16px;
	color: #666;
	text-align: center;
	line-height: 1.6;
}

.kc-connection-card-form {
	width: 100%;
}

.kc-form-field {
	margin-bottom: 25px;
}

.kc-form-label {
	display: block;
	margin-bottom: 8px;
	font-size: 16px;
	font-weight: 600;
	color: #23282d;
}

.kc-required {
	color: #dc3232;
	margin-left: 3px;
}

.kc-form-input {
	width: 100%;
	padding: 16px 18px;
	font-size: 18px; /* Larger for mobile */
	line-height: 1.5;
	color: #23282d;
	background: #f9f9f9;
	border: 2px solid #ddd;
	border-radius: 8px;
	box-sizing: border-box;
	transition: border-color 0.3s, background-color 0.3s;
	-webkit-appearance: none;
	appearance: none;
}

.kc-form-input:focus {
	outline: none;
	border-color: #4CAF50;
	background: #fff;
}

.kc-form-input.kc-field-error {
	border-color: #dc3232;
	background: #fff5f5;
}

.kc-field-error-message {
	display: block;
	margin-top: 5px;
	font-size: 14px;
	color: #dc3232;
	font-weight: 500;
}

/* Checkbox field styling */
.kc-form-field-checkbox {
	margin-bottom: 20px;
}

.kc-checkbox-label {
	display: flex;
	align-items: center;
	cursor: pointer;
	padding: 12px;
	background: #f9f9f9;
	border: 2px solid #ddd;
	border-radius: 8px;
	transition: background-color 0.3s, border-color 0.3s;
}

.kc-checkbox-label:hover {
	background: #f0f0f0;
	border-color: #ccc;
}

.kc-checkbox-label input[type="checkbox"] {
	margin: 0 12px 0 0;
	width: 24px;
	height: 24px;
	cursor: pointer;
	flex-shrink: 0;
	-webkit-appearance: none;
	appearance: none;
	background: #fff;
	border: 2px solid #ddd;
	border-radius: 4px;
	position: relative;
	transition: background-color 0.3s, border-color 0.3s;
}

.kc-checkbox-label input[type="checkbox"]:checked {
	background: #4CAF50;
	border-color: #4CAF50;
}

.kc-checkbox-label input[type="checkbox"]:checked::after {
	content: '\2713';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
}

.kc-checkbox-text {
	font-size: 16px;
	color: #23282d;
	line-height: 1.5;
	user-select: none;
}

/* Submit button */
.kc-form-actions {
	margin-top: 30px;
}

.kc-submit-button {
	width: 100%;
	padding: 18px 24px;
	font-size: 18px;
	font-weight: 700;
	color: #fff;
	background: #4CAF50;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.3s, transform 0.1s;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: 0 2px 5px rgba(76, 175, 80, 0.3);
}

.kc-submit-button:hover:not(:disabled) {
	background: #45a049;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4);
}

.kc-submit-button:active:not(:disabled) {
	transform: translateY(0);
	box-shadow: 0 2px 5px rgba(76, 175, 80, 0.3);
}

.kc-submit-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* Message display */
.kc-message {
	margin-top: 20px;
	padding: 16px 20px;
	border-radius: 8px;
	font-size: 16px;
	line-height: 1.6;
	text-align: center;
}

.kc-message-success {
	background: #d4edda;
	border: 2px solid #c3e6cb;
	color: #155724;
}

.kc-message-error {
	background: #f8d7da;
	border: 2px solid #f5c6cb;
	color: #721c24;
}

/* Mobile optimizations */
@media (max-width: 768px) {
	.kc-connection-card-container {
		padding: 0 10px;
	}

	.kc-connection-card-form-wrapper {
		padding: 25px 15px;
		border-radius: 8px;
	}

	.kc-connection-card-title {
		font-size: 24px;
	}

	.kc-connection-card-description {
		font-size: 15px;
		margin-bottom: 25px;
	}

	.kc-form-input {
		padding: 14px 16px;
		font-size: 16px; /* iOS zoom prevention */
	}

	.kc-submit-button {
		padding: 16px 20px;
		font-size: 16px;
	}

	.kc-checkbox-label {
		padding: 10px;
	}

	.kc-checkbox-text {
		font-size: 15px;
	}
}

/* Very small screens */
@media (max-width: 480px) {
	.kc-connection-card-form-wrapper {
		padding: 20px 12px;
	}

	.kc-connection-card-title {
		font-size: 22px;
	}

	.kc-form-field {
		margin-bottom: 20px;
	}
}

/* Thumb-friendly spacing - ensure buttons are large enough */
@media (hover: none) and (pointer: coarse) {
	.kc-submit-button {
		min-height: 48px; /* Minimum touch target size */
		padding: 14px 20px;
	}

	.kc-checkbox-label {
		min-height: 48px;
	}

	.kc-form-input {
		min-height: 48px;
	}
}

/* Print styles - hide form elements */
@media print {
	.kc-connection-card-container {
		display: none;
	}
}
