/**
 * TimeFly Admin Settings Styles
 * FILE: admin/css/admin-settings.css
 *
 * Styling for TimeFly admin settings interface including hero banner,
 * card-based layout system, tabbed navigation, scanner table, FAQ
 * accordion, review/donation cards, admin notices, and form controls
 * following WordPress admin design patterns.
 *
 * @package TimeFly
 * @subpackage Admin\Styles
 * @since 0.1.0
 */

/* =============================================================================
   Admin Page Container
   ============================================================================= */

.timefly-admin-wrapper {
	margin: 0 20px 0 0;
	max-width: 1200px;
}

.timefly-admin-wrapper .notice {
	margin: 5px 0 15px;
}

/* =============================================================================
   Hero Banner Component
   ============================================================================= */

.timefly-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;
}

.timefly-hero-content {
	position: relative;
	z-index: 2;
	height: 100%;
	display: flex;
	align-items: center;
}

.timefly-hero-branding {
	display: flex;
	align-items: center;
	gap: 20px;
	width: 100%;
}

.timefly-hero-logo {
	width: 80px;
	height: 80px;
	flex-shrink: 0;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.timefly-hero-text {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.timefly-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;
}

.timefly-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;
}

/* =============================================================================
   Tab Navigation
   ============================================================================= */

.timefly-admin-wrapper .nav-tab-wrapper {
	margin: 0 0 24px 0;
	border-bottom: 1px solid #c3c4c7;
}

/* =============================================================================
   Settings Container & Grid System
   ============================================================================= */

.timefly-settings-container {
	max-width: 1200px;
}

.timefly-settings-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
	gap: 20px;
	margin-bottom: 24px;
}

/* =============================================================================
   Card Component System
   ============================================================================= */

.timefly-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;
}

.timefly-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;
}

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

.timefly-card h3 {
	margin-top: 0;
	color: #1d2327;
	font-size: 1.1em;
	display: flex;
	align-items: center;
	gap: 8px;
}

.timefly-card h3 .dashicons {
	color: #2271b1;
}

.timefly-card p:last-child {
	margin-bottom: 0;
}

/* Card Variants */
.timefly-card--warning {
	border-left: 4px solid #dba617;
	background: #fcf9e8;
}

.timefly-card--info {
	border-left: 4px solid #2271b1;
	background: #f0f6fc;
}

/* =============================================================================
   Statistics Display
   ============================================================================= */

.timefly-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 16px;
	margin: 16px 0;
}

.timefly-stat-item {
	text-align: center;
	padding: 16px;
	background: #f0f0f1;
	border-radius: 4px;
	border: 2px solid #dcdcde;
}

.timefly-stat-value {
	display: block;
	font-size: 2em;
	font-weight: bold;
	color: #1d2327;
	line-height: 1;
	margin-bottom: 8px;
}

.timefly-stat-label {
	display: block;
	font-size: 0.9em;
	color: #50575e;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.timefly-stat-success {
	border-color: #00a32a;
	background: #edfaef;
}

.timefly-stat-success .timefly-stat-value {
	color: #00a32a;
}

.timefly-stat-error {
	border-color: #d63638;
	background: #fcf0f1;
}

.timefly-stat-error .timefly-stat-value {
	color: #d63638;
}

.timefly-no-data {
	text-align: center;
	color: #646970;
	font-style: italic;
	margin: 16px 0;
}

/* =============================================================================
   Scanner Interface
   ============================================================================= */

.timefly-scanner-controls {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 16px 0;
	flex-wrap: wrap;
}

.timefly-last-scan {
	color: #646970;
	font-size: 0.95em;
}

.timefly-scan-spinner {
	float: none;
	margin: 0;
}

.timefly-scan-summary {
	margin: 16px 0;
	padding: 12px;
	background: #f0f6fc;
	border-left: 4px solid #2271b1;
	border-radius: 2px;
}

.timefly-scanner-help {
	width: 100%;
	color: #646970;
	font-size: 0.95em;
	margin: 8px 0 0 0;
}

/* =============================================================================
   Scanner Table
   ============================================================================= */

.timefly-scanner-table {
	margin-top: 16px;
}

.timefly-scanner-table th {
	font-weight: 600;
}

.timefly-col-status {
	width: 120px;
}

.timefly-col-type {
	width: 100px;
}

.timefly-col-blocks {
	width: 100px;
}

.timefly-col-actions {
	width: 80px;
	text-align: center;
}

/* Status Badges */
.timefly-status-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 0.85em;
	font-weight: 600;
	white-space: nowrap;
}

.timefly-status-icon {
	font-size: 1.2em;
	line-height: 1;
}

.timefly-status-visible {
	background: #edfaef;
	color: #00a32a;
}

.timefly-status-hidden {
	background: #fcf0f1;
	color: #d63638;
}

