/**
 * ProRank SEO Editor Sidebar - Premium Design 2025
 * Blue Primary (#3b82f6) + Orange Accent (#ff6b35)
 * Modern, Premium, Professional
 */

/* ============================================
   DESIGN SYSTEM FOUNDATION
   ============================================ */
:root {
  /* Primary - Blue */
  --seo-primary: #3b82f6;
  --seo-primary-dark: #2563eb;
  --seo-primary-darker: #1d4ed8;
  --seo-primary-light: #60a5fa;
  --seo-primary-bg: #eff6ff;
  --seo-primary-muted: rgba(59, 130, 246, 0.1);

  /* Accent - Orange */
  --seo-accent: #ff6b35;
  --seo-accent-light: #ffa500;
  --seo-accent-dark: #ff4500;
  --seo-accent-bg: #fff7ed;

  /* Status Colors */
  --seo-success: #3b82f6;
  --seo-success-bg: #ecfdf5;
  --seo-warning: #f59e0b;
  --seo-warning-bg: #fffbeb;
  --seo-danger: #ef4444;
  --seo-danger-bg: #fef2f2;

  /* Neutral Grays - The foundation */
  --seo-white: #FFFFFF;
  --seo-gray-25: #FCFCFD;
  --seo-gray-50: #F9FAFB;
  --seo-gray-100: #F3F4F6;
  --seo-gray-200: #E5E7EB;
  --seo-gray-300: #D1D5DB;
  --seo-gray-400: #9CA3AF;
  --seo-gray-500: #6B7280;
  --seo-gray-600: #4B5563;
  --seo-gray-700: #374151;
  --seo-gray-800: #1F2937;
  --seo-gray-900: #111827;

  /* Typography */
  --seo-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --seo-font-mono: 'SF Mono', Monaco, Consolas, monospace;

  /* Spacing */
  --seo-spacing-xs: 4px;
  --seo-spacing-sm: 8px;
  --seo-spacing-md: 16px;
  --seo-spacing-lg: 24px;
  --seo-spacing-xl: 32px;

  /* Shadows - Subtle */
  --seo-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --seo-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --seo-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --seo-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);

  /* Borders */
  --seo-radius-sm: 6px;
  --seo-radius-md: 8px;
  --seo-radius-lg: 12px;
  --seo-radius-full: 9999px;
  --seo-border: 1px solid var(--seo-gray-200);
}

/* ============================================
   RESET & BASE
   ============================================ */
.prorank-editor-sidebar *,
.prorank-editor-sidebar *::before,
.prorank-editor-sidebar *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.prorank-editor-sidebar {
  font-family: var(--seo-font);
  font-size: 13px;
  line-height: 1.5;
  color: var(--seo-gray-700);
  background: var(--seo-white);
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Subtle Scrollbar */
.prorank-editor-sidebar::-webkit-scrollbar {
  width: 5px;
}

.prorank-editor-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.prorank-editor-sidebar::-webkit-scrollbar-thumb {
  background: var(--seo-gray-200);
  border-radius: 3px;
}

.prorank-editor-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--seo-gray-300);
}

/* ============================================
   HEADER - Premium Blue Gradient + Orange Accent
   ============================================ */
.seo-sidebar-header {
  position: relative;
  padding: var(--seo-spacing-md);
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 70%, #1d4ed8 100%);
  border-bottom: none;
  box-shadow: var(--seo-shadow-md);
}

/* Orange accent bar at top */
.seo-sidebar-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #ff6b35 0%, #ffa500 50%, #ff4500 100%);
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
}

.seo-sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--seo-spacing-sm);
}

.seo-sidebar-logo {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  border-radius: var(--seo-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.seo-sidebar-title {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.seo-pro-badge {
  background: linear-gradient(135deg, #ff6b35 0%, #ff4500 100%);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: var(--seo-radius-sm);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: auto;
  box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
}

/* ============================================
   MAIN SCORE CARD - Premium Clean
   ============================================ */
.seo-score-card {
  background: var(--seo-white);
  margin: var(--seo-spacing-md);
  border-radius: var(--seo-radius-lg);
  padding: var(--seo-spacing-lg);
  border: var(--seo-border);
}

.seo-score-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--seo-spacing-lg);
}

.seo-score-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--seo-gray-900);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.seo-score-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--seo-radius-full);
  font-size: 11px;
  font-weight: 500;
}

.seo-score-status--poor {
  background: var(--seo-danger-bg);
  color: var(--seo-danger);
}

.seo-score-status--fair {
  background: var(--seo-warning-bg);
  color: var(--seo-warning);
}

.seo-score-status--good {
  background: var(--seo-success-bg);
  color: var(--seo-success);
}

