﻿/* General */

.gdc-tab-content {
	margin-top: 16px;
}

.gdc-debug-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-left: 10px;
	padding: 2px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	vertical-align: middle;
}

.gdc-debug-on {
	background: #fcf0f1;
	color: #8a2424;
	border: 1px solid #f8c4c4;
}

.gdc-debug-off {
	background: #f6f7f7;
	color: #646970;
	border: 1px solid #dcdcde;
}

/* WP Config Debug */

.gdc-status-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
}

.gdc-status-badge .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.gdc-status-on {
	background: #edfaef;
	color: #1a7c36;
	border: 1px solid #a7d9aa;
}

.gdc-status-off {
	background: #f6f7f7;
	color: #646970;
	border: 1px solid #dcdcde;
}

.gdc-toggle-label {
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

/* Shared badges */

.gdc-badge {
	display: inline-block;
	padding: 2px 6px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.4;
}

.gdc-badge-warning {
	background: #fcf0f1;
	color: #8a2424;
	border: 1px solid #f8c4c4;
}

.gdc-badge-info {
	background: #f0f6fc;
	color: #135e96;
	border: 1px solid #b8d3ee;
}

.gdc-text-muted {
	color: #646970;
}

.gdc-text-warning {
	color: #d63638;
	font-weight: 600;
}

.gdc-empty-state {
	padding: 24px;
	text-align: center;
	background: #fff;
	border: 1px solid #dcdcde;
	color: #646970;
}

/* Cron Viewer */

.gdc-cron-viewer {
	margin-top: 16px;
}

/* Summary cards */

.gdc-cron-summary {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.gdc-cron-summary-card {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	font-size: 12px;
	color: #50575e;
	min-width: 100px;
}

.gdc-cron-summary-card .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
	color: #646970;
	flex-shrink: 0;
}

.gdc-cron-summary-card > div {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

.gdc-cron-summary-card > div strong {
	font-size: 14px;
	color: #1d2327;
}

.gdc-card-ok {
	border-color: #a7d9aa;
	background: #edfaef;
}

.gdc-card-ok .dashicons {
	color: #1a7c36;
}

.gdc-card-warning {
	border-color: #f5c26b;
	background: #fff4e5;
}

.gdc-card-warning .dashicons {
	color: #7c4700;
}

.gdc-card-error {
	border-color: #f8c4c4;
	background: #fcf0f1;
}

.gdc-card-error .dashicons {
	color: #8a2424;
}

/* Notices area */

.gdc-cron-notices {
	margin-bottom: 12px;
}

.gdc-cron-notice {
	margin: 0 0 6px 0;
}

/* Table */

.gdc-cron-table code {
	font-size: 12px;
}

.gdc-cron-overdue td {
	background-color: #fcf0f1 !important;
}

.gdc-cron-orphan td {
	background-color: #fff4e5 !important;
}

/* Hook name + callback expand */

.gdc-cron-hook-name {
	font-size: 12px;
}

.gdc-cron-cb-toggle {
	cursor: pointer;
	border: none;
	background: none;
	padding: 0;
	margin-left: 2px;
	color: #2271b1;
	line-height: 1;
	vertical-align: middle;
}

.gdc-cron-cb-toggle:hover {
	color: #135e96;
}

.gdc-cron-callbacks {
	margin: 4px 0 0 0;
	padding: 0;
	list-style: none;
}

.gdc-cron-callbacks li {
	margin: 2px 0;
}

.gdc-cron-cb {
	font-size: 11px;
	color: #2271b1;
	background: #f0f6fc;
	border-radius: 2px;
	padding: 1px 4px;
}

/* Badges: extend existing */

.gdc-badge-orphan {
	background: #fff4e5;
	color: #7c4700;
	border: 1px solid #f5c26b;
}

.gdc-badge-error {
	background: #fcf0f1;
	color: #8a2424;
	border: 1px solid #f8c4c4;
}

.gdc-badge-critical {
	background: #8a2424;
	color: #fff;
	border: 1px solid #6e1b1b;
}

/* Actions column */

.gdc-cron-actions {
	white-space: nowrap;
}

.gdc-cron-actions .button-small {
	padding: 0 4px;
	min-height: 24px;
	line-height: 22px;
}

.gdc-cron-actions .button-small + .button-small {
	margin-left: 3px;
}

.gdc-cron-run-ok {
	color: #1a7c36 !important;
}

.gdc-cron-run-error {
	color: #d63638 !important;
}

/* Cron source badges */

.gdc-source-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 500;
	max-width: 140px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: middle;
}

.gdc-source-core {
	background: #f0f6fc;
	color: #135e96;
	border: 1px solid #b8d3ee;
}

.gdc-source-plugin {
	background: #edfaef;
	color: #1a7c36;
	border: 1px solid #a7d9aa;
}

.gdc-source-theme {
	background: #fff4e5;
	color: #7c4700;
	border: 1px solid #f5c26b;
}

/* Log Viewer toolbar */

.gdc-log-viewer {
	margin-top: 16px;
}

.gdc-log-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 12px;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-bottom: none;
	border-radius: 3px 3px 0 0;
	flex-wrap: wrap;
	gap: 8px;
}

