/**
 * Frontend Form Styles
 * Base styles for form rendering - extracted from includes/class-frontend.php
 * Dynamic styles are handled via PHP template in assets/css/frontend/form-styles-template.php
 */

/* Base wrapper styling - dynamic values will be injected via PHP */
.auto-form-builder-wrapper {
	position: relative;
	box-sizing: border-box;
	overflow: visible; /* Changed to visible to prevent dropdown clipping */

	/* border-radius and box-shadow applied dynamically from form Customize settings */
}

.auto-form-builder-wrapper * {
	box-sizing: border-box;
}

/* Form Header Styles */
.auto-form-builder-header {
	margin-bottom: 20px;
}

.auto-form-builder-title {
	margin: 0 0 15px;
	padding: 0;
	font-size: 24px;
	font-weight: 700;
	color: #1d2327;
	text-align: left;
}

.auto-form-builder-description {
	margin: 0 0 20px;
	padding: 0;
	font-size: 16px;
	color: #6b7280;
	line-height: 1.5;
	text-align: left;
}

/* Number Slider Styles */
.number-slider-wrapper {
	margin-top: 10px;
}

.number-slider-wrapper input[type="range"] {
	width: 100%;
	margin-bottom: 5px;
}

.slider-labels {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: #666;
}

.number-format-preview {
	font-size: 12px;
	color: #666;
	margin-top: 5px;
}

/* Number Field with Symbol Box */
.number-field-with-symbol {
	display: flex;
	align-items: stretch;
	position: relative;
	width: 100%;
}

.number-field-with-symbol input[type="number"] {
	flex: 1;
	border-radius: 0 4px 4px 0 !important;
	border-left: none !important;
}

.number-symbol-prefix {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 45px;
	padding: 0 12px;
	background: #f3f4f6;
	border: 1px solid #d1d5db;
	border-right: none;
	border-radius: 4px 0 0 4px;
	font-weight: 600;
	font-size: 16px;
	color: #374151;
	user-select: none;
	cursor: default;
}

.number-field-with-symbol input[type="number"]:focus {
	border-left: none !important;
}

.number-symbol-suffix {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 45px;
	padding: 0 12px;
	background: #f3f4f6;
	border: 1px solid #d1d5db;
	border-left: none;
	border-radius: 0 4px 4px 0;
	font-weight: 600;
	font-size: 16px;
	color: #374151;
	user-select: none;
	cursor: default;
}

.number-field-with-symbol input[type="number"]:has(+ .number-symbol-suffix) {
	border-radius: 4px 0 0 4px !important;
	border-right: none !important;
}

/* Selected files display - hidden by default, shown when files are selected via JS */
.selected-files-display {
	display: none;
}

.time-field-wrapper {
	position: relative;
	cursor: pointer;
	display: block;
	width: 100%;
}

.time-field-wrapper input {
	cursor: pointer;
}

.premium-feature-notice {
	padding: 12px;
	background: #fef3c7;
	border-left: 3px solid #f59e0b;
	color: #92400e;
}

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

.form-row {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin-bottom: 15px;
}

.required-indicator {
	color: #e74c3c;
}

.field-help-text {
	margin-top: 6px;
	font-size: 13px;
	color: #6b7280;
	line-height: 1.4;
}

.name-subfield {
	margin-bottom: 10px;
}

/* Modern File Upload Styles */
.auto-form-builder-wrapper .modern-file-upload-wrapper {
	position: relative;
	width: 100%;
	margin-bottom: 10px;
}