/* Score Display */
.seo-score-display {
  display: flex;
  align-items: center;
  gap: var(--seo-spacing-lg);
}

.seo-score-circle {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.seo-score-circle svg {
  transform: rotate(-90deg);
}

.seo-score-circle-bg {
  fill: none;
  stroke: var(--seo-gray-100);
  stroke-width: 8;
}

.seo-score-circle-progress {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dasharray 0.5s ease;
}

.seo-score-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.seo-score-number-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--seo-gray-900);
  line-height: 1;
}

.seo-score-number-label {
  font-size: 10px;
  color: var(--seo-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Score Metrics */
.seo-score-metrics {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--seo-spacing-xs);
}

.seo-metric-item {
  display: flex;
  align-items: center;
  padding: var(--seo-spacing-sm) var(--seo-spacing-sm);
  background: var(--seo-gray-50);
  border-radius: var(--seo-radius-sm);
  gap: var(--seo-spacing-sm);
}

.seo-metric-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 10px;
}

.seo-metric-icon--success {
  background: var(--seo-success-bg);
  color: var(--seo-success);
}

.seo-metric-icon--warning {
  background: var(--seo-warning-bg);
  color: var(--seo-warning);
}

.seo-metric-icon--error {
  background: var(--seo-danger-bg);
  color: var(--seo-danger);
}

.seo-metric-content {
  flex: 1;
  min-width: 0;
}

.seo-metric-label {
  font-size: 11px;
  color: var(--seo-gray-500);
}

.seo-metric-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--seo-gray-800);
}

/* ============================================
   CONTENT CARDS - Clean Panels
   ============================================ */
.seo-content-card {
  background: var(--seo-white);
  margin: var(--seo-spacing-md);
  border-radius: var(--seo-radius-md);
  overflow: hidden;
  border: var(--seo-border);
}

.seo-card-header {
  padding: var(--seo-spacing-sm) var(--seo-spacing-md);
  background: var(--seo-gray-50);
  border-bottom: var(--seo-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.seo-card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--seo-gray-700);
  display: flex;
  align-items: center;
  gap: var(--seo-spacing-xs);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.seo-card-icon {
  width: 14px;
  height: 14px;
  color: var(--seo-gray-400);
}

.seo-card-action {
  font-size: 11px;
  color: var(--seo-primary);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
}

.seo-card-action:hover {
  color: var(--seo-primary-dark);
}

.seo-card-body {
  padding: var(--seo-spacing-md);
}

/* ============================================
   FOCUS KEYWORD SECTION
   ============================================ */
.seo-keyword-input-group {
  display: flex;
  gap: var(--seo-spacing-sm);
  margin-bottom: var(--seo-spacing-md);
}

.seo-keyword-input {
  flex: 1;
  padding: var(--seo-spacing-sm) var(--seo-spacing-md);
  border: var(--seo-border);
  border-radius: var(--seo-radius-sm);
  font-size: 13px;
  transition: all 0.15s;
  background: var(--seo-white);
}

.seo-keyword-input:focus {
  outline: none;
  border-color: var(--seo-primary);
  box-shadow: 0 0 0 3px var(--seo-primary-muted);
}

.seo-keyword-input::placeholder {
  color: var(--seo-gray-400);
}

.seo-analyze-btn {
  padding: var(--seo-spacing-sm) var(--seo-spacing-md);
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: var(--seo-radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.seo-analyze-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.seo-analyze-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Keyword Metrics Grid */
.seo-keyword-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--seo-spacing-sm);
}

.seo-keyword-metric {
  text-align: center;
  padding: var(--seo-spacing-sm);
  background: var(--seo-gray-50);
  border-radius: var(--seo-radius-sm);
}

.seo-keyword-metric-label {
  font-size: 10px;
  color: var(--seo-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.seo-keyword-metric-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--seo-gray-900);
}

.seo-keyword-metric-value--good {
  color: var(--seo-success);
}

.seo-keyword-metric-value--warning {
  color: var(--seo-warning);
}

.seo-keyword-metric-value--error {
  color: var(--seo-danger);
}

/* ============================================
   READABILITY SECTION
   ============================================ */
.seo-readability-score {
  display: flex;
  align-items: center;
  gap: var(--seo-spacing-md);
  padding: var(--seo-spacing-md);
  background: var(--seo-gray-50);
  border-radius: var(--seo-radius-sm);
  margin-bottom: var(--seo-spacing-md);
}

.seo-readability-badge {
  padding: var(--seo-spacing-sm) var(--seo-spacing-md);
  border-radius: var(--seo-radius-sm);
  text-align: center;
  min-width: 80px;
}

.seo-readability-badge--easy {
  background: var(--seo-success-bg);
  color: var(--seo-success);
}

.seo-readability-badge--medium {
  background: var(--seo-warning-bg);
  color: var(--seo-warning);
}

.seo-readability-badge--difficult {
  background: var(--seo-danger-bg);
  color: var(--seo-danger);
}

.seo-readability-level {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.seo-readability-score-value {
  font-size: 20px;
  font-weight: 700;
  margin-top: 2px;
}

.seo-readability-details {
  flex: 1;
}

.seo-readability-info {
  display: flex;
  align-items: center;
  gap: var(--seo-spacing-md);
  margin-bottom: var(--seo-spacing-xs);
}

.seo-readability-stat {
  font-size: 12px;
  color: var(--seo-gray-600);
}

.seo-readability-stat strong {
  color: var(--seo-gray-800);
  font-weight: 600;
}

/* ============================================
   ALERTS & SUGGESTIONS - Subtle
   ============================================ */
.seo-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--seo-spacing-sm);
  padding: var(--seo-spacing-sm) var(--seo-spacing-md);
  border-radius: var(--seo-radius-sm);
  margin-bottom: var(--seo-spacing-sm);
  font-size: 12px;
  line-height: 1.4;
}

