/**
 * Admin CSS for Broken Image Fallback Pro
 */
.brokimfa-header {
	display: flex;
	align-items: center;
	margin-bottom: 30px;
	padding: 20px;
	border-radius: 8px;
	color: white;
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.brokimfa-header-free {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.brokimfa-header-pro {
	background: linear-gradient(135deg, #00a32a 0%, #00d084 100%);
}

.brokimfa-header-icon {
	margin-right: 20px;
	opacity: 0.9;
}

.brokimfa-header-text h1 {
	margin: 0;
	color: white;
	font-size: 28px;
	font-weight: 600;
}

.brokimfa-subtitle {
	margin: 5px 0 0 0;
	font-size: 16px;
	opacity: 0.9;
}

.brokimfa-header-upgrade {
	margin-left: auto;
}

.brokimfa-upgrade-button {
	background: rgba(255,255,255,0.2);
	color: white;
	padding: 12px 20px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.3s ease;
	border: 1px solid rgba(255,255,255,0.3);
}

.brokimfa-upgrade-button:hover {
	background: rgba(255,255,255,0.3);
	color: white;
	text-decoration: none;
	transform: translateY(-2px);
}

.brokimfa-pro-badge {
	background: #e26f56;
	color: white;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	margin-left: 8px;
}

.brokimfa-pro-preview {
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	padding: 15px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.brokimfa-pro-preview-content {
	display: flex;
	align-items: center;
	flex: 1;
}

.brokimfa-pro-preview-icon {
	font-size: 24px;
	margin-right: 15px;
	opacity: 0.7;
}

.brokimfa-upgrade-btn {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border: none;
	color: white;
	font-weight: 600;
	padding: 8px 16px;
}

.brokimfa-upgrade-btn:hover {
	background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
	color: white;
}

.brokimfa-upgrade-cta {
	background: white;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	padding: 30px;
	margin-top: 30px;
	text-align: center;
}

.brokimfa-upgrade-cta h3 {
	margin-bottom: 20px;
	font-size: 24px;
	color: #1d2327;
}

.brokimfa-pro-feature {
	display: flex;
	align-items: center;
	text-align: left;
	font-size: 14px;
}

.brokimfa-pro-feature .dashicons {
	color: #00a32a;
	margin-right: 8px;
}

.brokimfa-upgrade-cta-actions {
	margin-top: 25px;
}

.brokimfa-money-back {
	margin-top: 10px;
	color: #646970;
	font-size: 13px;
	font-style: italic;
}

/* Disabled PRO feature styles */
.brokimfa-disabled {
	opacity: 0.6;
}

.brokimfa-pro-label {
	background: #e26f56;
	color: white;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	margin-left: 8px;
}

input[disabled], 
textarea[disabled], 
select[disabled], 
button[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

.brokimfa-disabled input,
.brokimfa-disabled button {
	pointer-events: none;
}

/* Enhanced PRO badge styling */
.brokimfa-pro-badge {
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(226, 111, 86, 0.7);
	}
	70% {
		box-shadow: 0 0 0 10px rgba(226, 111, 86, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(226, 111, 86, 0);
	}
}
/* Admin page layout */
.brokimfa-info-panels {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 20px;
	margin: 30px;
	margin-bottom: 0;
}

.brokimfa-info-panel {
	padding: 20px;
	background: #fff;
	border: 1px solid #e1e1e1;
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.brokimfa-info-panel h3 {
	margin-top: 0;
	margin-bottom: 15px;
	color: #1d2327;
	font-size: 16px;
	font-weight: 600;
	border-bottom: 2px solid #f0f0f0;
	padding-bottom: 8px;
}

.brokimfa-info-panel ul {
	margin: 0;
	padding-left: 0;
	list-style: none;
}

.brokimfa-info-panel li {
	margin-bottom: 12px;
	line-height: 1.5;
	padding-left: 20px;
	position: relative;
}

.brokimfa-info-panel li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: #00a32a;
	font-weight: bold;
}

/* Enhanced form styling */
.brokimfa-admin-content .form-table {
	background: white;
	border-radius: 6px;
}

.brokimfa-admin-content .form-table th {
	font-weight: 600;
	color: #1d2327;
	padding: 15px 10px;
	width: 200px;
}

.brokimfa-admin-content .form-table td {
	padding: 15px 10px;
}

.brokimfa-admin-content .form-table tr {
	border-bottom: 1px solid #f6f7f7;
}

.brokimfa-admin-content .form-table tr:last-child {
	border-bottom: none;
}

/* Settings sections */
.brokimfa-admin-content h2 {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white !important;
	padding: 15px 20px;
	margin: 30px 0 0 0;
	border-radius: 6px 6px 0 0;
	font-size: 16px;
	font-weight: 600;
	text-shadow: 0 1px 2px rgba(0,0,0,0.1);
	box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.brokimfa-flex {
	display: flex;
	gap: 1rem;
}

.brokimfa-flex .brokimfa-flex-col {
	min-width: 0;
}

.brokimfa-flex .brokimfa-settings-container {
	flex: 0 1 70%;
}

.brokimfa-flex .brokimfa-settings-container.pro {
	flex: 0 1 100%;
}

.brokimfa-flex .brokimfa-sidebar-container {
	flex: 0 1 30%;
}

/* Form styling */
.brokimfa-image-upload {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.brokimfa-image-upload input[type="url"] {
	min-width: 300px;
	padding: 8px 12px;
	border-radius: 4px;
	border: 1px solid #ddd;
	transition: border-color 0.3s ease;
}

.brokimfa-image-upload input[type="url"]:focus {
	border-color: #667eea;
	box-shadow: 0 0 0 1px #667eea;
}

.brokimfa-image-upload .button {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	border: none;
	border-radius: 4px;
	padding: 8px 16px;
	font-weight: 500;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brokimfa-image-upload .button:hover {
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
}

.brokimfa-image-preview {
	margin-top: 10px;
	padding: 10px;
	border: 1px solid #e1e1e1;
	background: #fafafa;
	border-radius: 4px;
	display: inline-block;
}

.brokimfa-image-preview img {
	display: block;
	border-radius: 2px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Input styling enhancements */
input[type="text"],
input[type="url"],
input[type="number"],
select,
textarea {
	transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
	border-color: #667eea;
	box-shadow: 0 0 0 1px #667eea;
}

/* Checkbox styling */
input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: #667eea;
}

/* Notice styling */
.notice.inline {
	margin: 15px 0;
	padding: 12px 16px;
	border-radius: 4px;
	border-left-width: 4px;
}

.notice.notice-info.inline {
	background: #f0f6ff;
	border-left-color: #667eea;
	color: #1d2327;
}

/* Responsive design */
@media (max-width: 1200px) {
	.brokimfa-info-panels {
		grid-template-columns: 1fr 1fr;
	}

	.brokimfa-flex {
		flex-direction: column;
	}

	.brokimfa-flex .brokimfa-flex-col {
		flex: 1 1 auto; 
	}

	.brokimfa-upgrade-cta {
		padding: 10px;
	}
}

@media (max-width: 782px) {
	.brokimfa-info-panels {
		grid-template-columns: 1fr;
		margin: 20px;
	}
	
	.brokimfa-header {
		margin: 0 -20px 20px -20px;
		border-radius: 0;
		flex-direction: column;
		text-align: center;
	}
	
	.brokimfa-header-icon {
		margin-right: 0;
		margin-bottom: 15px;
	}
	
	.brokimfa-stats {
		flex-direction: column;
		gap: 15px;
	}
	
	.brokimfa-image-upload {
		flex-direction: column;
		align-items: flex-start;
	}
	
	.brokimfa-image-upload input[type="url"] {
		min-width: auto;
		width: 100%;
	}
	
	.form-table th,
	.form-table td {
		display: block;
		width: 100%;
		padding: 10px 15px;
	}
	
	.form-table th {
		background: #f8f9fa;
		font-weight: 600;
		border-bottom: none;
	}

	.brokimfa-upgrade-button {
		margin-left: unset;
	}
}

/* CSS validation */
.brokimfa-invalid-css {
	border-color: #d63638 !important;
	box-shadow: 0 0 0 1px #d63638;
}

/* Live preview */
#brokimfa-live-preview {
	border-radius: 4px;
	margin-top: 20px;
	padding: 20px;
	background: #fff;
	border: 1px solid #e1e1e1;
	box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

#brokimfa-live-preview h4 {
	margin-top: 0;
	margin-bottom: 15px;
	color: #1d2327;
	font-size: 16px;
	font-weight: 600;
	padding-bottom: 8px;
	border-bottom: 2px solid #f0f0f0;
}

#brokimfa-preview-content .brokimfa-alt-text-fallback {
	max-width: 300px;
}

/* Form field descriptions */
.form-table .description {
	font-size: 13px;
	color: #646970;
	margin-top: 8px;
	font-style: italic;
	line-height: 1.4;
}

/* Tab styling for better organization */
.brokimfa-tabs {
	border-bottom: 1px solid #c3c4c7;
	margin-bottom: 20px;
}

.brokimfa-tabs .nav-tab {
	border-bottom: 1px solid #c3c4c7;
	margin-bottom: -1px;
}

.brokimfa-tabs .nav-tab-active {
	border-bottom: 1px solid #fff;
}

/* Success/error messages */
.brokimfa-notice {
	padding: 12px;
	margin: 15px 0;
	border-radius: 4px;
}

.brokimfa-notice.success {
	background: #d1e7dd;
	border-left: 4px solid #0f5132;
	color: #0f5132;
}

.brokimfa-notice.error {
	background: #f8d7da;
	border-left: 4px solid #842029;
	color: #842029;
}

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

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

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

/* Menu icon styling for WordPress admin */
.toplevel_page_broken-image-fallback .wp-menu-image svg {
	width: 20px;
	height: 20px;
	fill: #a0a5aa;
	transition: fill 0.3s ease;
}

.toplevel_page_broken-image-fallback:hover .wp-menu-image svg,
.toplevel_page_broken-image-fallback.wp-has-current-submenu .wp-menu-image svg {
	fill: #00a32a;
}

/* Tab styling for better organization */
.brokimfa-tabs {
	border-bottom: 1px solid #c3c4c7;
	margin-bottom: 20px;
}

.brokimfa-tabs .nav-tab {
	border-bottom: 1px solid #c3c4c7;
	margin-bottom: -1px;
}

.brokimfa-tabs .nav-tab-active {
	border-bottom: 1px solid #fff;
}

/* Success/error messages */
.brokimfa-notice {
	padding: 12px;
	margin: 15px 0;
	border-radius: 4px;
}

.brokimfa-notice.success {
	background: #d1e7dd;
	border-left: 4px solid #0f5132;
	color: #0f5132;
}

.brokimfa-notice.error {
	background: #f8d7da;
	border-left: 4px solid #842029;
	color: #842029;
}

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

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

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