/**
 * Airy Frontend Forms - Frontend Styles
 * 
 * @package Airy_Frontend_Forms
 */

/* ==========================================================================
   Form Wrapper & Container
   ========================================================================== */

.affcf-form-wrapper {
	max-width: 800px;
	margin: 2rem auto;
	padding: 2rem;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.affcf-form {
	display: block;
}

/* ==========================================================================
   Field Wrappers
   ========================================================================== */

.affcf-field-wrapper {
	margin-bottom: 1.5rem;
}

.affcf-field-wrapper:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
   Labels
   ========================================================================== */

.affcf-field-label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: #333;
	font-size: 14px;
}

.affcf-required {
	color: #dc3545;
	font-weight: bold;
}

/* ==========================================================================
   Input Fields
   ========================================================================== */

.affcf-input {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.5;
	color: #333;
	background-color: #fff;
	transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.affcf-input:focus {
	outline: 0;
	border-color: #0073aa;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.affcf-input:disabled,
.affcf-input[readonly] {
	background-color: #f5f5f5;
	cursor: not-allowed;
}

.affcf-input::placeholder {
	color: #999;
	opacity: 1;
}

/* Textarea specific */
.affcf-input-textarea {
	resize: vertical;
	min-height: 100px;
}

.affcf-input-content {
	min-height: 200px;
}

/* Number inputs */
.affcf-input-number {
	max-width: 200px;
}

/* ==========================================================================
   Select Dropdowns
   ========================================================================== */

.affcf-input-select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 12px;
	padding-right: 2.5rem;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
}

.affcf-input-select[multiple] {
	background-image: none;
	padding-right: 0.75rem;
	min-height: 150px;
}

/* ==========================================================================
   Checkbox & Radio Groups
   ========================================================================== */

.affcf-checkbox-group,
.affcf-radio-group {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.affcf-checkbox-label,
.affcf-radio-label {
	display: flex;
	align-items: center;
	cursor: pointer;
	font-weight: normal;
	margin-bottom: 0;
}

.affcf-checkbox-label input[type="checkbox"],
.affcf-radio-label input[type="radio"] {
	width: auto;
	margin-right: 0.5rem;
	cursor: pointer;
}

.affcf-true-false {
	font-weight: 600;
}

/* ==========================================================================
   File Upload
   ========================================================================== */

.affcf-image-upload-wrapper {
	position: relative;
}

.affcf-file-input {
	width: 100%;
	padding: 0.5rem;
	border: 2px dashed #ddd;
	border-radius: 4px;
	cursor: pointer;
}

.affcf-file-input:hover {
	border-color: #0073aa;
	background-color: #f8f9fa;
}

.affcf-image-preview {
	margin-top: 1rem;
	position: relative;
	display: inline-block;
}

.affcf-image-preview img {
	max-width: 300px;
	height: auto;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.affcf-remove-image {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	padding: 0.25rem 0.75rem;
	background: #dc3545;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
}

.affcf-remove-image:hover {
	background: #c82333;
}

/* ==========================================================================
   Help Text
   ========================================================================== */

.affcf-help-text {
	margin: 0.5rem 0 0;
	font-size: 13px;
	color: #666;
	font-style: italic;
}

/* ==========================================================================
   Submit Button
   ========================================================================== */

.affcf-submit-wrapper {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid #eee;
}

.affcf-submit-button {
	display: inline-block;
	padding: 0.75rem 2rem;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	background-color: #0073aa;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.15s ease-in-out;
}

.affcf-submit-button:hover {
	background-color: #005a87;
}

.affcf-submit-button:active {
	background-color: #004768;
}

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

.affcf-submit-button.affcf-submitting {
	position: relative;
	color: transparent;
}

.affcf-submit-button.affcf-submitting::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid #fff;
	border-top-color: transparent;
	border-radius: 50%;
	animation: affcf-spin 0.6s linear infinite;
}

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

/* ==========================================================================
   Messages & Notices
   ========================================================================== */

.affcf-message,
.affcf-error,
.affcf-notice {
	padding: 1rem 1.5rem;
	margin-bottom: 1.5rem;
	border-radius: 4px;
	font-size: 14px;
}

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

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

.affcf-notice {
	background-color: #d1ecf1;
	border: 1px solid #bee5eb;
	color: #0c5460;
}

.affcf-notice-warning {
	background-color: #fff3cd;
	border: 1px solid #ffeeba;
	color: #856404;
}

.affcf-notice p {
	margin: 0 0 0.5rem 0;
}

.affcf-notice p:last-child {
	margin-bottom: 0;
}

.affcf-notice a {
	color: inherit;
	text-decoration: underline;
	font-weight: 600;
}

.affcf-notice a:hover {
	text-decoration: none;
}

.affcf-notice .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
	vertical-align: text-bottom;
}

/* ==========================================================================
   Validation States
   ========================================================================== */

.affcf-field-wrapper.affcf-has-error .affcf-input {
	border-color: #dc3545;
}

.affcf-field-wrapper.affcf-has-error .affcf-input:focus {
	border-color: #dc3545;
	box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.affcf-field-error {
	display: block;
	margin-top: 0.5rem;
	font-size: 13px;
	color: #dc3545;
}

.affcf-field-wrapper.affcf-has-success .affcf-input {
	border-color: #28a745;
}

/* ==========================================================================
   WordPress Editor Integration
   ========================================================================== */

.affcf-field-wrapper .wp-editor-wrap {
	margin-top: 0.5rem;
}

.affcf-field-wrapper .wp-editor-container {
	border: 1px solid #ddd;
	border-radius: 4px;
}

/* ==========================================================================
   Taxonomy Fields
   ========================================================================== */

.affcf-taxonomy-field .affcf-checkbox-group,
.affcf-taxonomy-field .affcf-radio-group {
	max-height: 300px;
	overflow-y: auto;
	padding: 0.75rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #f9f9f9;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
	.affcf-form-wrapper {
		padding: 1rem;
		margin: 1rem;
	}
	
	.affcf-submit-button {
		width: 100%;
	}
	
	.affcf-image-preview img {
		max-width: 100%;
	}
}

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

.affcf-loading {
	position: relative;
	pointer-events: none;
	opacity: 0.6;
}

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

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

.affcf-input:focus-visible,
.affcf-submit-button:focus-visible {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

/* ==========================================================================
   Advanced Field Types - Week 8
   ========================================================================== */

/* WYSIWYG Editor */
.affcf-field-wrapper .mce-tinymce {
	border-color: #ddd !important;
	border-radius: 4px;
}

/* File Upload */
.affcf-file-upload-wrapper {
	position: relative;
}

.affcf-file-preview {
	margin-top: 1rem;
	padding: 0.75rem;
	background: #f8f9fa;
	border: 1px solid #ddd;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.affcf-file-name {
	font-size: 14px;
	color: #333;
	word-break: break-all;
}

.affcf-remove-file {
	padding: 0.25rem 0.75rem;
	background: #dc3545;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	margin-left: 1rem;
	flex-shrink: 0;
}

.affcf-remove-file:hover {
	background: #c82333;
}

/* Gallery Field */
.affcf-gallery-wrapper {
	position: relative;
}

/* Gallery Add Button */
.affcf-gallery-add-button-wrapper {
	margin-bottom: 1rem;
}

.affcf-gallery-add-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	background: #0073aa;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease;
	text-decoration: none;
}

.affcf-gallery-add-button:hover {
	background: #005a87;
	color: #fff;
}

.affcf-gallery-add-button .dashicon {
	font-size: 18px;
	line-height: 1;
}

/* Hidden file input */
.affcf-gallery-input-hidden {
	display: none !important;
}

/* Gallery Counter */
.affcf-gallery-count {
	margin-top: 0.5rem;
	margin-bottom: 0.5rem;
	font-size: 13px;
	color: #666;
}

.affcf-gallery-current-count {
	font-weight: 600;
	color: #0073aa;
}

.affcf-gallery-preview {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 1rem;
	margin-top: 1rem;
	padding: 1rem;
	background: #f8f9fa;
	border: 1px solid #ddd;
	border-radius: 4px;
	min-height: 150px;
}

.affcf-gallery-item {
	position: relative;
	aspect-ratio: 1;
	border: 2px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
	background: #fff;
}

.affcf-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.affcf-remove-gallery-item {
	position: absolute;
	top: 0.25rem;
	right: 0.25rem;
	width: 24px;
	height: 24px;
	background: #dc3545;
	color: #fff;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	font-size: 16px;
	font-weight: bold;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.affcf-remove-gallery-item:hover {
	background: #c82333;
}

/* Date/Time Pickers */
.affcf-input-date_picker,
.affcf-input-date_time_picker,
.affcf-input-time_picker {
	max-width: 250px;
}

/* Color Picker */
.affcf-input-color {
	max-width: 100px;
	height: 50px;
	padding: 0.25rem;
	cursor: pointer;
}

/* Repeater Field */
.affcf-repeater-wrapper {
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 1rem;
	background: #f8f9fa;
}

.affcf-repeater-rows {
	margin-bottom: 1rem;
}

.affcf-repeater-row {
	margin-bottom: 1rem;
	padding: 1rem;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
}

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

.affcf-repeater-row-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 0.75rem;
	margin-bottom: 0.75rem;
	border-bottom: 1px solid #eee;
}

.affcf-row-number {
	font-weight: 600;
	color: #333;
	font-size: 14px;
}

.affcf-remove-repeater-row {
	padding: 0.25rem 0.5rem;
	background: transparent;
	color: #dc3545;
	border: 1px solid #dc3545;
	border-radius: 4px;
	cursor: pointer;
	font-size: 12px;
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.affcf-remove-repeater-row:hover {
	background: #dc3545;
	color: #fff;
}

.affcf-remove-repeater-row .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.affcf-repeater-fields {
	display: grid;
	gap: 1rem;
}

.affcf-add-repeater-row {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	background: #0073aa;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
}

.affcf-add-repeater-row:hover {
	background: #005a87;
}

.affcf-add-repeater-row .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.affcf-add-repeater-row:disabled {
	background: #ccc;
	cursor: not-allowed;
}

/* Group Field */
.affcf-group-wrapper {
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 1rem;
	background: #f8f9fa;
}

.affcf-group-fields {
	display: grid;
	gap: 1rem;
}

.affcf-group-fields .affcf-field-wrapper {
	margin-bottom: 0;
}

/* Sub-fields styling */
.affcf-sub-field {
	background: #fff;
	padding: 0.75rem;
	border-radius: 4px;
}

.affcf-sub-field .affcf-field-label {
	font-size: 13px;
	margin-bottom: 0.375rem;
}

.affcf-sub-field .affcf-input {
	font-size: 13px;
	padding: 0.5rem;
}

/* Repeater template (hidden) */
.affcf-repeater-template {
	display: none !important;
}

/* ==========================================================================
   Advanced Field Responsive
   ========================================================================== */

@media (max-width: 768px) {
	.affcf-gallery-preview {
		grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
		gap: 0.5rem;
		padding: 0.5rem;
	}
	
	.affcf-repeater-row-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}
	
	.affcf-file-preview {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}
	
	.affcf-remove-file {
		margin-left: 0;
		width: 100%;
	}
}


/* ===================================
   Success/Error Messages
   =================================== */

.affcf-message {
	padding: 15px 20px;
	margin-bottom: 20px;
	border-radius: 4px;
	border-left: 4px solid;
	font-size: 14px;
	line-height: 1.5;
}

.affcf-message p {
	margin: 0;
}

.affcf-message-success {
	background-color: #d4edda;
	border-color: #28a745;
	color: #155724;
}

.affcf-message-error {
	background-color: #f8d7da;
	border-color: #dc3545;
	color: #721c24;
}

.affcf-message-warning {
	background-color: #fff3cd;
	border-color: #ffc107;
	color: #856404;
}

.affcf-message-info {
	background-color: #d1ecf1;
	border-color: #17a2b8;
	color: #0c5460;
}

/* Auto-Save Indicator */
.affcf-draft-indicator {
	background-color: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 10px 15px;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.affcf-draft-status {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #666;
}

.affcf-draft-icon {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background-color: #ccc;
	display: inline-block;
}

.affcf-draft-saving .affcf-draft-icon {
	background-color: #f0ad4e;
	animation: pulse 1s infinite;
}

.affcf-draft-saved .affcf-draft-icon {
	background-color: #5cb85c;
}

.affcf-draft-error .affcf-draft-icon {
	background-color: #d9534f;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.5; }
}

.affcf-save-draft {
	background: none;
	border: none;
	color: #0073aa;
	text-decoration: underline;
	cursor: pointer;
	font-size: 14px;
}

.affcf-save-draft:hover {
	color: #005a87;
}

/* Relationship Field Checkboxes */
.affcf-relationship-checkboxes {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background-color: #fafafa;
	max-height: 300px;
	overflow-y: auto;
}

.affcf-checkbox-item {
	margin: 0;
	padding: 0;
}

.affcf-checkbox-item label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	cursor: pointer;
	border-radius: 3px;
	transition: background-color 0.2s;
	margin: 0;
}

.affcf-checkbox-item label:hover {
	background-color: #f0f0f0;
}

.affcf-checkbox-item input[type="checkbox"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
	margin: 0;
	flex-shrink: 0;
}

.affcf-checkbox-item input[type="checkbox"]:checked + span {
	font-weight: 500;
	color: #0073aa;
}

.affcf-checkbox-item span {
	font-size: 14px;
	line-height: 1.4;
	color: #333;
}

/* Scrollbar styling for checkbox container */
.affcf-relationship-checkboxes::-webkit-scrollbar {
	width: 8px;
}

.affcf-relationship-checkboxes::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.affcf-relationship-checkboxes::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 4px;
}

.affcf-relationship-checkboxes::-webkit-scrollbar-thumb:hover {
	background: #555;
}

/* ==========================================================================
   Link Field
   ========================================================================== */

.affcf-link-field-wrapper {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.affcf-link-url-wrapper,
.affcf-link-title-wrapper {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.affcf-link-sub-label {
	font-size: 12px;
	color: #666;
	font-weight: 500;
}

.affcf-link-target-wrapper {
	margin-top: 0.25rem;
}

.affcf-link-target-label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 13px;
	color: #555;
	cursor: pointer;
}

.affcf-link-target-label input[type="checkbox"] {
	margin: 0;
}

.affcf-sub-link {
	padding: 0.75rem;
	background: #f9f9f9;
	border-radius: 4px;
}

/* ==========================================================================
   User Field
   ========================================================================== */

.affcf-user-select {
	width: 100%;
}

/* ==========================================================================
   oEmbed Field
   ========================================================================== */

.affcf-oembed-wrapper {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.affcf-oembed-preview {
	padding: 1rem;
	background: #f5f5f5;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.affcf-oembed-preview iframe {
	max-width: 100%;
}

/* ==========================================================================
   Message Field
   ========================================================================== */

.affcf-message-field {
	padding: 1rem;
	background: #f0f6fc;
	border-left: 4px solid #0073aa;
	border-radius: 0 4px 4px 0;
	color: #333;
	font-size: 14px;
	line-height: 1.6;
}

.affcf-message-field p {
	margin: 0 0 0.5rem 0;
}

.affcf-message-field p:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
   Tab Group (WP Admin Style Tabbed Interface)
   ========================================================================== */

.affcf-tab-group {
	margin: 15px 0;
}

.affcf-tab-nav {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #c3c4c7;
}

.affcf-tab-nav-item {
	margin: 0 0 -1px 0;
}

.affcf-tab-nav-item a {
	display: block;
	padding: 8px 14px;
	background: #f0f0f1;
	border: 1px solid #c3c4c7;
	border-bottom: none;
	margin-right: -1px;
	color: #50575e;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
	line-height: 1.4;
}

.affcf-tab-nav-item:first-child a {
	border-radius: 3px 0 0 0;
}

.affcf-tab-nav-item:last-child a {
	border-radius: 0 3px 0 0;
}

.affcf-tab-nav-item a:hover {
	background: #fff;
	color: #1d2327;
}

.affcf-tab-nav-item.active a {
	background: #fff;
	border-bottom: 1px solid #fff;
	color: #1d2327;
}

.affcf-tab-panel {
	padding: 15px;
	border: 1px solid #c3c4c7;
	border-top: none;
	background: #fff;
}

.affcf-tab-panel:not(.active) {
	display: none;
}

/* ==========================================================================
   Accordion Field
   ========================================================================== */

.affcf-accordion-field {
	border: 1px solid #ddd;
	border-radius: 4px;
	margin: 1rem 0;
	overflow: hidden;
}

.affcf-accordion-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.75rem 1rem;
	background: #f5f5f5;
	cursor: pointer;
	user-select: none;
	transition: background-color 0.2s ease;
}

.affcf-accordion-header:hover {
	background: #eee;
}

.affcf-accordion-title {
	font-weight: 600;
	color: #333;
}

.affcf-accordion-icon {
	font-size: 12px;
	color: #666;
	transition: transform 0.3s ease;
	display: inline-block;
}

.affcf-accordion-open .affcf-accordion-icon {
	transform: rotate(180deg);
}

.affcf-accordion-header:hover .affcf-accordion-icon {
	color: #333;
}

.affcf-accordion-content {
	display: none;
	padding: 1rem;
	background: #fff;
}

.affcf-accordion-open .affcf-accordion-content {
	display: block;
}

/* ==========================================================================
   Flexible Content Field
   ========================================================================== */

.affcf-flexible-content-wrapper {
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
}

.affcf-flexible-content-rows {
	background: #fafafa;
}

.affcf-flexible-content-row {
	border-bottom: 1px solid #ddd;
	background: #fff;
}

.affcf-flexible-content-row:last-child {
	border-bottom: none;
}

.affcf-flexible-row-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.75rem 1rem;
	background: #f5f5f5;
	border-bottom: 1px solid #ddd;
}

.affcf-flexible-row-title {
	font-weight: 600;
	color: #333;
}

.affcf-flexible-row-actions {
	display: flex;
	gap: 0.5rem;
}

.affcf-flexible-row-toggle,
.affcf-flexible-row-remove {
	padding: 0.25rem 0.5rem;
	border: none;
	background: #e0e0e0;
	border-radius: 3px;
	cursor: pointer;
	font-size: 12px;
	transition: background-color 0.2s ease;
}

.affcf-flexible-row-toggle:hover {
	background: #d0d0d0;
}

.affcf-flexible-row-remove {
	background: #dc3545;
	color: #fff;
}

.affcf-flexible-row-remove:hover {
	background: #c82333;
}

.affcf-flexible-row-content {
	padding: 1rem;
}

.affcf-flexible-sub-field {
	margin-bottom: 1rem;
}

.affcf-flexible-sub-field:last-child {
	margin-bottom: 0;
}

.affcf-flexible-content-add {
	padding: 1rem;
	background: #f5f5f5;
	border-top: 1px solid #ddd;
}

.affcf-flexible-content-add-label {
	font-size: 13px;
	color: #666;
	margin-bottom: 0.5rem;
}

.affcf-flexible-content-layouts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.affcf-add-layout-btn {
	padding: 0.5rem 1rem;
	border: 1px solid #0073aa;
	background: #fff;
	color: #0073aa;
	border-radius: 4px;
	cursor: pointer;
	font-size: 13px;
	transition: all 0.2s ease;
}

.affcf-add-layout-btn:hover {
	background: #0073aa;
	color: #fff;
}

/* ==========================================================================
   Nav Menu Field
   ========================================================================== */

.affcf-nav-menu-select {
	width: 100%;
}

/* ==========================================================================
   Icon Picker Field
   ========================================================================== */

/* Legacy icon picker wrapper (kept for backward compatibility) */
.affcf-icon-picker-wrapper {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

/* ==========================================================================
   Taxonomy Field (ACF)
   ========================================================================== */

.affcf-taxonomy-checkboxes,
.affcf-taxonomy-radios {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	max-height: 200px;
	overflow-y: auto;
	padding: 0.5rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fafafa;
}

.affcf-taxonomy-item label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	padding: 0.25rem;
}

.affcf-taxonomy-item label:hover {
	background: #f0f0f0;
	border-radius: 3px;
}

/* ==========================================================================
   Nested Group Fields
   ========================================================================== */

.affcf-nested-group {
	padding: 1rem;
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
}

.affcf-nested-field {
	margin-bottom: 1rem;
}

.affcf-nested-field:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
   Layout Elements in Sub-fields
   ========================================================================== */

.affcf-layout-element {
	padding: 0.75rem 1rem;
	background: #e9ecef;
	border-radius: 4px;
	margin: 0.5rem 0;
}

.affcf-layout-element strong {
	color: #495057;
	font-size: 13px;
}

/* ==========================================================================
   WordPress Admin-Like Field Styles
   ========================================================================== */

/* Image Field - WP Admin Style */
.affcf-image-field-wp {
	display: flex;
	align-items: center;
	gap: 10px;
}

.affcf-image-field-wp .affcf-no-image-text {
	color: #666;
	font-size: 13px;
}

.affcf-image-field-wp .affcf-add-image-btn {
	display: inline-block;
	padding: 4px 10px;
	background: #f6f7f7;
	border: 1px solid #2271b1;
	border-radius: 3px;
	color: #2271b1;
	font-size: 13px;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.2s ease;
}

.affcf-image-field-wp .affcf-add-image-btn:hover {
	background: #f0f0f1;
	border-color: #135e96;
	color: #135e96;
}

.affcf-image-field-wp .affcf-image-preview-wp {
	position: relative;
	display: inline-block;
	margin-right: 10px;
}

.affcf-image-field-wp .affcf-image-preview-wp img {
	max-width: 150px;
	max-height: 150px;
	border: 1px solid #ddd;
	border-radius: 3px;
}

.affcf-image-field-wp .affcf-remove-image-btn {
	position: absolute;
	top: -8px;
	right: -8px;
	width: 20px;
	height: 20px;
	background: #dc3545;
	color: #fff;
	border: 2px solid #fff;
	border-radius: 50%;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.affcf-image-field-wp .affcf-remove-image-btn:hover {
	background: #c82333;
}

.affcf-image-field-wp .affcf-file-input-hidden {
	display: none;
}

/* Group Field - WP Admin Style */
.affcf-group-wp {
	border: 1px solid #c3c4c7;
	border-left: 4px solid #2271b1;
	background: #fff;
	margin: 0;
	padding: 0;
}

.affcf-group-wp .affcf-group-inner {
	padding: 12px 15px;
}

.affcf-group-wp .affcf-group-field {
	margin-bottom: 15px;
	padding-bottom: 15px;
	border-bottom: 1px solid #f0f0f1;
}

.affcf-group-wp .affcf-group-field:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.affcf-group-wp .affcf-group-field-label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	color: #1e1e1e;
	margin-bottom: 8px;
}

/* Number Field - WP Admin Style with Spinner */
.affcf-number-field-wp {
	position: relative;
	display: inline-flex;
	align-items: center;
	max-width: 200px;
}

.affcf-number-field-wp input[type="number"] {
	width: 100%;
	padding: 6px 30px 6px 10px;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	font-size: 13px;
	line-height: 1.5;
	-moz-appearance: textfield;
}

.affcf-number-field-wp input[type="number"]::-webkit-inner-spin-button,
.affcf-number-field-wp input[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.affcf-number-spinner {
	position: absolute;
	right: 1px;
	top: 1px;
	bottom: 1px;
	display: flex;
	flex-direction: column;
	width: 24px;
	border-left: 1px solid #8c8f94;
	background: #f0f0f1;
	border-radius: 0 2px 2px 0;
}

.affcf-number-spinner button {
	flex: 1;
	border: none;
	background: transparent;
	cursor: pointer;
	padding: 0;
	font-size: 10px;
	color: #50575e;
	display: flex;
	align-items: center;
	justify-content: center;
}

.affcf-number-spinner button:hover {
	background: #dcdcde;
}

.affcf-number-spinner button:first-child {
	border-bottom: 1px solid #8c8f94;
}

/* URL Field - WP Admin Style with Globe Icon */
.affcf-url-field-wp {
	position: relative;
	display: flex;
	align-items: center;
}

.affcf-url-field-wp .affcf-url-icon {
	position: absolute;
	left: 10px;
	color: #8c8f94;
	font-size: 16px;
	pointer-events: none;
}

.affcf-url-field-wp input[type="url"],
.affcf-url-field-wp input[type="text"].affcf-url-input {
	width: 100%;
	padding: 6px 10px 6px 32px;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	font-size: 13px;
}

/* Range Field - WP Admin Style */
.affcf-range-field-wp {
	display: flex;
	align-items: center;
	gap: 15px;
}

.affcf-range-field-wp input[type="range"] {
	flex: 1;
	max-width: 200px;
	height: 8px;
	-webkit-appearance: none;
	background: #dcdcde;
	border-radius: 4px;
	outline: none;
}

.affcf-range-field-wp input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	background: #2271b1;
	border-radius: 50%;
	cursor: pointer;
}

.affcf-range-field-wp input[type="range"]::-moz-range-thumb {
	width: 16px;
	height: 16px;
	background: #2271b1;
	border-radius: 50%;
	cursor: pointer;
	border: none;
}

.affcf-range-field-wp .affcf-range-number {
	display: inline-flex;
	align-items: center;
}

.affcf-range-field-wp .affcf-range-number input {
	width: 60px;
	padding: 4px 8px;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	font-size: 13px;
	text-align: center;
}

/* Gallery Field - WP Admin Style */
.affcf-gallery-field-wp {
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	background: #fff;
}

.affcf-gallery-field-wp .affcf-gallery-items {
	min-height: 150px;
	padding: 10px;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: 10px;
	background: #f6f7f7;
}

.affcf-gallery-field-wp .affcf-gallery-item {
	position: relative;
	aspect-ratio: 1;
	border: 1px solid #dcdcde;
	border-radius: 3px;
	overflow: hidden;
	background: #fff;
}

.affcf-gallery-field-wp .affcf-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.affcf-gallery-field-wp .affcf-gallery-item .affcf-gallery-item-remove {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 20px;
	height: 20px;
	background: rgba(0,0,0,0.6);
	color: #fff;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.2s;
}

.affcf-gallery-field-wp .affcf-gallery-item:hover .affcf-gallery-item-remove {
	opacity: 1;
}

.affcf-gallery-field-wp .affcf-gallery-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px;
	border-top: 1px solid #c3c4c7;
	background: #fff;
}

