/* CENL Permissions Admin Styles */

/* Tabbed Navigation */
.cenl-nav-tabs {
	margin-bottom: 0;
}

.cenl-tab-content {
	border-top: none;
	padding: 0;
}

/* Content Manager Styles */
.cenl-content-manager {
	margin: 0;
}

.content-manager-header {
	background: #f9f9f9;
	padding: 20px;
	border-bottom: 1px solid #eee;
}

.content-manager-header h2 {
	margin-top: 0;
	margin-bottom: 5px;
}

.content-filters {
	background: #fff;
	padding: 15px 20px;
	border-bottom: 1px solid #eee;
	display: flex;
	gap: 15px;
	flex-wrap: wrap;
	align-items: end;
}

.filter-group {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.filter-group label {
	font-weight: 600;
	font-size: 12px;
	color: #646970;
	margin-bottom: 0;
}

.filter-group input,
.filter-group select {
	width: 100%;
}

.bulk-actions-bar {
	background: #f9f9f9;
	padding: 10px 20px;
	border-bottom: 1px solid #eee;
	display: flex;
	gap: 10px;
	align-items: center;
}

.bulk-selected-count {
	color: #646970;
	font-style: italic;
	margin-left: 10px;
}

.content-table-container {
	background: #fff;
}

.content-pagination {
	background: #f9f9f9;
	padding: 10px 20px;
	border-top: 1px solid #eee;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.pagination-links a {
	text-decoration: none;
	padding: 4px 8px;
	margin: 0 2px;
	border: 1px solid #ddd;
	border-radius: 3px;
}

.pagination-links a:hover {
	background: #f0f0f1;
}

.pagination-links strong {
	padding: 4px 8px;
	margin: 0 2px;
	background: #2271b1;
	color: #fff;
	border-radius: 3px;
}

/* Access Status Indicators */
.access-status {
	padding: 4px 8px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	display: inline-block;
}

.access-status.public {
	background: #e7f5fe;
	color: #0073aa;
}

.access-status.member {
	background: #d1ecf1;
	color: #0c5460;
}

.access-status.inherited {
	background: #fff3cd;
	color: #856404;
}

.access-status.post-type {
	background: #f8d7da;
	color: #721c24;
}

/* Quick Toggle Buttons */
.quick-toggle {
	padding: 2px 8px;
	font-size: 11px;
	min-height: auto;
	height: auto;
	line-height: 1.4;
}

.quick-toggle.loading {
	opacity: 0.6;
	cursor: not-allowed;
}

.quick-toggle:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Loading States */
.loading-row {
	text-align: center;
	padding: 40px 20px;
}

.spinner.is-active {
	visibility: visible;
	margin: 0 10px 0 0;
}

/* Settings Tab */
.settings-content {
	padding: 20px;
}

.settings-content h2 {
	margin-top: 0;
	border-bottom: 1px solid #eee;
	padding-bottom: 10px;
}

/* Original Overview Styles */
.cenl-permissions-overview {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-top: 20px;
}

.permissions-section {
	background: #fff;
	border: 1px solid #ccd0d4;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
	padding: 20px;
	border-radius: 4px;
}

.permissions-section h2 {
	margin-top: 0;
	border-bottom: 1px solid #eee;
	padding-bottom: 10px;
	color: #23282d;
}

.permissions-section h3 {
	margin-bottom: 10px;
	color: #2271b1;
}

.user-count {
	font-size: 24px;
	font-weight: bold;
	color: #2271b1;
	margin-bottom: 5px;
}

.content-list {
	max-height: 300px;
	overflow-y: auto;
	border: 1px solid #ddd;
	padding: 10px;
	background: #f9f9f9;
	border-radius: 3px;
}

.content-item {
	margin: 5px 0;
	padding: 10px;
	background: white;
	border-left: 3px solid #2271b1;
	border-radius: 3px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.content-item strong {
	color: #23282d;
}

.content-item small {
	color: #646970;
}

.content-item a {
	color: #2271b1;
	text-decoration: none;
}

.content-item a:hover {
	color: #135e96;
}

.post-type-restrictions {
	grid-column: 1 / -1;
}

.cenl-permissions-meta {
	margin: 10px 0;
}

.cenl-permissions-meta label {
	display: block;
	margin: 10px 0;
	font-weight: 500;
}

.cenl-permissions-meta input[type="checkbox"] {
	margin-right: 8px;
}

.cenl-permissions-meta .description {
	margin: 5px 0;
	font-style: italic;
	color: #646970;
	font-size: 13px;
}

/* Access denied message styles */
.cenl-access-message {
	background: #f8d7da;
	color: #721c24;
	padding: 15px;
	margin: 20px 0;
	border: 1px solid #f5c6cb;
	border-radius: 4px;
	font-size: 14px;
}

/* Admin bar access indicator */
#wp-admin-bar-cenl-access-level {
	background: #2271b1 !important;
}

#wp-admin-bar-cenl-access-level .ab-item {
	color: #fff !important;
	font-weight: 500;
}

