/**
 * Simple Content Protector - Modern Admin Design
 * Professional gradient-based design with smooth animations
 * @package Simple_Content_Protector
 * @version 2.0.0
 */

/* ==========================================
   CSS Variables - Modern Color Palette
   ========================================== */
:root {
	--primary-gradient: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
	--primary-gradient-alt: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
	--success-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);
	--danger-gradient: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
	--info-gradient: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
	--warning-gradient: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
	--dark: #1E293B;
	--dark-alt: #0F172A;
	--gray-50: #F8FAFC;
	--gray-100: #F1F5F9;
	--gray-200: #E2E8F0;
	--gray-300: #CBD5E1;
	--gray-600: #475569;
	--gray-700: #334155;
	--gray-800: #1E293B;
	--gray-900: #0F172A;
	--white: #FFFFFF;
	--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	--shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.15);
	--shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
	--shadow-xl: 0 20px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ==========================================
   Wrapper & Base Styles
   ========================================== */
.scp-wrapper {
	max-width: 1400px;
	margin: 0 auto;
	padding: 30px 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================
   Hero Section - Modern Gradient Design
   ========================================== */
.scp-hero {
	position: relative;
	background: var(--primary-gradient);
	border-radius: 24px;
	padding: 50px 40px;
	margin-bottom: 40px;
	overflow: hidden;
	min-height: 220px;
	display: flex;
	align-items: center;
	box-shadow: var(--shadow-xl);
}

.scp-hero-background {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	opacity: 0.1;
}

.scp-hero-pattern {
	width: 100%;
	height: 100%;
	background-image: 
		radial-gradient(circle at 25% 25%, white 2px, transparent 0),
		radial-gradient(circle at 75% 75%, white 2px, transparent 0);
	background-size: 40px 40px;
	background-position: 0 0, 20px 20px;
}

.scp-hero-content {
	position: relative;
	z-index: 1;
	width: 100%;
}

.scp-hero-icon {
	margin-bottom: 20px;
	animation: scpFloat 3s ease-in-out infinite;
}

@keyframes scpFloat {
	0%, 100% { transform: translateY(0px); }
	50% { transform: translateY(-10px); }
}

.scp-hero-title {
	font-size: 42px;
	font-weight: 800;
	color: var(--white);
	margin: 0 0 12px 0;
	letter-spacing: -1px;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.scp-hero-subtitle {
	font-size: 18px;
	color: rgba(255, 255, 255, 0.9);
	margin: 0 0 20px 0;
	font-weight: 400;
}

.scp-hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(10px);
	padding: 10px 24px;
	border-radius: 50px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	transition: all 0.3s ease;
}

.scp-hero-badge.active {
	background: rgba(255, 255, 255, 0.25);
}

.scp-badge-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--gray-300);
	animation: scpPulse 2s infinite;
	transition: background 0.3s ease;
}

.scp-hero-badge.active .scp-badge-dot {
	background: #10B981;
	animation: scpPulse 1.5s infinite;
}

@keyframes scpPulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.5; }
}

.scp-badge-text {
	font-size: 14px;
	font-weight: 600;
	color: var(--white);
	letter-spacing: 0.5px;
	text-transform: uppercase;
}

/* ==========================================
   Main Grid Layout
   ========================================== */
.scp-main-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
	margin-bottom: 40px;
}

@media (max-width: 1200px) {
	.scp-main-grid {
		grid-template-columns: 1fr;
	}
}

/* ==========================================
   Card Components
   ========================================== */
.scp-card {
	background: var(--white);
	border-radius: 20px;
	box-shadow: var(--shadow);
	border: 1px solid var(--gray-200);
	overflow: hidden;
	margin-bottom: 25px;
	transition: all 0.3s ease;
}

.scp-card:hover {
	box-shadow: var(--shadow-md);
	transform: translateY(-2px);
}

.scp-card-header {
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 24px 28px;
	background: var(--gray-50);
	border-bottom: 1px solid var(--gray-200);
}

.scp-card-icon {
	font-size: 28px;
	line-height: 1;
}

.scp-card-title {
	font-size: 20px;
	font-weight: 700;
	color: var(--dark);
	margin: 0;
	letter-spacing: -0.5px;
}

.scp-card-content {
	padding: 28px;
}

/* ==========================================
   Master Switch Card (Hero Card)
   ========================================== */
.scp-card-hero {
	border-left: 4px solid #667EEA;
	background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
}

.scp-switch-box {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px;
	background: var(--gray-50);
	border-radius: 16px;
	border: 2px solid var(--gray-200);
	transition: all 0.3s ease;
}

.scp-switch-box:hover {
	border-color: #667EEA;
	background: #F8FAFC;
}

.scp-select-trigger {
	position: relative;
}

.scp-select-inline {
	padding: 8px 32px 8px 14px;
	border: 2px solid var(--gray-200);
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	background: var(--white);
	color: var(--dark);
	cursor: pointer;
	transition: all 0.3s ease;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
}