.affcf-gallery-field-wp .affcf-add-to-gallery-btn {
	display: inline-block;
	padding: 6px 12px;
	background: #2271b1;
	border: none;
	border-radius: 3px;
	color: #fff;
	font-size: 13px;
	cursor: pointer;
	text-decoration: none;
}

.affcf-gallery-field-wp .affcf-add-to-gallery-btn:hover {
	background: #135e96;
}

.affcf-gallery-field-wp .affcf-bulk-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.affcf-gallery-field-wp .affcf-bulk-actions select {
	padding: 4px 8px;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	font-size: 13px;
	background: #fff;
}

/* Relationship Field - WP Admin Style Two Column */
.affcf-relationship-field-wp {
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	background: #fff;
}

.affcf-relationship-field-wp .affcf-relationship-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	background: #f6f7f7;
	border-bottom: 1px solid #c3c4c7;
}

.affcf-relationship-field-wp .affcf-relationship-search {
	flex: 1;
	padding: 4px 8px;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	font-size: 13px;
}

.affcf-relationship-field-wp .affcf-relationship-filter {
	padding: 4px 8px;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	font-size: 13px;
	background: #fff;
}

.affcf-relationship-field-wp .affcf-relationship-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	min-height: 200px;
}

.affcf-relationship-field-wp .affcf-relationship-choices,
.affcf-relationship-field-wp .affcf-relationship-selected {
	padding: 10px;
	overflow-y: auto;
	max-height: 250px;
}

