/**
 * Attendee Form Styles
 * Step 2 of registration flow
 * 
 * @package SureCartCourseExtension
 * @since 1.2.0
 */

/* ========================================
   Attendee Form Container
   ======================================== */

.sce-attendee-form {
	padding: 0;
	animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
	from {
		opacity: 0;
		transform: translateX(20px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* ========================================
   Form Header
   ======================================== */

.sce-attendee-form__header {
	margin-bottom: 1.5rem;
}

.sce-attendee-form__title {
	font-size: 0.875rem;
	font-weight: 600;
	color: #6B7280;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.5rem;
}

.sce-attendee-form__description {
	font-size: 0.875rem;
	color: #6B7280;
	line-height: 1.5;
}

/* ========================================
   Attendee Cards
   ======================================== */

.sce-attendee-card {
	background: #F9FAFB;
	border: 1px solid #E5E7EB;
	border-radius: 8px;
	padding: 1.5rem;
	margin-bottom: 1rem;
	transition: all 0.2s ease;
}

.sce-attendee-card:hover {
	border-color: #D1D5DB;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sce-attendee-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.25rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid #E5E7EB;
}

.sce-attendee-card__title {
	font-size: 1rem;
	font-weight: 600;
	color: #1F2937;
	margin: 0;
}

.sce-attendee-card__prefill {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: #6B7280;
	cursor: pointer;
	user-select: none;
}

.sce-attendee-card__prefill input[type="checkbox"] {
	width: 16px;
	height: 16px;
	border: 1px solid #D1D5DB;
	border-radius: 4px;
	cursor: pointer;
	accent-color: #00C896;
}

.sce-attendee-card__prefill:hover {
	color: #1F2937;
}

/* ========================================
   Form Fields
   ======================================== */

.sce-form-field {
	margin-bottom: 1.25rem;
}

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

.sce-form-field__label {
	display: block;
	font-size: 0.875rem;
	font-weight: 500;
	color: #374151;
	margin-bottom: 0.5rem;
}

.sce-form-field__label--required::after {
	content: " *";
	color: #DC2626;
}

.sce-form-field__input,
.sce-form-field__select,
.sce-form-field__textarea {
	width: 100%;
	padding: 0.625rem 0.875rem;
	font-size: 0.9375rem;
	color: #1F2937;
	background: #FFFFFF;
	border: 1px solid #D1D5DB;
	border-radius: 6px;
	transition: all 0.15s ease;
	font-family: inherit;
}

.sce-form-field__input:focus,
.sce-form-field__select:focus,
.sce-form-field__textarea:focus {
	outline: none;
	border-color: #00C896;
	box-shadow: 0 0 0 3px rgba(0, 200, 150, 0.1);
}

.sce-form-field__input::placeholder,
.sce-form-field__textarea::placeholder {
	color: #9CA3AF;
}

.sce-form-field__textarea {
	min-height: 80px;
	resize: vertical;
}

.sce-form-field__select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
	background-position: right 0.5rem center;
	background-repeat: no-repeat;
	background-size: 1.5em 1.5em;
	padding-right: 2.5rem;
	cursor: pointer;
}

.sce-form-field__hint {
	display: block;
	font-size: 0.8125rem;
	color: #6B7280;
	margin-top: 0.375rem;
	line-height: 1.4;
}

.sce-form-field__error {
	display: none;
	font-size: 0.8125rem;
	color: #DC2626;
	margin-top: 0.375rem;
	line-height: 1.4;
}

.sce-form-field--error .sce-form-field__input,
.sce-form-field--error .sce-form-field__select,
.sce-form-field--error .sce-form-field__textarea {
	border-color: #DC2626;
}

.sce-form-field--error .sce-form-field__error {
	display: block;
}

/* ========================================
   Checkbox Fields
   ======================================== */

.sce-form-field--checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.sce-form-field--checkbox .sce-form-field__input {
	width: 18px;
	height: 18px;
	margin-top: 0.125rem;
	flex-shrink: 0;
	cursor: pointer;
	accent-color: #00C896;
}

.sce-form-field--checkbox .sce-form-field__label {
	margin-bottom: 0;
	cursor: pointer;
	flex: 1;
}

.sce-form-field--checkbox .sce-form-field__label a {
	color: #00C896;
	text-decoration: underline;
}

.sce-form-field--checkbox .sce-form-field__label a:hover {
	color: #059669;
}

/* ========================================
   Field Groups (Two Column Layout)
   ======================================== */

.sce-form-field-group {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

@media (max-width: 640px) {
	.sce-form-field-group {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}
}

.sce-form-field-group .sce-form-field {
	margin-bottom: 0;
}

/* ========================================
   Conditional Fields
   ======================================== */

.sce-form-field--conditional {
	display: none;
	animation: fadeIn 0.2s ease-out;
}

.sce-form-field--conditional.is-visible {
	display: block;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ========================================
   Privacy & Terms Section
   ======================================== */

.sce-attendee-form__legal {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid #E5E7EB;
}

/* ========================================
   Loading State
   ======================================== */

.sce-attendee-form--loading {
	opacity: 0.6;
	pointer-events: none;
}

.sce-attendee-form__skeleton {
	padding: 1.5rem;
	background: #F9FAFB;
	border: 1px solid #E5E7EB;
	border-radius: 8px;
	margin-bottom: 1rem;
}

.sce-skeleton-line {
	height: 12px;
	background: linear-gradient(90deg, #E5E7EB 25%, #F3F4F6 50%, #E5E7EB 75%);
	background-size: 200% 100%;
	animation: shimmer 1.5s infinite;
	border-radius: 4px;
	margin-bottom: 0.75rem;
}

.sce-skeleton-line:last-child {
	margin-bottom: 0;
}

.sce-skeleton-line--short {
	width: 60%;
}

.sce-skeleton-line--medium {
	width: 80%;
}

@keyframes shimmer {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 640px) {
	.sce-attendee-card {
		padding: 1.25rem;
	}
	
	.sce-attendee-card__header {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}
	
	.sce-form-field__input,
	.sce-form-field__select,
	.sce-form-field__textarea {
		font-size: 16px; /* Prevents zoom on iOS */
	}
}

/* ========================================
   Accessibility
   ======================================== */

.sce-form-field__input:focus-visible,
.sce-form-field__select:focus-visible,
.sce-form-field__textarea:focus-visible {
	outline: 2px solid #00C896;
	outline-offset: 2px;
}

/* Screen reader only text */
.sce-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}