.seo-alert--info {
  background: var(--seo-gray-50);
  color: var(--seo-gray-700);
  border-left: 2px solid var(--seo-primary);
}

.seo-alert--success {
  background: var(--seo-success-bg);
  color: var(--seo-gray-700);
  border-left: 2px solid var(--seo-success);
}

.seo-alert--warning {
  background: var(--seo-warning-bg);
  color: var(--seo-gray-700);
  border-left: 2px solid var(--seo-warning);
}

.seo-alert--error {
  background: var(--seo-danger-bg);
  color: var(--seo-gray-700);
  border-left: 2px solid var(--seo-danger);
}

.seo-alert-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 1px;
}

.seo-alert-content {
  flex: 1;
}

/* Suggestions List */
.seo-suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--seo-gray-100);
  border-radius: var(--seo-radius-sm);
  overflow: hidden;
}

.seo-suggestion-item {
  display: flex;
  align-items: flex-start;
  gap: var(--seo-spacing-sm);
  padding: var(--seo-spacing-sm) var(--seo-spacing-md);
  background: var(--seo-white);
  font-size: 12px;
  transition: background 0.15s;
  cursor: pointer;
}

.seo-suggestion-item:hover {
  background: var(--seo-gray-50);
}

.seo-suggestion-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

.seo-suggestion-icon--high {
  color: var(--seo-danger);
}

.seo-suggestion-icon--medium {
  color: var(--seo-warning);
}

.seo-suggestion-icon--low {
  color: var(--seo-gray-400);
}

/* ============================================
   EMPTY STATES
   ============================================ */
.seo-empty-state {
  text-align: center;
  padding: var(--seo-spacing-xl);
  color: var(--seo-gray-500);
}

.seo-empty-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto var(--seo-spacing-sm);
  color: var(--seo-gray-300);
}

.seo-empty-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--seo-gray-700);
  margin-bottom: var(--seo-spacing-xs);
}

.seo-empty-message {
  font-size: 12px;
  color: var(--seo-gray-500);
  max-width: 240px;
  margin: 0 auto;
}

/* ============================================
   LOADING STATES
   ============================================ */
.seo-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--seo-spacing-lg);
}

.seo-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--seo-gray-200);
  border-top-color: var(--seo-gray-600);
  border-radius: 50%;
  animation: seo-spin 0.6s linear infinite;
}

@keyframes seo-spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .seo-score-display {
    flex-direction: column;
    gap: var(--seo-spacing-md);
  }

  .seo-keyword-metrics {
    grid-template-columns: 1fr;
  }

  .seo-readability-score {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================
   PRORANK PANEL STYLES
   ============================================ */
.prorank-plugin-sidebar {
  width: 100%;
  position: relative;
  top: 0;
}

.prorank-editor-sidebar .components-panel {
  margin: 0;
  border: none;
  background: var(--seo-white);
}

/* Panel Body */
.prorank-panel-body {
  border-bottom: var(--seo-border);
  background-color: var(--seo-white);
  margin: var(--seo-spacing-sm) var(--seo-spacing-md);
  border-radius: var(--seo-radius-md);
  overflow: hidden;
  border: var(--seo-border);
}

.prorank-panel-body:last-child {
  border-bottom: none;
}

/* Panel Header Button */
.prorank-panel-body .components-panel__body-toggle {
  padding: var(--seo-spacing-sm) var(--seo-spacing-md);
  font-weight: 600;
  font-size: 12px;
  color: var(--seo-gray-700);
  background-color: var(--seo-gray-50);
  transition: all 0.2s ease;
  border-bottom: var(--seo-border);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  position: relative;
}

/* Blue left accent on panel headers */
.prorank-panel-body .components-panel__body-toggle::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--seo-primary);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.prorank-panel-body .components-panel__body-toggle:hover {
  background-color: var(--seo-primary-bg);
  color: var(--seo-primary-dark);
}

