/**
 * Raptcha Admin Settings CSS
 * FILE: assets/css/raptcha-admin-settings.css
 * 
 * Complete styles for the Raptcha admin settings page, including hero banner, cards, and accordions.
 * Loads only on settings page for performance optimization.
 */

/* Admin Wrapper - Contains everything after .wrap */
.raptcha-admin-wrapper {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Hero Banner Component */
.raptcha-hero {
	background: linear-gradient(135deg, #2271b1 0%, #1e5a8a 100%);
	color: white;
	padding: 8px 8px;
	border-radius: 8px;
	margin-bottom: 24px;
	position: relative;
	overflow: hidden;
	min-height: 80px;
}

.raptcha-hero-content {
	position: relative;
	z-index: 2;
	height: 100%;
	display: flex;
	align-items: center;
}

.raptcha-hero-branding {
	display: flex;
	align-items: center;
	gap: 20px;
	width: 100%;
}

.raptcha-hero-logo {
	width: 80px;
	height: 80px;
	flex-shrink: 0;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.raptcha-hero-text {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.raptcha-hero-title {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-weight: 700;
	font-size: 2.5em;
	margin: 0;
	color: white;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
	line-height: 1.2;
}

.raptcha-hero-subtitle {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-weight: 300;
	font-style: italic;
	font-size: 1.2em;
	margin: 0;
	color: rgba(255, 255, 255, 0.9);
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
	line-height: 1.4;
}

/* Settings Grid System */
.raptcha-settings-container {
	max-width: 1200px;
	margin-bottom: 24px;
}

.raptcha-settings-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
	gap: 20px;
	margin-bottom: 24px;
}

@media (max-width: 960px) {
	.raptcha-settings-grid {
		grid-template-columns: 1fr;
	}
}

/* Card Component */
.raptcha-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 20px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
	margin-bottom: 20px;
}

.raptcha-card h2 {
	margin-top: 0;
	border-bottom: 1px solid #dcdcde;
	padding-bottom: 12px;
	margin-bottom: 16px;
	color: #1d2327;
	font-size: 1.3em;
	display: flex;
	align-items: center;
	gap: 8px;
}

.raptcha-card h2 .dashicons {
	color: #2271b1;
	font-size: 24px;
	width: 24px;
	height: 24px;
}

.raptcha-card h3 {
	margin-top: 0;
	color: #1d2327;
	font-size: 1.1em;
	display: flex;
	align-items: center;
	gap: 8px;
}

.raptcha-card h3 .dashicons {
	color: #2271b1;
}

.raptcha-card p:last-child {
	margin-bottom: 0;
}

/* Accordion Container */
.raptcha-accordion {
	border: 1px solid #dcdcde;
	border-radius: 6px;
	overflow: hidden;
	margin-top: 16px;
}

.raptcha-accordion-item {
	border-bottom: 1px solid #dcdcde;
}

.raptcha-accordion-item:last-child {
	border-bottom: none;
}

/* Accordion Header */
.raptcha-accordion-header {
	background: #f9f9f9;
	border: none;
	padding: 16px;
	width: 100%;
	text-align: left;
	cursor: pointer;
	font-weight: 600;
	font-size: 15px;
	color: #23282d;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: background-color 0.2s ease;
}

.raptcha-accordion-header:hover {
	background: #f0f0f1;
}

.raptcha-accordion-header:focus {
	outline: 2px solid #2271b1;
	outline-offset: -2px;
}

.raptcha-accordion-header[aria-expanded="true"] {
	background: #fff;
}

/* Toggle Icon */
.raptcha-accordion-toggle {
	color: #2271b1;
	font-size: 1.2em;
	transition: transform 0.2s ease;
	flex-shrink: 0;
	margin-left: 12px;
}

.raptcha-accordion-header[aria-expanded="true"] .raptcha-accordion-toggle {
	transform: rotate(180deg);
}

/* Accordion Content */
.raptcha-accordion-content {
	display: none;
	padding: 16px;
	background: #fff;
}

.raptcha-accordion-content.raptcha-accordion-open {
	display: block;
}

.raptcha-accordion-content h4 {
	margin-top: 0;
	margin-bottom: 8px;
	color: #2271b1;
	font-size: 15px;
}

.raptcha-accordion-content p {
	margin: 0 0 8px 0;
	line-height: 1.5;
	font-size: 15px;
}

.raptcha-accordion-content p:last-child {
	margin-bottom: 0;
}

.raptcha-accordion-content ul {
	margin: 8px 0;
	padding-left: 24px;
}

.raptcha-accordion-content li {
	margin-bottom: 4px;
	line-height: 1.5;
}

.raptcha-accordion-content a {
	color: #2271b1;
	text-decoration: none;
}

.raptcha-accordion-content a:hover {
	text-decoration: underline;
}

/* Footer Component */
.raptcha-footer {
	margin-top: 32px;
	padding: 16px;
	border: none;
	background: transparent;
	box-shadow: none;
	border-top: 3px solid #2271b1;
}

.raptcha-footer-text {
	margin: 0;
	font-size: 13px;
	color: #646970;
	text-align: center;
	font-style: italic;
}

.raptcha-footer-link {
	margin-left: 12px;
	color: #2271b1;
	text-decoration: none;
	font-weight: 600;
}

.raptcha-footer-link:hover {
	color: #135e96;
	text-decoration: underline;
}

/* Toggle Grid System */
.raptcha-settings-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 20px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
	margin-bottom: 20px;
}

.raptcha-settings-card h2 {
	margin-top: 0;
	border-bottom: 1px solid #dcdcde;
	padding-bottom: 12px;
	margin-bottom: 16px;
	color: #1d2327;
	font-size: 1.3em;
	display: flex;
	align-items: center;
	gap: 8px;
}

.raptcha-settings-card h2 .dashicons {
	color: #2271b1;
	font-size: 24px;
	width: 24px;
	height: 24px;
}

.raptcha-settings-card p.description {
	margin: 0 0 16px 0;
	color: #646970;
	font-size: 14px;
	line-height: 1.5;
}

.raptcha-sections-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 12px;
	margin-bottom: 20px;
}

