/**
 * Post Lifecycle - Admin Styles
 *
 * @package PostLifecycle
 * @since 1.0.0
 */

/* ==========================================================================
   Variables
   ========================================================================== */
:root {
	--bclc-primary: #2271b1;
	--bclc-primary-hover: #135e96;
	--bclc-success: #00a32a;
	--bclc-warning: #dba617;
	--bclc-danger: #d63638;
	--bclc-border: #c3c4c7;
	--bclc-bg-light: #f6f7f7;
}

/* ==========================================================================
   Dashboard
   ========================================================================== */
.bclc-dashboard h1 {
	margin-bottom: 20px;
}

.bclc-dashboard-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
	gap: 20px;
	margin-top: 20px;
}

.bclc-widget {
	background: #fff;
	border: 1px solid var(--bclc-border);
	border-radius: 4px;
	padding: 20px;
}

.bclc-widget h2 {
	margin: 0 0 15px;
	padding: 0 0 10px;
	border-bottom: 1px solid var(--bclc-border);
	font-size: 14px;
}

/* Stats Grid */
.bclc-stats-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 15px;
}

.bclc-stat-box {
	background: var(--bclc-bg-light);
	border-radius: 4px;
	padding: 15px;
	text-align: center;
}

.bclc-stat-number {
	display: block;
	font-size: 28px;
	font-weight: 600;
	color: var(--bclc-primary);
	line-height: 1.2;
}

.bclc-stat-label {
	display: block;
	font-size: 12px;
	color: #50575e;
	margin-top: 5px;
}

.bclc-stat-warning .bclc-stat-number {
	color: var(--bclc-warning);
}

.bclc-stat-alert .bclc-stat-number {
	color: var(--bclc-danger);
}

/* Action List */
.bclc-action-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bclc-action-list li {
	margin-bottom: 10px;
}

.bclc-action-list .button {
	width: 100%;
	text-align: left;
	display: flex;
	align-items: center;
	gap: 8px;
}

.bclc-action-list .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* Status Indicators */
.bclc-status {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 500;
}

.bclc-status-active {
	background: #d7f4d7;
	color: #006600;
}

.bclc-status-inactive {
	background: #fcf0f1;
	color: #8b0000;
}

/* Widget Footer */
.bclc-widget-footer {
	margin: 15px 0 0;
	padding-top: 10px;
	border-top: 1px solid var(--bclc-border);
}

/* No Data */
.bclc-no-data {
	padding: 30px;
	text-align: center;
	color: #646970;
}

.bclc-no-data.bclc-success {
	color: var(--bclc-success);
}

.bclc-no-data .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
	margin-bottom: 10px;
}

/* ==========================================================================
   Expiration List
   ========================================================================== */
.bclc-expiration-page .subsubsub {
	margin-bottom: 15px;
}

.bclc-expiration-content {
	margin-top: 20px;
}

.bclc-expired {
	background-color: #fcf0f1 !important;
}

.bclc-countdown {
	font-weight: 500;
}

.bclc-countdown-warning {
	color: var(--bclc-warning);
}

.bclc-countdown-expired {
	color: var(--bclc-danger);
}

.bclc-post-status {
	display: inline-block;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 11px;
	text-transform: uppercase;
}

.bclc-status-publish {
	background: #d7f4d7;
	color: #006600;
}

.bclc-status-draft {
	background: #f0f0f1;
	color: #50575e;
}

.bclc-status-future {
	background: #e5f5fa;
	color: #0a4b78;
}

/* ==========================================================================
   Audit Page (v2 - Priority-based Layout)
   ========================================================================== */

/* Header with help toggle */
.bclc-audit-v2 h1 {
	display: flex;
	align-items: center;
	gap: 10px;
}

.bclc-help-toggle {
	background: none;
	border: none;
	cursor: pointer;
	padding: 5px;
	color: #646970;
	transition: color 0.2s;
}

.bclc-help-toggle:hover {
	color: var(--bclc-primary);
}

.bclc-help-toggle .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

/* Help Panel */
.bclc-help-panel {
	background: var(--bclc-bg-light);
	border: 1px solid var(--bclc-border);
	border-radius: 4px;
	padding: 15px 20px;
	margin-bottom: 20px;
}

.bclc-help-panel[hidden] {
	display: none;
}

.bclc-help-content h3 {
	margin: 0 0 10px;
	font-size: 14px;
}

.bclc-help-content p {
	margin: 0 0 10px;
	color: #646970;
	font-size: 13px;
}

.bclc-help-content ul {
	list-style: none;
	margin: 0 0 10px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
}

.bclc-help-content li {
	font-size: 12px;
	color: #50575e;
}

.bclc-help-content li strong {
	color: var(--bclc-danger);
}

