/**
 * ProRank Design System - On-Page SEO Feature Styles
 *
 * Styles specific to the On-Page SEO module pages.
 * Extends core components for on-page SEO specific layouts.
 *
 * @module features/onpage-seo
 * @since 3.0.0
 */

/* ============================================
   EMPTY STATES
   Consistent styling for disabled/empty modules
   ============================================ */

.prorank-empty-state {
  text-align: center;
  padding: var(--prorank-space-2xl) 0;
  color: var(--prorank-text-secondary);
  margin: 0;
}

.prorank-module-disabled-message {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  padding: var(--prorank-space-xl);
}

.prorank-empty-state-card {
  text-align: center;
  padding: 60px 20px;
  background: var(--prorank-bg-secondary);
  border-radius: var(--prorank-radius);
}

.prorank-module-icon-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: var(--prorank-bg);
  border-radius: 50%;
  margin-bottom: 20px;
}

.prorank-module-icon-large .dashicons {
  font-size: 40px;
  width: 40px;
  height: 40px;
  color: var(--prorank-text-secondary);
}

/* ============================================
   MODULE SETTINGS LAYOUT
   ============================================ */

.prorank-settings-content {
  padding: 20px 0;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.prorank-module-locked {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: var(--prorank-radius);
  border: 2px dashed #60a5fa;
}

.prorank-module-locked h3 {
  color: #1e40af;
  margin-bottom: 16px;
}

.prorank-module-locked p {
  color: #64748b;
  margin-bottom: 24px;
}

/* Tab navigation uses unified styles from _tabs.css */

/* ============================================
   LIVE PREVIEW COMPONENT
   ============================================ */

.prorank-live-preview {
  margin-top: 16px;
  padding: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.prorank-live-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12px;
  color: #6b7280;
}

.prorank-live-preview-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.prorank-live-preview-count {
  padding: 2px 8px;
  background: #10b981;
  color: white;
  border-radius: 4px;
  font-weight: 500;
}

.prorank-live-preview-count.over-limit {
  background: #ef4444;
}

.prorank-live-preview-content {
  padding: 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.prorank-preview-title {
  color: #1a0dab;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
}

.prorank-preview-description {
  color: #545454;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.prorank-live-preview-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 4px;
  color: #dc2626;
  font-size: 13px;
}

.prorank-live-preview-warning .dashicons {
  color: #dc2626;
  font-size: 16px;
}

/* ============================================
   TEMPLATE FIELD STYLES
   ============================================ */

.prorank-template-field {
  position: relative;
  margin-bottom: 20px;
}

.prorank-template-actions {
  margin-top: 8px;
}

.prorank-variable-picker {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  margin-top: 4px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-height: 300px;
  overflow-y: auto;
}

.prorank-variable-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.prorank-variable-picker-body {
  padding: 16px;
}

.prorank-variable-group {
  margin-bottom: 16px;
}

.prorank-variable-group:last-child {
  margin-bottom: 0;
}

.prorank-variable-group h5 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #6b7280;
  margin: 0 0 8px 0;
}

.prorank-variable-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prorank-variable-item {
  padding: 4px 8px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  cursor: pointer;
  transition: all 0.2s;
}

.prorank-variable-item:hover {
  background: var(--prorank-primary-light);
  border-color: var(--prorank-primary);
  color: var(--prorank-primary);
}

/* ============================================
   VARIABLE REFERENCE CARD
   ============================================ */

.prorank-variable-reference {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  margin-top: 24px;
}

.prorank-variable-reference .prorank-card-header {
  background: #f3f4f6;
  padding: 12px 16px;
}

.prorank-variable-reference h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.prorank-variable-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  padding: 16px;
}

.prorank-variable-grid strong {
  display: block;
  margin-bottom: 8px;
  color: #374151;
  font-size: 13px;
}

.prorank-variable-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.prorank-variable-grid li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  color: #6b7280;
}

.prorank-variable-grid code {
  padding: 2px 6px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 3px;
  font-size: 11px;
  color: #059669;
}

/* ============================================
   PREMIUM FEATURES CALLOUT
   ============================================ */

.prorank-card-pro-callout {
  background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
  border: 2px solid #f59e0b;
  margin-top: 32px;
}

.prorank-card-pro-callout .prorank-card-body {
  padding: 24px;
  text-align: center;
}

.prorank-card-pro-callout .prorank-title {
  color: #92400e;
  font-size: 18px;
  margin-bottom: 12px;
}

.prorank-card-pro-callout .prorank-description {
  color: #78350f;
  margin-bottom: 20px;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
  .prorank-variable-grid {
    grid-template-columns: 1fr;
  }

  .prorank-variable-picker {
    position: static;
    margin-top: 16px;
  }
}

/* ============================================
   TEMPLATE FIELD COMPONENT
   ============================================ */

.prorank-template-field {
  margin-bottom: 20px;
}

.prorank-template-field .prorank-input,
.prorank-template-field .prorank-textarea {
  width: 100%;
  max-width: 600px;
}

/* ============================================
   VARIABLE PICKER COMPONENT
   ============================================ */

.prorank-variable-picker-section {
  position: relative;
  margin-top: 8px;
}

.prorank-variable-picker-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 13px;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.2s;
}

.prorank-variable-picker-toggle:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.prorank-variable-picker-toggle .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.prorank-variable-picker-toggle[aria-expanded="true"] .dashicons-arrow-down-alt2 {
  transform: rotate(180deg);
}

.prorank-variable-list {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  min-width: 400px;
  max-width: 600px;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  margin-top: 4px;
}

.prorank-variable-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 6px 6px 0 0;
}

.prorank-variable-list-header span {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.prorank-variable-list-content {
  padding: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.prorank-variable-group {
  margin-bottom: 16px;
}

.prorank-variable-group:last-child {
  margin-bottom: 0;
}

.prorank-variable-group-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 8px;
}

.prorank-variable-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.prorank-variable-button {
  padding: 4px 8px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.prorank-variable-button:hover {
  background: #fef3c7;
  border-color: #fbbf24;
  color: #92400e;
}