.affcf-relationship-field-wp .affcf-relationship-choices {
	background: #f6f7f7;
	border-right: 1px solid #c3c4c7;
}

.affcf-relationship-field-wp .affcf-relationship-selected {
	background: #fff;
}

.affcf-relationship-field-wp .affcf-relationship-item {
	padding: 6px 10px;
	margin-bottom: 4px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 3px;
	cursor: pointer;
	font-size: 13px;
	transition: all 0.15s ease;
}

.affcf-relationship-field-wp .affcf-relationship-item:hover {
	border-color: #2271b1;
	background: #f0f6fc;
}

.affcf-relationship-field-wp .affcf-relationship-item.selected {
	background: #e7f3ff;
	border-color: #2271b1;
}

.affcf-relationship-field-wp .affcf-relationship-selected .affcf-relationship-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #f0f6fc;
	border-color: #2271b1;
}

.affcf-relationship-field-wp .affcf-relationship-item-remove {
	color: #d63638;
	font-size: 16px;
	cursor: pointer;
	padding: 0 4px;
}

.affcf-relationship-field-wp .affcf-relationship-item-remove:hover {
	color: #a00;
}

/* Button Group Field - WP Admin Style */
.affcf-button-group-wp {
	display: inline-flex;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	overflow: hidden;
}

