/**
 * Professional Forms Styles
 *
 * @package Coursee
 * @since 1.0.0
 */

/* Form Wrapper */
.coursee-form-wrapper {
	max-width: 1000px;
	margin: 2rem auto;
	padding: 0;
}

/* Form Header */
.form-header {
	background: #3b82f6;
	color: #fff;
	padding: 2.5rem;
	border-radius: 12px 12px 0 0;
	margin-bottom: 0;
}

.form-header h2 {
	margin: 0 0 0.5rem 0;
	font-size: 2rem;
	font-weight: 700;
	color: #fff;
}

.form-description {
	margin: 0;
	opacity: 0.95;
	font-size: 1rem;
	line-height: 1.6;
}

/* Form Container */
.coursee-form {
	background: #fff;
	border-radius: 0 0 12px 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	padding: 2.5rem;
}

/* Form Sections */
.form-section {
	margin-bottom: 2.5rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid #e5e7eb;
}

.form-section:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.section-title {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 1.5rem;
	font-weight: 600;
	color: #1f2937;
	margin: 0 0 1.5rem 0;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid #667eea;
}

.section-icon {
	font-size: 1.75rem;
}

.questions-count {
	font-size: 0.875rem;
	font-weight: 400;
	color: #6b7280;
	margin-left: auto;
}

/* Form Groups */
.form-group {
	margin-bottom: 1.75rem;
}

.form-group:last-child {
	margin-bottom: 0;
}

/* Labels */
.coursee-form label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: #374151;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.field-hint {
	display: block;
	font-weight: 400;
	font-size: 0.8125rem;
	color: #6b7280;
	margin-top: 0.25rem;
}

.required {
	color: #ef4444;
	font-weight: 700;
	margin-left: 0.25rem;
}

.currency {
	font-weight: 400;
	font-size: 0.875rem;
	color: #6b7280;
}

/* Form Controls */
.form-control {
	width: 100%;
	padding: 0.875rem 1rem;
	border: 2px solid #e5e7eb;
	border-radius: 8px;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: #1f2937;
	background-color: #fff;
	transition: all 0.2s ease;
}

.form-control:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
	color: #9ca3af;
}

.form-control:disabled {
	background-color: #f3f4f6;
	cursor: not-allowed;
}

/* Form Rows */
.form-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1.5rem;
}

@media (max-width: 768px) {
	.form-row {
		grid-template-columns: 1fr;
	}
}

/* Input Groups */
.input-group {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.input-prefix {
	padding: 0.875rem 0.75rem;
	background-color: #f3f4f6;
	border: 2px solid #e5e7eb;
	border-right: none;
	border-radius: 8px 0 0 8px;
	color: #6b7280;
	font-weight: 600;
}

.input-group .form-control {
	border-radius: 0 8px 8px 0;
}

/* Character Count */
.char-count {
	text-align: right;
	font-size: 0.75rem;
	color: #9ca3af;
	margin-top: 0.25rem;
}

.char-count .current {
	font-weight: 600;
}

/* Form Text */
.form-text {
	display: block;
	margin-top: 0.5rem;
	font-size: 0.8125rem;
	color: #6b7280;
}

/* Checkbox Groups */
.checkbox-group {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	cursor: pointer;
	font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
	margin-top: 0.25rem;
	width: 18px;
	height: 18px;
	cursor: pointer;
	accent-color: #667eea;
}

.checkbox-label span {
	flex: 1;
	line-height: 1.5;
}

/* Image Upload */
.image-upload-wrapper {
	position: relative;
}

.image-upload-placeholder {
	border: 2px dashed #d1d5db;
	border-radius: 8px;
	padding: 3rem 2rem;
	text-align: center;
	background-color: #f9fafb;
	transition: all 0.2s ease;
}

.image-upload-placeholder:hover {
	border-color: #667eea;
	background-color: #f3f4f6;
}

.upload-icon {
	font-size: 3rem;
	margin-bottom: 1rem;
}

.upload-hint {
	margin: 0.75rem 0 0 0;
	font-size: 0.8125rem;
	color: #6b7280;
}

.image-preview {
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	border: 2px solid #e5e7eb;
	margin-bottom: 1rem;
}

.image-preview img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 400px;
	object-fit: cover;
}

.upload-placeholder {
	border: 2px dashed #cbd5e1;
	border-radius: 12px;
	padding: 3rem 2rem;
	text-align: center;
	background: #f8fafc;
	transition: all 0.3s ease;
	cursor: pointer;
}