.prorank-panel-body .components-panel__body-toggle:hover::before {
  opacity: 1;
}

/* Active/Open panel - orange accent */
.prorank-panel-body.is-opened .components-panel__body-toggle {
  background-color: var(--seo-white);
  border-bottom-color: var(--seo-accent);
}

.prorank-panel-body.is-opened .components-panel__body-toggle::before {
  opacity: 1;
  background: var(--seo-accent);
}

.prorank-panel-body .components-panel__body-toggle:focus {
  outline: 2px solid var(--seo-primary);
  outline-offset: -2px;
}

/* Panel Content */
.prorank-panel-content {
  padding: var(--seo-spacing-md);
  font-size: 13px;
  line-height: 1.5;
  background-color: var(--seo-white);
  color: var(--seo-gray-700);
}

/* Placeholder Content */
.prorank-panel-placeholder {
  margin: 0;
  padding: var(--seo-spacing-lg);
  text-align: center;
  color: var(--seo-gray-500);
  background-color: var(--seo-gray-50);
  border-radius: var(--seo-radius-sm);
  font-size: 12px;
}

/* Debug Info */
.prorank-debug-info {
  padding: var(--seo-spacing-sm);
  margin-top: var(--seo-spacing-md);
  background-color: var(--seo-gray-50);
  border-top: var(--seo-border);
  font-size: 11px;
  color: var(--seo-gray-500);
}

.prorank-debug-info p {
  margin: 0 0 2px 0;
}

/* ============================================
   WORDPRESS SIDEBAR INTEGRATION
   ============================================ */
.interface-complementary-area[aria-label*='ProRank'] {
  background-color: var(--seo-white) !important;
}

.interface-complementary-area[aria-label*='ProRank'] .interface-complementary-area__fill {
  background-color: var(--seo-white) !important;
}

.interface-complementary-area[aria-label*='ProRank'] .components-panel {
  background-color: transparent !important;
}

.interface-complementary-area[aria-label*='ProRank'] .components-panel__body {
  background-color: var(--seo-white) !important;
}

/* Text colors */
.interface-complementary-area[aria-label*='ProRank'] * {
  color: var(--seo-gray-700) !important;
}

.interface-complementary-area[aria-label*='ProRank'] .seo-score-number-value,
.interface-complementary-area[aria-label*='ProRank'] .seo-keyword-metric-value,
.interface-complementary-area[aria-label*='ProRank'] .seo-readability-score-value,
.interface-complementary-area[aria-label*='ProRank'] .seo-card-title,
.interface-complementary-area[aria-label*='ProRank'] .seo-sidebar-title {
  color: var(--seo-gray-900) !important;
}

.interface-complementary-area[aria-label*='ProRank'] .components-panel__body-toggle {
  background-color: var(--seo-gray-50) !important;
  color: var(--seo-gray-700) !important;
}

/* ============================================
   PRORANK TOOLBAR BUTTON - Premium Blue
   ============================================ */
.prorank-toolbar-button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0 !important;
  margin: 0 4px;
  border-radius: var(--seo-radius-sm);
  background: transparent;
  color: var(--seo-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.prorank-toolbar-button:hover {
  background: var(--seo-primary-bg);
  color: var(--seo-primary-dark);
}

.prorank-toolbar-button.is-pressed,
.prorank-toolbar-button:focus {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  border: 1px solid #93c5fd;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

.prorank-toolbar-button svg {
  display: block;
}

.prorank-toolbar-button img {
  display: block;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.35);
  transition: filter 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.prorank-toolbar-button.is-pressed img,
.prorank-toolbar-button:focus img {
  filter: none !important;
  background: rgba(255, 255, 255, 1);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.3);
}

.edit-post-pinned-plugins .prorank-toolbar-button,
.editor-header__settings .prorank-toolbar-button {
  margin-left: 4px;
}

/* WP may drop custom class names in pinned toolbar renders. */
.editor-header__settings button[aria-label='ProRank SEO'],
.editor-header__settings button[aria-label='Toggle ProRank SEO sidebar'] {
  background: transparent !important;
  color: #1d4ed8 !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
}

.editor-header__settings button[aria-label='ProRank SEO']:hover,
.editor-header__settings button[aria-label='Toggle ProRank SEO sidebar']:hover {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
  border-color: #bfdbfe !important;
}

.editor-header__settings button[aria-label='ProRank SEO'].is-pressed,
.editor-header__settings button[aria-label='Toggle ProRank SEO sidebar'].is-pressed,
.editor-header__settings button[aria-label='ProRank SEO'][aria-pressed='true'],
.editor-header__settings button[aria-label='Toggle ProRank SEO sidebar'][aria-pressed='true'] {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
  border-color: #60a5fa !important;
  color: #1d4ed8 !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.24) !important;
}

.editor-header__settings button[aria-label='ProRank SEO'] img,
.editor-header__settings button[aria-label='Toggle ProRank SEO sidebar'] img {
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.35);
}