.affcf-button-group-wp label {
	padding: 6px 14px;
	background: #f6f7f7;
	border-right: 1px solid #8c8f94;
	cursor: pointer;
	font-size: 13px;
	color: #50575e;
	transition: all 0.15s ease;
	margin: 0;
}

.affcf-button-group-wp label:last-child {
	border-right: none;
}

.affcf-button-group-wp label:hover {
	background: #f0f0f1;
}

.affcf-button-group-wp input[type="radio"] {
	display: none;
}

.affcf-button-group-wp input[type="radio"]:checked + span,
.affcf-button-group-wp label.active {
	background: #2271b1;
	color: #fff;
}

.affcf-button-group-wp label.active {
	background: #2271b1;
	color: #fff;
}

/* Radio Field - WP Admin Style */
.affcf-radio-group-wp {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	background: #f6f7f7;
}

.affcf-radio-group-wp label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 13px;
	margin: 0;
	padding: 4px 0;
}

.affcf-radio-group-wp input[type="radio"] {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: #2271b1;
}

/* Checkbox Field - WP Admin Style */
.affcf-checkbox-group-wp {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	background: #f6f7f7;
}

.affcf-checkbox-group-wp label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 13px;
	margin: 0;
	padding: 4px 0;
}

.affcf-checkbox-group-wp input[type="checkbox"] {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: #2271b1;
}