.upload-placeholder:hover {
	border-color: #3b82f6;
	background: #eff6ff;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.upload-placeholder .upload-icon {
	font-size: 3.5rem;
	margin-bottom: 1rem;
	color: #94a3b8;
}

.upload-placeholder:hover .upload-icon {
	color: #3b82f6;
}

.upload-placeholder .upload-text {
	font-size: 1.125rem;
	font-weight: 600;
	color: #334155;
	margin: 0 0 0.5rem 0;
}

.upload-placeholder .upload-hint {
	font-size: 0.875rem;
	color: #64748b;
	margin: 0 0 1.5rem 0;
}

.remove-image {
	position: absolute;
	top: 1rem;
	right: 1rem;
	background: rgba(239, 68, 68, 0.9);
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 0.5rem 1rem;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	transition: all 0.2s ease;
	box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.remove-image:hover {
	background: #dc2626;
	transform: scale(1.05);
}

.remove-image .dashicons {
	font-size: 1rem;
	width: 1rem;
	height: 1rem;
}

.image-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.image-preview:hover .image-overlay {
	opacity: 1;
}

.image-overlay .button {
	margin: 0;
}

/* File Upload */
.file-upload-wrapper {
	margin-top: 0.5rem;
}

.uploaded-files-list {
	margin-top: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.uploaded-file-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem 1rem;
	background-color: #f3f4f6;
	border-radius: 6px;
	border: 1px solid #e5e7eb;
}

.file-name {
	flex: 1;
	font-size: 0.875rem;
	color: #374151;
}

.remove-file-btn {
	color: #ef4444;
	font-size: 0.875rem;
}

/* Video Preview */
.video-preview-container {
	margin-top: 1rem;
	border-radius: 8px;
	overflow: hidden;
}

.video-preview-container iframe {
	width: 100%;
	height: 400px;
	border: none;
}

/* Score Indicator */
.score-indicator {
	margin-top: 0.5rem;
}

.score-bar {
	height: 8px;
	background-color: #e5e7eb;
	border-radius: 4px;
	overflow: hidden;
}

.score-fill {
	height: 100%;
	background: #3b82f6;
	transition: width 0.3s ease;
}

/* Questions Container */
#quiz-questions-container {
	margin-top: 1.5rem;
}

.questions-list {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
}

.empty-state {
	text-align: center;
	padding: 3rem 2rem;
	color: #9ca3af;
	font-style: italic;
}

/* Question Item */
.question-item {
	background-color: #f9fafb;
	border: 2px solid #e5e7eb;
	border-radius: 12px;
	padding: 1.5rem;
	transition: all 0.2s ease;
}

.question-item:hover {
	border-color: #667eea;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.question-item.sortable-ghost {
	opacity: 0.4;
}

.question-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.25rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #e5e7eb;
}

.question-drag-handle {
	cursor: move;
	color: #9ca3af;
}

.question-number {
	font-weight: 700;
	color: #667eea;
	font-size: 1.125rem;
}

.question-actions {
	margin-left: auto;
	display: flex;
	gap: 0.5rem;
}

.question-actions .button-link {
	color: #6b7280;
	padding: 0.25rem;
}

.question-actions .button-link:hover {
	color: #ef4444;
}

.question-body {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.question-options-container {
	margin-top: 0.5rem;
}

/* Option Item */
.option-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
	padding: 0.75rem;
	background-color: #fff;
	border-radius: 6px;
	border: 1px solid #e5e7eb;
}

