/**
 * Admin styles for LLMs.txt Manager
 * Professional, Modern UI Overhaul
 *
 * @package WPG_LLMsTxt_Manager
 */

:root {
	--wpg_llmstxt-primary: #2271b1;
	--wpg_llmstxt-primary-hover: #135e96;
	--wpg_llmstxt-bg: #f0f0f1;
	--wpg_llmstxt-white: #ffffff;
	--wpg_llmstxt-text: #3c434a;
	--wpg_llmstxt-text-light: #646970;
	--wpg_llmstxt-border: #c3c4c7;
	--wpg_llmstxt-border-light: #dcdcde;
	--wpg_llmstxt-success: #00a32a;
	--wpg_llmstxt-danger: #d63638;
	--wpg_llmstxt-warning: #dba617;
	--wpg_llmstxt-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	--wpg_llmstxt-radius: 4px;
}

/* Container & Layout */
.wpg_llmstxt-wrap {
	max-width: 1200px;
	margin: 20px auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.wpg_llmstxt-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	background: var(--wpg_llmstxt-white);
	padding: 20px;
	border: 1px solid var(--wpg_llmstxt-border-light);
	border-radius: var(--wpg_llmstxt-radius);
	box-shadow: var(--wpg_llmstxt-card-shadow);
}

.wpg_llmstxt-header h1 {
	margin: 0;
	font-size: 24px;
	font-weight: 600;
	color: var(--wpg_llmstxt-text);
	display: flex;
	align-items: center;
	gap: 10px;
}

.wpg_llmstxt-header-actions {
	display: flex;
	gap: 10px;
}

.wpg_llmstxt-container {
	display: flex;
	gap: 20px;
	align-items: flex-start;
}

.wpg_llmstxt-main {
	flex: 1;
	min-width: 0; /* Prevent flex overflow */
}

.wpg_llmstxt-sidebar {
	width: 300px;
	flex-shrink: 0;
}

/* Tabs */
.wpg_llmstxt-tabs-nav {
	display: flex;
	gap: 5px;
	margin-bottom: 0;
	border-bottom: 1px solid var(--wpg_llmstxt-border);
}

.wpg_llmstxt-tab-link {
	padding: 12px 20px;
	background: transparent;
	border: 1px solid transparent;
	border-bottom: none;
	color: var(--wpg_llmstxt-text-light);
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	border-radius: 4px 4px 0 0;
	transition: all 0.2s ease;
}

.wpg_llmstxt-tab-link:hover {
	color: var(--wpg_llmstxt-primary);
	background: rgba(255, 255, 255, 0.5);
}

.wpg_llmstxt-tab-link.active {
	background: var(--wpg_llmstxt-white);
	border-color: var(--wpg_llmstxt-border);
	border-bottom-color: var(--wpg_llmstxt-white);
	color: var(--wpg_llmstxt-text);
	margin-bottom: -1px;
}

.wpg_llmstxt-tab-content {
	display: none;
	background: var(--wpg_llmstxt-white);
	border: 1px solid var(--wpg_llmstxt-border);
	border-top: none;
	padding: 30px;
	border-radius: 0 0 4px 4px;
	box-shadow: var(--wpg_llmstxt-card-shadow);
}

.wpg_llmstxt-tab-content.active {
	display: block;
}

/* Cards */
.wpg_llmstxt-card {
	background: var(--wpg_llmstxt-white);
	border: 1px solid var(--wpg_llmstxt-border-light);
	border-radius: var(--wpg_llmstxt-radius);
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: var(--wpg_llmstxt-card-shadow);
}

.wpg_llmstxt-card h2 {
	margin-top: 0;
	font-size: 16px;
	padding-bottom: 15px;
	border-bottom: 1px solid #f0f0f1;
	margin-bottom: 15px;
}

.wpg_llmstxt-card h3 {
	font-size: 14px;
	margin: 15px 0 10px;
}

/* Forms */
.wpg_llmstxt-form-table {
	width: 100%;
	border-collapse: collapse;
}

.wpg_llmstxt-form-table th {
	width: 200px;
	text-align: left;
	padding: 20px 10px 20px 0;
	vertical-align: top;
	font-weight: 600;
}

.wpg_llmstxt-form-table td {
	padding: 15px 0;
}

/* Custom Checkbox Toggle */
.wpg_llmstxt-toggle {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
}

.wpg_llmstxt-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
}

.wpg_llmstxt-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	transition: .4s;
	border-radius: 24px;
}

.wpg_llmstxt-slider:before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: .4s;
	border-radius: 50%;
}

input:checked + .wpg_llmstxt-slider {
	background-color: var(--wpg_llmstxt-primary);
}

input:focus + .wpg_llmstxt-slider {
	box-shadow: 0 0 1px var(--wpg_llmstxt-primary);
}

input:checked + .wpg_llmstxt-slider:before {
	transform: translateX(20px);
}

/* Post Types Grid */
.wpg_llmstxt-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 10px;
	background: #f9f9f9;
	padding: 15px;
	border-radius: 4px;
	border: 1px solid #eee;
}

.wpg_llmstxt-checkbox-label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 13px;
}

/* Preview Area */
.wpg_llmstxt-preview-box {
	background: #1e1e1e;
	border-radius: 4px;
	padding: 0;
	overflow: hidden;
}

.wpg_llmstxt-preview-header {
	background: #2d2d2d;
	padding: 8px 15px;
	color: #999;
	font-size: 12px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #333;
}

.wpg_llmstxt-preview-content {
	width: 100%;
	min-height: 400px;
	background: #1e1e1e !important;
	border: none;
	color: #e0e0e0 !important;
	font-family: 'Consolas', 'Monaco', monospace;
	font-size: 13px;
	line-height: 1.5;
	padding: 15px;
	resize: vertical;
	box-shadow: none !important;
}

.wpg_llmstxt-preview-content:focus {
	outline: none;
	box-shadow: none;
}

/* Stats Widget */
.wpg_llmstxt-stat-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid #eee;
}

.wpg_llmstxt-stat-item:last-child {
	border-bottom: none;
}

.wpg_llmstxt-stat-value {
	font-weight: 700;
	color: var(--wpg_llmstxt-primary);
}

.wpg_llmstxt-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
}

.wpg_llmstxt-badge.success {
	background: #d1e7dd;
	color: #0f5132;
}

.wpg_llmstxt-badge.warning {
	background: #fff3cd;
	color: #664d03;
}

.wpg_llmstxt-badge.danger {
	background: #f8d7da;
	color: #842029;
}

/* Responsive */
@media (max-width: 960px) {
	.wpg_llmstxt-container {
		flex-direction: column;
	}
	.wpg_llmstxt-sidebar {
		width: 100%;
	}
	.wpg_llmstxt-form-table th, 
	.wpg_llmstxt-form-table td {
		display: block;
		width: 100%;
		padding: 5px 0;
	}
	.wpg_llmstxt-form-table th {
		padding-top: 15px;
	}
}