/* True/False Field - WP Admin Style */
.affcf-true-false-wp {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	background: #f6f7f7;
}

.affcf-true-false-wp input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: #2271b1;
}

.affcf-true-false-wp .affcf-true-false-message {
	font-size: 13px;
	color: #1e1e1e;
}

/* Select Field - WP Admin Style Multi-select */
.affcf-select-multi-wp {
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	background: #f6f7f7;
	min-height: 150px;
	padding: 0;
}

.affcf-select-multi-wp option {
	padding: 8px 10px;
	cursor: pointer;
}

.affcf-select-multi-wp option:checked {
	background: #2271b1;
	color: #fff;
}

/* File Field - WP Admin Style */
.affcf-file-field-wp {
	display: flex;
	align-items: center;
	gap: 10px;
}

.affcf-file-field-wp .affcf-no-file-text {
	color: #666;
	font-size: 13px;
}

.affcf-file-field-wp .affcf-add-file-btn {
	display: inline-block;
	padding: 4px 10px;
	background: #f6f7f7;
	border: 1px solid #2271b1;
	border-radius: 3px;
	color: #2271b1;
	font-size: 13px;
	cursor: pointer;
	text-decoration: none;
}

.affcf-file-field-wp .affcf-add-file-btn:hover {
	background: #f0f0f1;
	border-color: #135e96;
	color: #135e96;
}

