/* On-Page SEO Modern Design */
.prorank-on-page-seo-page {
  /* Color Theme Variables */
  --onpage-primary: #0073aa;
  --onpage-secondary: #00a0d2;
  --onpage-success: #00ba37;
  --onpage-warning: #f39c12;
  --onpage-error: #dc3232;
  --onpage-info: #00a0d2;
  
  /* Layout Variables */
  --onpage-max-width: 1600px;
  --onpage-sidebar-width: 400px;
  --onpage-gap: 24px;
  --onpage-card-padding: 24px;
  
  /* Typography */
  --onpage-heading-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --onpage-body-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Shadows and Effects */
  --onpage-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --onpage-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --onpage-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --onpage-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  min-height: 100vh;
  background: #f5f5f7;
  color: #1e1e1e;
  font-family: var(--onpage-body-font);
}

/* Dark Mode Support */
[data-theme="dark"] .prorank-on-page-seo-page {
  background: #1e1e1e;
  color: #e0e0e0;
  
  --onpage-primary: #4da6cc;
  --onpage-secondary: #66b3d9;
  --onpage-success: #4caf50;
  --onpage-warning: #ff9800;
  --onpage-error: #f44336;
}

/* Main Header */
.prorank-on-page-seo-header {
  background: linear-gradient(135deg, var(--onpage-primary) 0%, var(--onpage-secondary) 100%);
  color: white;
  padding: 48px 0;
  margin: -20px -20px 32px -20px;
  position: relative;
  overflow: hidden;
}

.prorank-on-page-seo-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path fill="rgba(255,255,255,0.1)" d="M1200 120L0 16.48 0 0 1200 0 1200 120z"></path></svg>');
  background-size: cover;
  background-position: bottom;
}

.prorank-on-page-seo-header-content {
  max-width: var(--onpage-max-width);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

.prorank-on-page-seo-header h1 {
  font-size: 48px !important;
  font-weight: 700 !important;
  margin: 0 0 16px 0 !important;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.prorank-on-page-seo-header .subtitle {
  font-size: 20px;
  opacity: 0.9;
  max-width: 600px;
  line-height: 1.5;
}

/* Tabbed Layout Container */
.prorank-on-page-seo-tabbed {
  max-width: var(--onpage-max-width);
  margin: 0 auto;
  padding: 0 32px 32px;
}

/* Tab styles: Uses shared _tabs.css */

/* On-page specific tabs container */
.prorank-on-page-seo-tabs {
  margin-bottom: 32px;
}

[data-theme="dark"] .prorank-on-page-seo-tabs {
  background: #2c3338;
}

/* Module Status Bar */
.prorank-module-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(0, 115, 170, 0.1) 0%, rgba(0, 160, 210, 0.1) 100%);
  border-radius: 8px;
  margin-bottom: 24px;
}

[data-theme="dark"] .prorank-module-status-bar {
  background: linear-gradient(135deg, rgba(77, 166, 204, 0.15) 0%, rgba(102, 179, 217, 0.15) 100%);
}

.prorank-module-status-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.prorank-module-status-icon {
  width: 48px;
  height: 48px;
  background: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--onpage-primary);
  box-shadow: var(--onpage-shadow-sm);
}

[data-theme="dark"] .prorank-module-status-icon {
  background: #404040;
}

.prorank-module-status-text h3 {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 600;
}

.prorank-module-status-text p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

[data-theme="dark"] .prorank-module-status-text p {
  color: #999;
}

/* Settings Sections */
.prorank-settings-section {
  margin-bottom: 32px;
}

.prorank-settings-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e0e0e0;
}

[data-theme="dark"] .prorank-settings-section-header {
  border-bottom-color: #404040;
}

.prorank-settings-section-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1e1e1e;
}

[data-theme="dark"] .prorank-settings-section-header h3 {
  color: #e0e0e0;
}

/* Form Elements Enhancement */
.prorank-on-page-seo-page .components-base-control {
  margin-bottom: 20px;
}

.prorank-on-page-seo-page .components-text-control__input,
.prorank-on-page-seo-page .components-textarea-control__input,
.prorank-on-page-seo-page .components-select-control__input {
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  padding: 12px 16px;
  font-size: 15px;
  transition: var(--onpage-transition);
}

