/**
 * Developer Debug Mode - Admin Styles
 *
 * @package Developer_Debug_Mode
 * @version 1.1.0
 */

/* Main Container */
.dev-debug-mode-wrap {
	max-width: 1200px;
}

.dev-debug-mode-wrap h1 {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
}

.dev-debug-mode-version {
	font-size: 12px;
	font-weight: normal;
	color: #666;
	background: #f0f0f1;
	padding: 4px 10px;
	border-radius: 4px;
}

/* Container Layout */
.dev-debug-mode-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

@media (max-width: 1200px) {
	.dev-debug-mode-container {
		grid-template-columns: 1fr;
	}
}

/* Box Styles */
.dev-debug-status-box,
.dev-debug-settings-box,
.dev-debug-info-box,
.dev-debug-support-box {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 20px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.dev-debug-status-box h2,
.dev-debug-settings-box h2,
.dev-debug-info-box h2 {
	margin-top: 0;
	padding-bottom: 12px;
	border-bottom: 1px solid #dcdcde;
}

/* Status Grid */
.dev-debug-status-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 15px;
	margin-top: 15px;
}

.status-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 15px;
	background: #f6f7f7;
	border-radius: 4px;
	border-left: 4px solid #dcdcde;
	transition: all 0.2s ease;
}

.status-item.active {
	background: #edfaef;
	border-left-color: #00a32a;
}

.status-item.inactive {
	background: #f6f7f7;
	border-left-color: #dcdcde;
}

.status-indicator {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #dcdcde;
	flex-shrink: 0;
}

.status-item.active .status-indicator {
	background: #00a32a;
	box-shadow: 0 0 0 3px rgba(0, 163, 42, 0.2);
}

.status-label {
	font-weight: 600;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 12px;
	flex: 1;
}

.status-value {
	font-size: 11px;
	color: #666;
	text-transform: uppercase;
}

/* Toggle Switch */
.dev-debug-mode-switch {
	position: relative;
	display: inline-block;
	width: 50px;
	height: 26px;
}

.dev-debug-mode-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.dev-debug-mode-switch .slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	transition: 0.3s;
	border-radius: 26px;
}