.gdc-log-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	font-size: 12px;
	color: #50575e;
}

.gdc-log-meta code {
	font-size: 11px;
}

.gdc-log-badge {
	background: #dcdcde;
	border-radius: 10px;
	padding: 1px 8px;
	font-size: 11px;
	white-space: nowrap;
}

.gdc-log-actions {
	display: flex;
	align-items: center;
	gap: 6px;
}

.gdc-log-actions .button .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
	vertical-align: middle;
	margin-right: 3px;
}

.gdc-log-right {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.gdc-log-generate {
	display: flex;
	align-items: center;
	gap: 6px;
}

.gdc-log-wrap-label {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	white-space: nowrap;
	cursor: pointer;
	color: #3c434a;
}

.gdc-log-wrap-label input[type="checkbox"] {
	margin: 0;
}

.gdc-select-small {
	height: 30px;
	font-size: 12px;
	padding: 0 4px;
	border-radius: 3px;
}

#gdc-live-toggle.gdc-live-active {
	background: #1a7c36;
	border-color: #155d2a;
	color: #fff;
}

#gdc-live-toggle .gdc-live-icon {
	display: inline-block;
	font-size: 14px;
	width: 14px;
	height: 14px;
	vertical-align: middle;
	margin-right: 2px;
	transform-origin: 50% 50%;
}

#gdc-live-toggle.gdc-live-active .gdc-live-icon {
	animation: gdc-spin 1.5s linear infinite;
}

@keyframes gdc-spin {
	from { transform: rotate( 0deg ); }
	to   { transform: rotate( 360deg ); }
}

/* Reusable spin utility class (cron run/delete buttons) */
.gdc-spin {
	animation: gdc-spin 1s linear infinite;
	display: inline-block;
}

.gdc-clear-form {
	display: inline;
}

.gdc-log-empty-state {
	padding: 32px;
	text-align: center;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 0 0 3px 3px;
	color: #646970;
}

.gdc-log-pagination {
	padding: 8px 0;
}

.gdc-log-pagination .tablenav-pages {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Log Viewer: CodeMirror dark theme */

#gdc-log-wrap {
	width: 100%;
}

#gdc-log-wrap .CodeMirror {
	background: #1e1e1e;
	color: #abb2bf;
	font-family: Consolas, "Fira Code", "JetBrains Mono", "Courier New", monospace;
	font-size: 12px;
	line-height: 1.65;
	height: 640px;
	border: 1px solid #1d2327;
	border-top: none;
	border-radius: 0 0 3px 3px;
}

#gdc-log-wrap .CodeMirror-scroll {
	height: 640px;
	min-height: 0;
}

#gdc-log-wrap .CodeMirror-gutters {
	background: #252526;
	border-right: 1px solid #3e3e42;
}