[data-theme="dark"] .prorank-on-page-seo-page .components-text-control__input,
[data-theme="dark"] .prorank-on-page-seo-page .components-textarea-control__input,
[data-theme="dark"] .prorank-on-page-seo-page .components-select-control__input {
  background: #1e1e1e;
  border-color: #404040;
  color: #e0e0e0;
}

.prorank-on-page-seo-page .components-text-control__input:focus,
.prorank-on-page-seo-page .components-textarea-control__input:focus,
.prorank-on-page-seo-page .components-select-control__input:focus {
  border-color: var(--onpage-primary);
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
  outline: none;
}

/* Stats Grid */
.prorank-onpage-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.prorank-onpage-stat-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: var(--onpage-transition);
}

[data-theme="dark"] .prorank-onpage-stat-card {
  background: linear-gradient(135deg, #2c3338 0%, #1e1e1e 100%);
  border-color: #404040;
}

.prorank-onpage-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--onpage-shadow-lg);
}

.prorank-onpage-stat-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--onpage-primary);
  margin-bottom: 8px;
}

.prorank-onpage-stat-label {
  font-size: 14px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="dark"] .prorank-onpage-stat-label {
  color: #999;
}

/* Quick Actions */
.prorank-onpage-quick-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.prorank-onpage-quick-action {
  flex: 1;
  min-width: 200px;
  padding: 16px 24px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: var(--onpage-transition);
  text-decoration: none;
  color: #1e1e1e;
}

[data-theme="dark"] .prorank-onpage-quick-action {
  background: #2c3338;
  border-color: #404040;
  color: #e0e0e0;
}

.prorank-onpage-quick-action:hover {
  border-color: var(--onpage-primary);
  background: rgba(0, 115, 170, 0.05);
  transform: translateY(-2px);
}

.prorank-onpage-quick-action-icon {
  font-size: 32px;
  margin-bottom: 8px;
  color: var(--onpage-primary);
}

/* Pro Features Callout */
.prorank-onpage-pro-callout {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-radius: 12px;
  padding: 24px;
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}

[data-theme="dark"] .prorank-onpage-pro-callout {
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.15) 0%, rgba(33, 150, 243, 0.25) 100%);
}

.prorank-onpage-pro-icon {
  font-size: 48px;
  color: #1565c0;
}

.prorank-onpage-pro-content h4 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 600;
}

.prorank-onpage-pro-content p {
  margin: 0 0 16px 0;
  color: #424242;
}

[data-theme="dark"] .prorank-onpage-pro-content p {
  color: #bbb;
}

/* Save Button Enhancement */
.prorank-settings-actions {
  position: sticky;
  bottom: 0;
  background: white;
  padding: 24px 0 0;
  margin-top: 32px;
  border-top: 1px solid #e0e0e0;
}

[data-theme="dark"] .prorank-settings-actions {
  background: #2c3338;
  border-top-color: #404040;
}

.prorank-settings-actions .components-button.is-primary {
  background: var(--onpage-primary);
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 115, 170, 0.25);
  transition: var(--onpage-transition);
}

.prorank-settings-actions .components-button.is-primary:hover {
  background: var(--onpage-secondary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 115, 170, 0.35);
}

/* Loading State */
.prorank-onpage-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: #666;
}

[data-theme="dark"] .prorank-onpage-loading {
  color: #999;
}

.prorank-onpage-loading .components-spinner {
  margin-bottom: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .prorank-on-page-seo-header h1 {
    font-size: 36px !important;
  }
  
  .prorank-on-page-seo-header .subtitle {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .prorank-on-page-seo-tabbed {
    padding: 0 16px 16px;
  }
  
  .prorank-onpage-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Animation for Module Toggle */
.prorank-module-toggle-animation {
  animation: togglePulse 0.6s ease-out;
}

@keyframes togglePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Disabled State Overlay */
.prorank-module-disabled-overlay {
  position: relative;
}

.prorank-module-disabled-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.6);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

[data-theme="dark"] .prorank-module-disabled-overlay::after {
  background: rgba(0, 0, 0, 0.6);
}

.prorank-module-disabled-overlay.is-disabled::after {
  opacity: 1;
}