.auto-form-builder-wrapper .modern-file-upload-area {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 120px;
	padding: 24px;
	border: 2px dashed #e2e8f0;
	border-radius: 12px;
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
	cursor: pointer;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.auto-form-builder-wrapper .modern-file-upload-area:hover {
	border-color: #667eea;
	background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgb(102 126 234 / 15%);
}

.auto-form-builder-wrapper .modern-file-upload-area.drag-over {
	border-color: #4f46e5;
	background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
	transform: scale(1.02);
	box-shadow: 0 12px 30px rgb(79 70 229 / 20%);
}

.auto-form-builder-wrapper .modern-file-upload-area.has-files {
	border-color: #10b981;
	background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
}

.auto-form-builder-wrapper .file-upload-icon {
	width: 48px;
	height: 48px;
	margin-bottom: 16px;
	color: #667eea;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgb(102 126 234 / 10%);
	border-radius: 12px;
}

.auto-form-builder-wrapper .modern-file-upload-area:hover .file-upload-icon {
	color: #5a67d8;
	transform: scale(1.1);
	background: rgb(90 103 216 / 15%);
}

.auto-form-builder-wrapper .modern-file-upload-area.has-files .file-upload-icon {
	color: #10b981;
	background: rgb(16 185 129 / 10%);
}

.auto-form-builder-wrapper .file-upload-text {
	text-align: center;
}

.auto-form-builder-wrapper .file-upload-title {
	font-size: 16px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 4px;
	transition: color 0.3s ease;
}

.auto-form-builder-wrapper .modern-file-upload-area:hover .file-upload-title {
	color: #667eea;
}

.auto-form-builder-wrapper .modern-file-upload-area.has-files .file-upload-title {
	color: #10b981;
}

.auto-form-builder-wrapper .file-upload-subtitle {
	font-size: 14px;
	color: #6b7280;
	transition: color 0.3s ease;
}

.auto-form-builder-wrapper .selected-files-display {
	margin-top: 16px;
}

.auto-form-builder-wrapper .selected-files {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	overflow: visible;
	box-shadow: 0 1px 3px rgb(0 0 0 / 10%);
}

/* Ensure selected-files content is visible */
.auto-form-builder-wrapper .selected-files-display.has-files,
.auto-form-builder-wrapper .selected-files-display[style*="display: block"] {
	display: block !important;
}

.auto-form-builder-wrapper .selected-files > * {
	display: block;
	visibility: visible;
}

.auto-form-builder-wrapper .selected-file {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 16px;
	border-bottom: 1px solid #f3f4f6;
	transition: background-color 0.2s ease;
}

.auto-form-builder-wrapper .selected-file:last-child {
	border-bottom: none;
}

.auto-form-builder-wrapper .selected-file:hover {
	background-color: #f9fafb;
}

.auto-form-builder-wrapper .file-name {
	font-size: 14px;
	font-weight: 500;
	color: #374151;
	flex: 1;
	margin-right: 12px;
	word-break: break-word;
}

.auto-form-builder-wrapper .file-size {
	font-size: 12px;
	color: #6b7280;
	background: #f3f4f6;
	padding: 4px 8px;
	border-radius: 4px;
	font-weight: 500;
}

.auto-form-builder-wrapper .file-field-info {
	font-size: 13px;
	color: #6b7280;
	margin-top: 8px;
	padding: 8px 12px;
	background: #f8fafc;
	border-radius: 6px;
	border-left: 3px solid #e2e8f0;
}

/* Async File Upload with Progress */
.auto-form-builder-wrapper .modern-file-upload-area.uploading {
	border-color: #3b82f6;
	background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
	pointer-events: none;
}

.auto-form-builder-wrapper .modern-file-upload-area.uploading .file-upload-title {
	color: #3b82f6;
}

.auto-form-builder-wrapper .selected-files-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 14px;
	background: #f8fafc;
	border-bottom: 1px solid #e5e7eb;
	font-size: 13px;
	font-weight: 500;
	color: #374151;
}

.auto-form-builder-wrapper .clear-all-btn {
	background: none;
	border: none;
	color: #6b7280;
	font-size: 12px;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 4px;
	transition: all 0.2s ease;
}

.auto-form-builder-wrapper .clear-all-btn:hover {
	background: #fee2e2;
	color: #dc2626;
}

