/**
 * Contractor Profile Styles
 * 
 * CSS styles for contractor profile form and My Account integration
 *
 * @package Defox\CustomerPointsAddonLite
 * @since 1.0.0
 */

/* Main wrapper */
.defox-contractor-profile-wrapper {
	max-width: 800px;
	margin: 0 auto;
}

.defox-contractor-profile-wrapper h2 {
	color: #333;
	border-bottom: 2px solid #0073aa;
	padding-bottom: 10px;
	margin-bottom: 20px;
}

.profile-description {
	background: #f0f6fc;
	border-left: 4px solid #0073aa;
	padding: 15px 20px;
	margin-bottom: 25px;
	font-size: 16px;
	line-height: 1.5;
}

/* Profile Status */
.profile-status {
	padding: 15px 20px;
	border-radius: 8px;
	margin-bottom: 25px;
	border: 1px solid;
}

.profile-status-complete {
	background: #d1eddb;
	border-color: #00a32a;
	color: #1e4620;
}

.profile-status-incomplete {
	background: #fcf2cd;
	border-color: #dba617;
	color: #614200;
}

.status-complete,
.status-incomplete {
	font-weight: 600;
	margin-left: 10px;
}

/* Form styling */
.defox-contractor-profile-form {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 0;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Fieldsets */
.defox-contractor-profile-form fieldset {
	border: none;
	border-bottom: 1px solid #eee;
	margin: 0;
	padding: 25px 30px;
	position: relative;
}

.defox-contractor-profile-form fieldset:last-child {
	border-bottom: none;
}

.defox-contractor-profile-form legend {
	font-size: 18px;
	font-weight: 600;
	color: #333;
	padding: 0 15px 0 0;
	margin-bottom: 20px;
	border-bottom: 1px solid #ddd;
	width: 100%;
	padding-bottom: 10px;
}

/* Form rows */
.form-row {
	margin-bottom: 20px;
	position: relative;
}

.form-row:last-child {
	margin-bottom: 0;
}

/* Labels */
.defox-contractor-profile-form label {
	display: block;
	font-weight: 600;
	color: #555;
	margin-bottom: 8px;
	line-height: 1.4;
}

.defox-contractor-profile-form label .required {
	color: #d63384;
	font-weight: bold;
	margin-left: 3px;
}

/* Checkbox labels */
.checkbox-label {
	display: flex !important;
	align-items: flex-start;
	font-weight: 500 !important;
	gap: 10px;
	line-height: 1.5;
	cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
	margin: 4px 0 0 0 !important;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
}

.consent-label {
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	padding: 15px;
	transition: all 0.2s ease;
}

.consent-label:hover {
	background: #e9ecef;
	border-color: #adb5bd;
}

.consent-label .required {
	color: #d63384;
	margin-left: 5px;
}

/* Form inputs */
.defox-contractor-profile-form input[type="text"],
.defox-contractor-profile-form select {
	width: 100%;
	padding: 12px 15px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 16px;
	line-height: 1.4;
	transition: all 0.2s ease;
	background: #fff;
}

.defox-contractor-profile-form input[type="text"]:focus,
.defox-contractor-profile-form select:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.defox-contractor-profile-form input[type="text"]:invalid {
	border-color: #d63384;
}

/* Small help text */
.form-row small {
	display: block;
	color: #666;
	font-size: 14px;
	margin-top: 5px;
	line-height: 1.4;
}

/* Conditional fields */
.conditional-field {
	transition: all 0.3s ease;
}

.conditional-field.hidden {
	display: none !important;
}

/* Form actions */
.form-actions {
	padding: 25px 30px;
	background: #f8f9fa;
	border-top: 1px solid #dee2e6;
	text-align: right;
	border-radius: 0 0 8px 8px;
}

.form-actions button {
	background: #0073aa;
	color: #fff;
	border: none;
	padding: 12px 30px;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	min-width: 200px;
}

.form-actions button:hover {
	background: #005a87;
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-actions button:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

.form-actions button:active {
	transform: translateY(0);
}

/* Specific field styling */
#tax-office {
	background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px;
	padding-right: 40px;
	appearance: none;
}

/* Loading state */
.form-loading {
	position: relative;
	pointer-events: none;
	opacity: 0.6;
}

.form-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid #0073aa;
	border-top-color: transparent;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

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

/* Responsive design */
@media (max-width: 768px) {
	.defox-contractor-profile-wrapper {
		margin: 0;
	}
	
	.defox-contractor-profile-form fieldset {
		padding: 20px 15px;
	}
	
	.form-actions {
		padding: 20px 15px;
		text-align: center;
	}
	
	.form-actions button {
		width: 100%;
	}
	
	.checkbox-label {
		gap: 8px;
	}
	
	.consent-label {
		padding: 12px;
	}
	
	.profile-description {
		padding: 12px 15px;
		font-size: 15px;
	}
}

@media (max-width: 480px) {
	.defox-contractor-profile-form {
		border-radius: 0;
		border-left: none;
		border-right: none;
	}
	
	.defox-contractor-profile-form fieldset {
		padding: 15px 10px;
	}
	
	.defox-contractor-profile-form legend {
		font-size: 16px;
	}
	
	.form-actions {
		padding: 15px 10px;
	}
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
	.conditional-field,
	.form-actions button,
	.consent-label {
		transition: none;
	}
	
	.form-loading::after {
		animation: none;
	}
}

/* High contrast mode */
@media (prefers-contrast: high) {
	.defox-contractor-profile-form {
		border-color: #000;
	}
	
	.defox-contractor-profile-form input[type="text"],
	.defox-contractor-profile-form select {
		border-color: #000;
	}
	
	.defox-contractor-profile-form input[type="text"]:focus,
	.defox-contractor-profile-form select:focus {
		border-color: #000;
		box-shadow: 0 0 0 2px #000;
	}
}

/* Print styles */
@media print {
	.form-actions {
		display: none;
	}
	
	.defox-contractor-profile-form {
		border: none;
		box-shadow: none;
	}
	
	.conditional-field {
		display: block !important;
	}
}
