/**
 * CPFA Forms - Frontend Styles
 *
 * Stylesheet for the abonnement form
 */

/* Container */
.cpfa-abonnement-form-container {
	max-width: 800px;
	margin: 0 auto;
	padding: 20px;
}

.cpfa-form-title {
	text-align: center;
	color: #333;
	margin-bottom: 30px;
	font-size: 28px;
}

/* Messages */
#cpfa-form-messages {
	margin-bottom: 20px;
}

.cpfa-message {
	padding: 15px 20px;
	border-radius: 4px;
	margin-bottom: 15px;
}

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

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

.cpfa-message-info {
	background-color: #d1ecf1;
	border: 1px solid #bee5eb;
	color: #0c5460;
}

/* Form */
.cpfa-form {
	background: #fff;
	border: 1px solid #e1e1e1;
	border-radius: 8px;
	padding: 30px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Sections */
.cpfa-form-section {
	margin-bottom: 30px;
	padding-bottom: 30px;
	border-bottom: 1px solid #e1e1e1;
}

.cpfa-form-section:last-of-type {
	border-bottom: none;
}

.cpfa-section-title {
	font-size: 20px;
	color: #0073aa;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid #0073aa;
}

/* Form Fields */
.cpfa-form-row {
	display: flex;
	gap: 20px;
	margin-bottom: 20px;
}

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

.cpfa-form-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	color: #333;
}

.cpfa-required {
	color: #d63638;
	font-weight: bold;
}

.cpfa-form-field input[type="text"],
.cpfa-form-field input[type="email"],
.cpfa-form-field input[type="tel"],
.cpfa-form-field input[type="file"] {
	width: 100%;
	padding: 10px 15px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 16px;
	transition: border-color 0.3s;
}

.cpfa-form-field input[type="text"]:focus,
.cpfa-form-field input[type="email"]:focus,
.cpfa-form-field input[type="tel"]:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 1px #0073aa;
}

.cpfa-field-half {
	flex: 1;
}

.cpfa-field-help {
	display: block;
	margin-top: 5px;
	font-size: 13px;
	color: #666;
	font-style: italic;
}

/* Radio Group */
.cpfa-radio-group {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.cpfa-radio-option {
	display: flex;
	align-items: flex-start;
	padding: 15px;
	border: 2px solid #ddd;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.3s;
}

.cpfa-radio-option:hover {
	border-color: #0073aa;
	background-color: #f8f9fa;
}

.cpfa-radio-option input[type="radio"] {
	margin-right: 12px;
	margin-top: 4px;
	width: 18px;
	height: 18px;
	cursor: pointer;
}

.cpfa-radio-option input[type="radio"]:checked + .cpfa-radio-label {
	color: #0073aa;
}

.cpfa-radio-option:has(input[type="radio"]:checked) {
	border-color: #0073aa;
	background-color: #e8f4f8;
}

.cpfa-radio-label {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.cpfa-radio-label strong {
	font-size: 16px;
}

.cpfa-radio-label small {
	color: #666;
	font-size: 13px;
}

/* Price Display */
.cpfa-price-display {
	margin-top: 20px;
	padding: 15px 20px;
	background-color: #e8f4f8;
	border: 2px solid #0073aa;
	border-radius: 6px;
	text-align: center;
	display: none;
}

.cpfa-price-display.visible {
	display: block;
}

.cpfa-price-label {
	font-size: 16px;
	color: #333;
	margin-right: 10px;
}

.cpfa-price-amount {
	font-size: 24px;
	font-weight: bold;
	color: #0073aa;
}

/* Payment Instructions */
.cpfa-payment-instructions {
	background-color: #fff3cd;
	border: 1px solid #ffc107;
	padding: 15px 20px;
	border-radius: 4px;
	margin-bottom: 20px;
	line-height: 1.8;
}

/* Payment Methods */
.cpfa-payment-methods {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	margin: 20px 0;
}

.cpfa-payment-method {
	border: 2px solid #ddd;
	border-radius: 8px;
	padding: 20px;
	text-align: center;
	background-color: #fff;
	transition: all 0.3s;
}

.cpfa-payment-method:hover {
	border-color: #0073aa;
	box-shadow: 0 4px 12px rgba(0, 115, 170, 0.1);
}

.cpfa-payment-method h4 {
	margin: 0 0 15px 0;
	color: #333;
	font-size: 18px;
}

.cpfa-qr-code {
	max-width: 200px;
	height: auto;
	margin: 15px auto;
	display: block;
	border: 1px solid #e1e1e1;
	border-radius: 4px;
}

.cpfa-payment-info {
	margin: 10px 0;
	font-size: 14px;
	color: #666;
}

.cpfa-payment-info strong {
	color: #333;
}

.cpfa-payment-single {
	grid-column: 1 / -1;
	max-width: 400px;
	margin: 0 auto;
}

/* Checkboxes */
.cpfa-checkbox-label {
	display: flex;
	align-items: flex-start;
	cursor: pointer;
}

.cpfa-checkbox-label input[type="checkbox"] {
	margin-right: 10px;
	margin-top: 4px;
	width: 18px;
	height: 18px;
	cursor: pointer;
}

.cpfa-checkbox-label a {
	color: #0073aa;
	text-decoration: underline;
}

/* Submit Button */
.cpfa-form-actions {
	text-align: center;
	margin-top: 30px;
}

.cpfa-submit-button {
	background-color: #0073aa;
	color: #fff;
	border: none;
	padding: 15px 40px;
	font-size: 18px;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.3s;
}

.cpfa-submit-button:hover {
	background-color: #005a87;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.cpfa-submit-button:active {
	transform: translateY(0);
}

.cpfa-submit-button:disabled {
	background-color: #ccc;
	cursor: not-allowed;
	transform: none;
}

.cpfa-loading {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-left: 15px;
	color: #666;
}

.cpfa-loading .spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid rgba(0, 115, 170, 0.3);
	border-top-color: #0073aa;
	border-radius: 50%;
	animation: cpfa-spin 0.8s linear infinite;
}

@keyframes cpfa-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Responsive */
@media (max-width: 768px) {
	.cpfa-form-row {
		flex-direction: column;
		gap: 0;
	}

	.cpfa-field-half {
		width: 100%;
	}

	.cpfa-form {
		padding: 20px;
	}

	.cpfa-payment-methods {
		grid-template-columns: 1fr;
	}

	.cpfa-submit-button {
		width: 100%;
	}

	.cpfa-loading {
		display: block;
		margin-left: 0;
		margin-top: 10px;
	}
}

@media (max-width: 480px) {
	.cpfa-abonnement-form-container {
		padding: 10px;
	}

	.cpfa-form-title {
		font-size: 22px;
	}

	.cpfa-section-title {
		font-size: 18px;
	}

	.cpfa-qr-code {
		max-width: 150px;
	}
}