.affcf-file-field-wp .affcf-file-preview-wp {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	background: #f6f7f7;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
}

.affcf-file-field-wp .affcf-file-icon {
	font-size: 20px;
	color: #50575e;
}

.affcf-file-field-wp .affcf-file-name {
	font-size: 13px;
	color: #1e1e1e;
}

.affcf-file-field-wp .affcf-remove-file-btn {
	color: #d63638;
	cursor: pointer;
	font-size: 16px;
	padding: 0 4px;
}

/* oEmbed Field - WP Admin Style */
.affcf-oembed-field-wp {
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	overflow: hidden;
}

.affcf-oembed-field-wp .affcf-oembed-input-wrapper {
	padding: 10px;
	background: #f6f7f7;
	border-bottom: 1px solid #c3c4c7;
}

.affcf-oembed-field-wp input {
	width: 100%;
	padding: 6px 10px;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	font-size: 13px;
}

.affcf-oembed-field-wp input::placeholder {
	color: #8c8f94;
}

.affcf-oembed-field-wp .affcf-oembed-preview {
	min-height: 150px;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #8c8f94;
}

.affcf-oembed-field-wp .affcf-oembed-preview .affcf-oembed-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.affcf-oembed-field-wp .affcf-oembed-preview .affcf-oembed-placeholder .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
	color: #c3c4c7;
}

/* WYSIWYG Field - WP Admin Style */
.affcf-wysiwyg-field-wp .affcf-wysiwyg-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	padding: 8px;
	background: #f6f7f7;
	border: 1px solid #c3c4c7;
	border-bottom: none;
	border-radius: 3px 3px 0 0;
}

.affcf-wysiwyg-field-wp .affcf-add-media-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	background: #2271b1;
	border: none;
	border-radius: 3px;
	color: #fff;
	font-size: 13px;
	cursor: pointer;
	margin-right: 10px;
}

.affcf-wysiwyg-field-wp .affcf-add-media-btn:hover {
	background: #135e96;
}

.affcf-wysiwyg-field-wp .affcf-toolbar-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
}

.affcf-wysiwyg-field-wp .affcf-toolbar-btn {
	padding: 4px 8px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	font-size: 12px;
	cursor: pointer;
	color: #50575e;
}

.affcf-wysiwyg-field-wp .affcf-toolbar-btn:hover {
	background: #f0f0f1;
	border-color: #8c8f94;
}

.affcf-wysiwyg-field-wp .affcf-wysiwyg-mode {
	margin-left: auto;
	display: flex;
}

.affcf-wysiwyg-field-wp .affcf-wysiwyg-mode button {
	padding: 4px 12px;
	background: #fff;
	border: 1px solid #c3c4c7;
	font-size: 12px;
	cursor: pointer;
	color: #50575e;
}

.affcf-wysiwyg-field-wp .affcf-wysiwyg-mode button:first-child {
	border-radius: 3px 0 0 3px;
	border-right: none;
}

.affcf-wysiwyg-field-wp .affcf-wysiwyg-mode button:last-child {
	border-radius: 0 3px 3px 0;
}

.affcf-wysiwyg-field-wp .affcf-wysiwyg-mode button.active {
	background: #f0f0f1;
	color: #1e1e1e;
}

/* Link Field - WP Admin Style */
.affcf-link-field-wp {
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	padding: 10px;
	background: #f6f7f7;
}

.affcf-link-field-wp .affcf-select-link-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 12px;
	background: #f6f7f7;
	border: 1px solid #2271b1;
	border-radius: 3px;
	color: #2271b1;
	font-size: 13px;
	cursor: pointer;
}

.affcf-link-field-wp .affcf-select-link-btn:hover {
	background: #f0f6fc;
}

.affcf-link-field-wp .affcf-link-preview {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	margin-top: 10px;
}

.affcf-link-field-wp .affcf-link-url-display {
	flex: 1;
	font-size: 13px;
	color: #2271b1;
	word-break: break-all;
}

.affcf-link-field-wp .affcf-link-edit,
.affcf-link-field-wp .affcf-link-remove {
	color: #50575e;
	cursor: pointer;
	font-size: 16px;
}

.affcf-link-field-wp .affcf-link-remove:hover {
	color: #d63638;
}

/* Repeater Field - WP Admin Style */
.affcf-repeater-field-wp {
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	background: #fff;
}