.timefly-status-mixed {
	background: #fcf9e8;
	color: #dba617;
}

.timefly-no-results {
	text-align: center;
	padding: 32px;
	color: #646970;
}

.timefly-no-results .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
	opacity: 0.3;
	display: block;
	margin: 0 auto 16px;
}

/* =============================================================================
   Form Controls
   ============================================================================= */

.timefly-setting-item {
	padding: 16px 0;
	border-bottom: 1px solid #f0f0f1;
}

.timefly-setting-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.timefly-setting-content {
	width: 100%;
}

.timefly-setting-label {
	font-weight: 600;
	font-size: 14px;
	margin: 0 0 12px 0;
	color: #1d2327;
	display: block;
}

.timefly-setting-description {
	color: #646970;
	font-size: 13px;
	line-height: 1.5;
	margin: 8px 0 0 0;
}

.timefly-setting-note {
	margin: 12px 0 0 0;
	padding: 12px;
	background: #f0f6fc;
	border-left: 4px solid #2271b1;
	border-radius: 2px;
	font-size: 0.95em;
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.timefly-setting-note .dashicons {
	color: #2271b1;
	flex-shrink: 0;
	margin-top: 2px;
}

/* Radio Options */
.timefly-radio-option {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px;
	margin: 8px 0;
	border: 2px solid #dcdcde;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.timefly-radio-option:hover {
	border-color: #2271b1;
	background: #f0f6fc;
}

.timefly-radio-option input[type="radio"] {
	margin-top: 2px;
	flex-shrink: 0;
}

.timefly-radio-label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
}

.timefly-radio-description {
	font-size: 0.9em;
	color: #646970;
	font-weight: normal;
}

/* Checkbox Group */
.timefly-checkbox-group {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 12px 0;
}

.timefly-checkbox-option {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	background: #f0f0f1;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.timefly-checkbox-option:hover {
	background: #fff;
	border-color: #2271b1;
}

.timefly-checkbox-option input[type="checkbox"] {
	margin: 0;
}

/* =============================================================================
   FAQ Accordion (ConFab Modern Design)
   ============================================================================= */

.timefly-accordion {
	border: 1px solid #dcdcde;
	border-radius: 6px;
	overflow: hidden;
	margin-top: 16px;
}

.timefly-accordion-item {
	border-bottom: 1px solid #dcdcde;
}

.timefly-accordion-item:last-child {
	border-bottom: none;
}

.timefly-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;
}

.timefly-accordion-header:hover {
	background: #f0f0f1;
}

.timefly-accordion-header:focus {
	outline: 2px solid #2271b1;
	outline-offset: -2px;
}

.timefly-accordion-toggle {
	color: #2271b1;
	font-size: 1.2em;
	transition: transform 0.2s ease;
	flex-shrink: 0;
	margin-left: 12px;
}

.timefly-accordion-header[aria-expanded="true"] {
	background: #fff;
}

.timefly-accordion-header[aria-expanded="true"] .timefly-accordion-toggle {
	transform: rotate(180deg);
}

/* Content sections - start hidden */
.timefly-accordion-content {
	display: none;
	padding: 16px;
	background: #fff;
}

/* Open state - show content */
.timefly-accordion-content.timefly-accordion-open {
	display: block;
}

.timefly-accordion-content h4 {
	margin-top: 0;
	margin-bottom: 8px;
	color: #2271b1;
	font-size: 15px;
}

.timefly-accordion-content p {
	margin: 0 0 8px 0;
	line-height: 1.5;
	font-size: 15px;
}

.timefly-accordion-content p:last-child {
	margin-bottom: 0;
}

.timefly-accordion-content ul {
	margin: 8px 0;
	padding-left: 24px;
}

.timefly-accordion-content li {
	margin-bottom: 4px;
	line-height: 1.5;
}

.timefly-accordion-content code {
	background: #f9f9f9;
	padding: 2px 4px;
	border-radius: 3px;
	font-family: 'Courier New', monospace;
	font-size: 15px;
}

.timefly-accordion-content pre {
	background: #f9f9f9;
	padding: 8px;
	border-radius: 3px;
	overflow-x: auto;
	font-size: 15px;
	margin: 8px 0;
}

.timefly-accordion-content a {
	color: #2271b1;
	text-decoration: none;
}

.timefly-accordion-content a:hover {
	text-decoration: underline;
}

/* Responsive Design for Accordion */
@media (max-width: 768px) {
	.timefly-accordion-header {
		padding: 12px;
		font-size: 14px;
	}

	.timefly-accordion-content {
		padding: 12px;
	}

	.timefly-accordion-toggle {
		font-size: 1em;
	}
}

/* =============================================================================
   Lists
   ============================================================================= */

.timefly-numbered-list {
	counter-reset: item;
	list-style: none;
	padding: 0;
}