/* Settings page styles */
.form-table th {
	color: #23282d;
	font-weight: 600;
}

.form-table fieldset label {
	display: block;
	margin: 8px 0;
	font-weight: normal;
}

.form-table fieldset input[type="checkbox"] {
	margin-right: 8px;
}

.form-table fieldset small {
	color: #646970;
	margin-left: 5px;
}

/* Responsive design */
@media (max-width: 768px) {
	.cenl-permissions-overview {
		grid-template-columns: 1fr;
		gap: 15px;
	}

	.post-type-restrictions {
		grid-column: 1;
	}

	.permissions-section {
		padding: 15px;
	}
}

/* Notice styles */
.notice.cenl-permissions-notice {
	border-left-color: #2271b1;
}

.notice.cenl-permissions-notice p {
	margin: 0.5em 0;
}

/* Button styles */
.button.cenl-permissions-button {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.button.cenl-permissions-button:hover {
	background: #135e96;
	border-color: #135e96;
}

/* Table styles for content lists */
.cenl-permissions-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 10px;
}

.cenl-permissions-table th,
.cenl-permissions-table td {
	padding: 8px 12px;
	text-align: left;
	border-bottom: 1px solid #ddd;
}

.cenl-permissions-table th {
	background: #f1f1f1;
	font-weight: 600;
	color: #23282d;
}

.cenl-permissions-table tr:hover {
	background: #f9f9f9;
}

/* Status indicators */
.cenl-status-indicator {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin-right: 8px;
}

.cenl-status-member {
	background: #00a32a;
}

.cenl-status-unauthenticated {
	background: #dba617;
}

.cenl-status-public {
	background: #72aee6;
}

/* Access Denied Modal Styles */
.cenl-access-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cenl-access-modal-overlay.show {
	opacity: 1;
	visibility: visible;
}

.cenl-access-modal {
	background: #fff;
	max-width: 500px;
	width: 90%;
	padding: 0;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	transform: scale(0.7);
	transition: transform 0.3s ease;
	position: relative;
}

.cenl-access-modal-overlay.show .cenl-access-modal {
	transform: scale(1);
}

.cenl-access-modal-header {
	padding: 20px 25px 15px;
	border-bottom: 1px solid #eee;
	position: relative;
}

.cenl-access-modal-header h3 {
	margin: 0;
	color: #721c24;
	font-size: 18px;
	font-weight: 600;
}

.cenl-access-modal-header.access-denied h3 {
	color: #856404;
}

.cenl-access-modal-close {
	position: absolute;
	top: 15px;
	right: 20px;
	background: none;
	border: none;
	font-size: 24px;
	color: #666;
	cursor: pointer;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background-color 0.2s ease;
}

.cenl-access-modal-close:hover {
	background-color: #f0f0f0;
	color: #000;
}

.cenl-access-modal-body {
	padding: 20px 25px;
}

.cenl-access-modal-body p {
	margin: 0 0 15px;
	line-height: 1.6;
	color: #444;
}

.cenl-access-modal-body p:last-child {
	margin-bottom: 0;
}

.cenl-access-modal-footer {
	padding: 15px 25px 20px;
	text-align: right;
	border-top: 1px solid #eee;
}

.cenl-access-modal-button {
	background: #2271b1;
	color: #fff;
	border: none;
	padding: 10px 20px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	transition: background-color 0.2s ease;
	text-decoration: none;
	display: inline-block;
	margin-left: 10px;
}

.cenl-access-modal-button:hover {
	background: #135e96;
	color: #fff;
}

.cenl-access-modal-button.secondary {
	background: #f6f7f7;
	color: #2c3338;
	border: 1px solid #c3c4c7;
}

.cenl-access-modal-button.secondary:hover {
	background: #f0f0f1;
	color: #2c3338;
}

/* Access denied icon */
.cenl-access-modal-icon {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	margin: 0 auto 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	color: #fff;
}

.cenl-access-modal-icon.member-required {
	background: #dc3545;
}

.cenl-access-modal-icon.access-denied {
	background: #ffc107;
	color: #212529;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
	.cenl-access-modal {
		width: 95%;
		margin: 20px;
	}

	.cenl-access-modal-header,
	.cenl-access-modal-body,
	.cenl-access-modal-footer {
		padding-left: 20px;
		padding-right: 20px;
	}
}