.affcf-repeater-field-wp .affcf-repeater-row-wp {
	border-bottom: 1px solid #c3c4c7;
}

.affcf-repeater-field-wp .affcf-repeater-row-wp:last-child {
	border-bottom: none;
}

.affcf-repeater-field-wp .affcf-repeater-row-header-wp {
	display: flex;
	align-items: center;
	padding: 10px 15px;
	background: #f6f7f7;
	border-bottom: 1px solid #c3c4c7;
	cursor: pointer;
}

.affcf-repeater-field-wp .affcf-repeater-row-index {
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #dcdcde;
	color: #50575e;
	font-weight: 600;
	font-size: 13px;
	border-radius: 50%;
	margin-right: 12px;
}

.affcf-repeater-field-wp .affcf-repeater-row-label {
	flex: 1;
	font-size: 13px;
	font-weight: 600;
	color: #1e1e1e;
}

.affcf-repeater-field-wp .affcf-repeater-row-actions {
	display: flex;
	gap: 5px;
}

.affcf-repeater-field-wp .affcf-repeater-row-action {
	padding: 4px 8px;
	background: transparent;
	border: none;
	cursor: pointer;
	color: #50575e;
	font-size: 16px;
}

.affcf-repeater-field-wp .affcf-repeater-row-action:hover {
	color: #2271b1;
}

.affcf-repeater-field-wp .affcf-repeater-row-action.remove:hover {
	color: #d63638;
}

.affcf-repeater-field-wp .affcf-repeater-row-content {
	padding: 15px;
}

.affcf-repeater-field-wp .affcf-add-row-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	padding: 12px;
	background: #f6f7f7;
	border: none;
	border-top: 1px solid #c3c4c7;
	cursor: pointer;
	font-size: 13px;
	color: #2271b1;
	font-weight: 600;
}

.affcf-repeater-field-wp .affcf-add-row-btn:hover {
	background: #f0f0f1;
}

/* Flexible Content Field - WP Admin Style */
.affcf-flexible-field-wp {
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	background: #fff;
}

.affcf-flexible-field-wp .affcf-flexible-header {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	padding: 8px 12px;
	background: #f6f7f7;
	border-bottom: 1px solid #c3c4c7;
}

.affcf-flexible-field-wp .affcf-flexible-toggle-btn {
	padding: 4px 10px;
	background: transparent;
	border: none;
	color: #2271b1;
	font-size: 12px;
	cursor: pointer;
}

.affcf-flexible-field-wp .affcf-flexible-toggle-btn:hover {
	text-decoration: underline;
}

.affcf-flexible-field-wp .affcf-flexible-add-row-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 12px;
	background: #2271b1;
	border: none;
	border-radius: 3px;
	color: #fff;
	font-size: 13px;
	cursor: pointer;
}

.affcf-flexible-field-wp .affcf-flexible-add-row-btn:hover {
	background: #135e96;
}

.affcf-flexible-field-wp .affcf-flexible-row {
	border-bottom: 1px solid #c3c4c7;
}

.affcf-flexible-field-wp .affcf-flexible-row:last-child {
	border-bottom: none;
}

.affcf-flexible-field-wp .affcf-flexible-row-header {
	display: flex;
	align-items: center;
	padding: 10px 15px;
	background: #f6f7f7;
	border-bottom: 1px solid #c3c4c7;
	cursor: pointer;
}

.affcf-flexible-field-wp .affcf-flexible-row-drag {
	width: 20px;
	margin-right: 10px;
	color: #c3c4c7;
	cursor: grab;
}

.affcf-flexible-field-wp .affcf-flexible-row-label {
	flex: 1;
	font-size: 13px;
	font-weight: 600;
	color: #1e1e1e;
}

.affcf-flexible-field-wp .affcf-flexible-row-actions {
	display: flex;
	gap: 5px;
}

.affcf-flexible-field-wp .affcf-flexible-row-action {
	padding: 4px 8px;
	background: transparent;
	border: none;
	cursor: pointer;
	color: #50575e;
	font-size: 14px;
}

.affcf-flexible-field-wp .affcf-flexible-row-action:hover {
	color: #2271b1;
}

.affcf-flexible-field-wp .affcf-flexible-row-action.remove:hover {
	color: #d63638;
}

.affcf-flexible-field-wp .affcf-flexible-row-content {
	padding: 15px;
}

/* Accordion Field - WP Admin Style */
.affcf-accordion-field-wp {
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	margin: 15px 0;
	overflow: hidden;
}

.affcf-accordion-field-wp .affcf-accordion-header-wp {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 15px;
	background: #f6f7f7;
	cursor: pointer;
	user-select: none;
	transition: background-color 0.2s;
}

.affcf-accordion-field-wp .affcf-accordion-header-wp:hover {
	background: #f0f0f1;
}

.affcf-accordion-field-wp .affcf-accordion-title-wp {
	font-weight: 600;
	font-size: 14px;
	color: #1e1e1e;
}

.affcf-accordion-field-wp .affcf-accordion-toggle {
	color: #50575e;
	font-size: 16px;
	transition: transform 0.3s;
}

.affcf-accordion-field-wp.open .affcf-accordion-toggle {
	transform: rotate(180deg);
}

.affcf-accordion-field-wp .affcf-accordion-content-wp {
	padding: 15px;
	background: #fff;
	border-top: 1px solid #c3c4c7;
	display: none;
}

.affcf-accordion-field-wp.open .affcf-accordion-content-wp {
	display: block;
}

/* Tab Group styles are now defined in the main Tab Group section above */

/* Date/Time Pickers - WP Admin Style */
.affcf-date-field-wp input {
	padding: 6px 10px;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	font-size: 13px;
	max-width: 200px;
}

/* Color Picker - WP Admin Style */
.affcf-color-field-wp {
	display: flex;
	align-items: center;
	gap: 10px;
}

.affcf-color-field-wp input[type="color"] {
	width: 50px;
	height: 30px;
	padding: 0;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	cursor: pointer;
}

.affcf-color-field-wp .affcf-color-value {
	font-size: 13px;
	color: #50575e;
	font-family: monospace;
}