.editor-header__settings button[aria-label='ProRank SEO'][aria-pressed='true'] img,
.editor-header__settings button[aria-label='Toggle ProRank SEO sidebar'][aria-pressed='true'] img,
.editor-header__settings button[aria-label='ProRank SEO'].is-pressed img,
.editor-header__settings button[aria-label='Toggle ProRank SEO sidebar'].is-pressed img {
  background: #ffffff !important;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.35) !important;
}

/* ProRank sidebar header pin button should remain visible when active. */
.interface-complementary-area.editor-sidebar .interface-complementary-area__pin-unpin-item.is-pressed {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  border: 1px solid #1d4ed8 !important;
  color: #ffffff !important;
}

.interface-complementary-area.editor-sidebar .interface-complementary-area__pin-unpin-item.is-pressed svg {
  fill: currentColor !important;
}

/* ============================================
   UTILITIES
   ============================================ */
.seo-text-muted {
  color: var(--seo-gray-500);
}

.seo-text-small {
  font-size: 11px;
}

.seo-mt-md {
  margin-top: var(--seo-spacing-md);
}

.seo-mb-md {
  margin-bottom: var(--seo-spacing-md);
}

.seo-hidden {
  display: none !important;
}

/* ============================================
   REDUCED MOTION & ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .prorank-panel-body .components-panel__body-toggle,
  .prorank-panel-body .components-panel__arrow,
  .seo-content-card,
  .seo-spinner {
    transition: none;
    animation: none;
  }
}

@media (prefers-contrast: high) {
  .prorank-panel-body {
    border: 2px solid var(--seo-gray-400);
  }

  .prorank-panel-body .components-panel__body-toggle:focus {
    outline-width: 3px;
  }
}

/* Readability Panel styles moved to panels/readability-panel.css */

/* ============================================
   CONTENT ANALYSIS PANEL - PREMIUM DESIGN
   ============================================ */
.prorank-content-analysis-panel {
  padding: 0;
}

.prorank-analysis-section {
  margin-bottom: 20px;
}

.prorank-analysis-section:last-child {
  margin-bottom: 0;
}

.prorank-analysis-section-title {
  margin: 0 0 12px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--seo-gray-600);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Analysis Items Grid */
.prorank-analysis-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prorank-analysis-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--seo-white);
  border: 1px solid var(--seo-gray-200);
  border-radius: 8px;
  transition: border-color 0.15s;
}

.prorank-analysis-item:hover {
  border-color: var(--seo-gray-300);
}

.prorank-analysis-item-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.prorank-analysis-item-icon--success {
  background: #dcfce7;
  color: #16a34a;
}

.prorank-analysis-item-icon--warning {
  background: #fef3c7;
  color: #d97706;
}

.prorank-analysis-item-icon--error {
  background: #fee2e2;
  color: #dc2626;
}

.prorank-analysis-item-content {
  flex: 1;
  min-width: 0;
}

.prorank-analysis-item-title {
  margin: 0 0 2px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--seo-gray-900);
}

.prorank-analysis-item-description {
  margin: 0;
  font-size: 12px;
  color: var(--seo-gray-500);
  line-height: 1.4;
}

/* AI Assistant Panel */
.prorank-ai-panel {
  padding: 0;
}

.prorank-ai-input-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.prorank-ai-input-group textarea {
  min-height: 80px;
  resize: vertical;
  border: 1px solid var(--seo-gray-200);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
}

.prorank-ai-input-group textarea:focus {
  border-color: var(--seo-gray-400);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.prorank-ai-submit-btn {
  width: 100%;
  justify-content: center;
  background: var(--seo-gray-900) !important;
  color: var(--seo-white) !important;
  border: none !important;
  padding: 12px 16px !important;
  font-weight: 500 !important;
}