#gdc-log-wrap .CodeMirror-linenumber {
	color: #495162;
	padding: 0 8px;
}

#gdc-log-wrap .CodeMirror-cursor {
	border-left: 1px solid #528bff;
}

/* ==========================================================================
   Tool header (summary cards + action buttons row)
   ========================================================================== */

.gdc-tool-header {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 16px;
}

/* ==========================================================================
   Transient viewer
   ========================================================================== */

.gdc-badge-expired {
	display: inline-block;
	padding: 1px 7px;
	border-radius: 3px;
	background: #d63638;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.8;
	vertical-align: middle;
}

.gdc-transient-expired td {
	background-color: #fef9e7;
}

.gdc-transient-key {
	word-break: break-all;
}

/* ==========================================================================
   Autoloaded options viewer — size bars
   ========================================================================== */

.gdc-size-bar-wrap {
	background: #f0f0f1;
	border-radius: 3px;
	height: 12px;
	overflow: hidden;
	width: 100%;
}

.gdc-size-bar {
	height: 12px;
	border-radius: 3px;
	min-width: 2px;
}

.gdc-bar-ok {
	background: #00a32a;
}

.gdc-bar-warning {
	background: #dba617;
}

.gdc-bar-danger {
	background: #d63638;
}

/* ==========================================================================
   HTTP log viewer
   ========================================================================== */

.gdc-http-table code.gdc-http-url {
	display: block;
	max-width: 420px;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 11px;
}

.gdc-http-method {
	display: inline-block;
	padding: 1px 6px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.8;
	color: #fff;
	background: #646970;
	vertical-align: middle;
}

.gdc-http-method-get    { background: #2271b1; }
.gdc-http-method-post   { background: #00a32a; }
.gdc-http-method-put    { background: #dba617; color: #1d2327; }
.gdc-http-method-patch  { background: #996800; }
.gdc-http-method-delete { background: #d63638; }
.gdc-http-method-head   { background: #8c8f94; }

.gdc-http-status {
	display: inline-block;
	padding: 1px 6px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.8;
	color: #fff;
	vertical-align: middle;
}

.gdc-http-status-2xx { background: #00a32a; }
.gdc-http-status-3xx { background: #dba617; color: #1d2327; }
.gdc-http-status-4xx { background: #d63638; }
.gdc-http-status-5xx { background: #8c1212; }
.gdc-http-status-err { background: #646970; }

.gdc-http-capturing {
	border-color: #00a32a;
	color: #00a32a;
}

/* ==========================================================================
   Constants viewer
   ========================================================================== */

.gdc-constant-group-heading {
	margin: 24px 0 4px;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #3c434a;
	border-bottom: 1px solid #dcdcde;
	padding-bottom: 4px;
}

.gdc-constant-masked {
	color: #8c8f94;
	font-style: italic;
	font-size: 12px;
}


#gdc-log-wrap .CodeMirror-selected {
	background: rgba(114, 174, 230, 0.18);
}

#gdc-log-wrap .CodeMirror-focused .CodeMirror-selected {
	background: rgba(114, 174, 230, 0.25);
}

/* Line colours (background + text override via wrap class) */

#gdc-log-wrap .gdc-log-fatal {
	background-color: rgba(248, 99, 104, 0.12) !important;
}

#gdc-log-wrap .gdc-log-fatal span {
	color: #f4b8ba !important;
}

#gdc-log-wrap .gdc-log-warning {
	background-color: rgba(240, 195, 60, 0.1) !important;
}

#gdc-log-wrap .gdc-log-warning span {
	color: #e8d680 !important;
}

#gdc-log-wrap .gdc-log-notice {
	background-color: rgba(114, 174, 230, 0.09) !important;
}

#gdc-log-wrap .gdc-log-notice span {
	color: #a9c5e8 !important;
}

#gdc-log-wrap .gdc-log-cron {
	background-color: rgba(104, 222, 124, 0.07) !important;
}

#gdc-log-wrap .gdc-log-cron span {
	color: #a8d8b0 !important;
}