/* User Field - WP Admin Style */
.affcf-user-field-wp select {
	width: 100%;
	max-width: 400px;
	padding: 6px 10px;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	font-size: 13px;
}

/* Taxonomy Field (ACF) - WP Admin Style */
.affcf-taxonomy-field-wp {
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	background: #f6f7f7;
	padding: 10px;
	max-height: 200px;
	overflow-y: auto;
}

.affcf-taxonomy-field-wp label {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 0;
	cursor: pointer;
	font-size: 13px;
}

.affcf-taxonomy-field-wp input {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: #2271b1;
}

/* Post Object / Page Link - WP Admin Style */
.affcf-post-object-field-wp select {
	width: 100%;
	padding: 6px 10px;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	font-size: 13px;
}

/* Password Field - WP Admin Style */
.affcf-password-field-wp {
	position: relative;
	max-width: 300px;
}

.affcf-password-field-wp input {
	width: 100%;
	padding: 6px 35px 6px 10px;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	font-size: 13px;
}

.affcf-password-field-wp .affcf-password-toggle {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	color: #50575e;
	font-size: 16px;
}

/* Email Field - WP Admin Style */
.affcf-email-field-wp input {
	width: 100%;
	max-width: 400px;
	padding: 6px 10px;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	font-size: 13px;
}

/* Text Field - WP Admin Style */
.affcf-text-field-wp input {
	width: 100%;
	padding: 6px 10px;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	font-size: 13px;
}

/* Textarea Field - WP Admin Style */
.affcf-textarea-field-wp textarea {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	font-size: 13px;
	resize: vertical;
	min-height: 100px;
}

/* Nav Menu Field - WP Admin Style */
.affcf-nav-menu-field-wp select {
	width: 100%;
	max-width: 400px;
	padding: 6px 10px;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	font-size: 13px;
}

/* Icon Picker - WP Admin Style (Visual Grid) */
.affcf-icon-picker-wp {
	position: relative;
}

.affcf-icon-picker-selected {
	display: flex;
	align-items: center;
	gap: 10px;
}

.affcf-icon-picker-preview {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	background: #f6f7f7;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	padding: 0 12px;
}

.affcf-icon-picker-preview .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
	line-height: 1;
}

.affcf-icon-picker-no-value {
	font-size: 13px;
	color: #8c8f94;
	white-space: nowrap;
}

.affcf-icon-picker-select-btn {
	padding: 6px 14px;
	background: #2271b1;
	color: #fff;
	border: 1px solid #2271b1;
	border-radius: 3px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
	transition: background 0.15s, border-color 0.15s;
}

.affcf-icon-picker-select-btn:hover {
	background: #135e96;
	border-color: #135e96;
}

.affcf-icon-picker-remove-btn {
	width: 32px;
	height: 32px;
	background: none;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	cursor: pointer;
	font-size: 18px;
	color: #cc1818;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	line-height: 1;
	transition: background 0.15s, color 0.15s;
}

.affcf-icon-picker-remove-btn:hover {
	background: #cc1818;
	color: #fff;
	border-color: #cc1818;
}

/* Icon Picker Modal/Dropdown */
.affcf-icon-picker-modal {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 100;
	width: 100%;
	max-width: 480px;
	margin-top: 5px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.affcf-icon-picker-tabs {
	display: flex;
	border-bottom: 1px solid #c3c4c7;
	background: #f6f7f7;
}

.affcf-icon-picker-tab {
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 600;
	color: #50575e;
	text-decoration: none;
	border-bottom: 2px solid transparent;
	cursor: pointer;
	transition: color 0.15s, border-color 0.15s;
}

.affcf-icon-picker-tab:hover {
	color: #1d2327;
}

.affcf-icon-picker-tab.active {
	color: #2271b1;
	border-bottom-color: #2271b1;
	background: #fff;
}

.affcf-icon-picker-search {
	padding: 10px;
	border-bottom: 1px solid #f0f0f1;
}

.affcf-icon-picker-search-input {
	width: 100%;
	padding: 6px 10px;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	font-size: 13px;
	box-sizing: border-box;
}

.affcf-icon-picker-content {
	display: none;
}

.affcf-icon-picker-content.active {
	display: block;
}

.affcf-icon-picker-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
	gap: 2px;
	padding: 10px;
	max-height: 260px;
	overflow-y: auto;
}

.affcf-icon-picker-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid transparent;
	border-radius: 3px;
	cursor: pointer;
	transition: background 0.1s, border-color 0.1s;
}

.affcf-icon-picker-icon:hover {
	background: #f0f0f1;
	border-color: #c3c4c7;
}

.affcf-icon-picker-icon.selected {
	background: #2271b1;
	border-color: #2271b1;
}

.affcf-icon-picker-icon.selected .dashicons {
	color: #fff;
}

.affcf-icon-picker-icon .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
	line-height: 1;
	color: #50575e;
}

.affcf-icon-picker-icon.hidden {
	display: none;
}

/* Icon Picker URL Tab */
.affcf-icon-picker-url-wrapper {
	display: flex;
	gap: 8px;
	padding: 15px 10px;
}

.affcf-icon-picker-url-input {
	flex: 1;
	padding: 6px 10px;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	font-size: 13px;
}

.affcf-icon-picker-url-apply {
	padding: 6px 14px;
	background: #2271b1;
	color: #fff;
	border: 1px solid #2271b1;
	border-radius: 3px;
	cursor: pointer;
	font-size: 13px;
	white-space: nowrap;
}

.affcf-icon-picker-url-apply:hover {
	background: #135e96;
}

.affcf-icon-picker-url-preview {
	padding: 0 10px 15px;
	text-align: center;
}

.affcf-icon-picker-url-preview img {
	max-width: 48px;
	max-height: 48px;
}

/* Message Field - WP Admin Style */
.affcf-message-field-wp {
	padding: 15px;
	background: #f0f6fc;
	border-left: 4px solid #72aee6;
	border-radius: 0 3px 3px 0;
	font-size: 13px;
	line-height: 1.6;
	color: #1e1e1e;
}

.affcf-message-field-wp p {
	margin: 0 0 10px 0;
}

.affcf-message-field-wp p:last-child {
	margin-bottom: 0;
}