.raptcha-section-toggle {
	background: #f9f9f9;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 12px;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	gap: 12px;
}

.raptcha-section-toggle:hover {
	background: #fff;
	border-color: #2271b1;
	box-shadow: 0 1px 3px rgba(34, 113, 177, 0.1);
}

/* Pill Toggle Switch */
.raptcha-pill {
	position: relative;
	display: inline-block;
	width: 50px;
	height: 24px;
	cursor: pointer;
	user-select: none;
	flex-shrink: 0;
}

.raptcha-pill-input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.raptcha-pill-slider {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #8c8f94;
	border-radius: 24px;
	transition: all 0.3s ease;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.raptcha-pill-slider:before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	border-radius: 50%;
	transition: all 0.3s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Active State */
.raptcha-pill-input:checked + .raptcha-pill-slider {
	background-color: #2271b1;
}

.raptcha-pill-input:checked + .raptcha-pill-slider:before {
	transform: translateX(26px);
}

/* Focus State */
.raptcha-pill-input:focus + .raptcha-pill-slider {
	box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.3);
}

/* Section Label */
.raptcha-section-label {
	flex: 1;
}

.raptcha-section-label label {
	font-weight: 500;
	color: #1d2327;
	cursor: pointer;
	margin: 0;
	display: block;
}

/* Save Button Area */
.raptcha-save-area {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
	padding: 16px 20px;
	background: #f9f9f9;
	border: 1px solid #dcdcde;
	border-radius: 4px;
}

.raptcha-save-area .button-primary {
	position: relative;
}

/* Spinner for Saving State */
.raptcha-save-area .dashicons-update.spin {
	animation: spin 1s linear infinite;
	margin-right: 6px;
}

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

/* Save Success Notification */
.raptcha-save-success {
	color: #46b450;
	font-size: 14px;
	font-weight: 500;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	animation: fadeIn 0.3s ease;
	opacity: 1;
	transition: opacity 0.3s ease;
}

.raptcha-save-success.fade-out {
	opacity: 0;
}

.raptcha-save-success .dashicons {
	color: #46b450;
	font-size: 18px;
	width: 18px;
	height: 18px;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Responsive */
@media (max-width: 768px) {
	.raptcha-admin-wrapper {
		padding: 0 12px;
	}

	.raptcha-hero {
		padding: 8px 16px;
	}

	.raptcha-hero-title {
		font-size: 2em;
	}

	.raptcha-hero-subtitle {
		font-size: 1em;
	}

	.raptcha-hero-branding {
		gap: 12px;
	}

	.raptcha-hero-logo {
		width: 60px;
		height: 60px;
	}

	.raptcha-card {
		padding: 16px;
	}

	.raptcha-card h2 {
		font-size: 1.2em;
	}

	.raptcha-accordion-header {
		padding: 12px;
		font-size: 14px;
	}

	.raptcha-accordion-content {
		padding: 12px;
	}

	.raptcha-accordion-toggle {
		font-size: 1em;
	}

	.raptcha-sections-grid {
		grid-template-columns: 1fr;
	}

	.raptcha-save-area {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 600px) {
	.raptcha-hero {
		padding: 8px;
		min-height: 60px;
	}

	.raptcha-hero-text {
		gap: 2px;
	}

	.raptcha-hero-title {
		font-size: 1.8em;
	}

	.raptcha-hero-subtitle {
		font-size: 0.9em;
	}

	.raptcha-hero-branding {
		flex-direction: column;
		gap: 10px;
		text-align: center;
	}

	.raptcha-hero-logo {
		width: 50px;
		height: 50px;
	}
}
/* Description text with italic emphasis */
.raptcha-description-emphasized {
	margin-top: 12px;
	font-style: italic;
}