.auto-form-builder-wrapper .selected-file-item {
	display: flex !important;
	align-items: center;
	padding: 12px 14px;
	border-bottom: 1px solid #f3f4f6;
	position: relative;
	overflow: visible;
	transition: background-color 0.2s ease;
	min-height: 72px;
	opacity: 1 !important;
	transform: none !important;
	visibility: visible !important;
}

.auto-form-builder-wrapper .selected-file-item:last-child {
	border-bottom: none;
}

.auto-form-builder-wrapper .selected-file-item:hover {
	background-color: #f9fafb;
}

/* Progress bar overlay */
.auto-form-builder-wrapper .upload-progress-bar {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	background: linear-gradient(90deg, #dbeafe 0%, #bfdbfe 100%);
	transition: width 0.3s ease;
	z-index: 0;
}

.auto-form-builder-wrapper .selected-file-item > * {
	position: relative;
	z-index: 1;
}

.auto-form-builder-wrapper .file-preview-container {
	display: flex !important;
	align-items: center;
	gap: 12px;
	flex: 1;
	min-width: 0;
	visibility: visible !important;
}

.auto-form-builder-wrapper .file-image-preview {
	width: 48px;
	height: 48px;
	overflow: hidden;
	border-radius: 8px;
	border: 2px solid #e5e7eb;
	flex-shrink: 0;
	background: #f3f4f6;
}

.auto-form-builder-wrapper .file-image-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.auto-form-builder-wrapper .file-icon-preview {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f3f4f6;
	border-radius: 8px;
	flex-shrink: 0;
}

.auto-form-builder-wrapper .file-info {
	flex: 1;
	min-width: 0;
	display: block !important;
	visibility: visible !important;
}

.auto-form-builder-wrapper .file-info .file-name {
	font-size: 14px;
	font-weight: 500;
	color: #374151;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 0 0 4px;
}

.auto-form-builder-wrapper .file-details {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.auto-form-builder-wrapper .file-details .file-size {
	font-size: 12px;
	color: #6b7280;
	background: #f3f4f6;
	padding: 2px 6px;
	border-radius: 4px;
}

.auto-form-builder-wrapper .file-status {
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 10px;
}

.auto-form-builder-wrapper .file-status.pending {
	background: #f3f4f6;
	color: #6b7280;
}

.auto-form-builder-wrapper .file-status.uploading {
	background: #dbeafe;
	color: #2563eb;
}

.auto-form-builder-wrapper .file-status.complete {
	background: #d1fae5;
	color: #059669;
}

.auto-form-builder-wrapper .file-status.error {
	background: #fee2e2;
	color: #dc2626;
}

.auto-form-builder-wrapper .remove-file-btn {
	display: flex !important;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	padding: 6px;
	cursor: pointer;
	color: #9ca3af;
	border-radius: 4px;
	transition: all 0.2s ease;
	flex-shrink: 0;
	margin-left: 8px;
	visibility: visible !important;
}

.auto-form-builder-wrapper .remove-file-btn:hover {
	background: #fee2e2;
	color: #dc2626;
}

/* File upload errors */
.auto-form-builder-wrapper .file-upload-errors {
	color: #dc2626;
	font-size: 12px;
	margin-top: 8px;
	padding: 8px 12px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 6px;
}

/* Status-based item styling */
.auto-form-builder-wrapper .selected-file-item.status-error {
	background: #fef2f2;
}

.auto-form-builder-wrapper .selected-file-item.status-complete {
	background: #f0fdf4;
}

/* Form layout - two column */
.auto-form-builder-wrapper.layout-two-column .auto-form-builder-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.auto-form-builder-wrapper.layout-two-column .submit-wrapper {
	grid-column: 1 / -1;
}

@media (width <= 768px) {
	.auto-form-builder-wrapper.layout-two-column .auto-form-builder-form {
		grid-template-columns: 1fr;
	}
}

/* Form layout - inline */
.auto-form-builder-wrapper.layout-inline .auto-form-builder-form {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: flex-end;
}

.auto-form-builder-wrapper.layout-inline .form-field {
	flex: 1 1 200px;
	margin-bottom: 0;
}

.auto-form-builder-wrapper.layout-inline .submit-wrapper {
	flex: 0 0 auto;
	margin-top: 0;
}

@media (width <= 768px) {
	.auto-form-builder-wrapper.layout-inline .auto-form-builder-form {
		flex-direction: column;
	}
}

/* Base form elements - structural styles only */
.auto-form-builder-wrapper .form-field label {
	display: block;
	margin-bottom: 8px;

	/* font-weight applied dynamically from form Customize settings */
}

.auto-form-builder-wrapper .form-field input[type="text"],
.auto-form-builder-wrapper .form-field input[type="email"],
.auto-form-builder-wrapper .form-field input[type="number"],
.auto-form-builder-wrapper .form-field input[type="tel"],
.auto-form-builder-wrapper .form-field input[type="date"],
.auto-form-builder-wrapper .form-field input[type="time"],
.auto-form-builder-wrapper .form-field input[type="search"],
.auto-form-builder-wrapper .form-field input[type="url"],
.auto-form-builder-wrapper .form-field input[type="password"],
.auto-form-builder-wrapper .form-field textarea,
.auto-form-builder-wrapper .form-field select {
	width: 100%;
	max-width: 100%;
	transition: all 0.3s ease;
	box-sizing: border-box;

	/* All visual styles (padding, border, border-radius, font-size, color, background) applied dynamically from form Customize settings */
}

/* Textarea field - ensure rows attribute works */
.auto-form-builder-wrapper .form-field textarea {
	height: auto;
	min-height: auto;
	resize: vertical;
	line-height: 1.5;
}

/* Normalize select to visually match inputs */
.auto-form-builder-wrapper .form-field select {
	appearance: none;
	padding-right: 30px;
	background-image: none;
}

/* Multiple select styling */
.auto-form-builder-wrapper .form-field select.multiple-select {
	color: transparent !important;
}

/* Search and URL input normalization - normalize sizing while preserving functionality */
.auto-form-builder-wrapper .form-field input[type="search"] {
	/* Only normalize box-sizing and dimensions, preserve search functionality like clear button */
	box-sizing: border-box;
}

.auto-form-builder-wrapper .form-field input[type="url"] {
	/* Only normalize box-sizing and dimensions, preserve URL functionality like mobile keyboard */
	box-sizing: border-box;
}

.auto-form-builder-wrapper .form-field select:not(.multiple-select) {
	height: 42px !important;
	line-height: 1;
}

.auto-form-builder-wrapper .multi-select-overlay-wrapper {
	position: relative !important;
	width: 100% !important;
}

.auto-form-builder-wrapper .selected-values-overlay {
	position: absolute !important;
	inset: 1px 30px 1px 1px !important;
	display: flex !important;
	align-items: center !important;
	pointer-events: none !important;
	padding: 0 13px !important;
	line-height: 1 !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	white-space: nowrap !important;
	z-index: 10 !important;
}

.auto-form-builder-wrapper .multi-select-overlay-wrapper::after {
	content: "?" !important;
	position: absolute !important;
	right: 12px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	font-size: 12px !important;
	color: #666 !important;
	pointer-events: none !important;
	z-index: 3 !important;
}

/* Focus states - applied dynamically from form Customize settings */
.auto-form-builder-wrapper .form-field input:focus,
.auto-form-builder-wrapper .form-field textarea:focus,
.auto-form-builder-wrapper .form-field select:focus {
	outline: none;

	/* border-color and box-shadow applied dynamically from form Customize settings */
}

/* Time field wrapper */
.auto-form-builder-wrapper .form-field .time-field-wrapper {
	position: relative;
	display: block;
	width: 100%;
}

.auto-form-builder-wrapper .form-field .field-description {
	font-size: 14px;
	color: #666;
	margin-top: 5px;
}

.auto-form-builder-wrapper .form-field.required label::after {
	content: " *";
	color: #f03e3e;
}

/* Submit button base styles - structure only */
.auto-form-builder-wrapper button[type="submit"] {
	cursor: pointer;
	transition: all 0.3s ease;

	/* All visual styles (border, border-radius, padding, font-size, font-weight) applied dynamically from form Customize settings */
}

.auto-form-builder-wrapper .submit-wrapper {
	text-align: left;
	margin-top: 20px;
}

/* Field width classes */
.auto-form-builder-wrapper .form-field.field-width-half {
	width: 48%;
	display: inline-block;
	margin-right: 2%;
}

.auto-form-builder-wrapper .form-field.field-width-third {
	width: 31%;
	display: inline-block;
	margin-right: 2%;
}

.auto-form-builder-wrapper .form-field.field-width-two-thirds {
	width: 65%;
	display: inline-block;
	margin-right: 2%;
}

/* Success message */
.auto-form-builder-success {
	background-color: #d3f9d8;
	border-left: 4px solid #37b24d;
	color: #2b8a3e;
	padding: 15px;
	margin-bottom: 20px;
	border-radius: 4px;
}

/* Error message */
.auto-form-builder-error {
	background: linear-gradient(135deg, #fef2f2 0%, #fef1f1 100%);
	border: 1px solid #fca5a5;
	border-left: 4px solid #ef4444;
	color: #dc2626;
	padding: 16px 20px;
	margin-bottom: 24px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgb(239 68 68 / 10%);
}

.auto-form-builder-error strong {
	color: #b91c1c;
	font-weight: 600;
	display: block;
	margin-bottom: 8px;
}

.auto-form-builder-error ul {
	margin: 8px 0 0;
	padding: 0;
	list-style: none !important;
	list-style-type: none !important;
}

.auto-form-builder-error li {
	margin-bottom: 6px;
	padding-left: 0;
	line-height: 1.5;
	list-style: none !important;
	list-style-type: none !important;
}

.auto-form-builder-error li::before {
	display: none !important;
	content: none !important;
}

.auto-form-builder-error li::marker {
	display: none !important;
	content: none !important;
}

.auto-form-builder-error li strong {
	color: #b91c1c;
	font-weight: 600;
	margin: 0;
	display: inline;
	margin-bottom: 0;
}

.auto-form-builder-error li strong::before,
.auto-form-builder-error li strong::after {
	display: none !important;
	content: none !important;
}

/* Enhanced error message styles */
.auto-form-builder-error-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}

.auto-form-builder-error-title-icon {
	font-size: 20px;
	font-weight: bold;
	color: #dc2626;
	line-height: 1;
}

.auto-form-builder-error-title {
	color: #b91c1c;
	font-size: 16px;
	font-weight: 600;
	margin: 0;
	display: inline-block;
}

.auto-form-builder-error-summary {
	color: #dc2626;
	font-size: 14px;
	margin: 0 0 12px;
	font-weight: 500;
}

.auto-form-builder-error-list {
	margin: 0;
	padding: 0;
	list-style: none !important;
}

.auto-form-builder-error-item {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 8px 12px;
	margin-bottom: 8px;
	background: #fff;
	border: 1px solid #fecaca;
	border-radius: 6px;
	list-style: none !important;
	transition: all 0.2s ease;
}

.auto-form-builder-error-item:hover {
	background: #fef8f8;
	border-color: #fca5a5;
	box-shadow: 0 1px 3px rgb(239 68 68 / 8%);
}

.auto-form-builder-error-item:last-child {
	margin-bottom: 0;
}

.auto-form-builder-error-item::before,
.auto-form-builder-error-item::marker {
	display: none !important;
	content: none !important;
}

.auto-form-builder-error-icon {
	flex-shrink: 0;
	font-size: 16px;
	color: #dc2626;
	line-height: 1.5;
	font-weight: bold;
}

.auto-form-builder-error-field {
	flex-shrink: 0;
	color: #b91c1c;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.5;
}

.auto-form-builder-error-message {
	color: #991b1b;
	font-size: 14px;
	line-height: 1.5;
	flex: 1;
}

/* Responsive error message */
@media (width <= 768px) {
	.auto-form-builder-error {
		padding: 14px 16px;
		margin-bottom: 20px;
	}

	.auto-form-builder-error::before {
		top: 14px;
		left: 14px;
	}

	.auto-form-builder-error strong {
		margin-left: 20px;
	}

	.auto-form-builder-error ul {
		margin-left: 20px;
	}

	.auto-form-builder-error-header {
		gap: 8px;
	}

	.auto-form-builder-error-item {
		flex-direction: column;
		gap: 6px;
		padding: 10px;
	}

	.auto-form-builder-error-field {
		display: block;
		margin-bottom: 4px;
	}
}

/* Background overlay */
.auto-form-builder-wrapper::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	border-radius: 8px;
}

.auto-form-builder-wrapper .auto-form-builder-form {
	position: relative;
	z-index: 1;
}

/* ============================================
   CHECKBOX & RADIO FIELD LAYOUT STYLES
   ============================================ */

/* Base checkbox/radio option styling */
.checkbox-option,
.radio-option {
	display: flex;
	align-items: center;
	cursor: pointer;
}

.checkbox-option input[type="checkbox"],
.radio-option input[type="radio"] {
	margin-right: 8px;
	cursor: pointer;
}

/* COLUMN LAYOUT (Default/Vertical) - Stack vertically */
.checkbox-container-column,
.radio-container-column {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* ROW LAYOUT (Horizontal) - Side by side */
.checkbox-container-row,
.radio-container-row {
	display: flex;
	flex-flow: row wrap;
	gap: 20px;
	align-items: center;
}

/* GRID LAYOUT - 2-column grid */
.checkbox-container-grid,
.radio-container-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

/* Select All option styling */
.checkbox-option.checkbox-select-all {
	font-weight: 600;
	border-bottom: 1px solid #e5e7eb;
	padding-bottom: 10px;
	margin-bottom: 5px;
}

/* Make Select All span full width in grid layout */
.checkbox-container-grid .checkbox-option.checkbox-select-all {
	grid-column: 1 / -1;
}

/* Make Select All span full width in row layout */
.checkbox-container-row .checkbox-option.checkbox-select-all {
	width: 100%;
	flex-basis: 100%;
}

/* None option styling */
.checkbox-option.checkbox-none {
	font-style: italic;
	opacity: 0.9;
}

/* Other option with text input */
.checkbox-option.checkbox-other {
	flex-wrap: wrap;
}

.checkbox-other-text {
	margin-left: 10px;
	padding: 6px 10px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 14px;
	flex: 1;
	min-width: 150px;
	display: none; /* Hidden by default, shown via JS when Other is checked */
}

.checkbox-other-text:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 2px rgb(59 130 246 / 20%);
}

/* Radio Other text input - hidden by default */
.radio-other-text {
	margin-top: 8px;
	padding: 6px 10px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 14px;
	width: 100%;
	max-width: 300px;
	display: none; /* Hidden by default, shown via JS when Other is selected */
}

.radio-other-text:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 2px rgb(59 130 246 / 20%);
}

/* Single checkbox styling */
.checkbox-single {
	display: flex;
	align-items: center;
	cursor: pointer;
}

.checkbox-single input[type="checkbox"] {
	margin-right: 8px;
	cursor: pointer;
}

/* Responsive adjustments */
@media (width <= 768px) {
	/* Grid layouts become single column on mobile */
	.checkbox-container-grid,
	.radio-container-grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	/* Row layouts stack vertically on mobile */
	.checkbox-container-row,
	.radio-container-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
}