.timefly-numbered-list>li {
	counter-increment: item;
	margin-bottom: 24px;
	padding-left: 40px;
	position: relative;
}

.timefly-numbered-list>li::before {
	content: counter(item);
	position: absolute;
	left: 0;
	top: 0;
	width: 28px;
	height: 28px;
	background: #2271b1;
	color: white;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	font-size: 14px;
}

.timefly-numbered-list p {
	margin: 8px 0;
}

.timefly-nested-list {
	margin: 12px 0;
	padding-left: 24px;
}

.timefly-nested-list li {
	margin: 8px 0;
}

.timefly-info-list {
	list-style: none;
	padding: 0;
	margin: 12px 0;
}

.timefly-info-list li {
	padding: 8px 0;
	padding-left: 28px;
	position: relative;
	line-height: 1.5;
}

.timefly-info-list li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: #00a32a;
	font-weight: bold;
	font-size: 16px;
}

/* =============================================================================
   Review & Donation Card System
   ============================================================================= */

:root {
	--timefly-success: #00a32a;
	--timefly-primary: #2271b1;
}

/* Review Request Card */
.timefly-card-review {
	border-left: 4px solid var(--timefly-success);
	background: #f6ffed;
}

.timefly-icon-review {
	color: var(--timefly-success);
}

.timefly-review-actions {
	margin: 15px 0 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.timefly-inline-form {
	display: inline-block;
	margin: 0;
}

.timefly-review-primary {
	background: var(--timefly-success);
	border-color: var(--timefly-success);
	color: white;
}

.timefly-review-primary:hover,
.timefly-review-primary:focus {
	background: #008a20;
	border-color: #008a20;
	color: white;
}

.timefly-review-secondary {
	background: white;
	border-color: #c3c4c7;
}

/* Donation Request Card */
.timefly-card-donation {
	border-left: 4px solid var(--timefly-primary);
	background: #f0f6fc;
}

.timefly-icon-donation {
	color: var(--timefly-primary);
}

.timefly-donation-actions {
	margin: 15px 0 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.timefly-donation-button {
	background: var(--timefly-primary);
	border-color: var(--timefly-primary);
	color: white;
}

.timefly-donation-button:hover,
.timefly-donation-button:focus {
	background: #135e96;
	border-color: #135e96;
	color: white;
}

.timefly-donation-secondary {
	background: white;
	border-color: #c3c4c7;
}

/* =============================================================================
   Footer Component
   ============================================================================= */

.timefly-footer {
	margin-top: 32px;
	padding: 16px;
	border: none;
	background: transparent;
	box-shadow: none;
	border-top: 3px solid #2271b1;
}

.timefly-footer-text {
	margin: 0;
	font-size: 13px;
	color: #646970;
	text-align: center;
	font-style: italic;
}

.timefly-footer-link {
	margin-left: 12px;
	color: #2271b1;
	text-decoration: none;
	font-weight: 600;
}

.timefly-footer-link:hover {
	color: #135e96;
	text-decoration: underline;
}

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

@media (max-width: 960px) {
	.timefly-settings-grid {
		grid-template-columns: 1fr;
	}

	.timefly-hero {
		padding: 8px 16px;
	}

	.timefly-hero-branding {
		gap: 16px;
	}

	.timefly-hero-logo {
		width: 64px;
		height: 64px;
	}

	.timefly-hero-title {
		font-size: 2em;
	}

	.timefly-hero-subtitle {
		font-size: 1em;
	}
}

@media (max-width: 600px) {
	.timefly-admin-wrapper {
		margin: 0 10px 0 0;
	}

	.timefly-hero {
		padding: 8px;
		min-height: auto;
	}

	.timefly-hero-branding {
		flex-direction: column;
		text-align: center;
		gap: 12px;
	}

	.timefly-hero-text {
		align-items: center;
	}

	.timefly-scanner-controls {
		flex-direction: column;
		align-items: flex-start;
	}

	.timefly-scanner-table .timefly-col-type,
	.timefly-scanner-table .timefly-col-blocks {
		display: none;
	}

	.timefly-stats-grid {
		grid-template-columns: 1fr;
	}

	.timefly-numbered-list>li {
		padding-left: 36px;
	}

	/* Review/Donation Card Responsive */
	.timefly-review-actions,
	.timefly-donation-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.timefly-review-actions .button,
	.timefly-donation-actions .button,
	.timefly-review-actions .timefly-inline-form,
	.timefly-donation-actions .timefly-inline-form {
		width: 100%;
	}

	.timefly-review-actions .button,
	.timefly-donation-actions .button {
		margin: 4px 0;
		text-align: center;
	}

	.timefly-notice-content {
		flex-direction: column;
		text-align: center;
		gap: 8px;
	}

	.timefly-notice-logo {
		margin-right: 0;
	}
}