.bclc-help-note {
	margin: 0;
	padding-top: 10px;
	border-top: 1px solid var(--bclc-border);
	font-size: 12px;
}

/* Priority Summary Boxes */
.bclc-priority-summary {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 15px;
	margin-bottom: 25px;
}

.bclc-priority-box {
	background: #fff;
	border: 2px solid var(--bclc-border);
	border-radius: 8px;
	padding: 20px;
	text-align: center;
	transition: transform 0.2s, box-shadow 0.2s;
}

.bclc-priority-box:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bclc-priority-count {
	display: block;
	font-size: 36px;
	font-weight: 700;
	line-height: 1.1;
}

.bclc-priority-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-top: 5px;
}

.bclc-priority-range {
	display: block;
	font-size: 11px;
	color: #646970;
	margin-top: 3px;
}

/* Priority Box Colors */
.bclc-priority-critical {
	border-color: var(--bclc-danger);
}

.bclc-priority-critical .bclc-priority-count,
.bclc-priority-critical .bclc-priority-label {
	color: var(--bclc-danger);
}

.bclc-priority-warning {
	border-color: var(--bclc-warning);
}

.bclc-priority-warning .bclc-priority-count,
.bclc-priority-warning .bclc-priority-label {
	color: #996800;
}

.bclc-priority-good {
	border-color: var(--bclc-success);
}

.bclc-priority-good .bclc-priority-count,
.bclc-priority-good .bclc-priority-label {
	color: var(--bclc-success);
}

/* No Issues Success Message */
.bclc-no-issues-message {
	background: #d7f4d7;
	border: 1px solid var(--bclc-success);
	border-radius: 8px;
	padding: 40px;
	text-align: center;
	margin: 30px 0;
}

.bclc-no-issues-message .dashicons {
	font-size: 64px;
	width: 64px;
	height: 64px;
	color: var(--bclc-success);
}

.bclc-no-issues-message h2 {
	margin: 15px 0 10px;
	color: #006600;
}

.bclc-no-issues-message p {
	margin: 0;
	color: #006600;
}

/* Priority Sections */
.bclc-priority-section {
	background: #fff;
	border: 1px solid var(--bclc-border);
	border-radius: 8px;
	margin-bottom: 15px;
	overflow: hidden;
}

.bclc-section-toggle {
	display: flex;
	align-items: center;
	width: 100%;
	padding: 15px 20px;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	font-size: 14px;
	transition: background 0.2s;
}

.bclc-section-toggle:hover {
	background: var(--bclc-bg-light);
}

.bclc-toggle-icon {
	margin-right: 10px;
	color: #646970;
}

.bclc-section-toggle > .dashicons:not(.bclc-toggle-icon) {
	margin-right: 10px;
}

.bclc-section-title {
	flex: 1;
	font-weight: 600;
}

.bclc-section-subtitle {
	display: block;
	font-size: 12px;
	font-weight: 400;
	color: #646970;
	margin-top: 2px;
}

.bclc-section-count {
	background: var(--bclc-bg-light);
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 13px;
	font-weight: 600;
}

/* Section Colors */
.bclc-priority-section.bclc-priority-critical .bclc-section-toggle > .dashicons:not(.bclc-toggle-icon) {
	color: var(--bclc-danger);
}

.bclc-priority-section.bclc-priority-critical .bclc-section-count {
	background: #fcf0f1;
	color: var(--bclc-danger);
}

.bclc-priority-section.bclc-priority-warning .bclc-section-toggle > .dashicons:not(.bclc-toggle-icon) {
	color: #996800;
}

.bclc-priority-section.bclc-priority-warning .bclc-section-count {
	background: #fcf9e8;
	color: #996800;
}

.bclc-priority-section.bclc-priority-good .bclc-section-toggle > .dashicons:not(.bclc-toggle-icon) {
	color: var(--bclc-success);
}

.bclc-priority-section.bclc-priority-good .bclc-section-count {
	background: #d7f4d7;
	color: var(--bclc-success);
}

/* Section Content */
.bclc-section-content {
	border-top: 1px solid var(--bclc-border);
	padding: 15px 20px;
}

.bclc-section-content[hidden] {
	display: none;
}

/* Post Cards */
.bclc-post-cards {
	display: grid;
	gap: 12px;
}

.bclc-post-card {
	background: var(--bclc-bg-light);
	border-radius: 6px;
	padding: 15px;
	transition: background 0.2s;
}

.bclc-post-card:hover {
	background: #eef0f1;
}

.bclc-card-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 10px;
}

.bclc-card-title {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.bclc-card-title a {
	color: #1d2327;
	text-decoration: none;
}

.bclc-card-title a:hover {
	color: var(--bclc-primary);
}

/* Score Badge */
.bclc-score-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
	white-space: nowrap;
}