.scp-select-inline:focus {
	outline: none;
	border-color: #667EEA;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.scp-select-trigger::after {
	content: "▼";
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	color: var(--gray-600);
	font-size: 10px;
	transition: all 0.3s ease;
}

.scp-select-inline:hover {
	border-color: #667EEA;
}

.scp-select-inline:focus + .scp-select-trigger::after,
.scp-select-trigger:hover::after {
	color: #667EEA;
}

.scp-switch-label {
	flex: 1;
}

/* ==========================================
   Field Box & Inline Inputs
   ========================================== */
.scp-field-box {
	margin-bottom: 20px;
}

.scp-field-box:last-child {
	margin-bottom: 0;
}

.scp-input-wrapper {
	position: relative;
}

.scp-input-inline {
	padding: 8px 14px;
	border: 2px solid var(--gray-200);
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	background: var(--white);
	color: var(--dark);
	transition: all 0.3s ease;
	width: 100%;
}

.scp-input-inline:focus {
	outline: none;
	border-color: #667EEA;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.scp-input-inline:hover {
	border-color: #667EEA;
}

.scp-input-inline::placeholder {
	color: var(--gray-600);
	opacity: 0.6;
}

.scp-switch-title {
	display: block;
	font-size: 18px;
	font-weight: 600;
	color: var(--dark);
	margin-bottom: 6px;
}

.scp-switch-desc {
	display: block;
	font-size: 14px;
	color: var(--gray-600);
}

.scp-switch {
	position: relative;
	display: inline-block;
	width: 64px;
	height: 32px;
	cursor: pointer;
}

.scp-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.scp-switch-slider {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--gray-300);
	border-radius: 32px;
	transition: all 0.3s ease;
}

.scp-switch-slider:before {
	position: absolute;
	content: "";
	height: 26px;
	width: 26px;
	left: 3px;
	bottom: 3px;
	background: var(--white);
	border-radius: 50%;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.scp-switch input:checked + .scp-switch-slider {
	background: var(--primary-gradient);
}

.scp-switch input:checked + .scp-switch-slider:before {
	transform: translateX(32px);
}

.scp-info-box {
	display: flex;
	gap: 12px;
	margin-top: 16px;
	padding: 14px 16px;
	background: linear-gradient(135deg, #F0F9FF 0%, #E0E7FF 100%);
	border: 2px solid #DBEAFE;
	border-left: 4px solid #3B82F6;
	border-radius: 12px;
}

.scp-info-icon {
	font-size: 20px;
	flex-shrink: 0;
}

.scp-info-box p {
	margin: 0;
	font-size: 14px;
	color: var(--gray-700);
	line-height: 1.6;
}

/* ==========================================
   Feature Grid
   ========================================== */
.scp-feature-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

@media (max-width: 768px) {
	.scp-feature-grid {
		grid-template-columns: 1fr;
	}
}

.scp-feature-item {
	display: block;
	cursor: pointer;
}

.scp-feature-item input {
	display: none;
}

.scp-feature-box {
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 16px;
	background: var(--gray-50);
	border: 2px solid var(--gray-200);
	border-radius: 12px;
	transition: all 0.3s ease;
	position: relative;
}

.scp-feature-item:hover .scp-feature-box {
	border-color: #667EEA;
	background: var(--white);
	box-shadow: var(--shadow-sm);
}

.scp-feature-item input:checked + .scp-feature-box {
	background: #F0F9FF;
	border-color: #3B82F6;
}

.scp-feature-icon {
	font-size: 28px;
	flex-shrink: 0;
}

.scp-feature-info {
	flex: 1;
	min-width: 0;
}

.scp-feature-name {
	display: block;
	font-size: 15px;
	font-weight: 600;
	color: var(--dark);
	margin-bottom: 4px;
}

.scp-feature-desc {
	display: block;
	font-size: 13px;
	color: var(--gray-600);
}

.scp-feature-toggle {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: var(--gray-200);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	flex-shrink: 0;
}

.scp-feature-item input:checked + .scp-feature-box .scp-feature-toggle {
	background: var(--primary-gradient);
}

.scp-feature-disabled {
	background: var(--gray-300);
}

.scp-check-icon {
	font-size: 16px;
	color: var(--white);
	font-weight: bold;
	opacity: 0;
	transform: scale(0);
	transition: all 0.3s ease;
}

.scp-feature-item input:checked + .scp-feature-box .scp-check-icon {
	opacity: 1;
	transform: scale(1);
}

/* Disabled state for features when main switch is off */
.scp-feature-disabled-state {
	pointer-events: none !important;
	opacity: 0.5 !important;
	position: relative;
}

.scp-feature-disabled-state::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.02);
	border-radius: 12px;
	z-index: 1;
	cursor: not-allowed;
}

.scp-feature-disabled-state .scp-feature-box {
	background: var(--gray-100) !important;
	border-color: var(--gray-200) !important;
	opacity: 0.6;
}