.option-input-wrapper {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.option-item .correct-answer {
	cursor: pointer;
	accent-color: #10b981;
}

.option-item .option-text {
	flex: 1;
	margin: 0;
}

.remove-option {
	color: #ef4444;
	padding: 0.25rem;
}

/* Form Messages */
.form-messages {
	margin-bottom: 1.5rem;
	padding: 1rem 1.25rem;
	border-radius: 8px;
	display: none;
}

.form-messages.show {
	display: block;
}

.form-messages.success {
	background-color: #d1fae5;
	border: 1px solid #10b981;
	color: #065f46;
}

.form-messages.error {
	background-color: #fee2e2;
	border: 1px solid #ef4444;
	color: #991b1b;
}

.form-messages.info {
	background-color: #dbeafe;
	border: 1px solid #3b82f6;
	color: #1e40af;
}

/* Form Actions */
.form-actions {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding-top: 2rem;
	border-top: 2px solid #e5e7eb;
	margin-top: 2rem;
}

.form-actions .button {
	margin: 0;
	padding: 0.875rem 1.75rem;
	font-size: 0.9375rem;
	font-weight: 600;
	border-radius: 8px;
	transition: all 0.2s ease;
	cursor: pointer;
}

.button-primary {
	background: #3b82f6;
	color: #fff;
	border: none;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.button-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.button-primary:active {
	transform: translateY(0);
}

.button-large {
	padding: 1rem 2.25rem;
	font-size: 1rem;
}

.button-secondary {
	background-color: #f3f4f6;
	color: #374151;
	border: 2px solid #e5e7eb;
}

.button-secondary:hover {
	background-color: #e5e7eb;
	border-color: #d1d5db;
}

.cancel-btn {
	background-color: transparent;
	color: #6b7280;
	border: 2px solid #e5e7eb;
}

.cancel-btn:hover {
	background-color: #f9fafb;
	color: #374151;
}

.button-spinner {
	display: inline-block;
	margin-left: 0.5rem;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none !important;
}

/* Select Multiple */
select[multiple] {
	min-height: 150px;
	padding: 0.5rem;
}

select[multiple] option {
	padding: 0.5rem;
	margin: 0.25rem 0;
	border-radius: 4px;
}

select[multiple] option:checked {
	background-color: #667eea;
	color: #fff;
}

/* TinyMCE Editor Styles */
.mce-tinymce {
	border: 2px solid #e5e7eb !important;
	border-radius: 8px !important;
	overflow: hidden;
}

.mce-tinymce:focus-within {
	border-color: #667eea !important;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

/* Responsive Design - Mobile First */
@media (max-width: 1024px) {
	.coursee-form-wrapper {
		margin: 1rem;
	}

	.form-header {
		padding: 1.75rem 1.5rem;
	}

	.form-header h2 {
		font-size: 1.75rem;
	}

	.form-description {
		font-size: 0.9375rem;
	}

	.coursee-form {
		padding: 1.75rem 1.5rem;
	}

	.section-title {
		font-size: 1.25rem;
		flex-wrap: wrap;
	}

	.section-icon {
		font-size: 1.5rem;
	}
}

@media (max-width: 768px) {
	.coursee-form-wrapper {
		margin: 0.5rem;
		max-width: 100%;
	}

	.form-header {
		padding: 1.5rem 1rem;
		border-radius: 8px 8px 0 0;
	}

	.form-header h2 {
		font-size: 1.5rem;
		margin-bottom: 0.75rem;
	}

	.form-description {
		font-size: 0.875rem;
		line-height: 1.5;
	}

	.coursee-form {
		padding: 1.25rem 1rem;
		border-radius: 0 0 8px 8px;
	}

	.form-section {
		margin-bottom: 2rem;
		padding-bottom: 1.5rem;
	}

	.section-title {
		font-size: 1.125rem;
		padding-bottom: 0.5rem;
		margin-bottom: 1.25rem;
		flex-wrap: wrap;
		gap: 0.5rem;
	}

	.section-icon {
		font-size: 1.25rem;
	}

	.questions-count {
		font-size: 0.8125rem;
		margin-left: 0;
		width: 100%;
		margin-top: 0.25rem;
	}

	/* Form Groups */
	.form-group {
		margin-bottom: 1.5rem;
	}

	.form-row {
		grid-template-columns: 1fr !important;
		gap: 1.25rem;
	}

	/* Form Controls */
	.form-control {
		padding: 0.75rem 0.875rem;
		font-size: 16px; /* Prevents zoom on iOS */
		border-radius: 6px;
	}

	/* Labels */
	.coursee-form label {
		font-size: 0.875rem;
		margin-bottom: 0.5rem;
	}

	.field-hint {
		font-size: 0.75rem;
		margin-top: 0.25rem;
	}

	/* Input Groups */
	.input-group {
		flex-direction: column;
		gap: 0.5rem;
	}

	.input-prefix {
		border-radius: 6px;
		border: 2px solid #e5e7eb;
		border-right: 2px solid #e5e7eb;
		text-align: center;
		padding: 0.75rem;
	}

	.input-group .form-control {
		border-radius: 6px;
		border-left: 2px solid #e5e7eb;
	}

	/* Character Count */
	.char-count {
		font-size: 0.6875rem;
		margin-top: 0.25rem;
	}

	/* Image Upload */
	.image-upload-placeholder {
		padding: 2rem 1rem;
	}

	.upload-icon {
		font-size: 2.5rem;
		margin-bottom: 0.75rem;
	}

	.image-preview img {
		max-height: 250px;
	}

	.image-overlay {
		flex-direction: column;
		gap: 0.75rem;
		padding: 1rem;
	}

	.image-overlay .button {
		width: 100%;
		padding: 0.75rem;
	}

	/* Video Preview */
	.video-preview-container iframe {
		height: 250px;
	}

	/* File Upload */
	.uploaded-file-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
		padding: 0.875rem;
	}

	.file-name {
		word-break: break-word;
		font-size: 0.8125rem;
	}

	/* Checkbox Groups */
	.checkbox-group {
		gap: 0.875rem;
	}

	.checkbox-label {
		font-size: 0.875rem;
		align-items: center;
	}

	.checkbox-label input[type="checkbox"] {
		width: 20px;
		height: 20px;
		flex-shrink: 0;
	}

	/* Question Items */
	.question-item {
		padding: 1.25rem 1rem;
		border-radius: 8px;
	}

	.question-header {
		flex-wrap: wrap;
		gap: 0.75rem;
		padding-bottom: 0.75rem;
		margin-bottom: 1rem;
	}

	.question-number {
		font-size: 1rem;
	}

	.question-actions {
		margin-left: 0;
		width: 100%;
		justify-content: flex-end;
		margin-top: 0.5rem;
	}

	.question-body {
		gap: 0.875rem;
	}

	.question-body .form-row {
		gap: 1rem;
	}

	/* Option Items */
	.option-item {
		flex-direction: column;
		align-items: stretch;
		gap: 0.5rem;
		padding: 0.625rem;
	}

	.option-input-wrapper {
		flex-direction: row;
		align-items: center;
		gap: 0.75rem;
	}

	.option-item .correct-answer {
		width: 20px;
		height: 20px;
		flex-shrink: 0;
	}

	.remove-option {
		align-self: flex-end;
		padding: 0.5rem;
	}

	/* Form Messages */
	.form-messages {
		padding: 0.875rem 1rem;
		font-size: 0.875rem;
		border-radius: 6px;
	}

	/* Form Actions */
	.form-actions {
		flex-direction: column;
		gap: 0.75rem;
		padding-top: 1.5rem;
		margin-top: 1.5rem;
	}

	.form-actions .button {
		width: 100%;
		padding: 1rem;
		font-size: 1rem;
		border-radius: 8px;
	}

	.button-large {
		padding: 1rem;
	}

	.button-spinner {
		margin-left: 0.75rem;
	}

	/* TinyMCE Mobile */
	.mce-tinymce {
		border-radius: 6px !important;
	}

	.mce-toolbar {
		flex-wrap: wrap;
	}

	.mce-toolbar .mce-btn {
		margin: 0.25rem;
	}

	/* Score Indicator */
	.score-indicator {
		margin-top: 0.75rem;
	}

	.score-bar {
		height: 6px;
	}

	/* Empty State */
	.empty-state {
		padding: 2rem 1rem;
		font-size: 0.875rem;
	}

	/* Add Question Button */
	.add-question-btn {
		width: 100%;
		padding: 1rem;
		justify-content: center;
	}

	.add-question-btn .dashicons {
		margin-right: 0.5rem;
	}

	/* Select Multiple */
	select[multiple] {
		min-height: 120px;
		padding: 0.5rem;
		font-size: 0.875rem;
	}

	/* Questions List */
	.questions-list {
		gap: 1.25rem;
		margin-bottom: 1.25rem;
	}
}

@media (max-width: 480px) {
	.coursee-form-wrapper {
		margin: 0;
		border-radius: 0;
	}

	.form-header {
		padding: 1.25rem 0.875rem;
		border-radius: 0;
	}

	.form-header h2 {
		font-size: 1.375rem;
	}

	.form-description {
		font-size: 0.8125rem;
	}

	.coursee-form {
		padding: 1rem 0.875rem;
		border-radius: 0;
	}

	.form-section {
		margin-bottom: 1.75rem;
		padding-bottom: 1.25rem;
	}

	.section-title {
		font-size: 1rem;
	}

	.form-control {
		padding: 0.625rem 0.75rem;
		font-size: 16px;
	}

	.form-group {
		margin-bottom: 1.25rem;
	}

	.image-upload-placeholder {
		padding: 1.5rem 0.875rem;
	}

	.upload-icon {
		font-size: 2rem;
	}

	.question-item {
		padding: 1rem 0.875rem;
	}

	.form-actions .button {
		padding: 0.875rem;
		font-size: 0.9375rem;
	}

	/* Hide drag handle on very small screens */
	.question-drag-handle {
		display: none;
	}
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
	.form-header {
		padding: 1rem 1.5rem;
	}

	.form-header h2 {
		font-size: 1.375rem;
	}

	.coursee-form {
		padding: 1.5rem;
	}

	.form-row {
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
	}

	.video-preview-container iframe {
		height: 300px;
	}
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
	.form-control:focus {
		border-width: 3px;
	}

	.button {
		min-height: 44px; /* Minimum touch target size */
	}

	.checkbox-label input[type="checkbox"] {
		min-width: 24px;
		min-height: 24px;
	}

	.question-actions .button-link {
		min-height: 44px;
		min-width: 44px;
		padding: 0.5rem;
	}

	.remove-option {
		min-height: 44px;
		min-width: 44px;
	}
}

/* Loading States */
.form-loading {
	position: relative;
	pointer-events: none;
	opacity: 0.6;
}

.form-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 40px;
	height: 40px;
	margin: -20px 0 0 -20px;
	border: 4px solid #e5e7eb;
	border-top-color: #667eea;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

/* Accessibility */
.form-control:focus-visible,
.button:focus-visible {
	outline: 2px solid #667eea;
	outline-offset: 2px;
}

/* Print Styles */
@media print {
	.form-actions,
	.image-overlay,
	.question-actions {
		display: none !important;
	}
}

/* Privacy Description Styles */
.privacy-description {
	margin-top: 0.75rem;
}

.privacy-info {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 1rem;
	background: #f8fafc;
	border-radius: 8px;
	border-left: 3px solid #3b82f6;
	margin-top: 0.75rem;
}

.privacy-info .privacy-icon {
	font-size: 1.5rem;
	flex-shrink: 0;
}

.privacy-info p {
	margin: 0;
	font-size: 0.875rem;
	color: #475569;
	line-height: 1.6;
}

.privacy-info.privacy-public {
	border-left-color: #10b981;
}

.privacy-info.privacy-private {
	border-left-color: #f59e0b;
}

.privacy-info.privacy-hidden {
	border-left-color: #64748b;
}

/* Form Group Full/Half */
.form-group-full {
	grid-column: 1 / -1;
}

.form-group-half {
	grid-column: span 1;
}

/* Upload Placeholder Enhanced */
.upload-placeholder {
	border: 2px dashed #cbd5e1;
	border-radius: 12px;
	padding: 3rem 2rem;
	text-align: center;
	background: #f8fafc;
	transition: all 0.3s ease;
	cursor: pointer;
}

.upload-placeholder:hover {
	border-color: #3b82f6;
	background: #eff6ff;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.upload-placeholder .upload-icon {
	display: flex;
	justify-content: center;
	margin-bottom: 1rem;
}

.upload-placeholder .upload-icon .dashicons {
	font-size: 3.5rem;
	width: 3.5rem;
	height: 3.5rem;
	color: #94a3b8;
	transition: color 0.3s ease;
}

.upload-placeholder:hover .upload-icon .dashicons {
	color: #3b82f6;
}

.upload-placeholder .upload-text {
	font-size: 1.125rem;
	font-weight: 600;
	color: #334155;
	margin: 0 0 0.5rem 0;
}

.upload-placeholder .upload-hint {
	font-size: 0.875rem;
	color: #64748b;
	margin: 0 0 1.5rem 0;
}

.image-upload-wrapper .image-preview ~ .upload-placeholder {
	display: none;
}

.image-upload-wrapper .image-preview {
	display: none;
}

.image-upload-wrapper .image-preview:not([style*="display: none"]) {
	display: block;
}

.image-upload-wrapper .image-preview:not([style*="display: none"]) ~ .upload-placeholder {
	display: none;
}

/* Remove Image Button Enhanced */
.remove-image {
	position: absolute;
	top: 1rem;
	right: 1rem;
	background: rgba(239, 68, 68, 0.95);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 0.625rem 1rem;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	transition: all 0.2s ease;
	box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
	z-index: 10;
}

.remove-image:hover {
	background: #dc2626;
	transform: scale(1.05);
	box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.remove-image .dashicons {
	font-size: 1rem;
	width: 1rem;
	height: 1rem;
}

/* Spin Animation for Loading */
@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

.dashicons.spin {
	animation: spin 1s linear infinite;
}