.bclc-score-badge.bclc-score-poor {
	background: #fcf0f1;
	color: var(--bclc-danger);
}

.bclc-score-badge.bclc-score-warning {
	background: #fcf9e8;
	color: #996800;
}

.bclc-score-badge.bclc-score-good {
	background: #d7f4d7;
	color: var(--bclc-success);
}

/* Issue Badges */
.bclc-card-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 12px;
}

.bclc-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 11px;
	background: #fff;
	border: 1px solid var(--bclc-border);
	color: #50575e;
	cursor: help;
}

.bclc-badge .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

.bclc-badge-old {
	border-color: #dba617;
	color: #996800;
}

.bclc-badge-old .dashicons {
	color: #dba617;
}

.bclc-badge-stale {
	border-color: #9370db;
	color: #6a5acd;
}

.bclc-badge-stale .dashicons {
	color: #9370db;
}

.bclc-badge-short {
	border-color: #3498db;
	color: #2980b9;
}

.bclc-badge-short .dashicons {
	color: #3498db;
}

.bclc-badge-noimage {
	border-color: #e74c3c;
	color: #c0392b;
}

.bclc-badge-noimage .dashicons {
	color: #e74c3c;
}

/* Card Footer */
.bclc-card-footer {
	display: flex;
	gap: 8px;
}

.bclc-card-footer .button {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.bclc-card-footer .button .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

/* Section More Link */
.bclc-section-more {
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid var(--bclc-border);
	text-align: center;
}

/* Single Priority View */
.bclc-back-link {
	margin-bottom: 15px;
}

.bclc-back-link a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: #646970;
	text-decoration: none;
	font-size: 13px;
}

.bclc-back-link a:hover {
	color: var(--bclc-primary);
}

.bclc-back-link .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.bclc-single-priority-header {
	background: #fff;
	border: 2px solid var(--bclc-border);
	border-radius: 8px;
	padding: 20px 25px;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 15px;
}

.bclc-single-priority-header > .dashicons {
	font-size: 32px;
	width: 32px;
	height: 32px;
}

.bclc-single-priority-header h2 {
	margin: 0;
	font-size: 18px;
}

.bclc-single-priority-header p {
	margin: 0;
	color: #646970;
	font-size: 13px;
	margin-left: auto;
}

.bclc-header-count {
	font-weight: 400;
	color: #646970;
}

.bclc-single-priority-header.bclc-priority-critical {
	border-color: var(--bclc-danger);
}

.bclc-single-priority-header.bclc-priority-critical > .dashicons,
.bclc-single-priority-header.bclc-priority-critical h2 {
	color: var(--bclc-danger);
}

.bclc-single-priority-header.bclc-priority-warning {
	border-color: var(--bclc-warning);
}

.bclc-single-priority-header.bclc-priority-warning > .dashicons,
.bclc-single-priority-header.bclc-priority-warning h2 {
	color: #996800;
}

.bclc-single-priority-header.bclc-priority-good {
	border-color: var(--bclc-success);
}

.bclc-single-priority-header.bclc-priority-good > .dashicons,
.bclc-single-priority-header.bclc-priority-good h2 {
	color: var(--bclc-success);
}

/* Full cards view (no section wrapper) */
.bclc-cards-full {
	background: #fff;
	border: 1px solid var(--bclc-border);
	border-radius: 8px;
	padding: 15px 20px;
}

.bclc-no-posts {
	color: #646970;
	text-align: center;
	padding: 30px;
}

/* Pagination */
.bclc-pagination-info {
	color: #646970;
	font-size: 13px;
	margin-bottom: 15px;
}

.bclc-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 5px;
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--bclc-border);
}

.bclc-page-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0 10px;
	background: #fff;
	border: 1px solid var(--bclc-border);
	border-radius: 4px;
	color: #2271b1;
	text-decoration: none;
	font-size: 13px;
	transition: all 0.2s;
}

.bclc-page-link:hover {
	background: #f0f0f1;
	border-color: #8c8f94;
	color: #135e96;
}

.bclc-page-link.current {
	background: var(--bclc-primary);
	border-color: var(--bclc-primary);
	color: #fff;
	font-weight: 600;
}

.bclc-page-link.disabled {
	background: #f6f7f7;
	border-color: #dcdcde;
	color: #a7aaad;
	cursor: not-allowed;
}

.bclc-page-dots {
	color: #646970;
	padding: 0 5px;
}

/* Settings Link */
.bclc-settings-link {
	margin-top: 25px;
}

.bclc-settings-link a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: #646970;
	text-decoration: none;
}