.scp-feature-disabled-state .scp-feature-toggle {
	background: var(--gray-300) !important;
	opacity: 0.5;
}

.scp-feature-disabled-state .scp-check-icon {
	opacity: 0 !important;
}

/* ==========================================
   Form Fields
   ========================================== */
.scp-field {
	margin-bottom: 24px;
}

.scp-field:last-child {
	margin-bottom: 0;
}

.scp-field-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	color: var(--dark);
	margin-bottom: 12px;
}

/* ==========================================
   Roles Container
   ========================================== */
.scp-roles-container {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
	margin-top: 16px;
}

.scp-roles-container.active {
	max-height: 400px;
	margin-bottom: 16px;
}

.scp-roles-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: var(--gray-50);
	padding: 16px;
	border-radius: 12px;
	border: 2px solid var(--gray-200);
}

.scp-role-item {
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	padding: 10px;
	border-radius: 8px;
	transition: all 0.2s ease;
}

.scp-role-item:hover {
	background: var(--white);
}

.scp-role-item input {
	display: none;
}

.scp-role-checkbox {
	width: 24px;
	height: 24px;
	border: 2px solid var(--gray-300);
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	flex-shrink: 0;
}

.scp-role-item input:checked + .scp-role-checkbox {
	background: var(--primary-gradient);
	border-color: #667EEA;
}

.scp-role-item input:checked + .scp-role-checkbox::after {
	content: "✓";
	color: var(--white);
	font-weight: bold;
	font-size: 14px;
}

.scp-role-name {
	font-size: 14px;
	font-weight: 500;
	color: var(--dark);
}

/* ==========================================
   Submit Button
   ========================================== */
.scp-submit-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 18px 30px;
	background: var(--primary-gradient);
	color: var(--white);
	font-size: 16px;
	font-weight: 700;
	border: none;
	border-radius: 16px;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.scp-submit-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.scp-submit-btn:active {
	transform: translateY(0);
}

.scp-submit-btn.loading {
	opacity: 0.8;
	pointer-events: none;
}

.scp-btn-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.scp-btn-text {
	flex: 1;
	text-align: center;
}

/* ==========================================
   Footer
   ========================================== */
.scp-footer {
	text-align: center;
	padding: 30px 20px;
	color: var(--gray-600);
	font-size: 15px;
}

.scp-footer-link {
	color: #667EEA;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.2s ease;
}

.scp-footer-link:hover {
	color: #764BA2;
	text-decoration: underline;
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 768px) {
	.scp-wrapper {
		padding: 20px 15px;
	}

	.scp-hero {
		padding: 35px 25px;
		min-height: 180px;
	}

	.scp-hero-title {
		font-size: 32px;
	}

	.scp-hero-subtitle {
		font-size: 16px;
	}

	.scp-card-content {
		padding: 20px;
	}

	.scp-card-header {
		padding: 20px;
	}
	
	.scp-switch-box {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}
	
	.scp-select-trigger,
	.scp-input-wrapper {
		width: 100%;
	}
	
	.scp-select-inline,
	.scp-input-inline {
		width: 100%;
	}
	
	.scp-field-box {
		margin-bottom: 16px;
	}
}

@media (max-width: 480px) {
	.scp-hero-title {
		font-size: 28px;
	}

	.scp-feature-grid {
		grid-template-columns: 1fr;
	}
}

/* ==========================================
   WordPress Admin Integration
   ========================================== */
#wpbody-content .scp-wrapper {
	padding: 20px 0;
}

.notice {
	border-radius: 12px;
	border-left-width: 4px;
}

/* ==========================================
   AJAX Notifications
   ========================================== */
.scp-ajax-notice {
	margin: 20px 0;
	padding: 15px 20px;
	background: linear-gradient(135deg, #10B981 0%, #059669 100%);
	color: white;
	border-radius: 12px;
	border-left: none;
	animation: scpSlideIn 0.3s ease;
}

.scp-ajax-notice p {
	color: white !important;
	font-weight: 600;
	margin: 0;
}

.scp-ajax-notice .notice-dismiss {
	color: rgba(255, 255, 255, 0.8);
}

.scp-ajax-notice .notice-dismiss:hover {
	color: white;
}

@keyframes scpSlideIn {
	from {
		transform: translateY(-20px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* ==========================================
   Loading States
   ========================================== */
.scp-feature-item.saving,
.scp-switch-box.saving {
	opacity: 0.7;
	pointer-events: none;
	position: relative;
}

.scp-feature-item.saving::after,
.scp-switch-box.saving::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 20px;
	height: 20px;
	border: 2px solid #667EEA;
	border-top-color: transparent;
	border-radius: 50%;
	animation: scpSpin 0.6s linear infinite;
}

@keyframes scpSpin {
	to {
		transform: translate(-50%, -50%) rotate(360deg);
	}
}

.scp-submit-btn.loading {
	position: relative;
}

.scp-submit-btn.loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 20px;
	height: 20px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: white;
	border-radius: 50%;
	animation: scpSpin 0.6s linear infinite;
}