.dev-debug-mode-switch .slider:before {
	position: absolute;
	content: "";
	height: 20px;
	width: 20px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: 0.3s;
	border-radius: 50%;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dev-debug-mode-switch input:checked + .slider {
	background-color: #2271b1;
}

.dev-debug-mode-switch input:focus + .slider {
	box-shadow: 0 0 0 2px #2271b1;
}

.dev-debug-mode-switch input:checked + .slider:before {
	transform: translateX(24px);
}

.dev-debug-mode-switch input:disabled + .slider {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Form Table */
.dev-debug-settings-box .form-table th {
	width: 180px;
	padding: 15px 10px 15px 0;
}

.dev-debug-settings-box .form-table td {
	padding: 15px 10px;
}

.dev-debug-settings-box .description {
	margin-top: 8px;
	color: #646970;
}

/* Info Box */
.info-section {
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid #f0f0f1;
}

.info-section:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.info-section h3 {
	margin: 0 0 10px 0;
	font-size: 14px;
}

.info-section p {
	margin: 0;
	color: #646970;
}

.info-section ul {
	margin: 10px 0 0 20px;
	color: #646970;
}

.info-section li {
	margin-bottom: 5px;
}

.info-section code {
	background: #f6f7f7;
	padding: 4px 8px;
	border-radius: 3px;
	font-size: 12px;
	word-break: break-all;
}

/* Support Box - Enhanced CTA */
.dev-debug-support-box {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	border: none;
	text-align: center;
	grid-column: 1 / -1;
}

.support-box-header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-bottom: 15px;
}

.support-box-header h2 {
	color: #fff;
	margin: 0;
	padding: 0;
	border: none;
}

.support-icon {
	font-size: 32px;
}

.support-tagline {
	font-size: 16px;
	margin: 0 0 20px 0;
	opacity: 0.95;
}

.support-features {
	display: flex;
	justify-content: center;
	gap: 30px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.support-feature {
	display: flex;
	align-items: center;
	gap: 10px;
	background: rgba(255, 255, 255, 0.15);
	padding: 12px 16px;
	border-radius: 8px;
	transition: all 0.2s ease;
}

.support-feature:hover {
	background: rgba(255, 255, 255, 0.25);
	transform: translateY(-2px);
}

.support-feature.feature-urgent {
	background: rgba(220, 38, 38, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.3);
	animation: pulse-urgent 2s infinite;
}

@keyframes pulse-urgent {
	0%, 100% {
		box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
	}
	50% {
		box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
	}
}

.feature-icon {
	font-size: 24px;
}

.feature-text {
	text-align: left;
}

.feature-text strong {
	display: block;
	font-size: 14px;
}

.feature-text span {
	font-size: 12px;
	opacity: 0.9;
}

.support-examples {
	background: rgba(255, 255, 255, 0.1);
	padding: 15px 20px;
	border-radius: 8px;
	margin-bottom: 20px;
	text-align: left;
	max-width: 500px;
	margin-left: auto;
	margin-right: auto;
}

.support-examples p {
	margin: 0 0 10px 0;
	color: #fff;
}

.support-examples ul {
	margin: 0;
	padding-left: 20px;
	color: rgba(255, 255, 255, 0.9);
}

.support-examples li {
	margin-bottom: 5px;
	font-size: 13px;
}

.dev-debug-support-box .button-hero {
	background: #fff;
	color: #667eea;
	border: none;
	font-size: 16px;
	padding: 12px 30px;
	height: auto;
	font-weight: 600;
	transition: all 0.2s ease;
}

.dev-debug-support-box .button-hero:hover {
	background: #f0f0f0;
	color: #764ba2;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.support-guarantee {
	margin: 15px 0 0 0;
	font-size: 13px;
	opacity: 0.9;
}

/* Help CTA Boxes */
.dev-debug-help-cta {
	display: flex;
	align-items: flex-start;
	gap: 15px;
	background: #f0f6fc;
	border: 1px solid #c3c4c7;
	border-left: 4px solid #2271b1;
	padding: 15px;
	margin: 15px 0;
	border-radius: 4px;
}

.dev-debug-help-cta-urgent {
	background: #fef2f2;
	border-left-color: #dc2626;
}

.dev-debug-help-cta .cta-icon {
	font-size: 28px;
	flex-shrink: 0;
}

.dev-debug-help-cta .cta-content h4 {
	margin: 0 0 8px 0;
	color: #1d2327;
}

.dev-debug-help-cta .cta-content p {
	margin: 0 0 12px 0;
	color: #646970;
}

.dev-debug-help-cta .button {
	margin: 0;
}

/* Contact Panel Slide-out */
.dev-debug-contact-panel {
	position: fixed;
	top: 0;
	right: -450px;
	width: 450px;
	height: 100%;
	z-index: 100001;
	transition: right 0.3s ease;
}

.dev-debug-contact-panel.active {
	right: 0;
}

.dev-debug-contact-panel.active .contact-panel-overlay {
	opacity: 1;
	visibility: visible;
}

.contact-panel-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

.contact-panel-content {
	position: absolute;
	top: 0;
	right: 0;
	width: 450px;
	height: 100%;
	background: #fff;
	box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
	overflow-y: auto;
	padding: 30px;
	box-sizing: border-box;
}

.contact-panel-close {
	position: absolute;
	top: 15px;
	right: 15px;
	background: none;
	border: none;
	font-size: 28px;
	cursor: pointer;
	color: #666;
	padding: 0;
	line-height: 1;
	transition: color 0.2s;
}

.contact-panel-close:hover {
	color: #d63638;
}

.contact-panel-header {
	margin-bottom: 25px;
	padding-bottom: 20px;
	border-bottom: 1px solid #dcdcde;
}

.contact-panel-header h2 {
	margin: 0 0 10px 0;
	color: #1d2327;
}

.contact-panel-header p {
	margin: 0;
	color: #646970;
}

/* Contact Form Styles */
.contact-panel-form .form-row {
	margin-bottom: 20px;
}

.contact-panel-form label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	color: #1d2327;
}

.contact-panel-form .required {
	color: #d63638;
}

.contact-panel-form input[type="text"],
.contact-panel-form input[type="email"],
.contact-panel-form input[type="url"],
.contact-panel-form select,
.contact-panel-form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 14px;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-panel-form input:focus,
.contact-panel-form select:focus,
.contact-panel-form textarea:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

.contact-panel-form input[readonly] {
	background: #f6f7f7;
	color: #646970;
}

.contact-panel-form .field-hint {
	margin: 6px 0 0 0;
	font-size: 12px;
	color: #646970;
}

.contact-panel-form .urgency-hint .hint-urgent {
	color: #dc2626;
	font-weight: 600;
}

.contact-panel-form .urgency-hint .hint-express {
	color: #d97706;
	font-weight: 600;
}

/* Checkbox row */
.form-row-checkbox {
	margin-top: 20px;
}

.checkbox-label {
	display: flex !important;
	align-items: flex-start;
	gap: 10px;
	font-weight: normal !important;
	cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
	width: auto;
	margin-top: 3px;
}

.checkbox-label span {
	font-size: 13px;
	color: #646970;
	line-height: 1.5;
}

.checkbox-label a {
	color: #2271b1;
}

/* Form Actions */
.form-actions {
	margin-top: 25px;
}

.form-actions .button-hero {
	width: 100%;
	text-align: center;
	font-size: 16px;
	padding: 12px 20px;
	height: auto;
}

.form-message {
	padding: 12px 15px;
	border-radius: 4px;
	margin-top: 15px;
	font-size: 14px;
}

.form-message.success {
	background: #edfaef;
	color: #00a32a;
	border: 1px solid #00a32a;
}

.form-message.error {
	background: #fcf0f1;
	color: #d63638;
	border: 1px solid #d63638;
}

.contact-panel-footer {
	margin-top: 25px;
	padding-top: 20px;
	border-top: 1px solid #dcdcde;
	text-align: center;
	color: #646970;
	font-size: 13px;
}

.contact-panel-footer a {
	color: #2271b1;
}

/* Footer */
.dev-debug-mode-footer {
	margin-top: 30px;
	padding: 20px;
	text-align: center;
	color: #646970;
	font-size: 13px;
}

.dev-debug-mode-footer a {
	color: #2271b1;
	text-decoration: none;
}

.dev-debug-mode-footer a:hover {
	text-decoration: underline;
}

/* Responsive */
@media (max-width: 782px) {
	.dev-debug-status-grid {
		grid-template-columns: 1fr;
	}

	.dev-debug-settings-box .form-table th,
	.dev-debug-settings-box .form-table td {
		display: block;
		width: 100%;
		padding: 10px 0;
	}

	.support-features {
		flex-direction: column;
		align-items: center;
	}

	.contact-panel-content {
		width: 100%;
	}

	.dev-debug-contact-panel {
		width: 100%;
		right: -100%;
	}
}

/* Auto-save indicator */
.dev-debug-save-indicator {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 15px;
	background: #f0f6fc;
	border-radius: 4px;
	font-size: 13px;
	color: #2271b1;
	margin-left: 15px;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.dev-debug-save-indicator.visible {
	opacity: 1;
}

.dev-debug-save-indicator.success {
	background: #edfaef;
	color: #00a32a;
}

.dev-debug-save-indicator.error {
	background: #fcf0f1;
	color: #d63638;
}

.dev-debug-save-indicator .spinner {
	float: none;
	margin: 0;
}

/* Debug Log Viewer */
.dev-debug-log-viewer {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 20px;
	margin-top: 20px;
	grid-column: 1 / -1;
}

.log-viewer-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 15px;
	margin-bottom: 15px;
	padding-bottom: 15px;
	border-bottom: 1px solid #e0e0e0;
}

.log-viewer-header h2 {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

.log-file-info {
	font-size: 13px;
	font-weight: normal;
	color: #666;
}

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

.log-lines-selector {
	display: flex;
	align-items: center;
	gap: 5px;
}

.log-lines-selector span {
	color: #666;
	font-size: 13px;
}

.log-lines-selector select {
	padding: 4px 8px;
}

.log-auto-refresh {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	color: #666;
}

.log-viewer-actions .button {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.log-viewer-actions .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 16px;
}

.log-viewer-search {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 15px;
}

.log-viewer-search input {
	flex: 1;
	max-width: 300px;
	padding: 6px 10px;
}

.search-results {
	font-size: 13px;
	color: #666;
}

.log-viewer-content {
	background: #1e1e1e;
	border-radius: 4px;
	padding: 15px;
	max-height: 500px;
	overflow: auto;
	margin-bottom: 15px;
}

.log-viewer-content pre {
	margin: 0;
	font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
	font-size: 12px;
	line-height: 1.5;
	color: #d4d4d4;
	white-space: pre-wrap;
	word-wrap: break-word;
}

.log-viewer-content .loading {
	color: #888;
	font-style: italic;
}

.log-viewer-content .success {
	color: #4caf50;
}

.log-viewer-content .error {
	color: #f44336;
}

/* Log line coloring */
.log-line {
	display: block;
}

.log-fatal {
	color: #ff5252;
	font-weight: bold;
	background: rgba(255, 82, 82, 0.1);
	padding: 2px 4px;
	margin: 2px 0;
	border-radius: 2px;
}

.log-error {
	color: #ff8a80;
}

.log-warning {
	color: #ffcc00;
}

.log-notice {
	color: #888;
}

.log-timestamp {
	color: #64b5f6;
}

/* Search highlight */
.search-highlight {
	background: #ffeb3b;
	color: #000;
	padding: 1px 2px;
	border-radius: 2px;
}

.log-viewer-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	padding-top: 15px;
	border-top: 1px solid #e0e0e0;
}

.log-viewer-footer p {
	margin: 0;
	font-size: 13px;
	color: #666;
}

.log-viewer-footer code {
	background: #f6f7f7;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 12px;
}

.log-tip {
	font-style: italic;
}

/* Status Grid - 6 items */
.dev-debug-status-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

@media (max-width: 600px) {
	.dev-debug-status-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.log-viewer-header {
		flex-direction: column;
		align-items: flex-start;
	}
	
	.log-viewer-actions {
		width: 100%;
		justify-content: flex-start;
	}
}