.bclc-settings-link a:hover {
	color: var(--bclc-primary);
}

.bclc-settings-link .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* Legacy Audit Page Styles (for backwards compatibility) */
.bclc-audit-page:not(.bclc-audit-v2) .bclc-audit-description {
	font-size: 14px;
	color: #646970;
	margin-bottom: 20px;
}

.bclc-audit-page:not(.bclc-audit-v2) .bclc-audit-summary {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 15px;
	margin-bottom: 30px;
}

.bclc-audit-page:not(.bclc-audit-v2) .bclc-audit-box {
	background: #fff;
	border: 1px solid var(--bclc-border);
	border-radius: 4px;
	padding: 20px;
	text-align: center;
}

.bclc-audit-page:not(.bclc-audit-v2) .bclc-audit-count {
	display: block;
	font-size: 32px;
	font-weight: 600;
	color: var(--bclc-primary);
}

.bclc-audit-page:not(.bclc-audit-v2) .bclc-audit-label {
	display: block;
	font-size: 13px;
	color: #646970;
	margin-top: 5px;
}

.bclc-issues-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bclc-issue {
	display: inline-block;
	background: #fcf0f1;
	color: #8b0000;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 11px;
	margin: 2px;
}

.bclc-no-issues {
	color: var(--bclc-success);
}

.bclc-audit-note {
	color: #646970;
	font-style: italic;
	margin-top: 15px;
}

/* Score Bar */
.bclc-score-bar {
	position: relative;
	width: 100%;
	max-width: 80px;
	height: 20px;
	background: #f0f0f1;
	border-radius: 3px;
	overflow: hidden;
}

.bclc-score-fill {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	transition: width 0.3s ease;
}

.bclc-score-text {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 11px;
	font-weight: 600;
	color: #1d2327;
	z-index: 1;
}

.bclc-score-good .bclc-score-fill {
	background: var(--bclc-success);
}

.bclc-score-warning .bclc-score-fill {
	background: var(--bclc-warning);
}

.bclc-score-poor .bclc-score-fill {
	background: var(--bclc-danger);
}

/* Expiration Status Colors */
.bclc-status-overdue {
	color: var(--bclc-danger);
	font-weight: 600;
}

.bclc-status-today {
	color: var(--bclc-warning);
	font-weight: 600;
}

.bclc-status-soon {
	color: var(--bclc-warning);
}

.bclc-status-normal {
	color: #646970;
}

/* ==========================================================================
   Settings Page
   ========================================================================== */
.bclc-settings-page .form-table th {
	padding-top: 15px;
	width: 250px;
}

.bclc-plugin-info,
.bclc-cron-info,
.bclc-support-info {
	margin-top: 30px;
}

.bclc-status-ok {
	color: var(--bclc-success);
}

.bclc-status-error {
	color: var(--bclc-danger);
}

/* ==========================================================================
   Calendar Page
   ========================================================================== */
.bclc-calendar-container {
	background: #fff;
	border: 1px solid var(--bclc-border);
	border-radius: 4px;
	padding: 20px;
	margin-top: 20px;
}

.bclc-calendar-header {
	margin-bottom: 20px;
}

.bclc-calendar-legend {
	display: flex;
	gap: 20px;
}

.bclc-legend-item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
}

.bclc-legend-color {
	width: 12px;
	height: 12px;
	border-radius: 3px;
}

.bclc-legend-scheduled .bclc-legend-color {
	background: var(--bclc-primary);
}

.bclc-legend-published .bclc-legend-color {
	background: var(--bclc-success);
}

.bclc-legend-expiring .bclc-legend-color {
	background: var(--bclc-warning);
}

#bclc-calendar {
	min-height: 400px;
}

.bclc-calendar-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 400px;
	color: #646970;
	text-align: center;
}

.bclc-calendar-placeholder .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
	margin-bottom: 15px;
	color: var(--bclc-border);
}

.bclc-calendar-info {
	margin-top: 30px;
}

.bclc-calendar-info ul {
	list-style: disc;
	margin-left: 20px;
}

/* ==========================================================================
   Dashboard Widget (WordPress Dashboard)
   ========================================================================== */
.bclc-widget-stats {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bclc-widget-stats li {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f1;
}

.bclc-widget-stats li:last-child {
	border-bottom: none;
}

.bclc-stat-value {
	font-weight: 600;
	color: var(--bclc-primary);
}

.bclc-widget-links {
	margin-top: 15px;
	padding-top: 10px;
	border-top: 1px solid #f0f0f1;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media screen and (max-width: 782px) {
	.bclc-dashboard-widgets {
		grid-template-columns: 1fr;
	}

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

	.bclc-audit-summary {
		grid-template-columns: repeat(2, 1fr);
	}
}
