/* EPT Validator Lite - Modern Styles
 * Optional CSS enhancements for sidebar
 * Can be loaded additionally or merged with existing styles
 */

/* Sidebar container improvements */
.components-panel__body.is-opened .ept-validator-sidebar {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
}

/* Modern form controls */
.ept-validator-sidebar .components-base-control {
  margin-bottom: 16px;
}

.ept-validator-sidebar .components-base-control__label {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.ept-validator-sidebar .components-text-control__input {
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.ept-validator-sidebar .components-text-control__input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  outline: none;
}

.ept-validator-sidebar .components-select-control__input {
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  background-color: white;
  transition: all 0.2s ease;
  cursor: pointer;
}

.ept-validator-sidebar .components-select-control__input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  outline: none;
}

/* Primary button styling */
.ept-validator-sidebar .components-button.is-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 6px rgba(102, 126, 234, 0.25);
  transition: all 0.3s ease;
}

.ept-validator-sidebar .components-button.is-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(102, 126, 234, 0.35);
}

.ept-validator-sidebar .components-button.is-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.25);
}

.ept-validator-sidebar .components-button.is-primary.is-busy {
  opacity: 0.7;
  cursor: wait;
}

/* Score display area */
.ept-score-container {
  margin-top: 24px;
  animation: fadeIn 0.5s ease;
}

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

/* Metric cards animation */
.ept-metric-card {
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Suggestions list styling */
.ept-suggestion-item {
  transition: all 0.2s ease;
}

.ept-suggestion-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* Toggle button hover effect */
.ept-toggle-button {
  position: relative;
  overflow: hidden;
}

.ept-toggle-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.ept-toggle-button:hover::before {
  left: 100%;
}

/* Status badges */
.ept-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ept-badge-success {
  background-color: #d1fae5;
  color: #065f46;
}

.ept-badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.ept-badge-error {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Loading spinner */
.ept-loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

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

/* Details section */
.ept-details-content {
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.ept-details-content.collapsed {
  max-height: 0;
}

.ept-details-content.expanded {
  max-height: 1000px;
}

/* Responsive adjustments */
@media (max-width: 782px) {
  .ept-validator-sidebar {
    padding: 12px;
  }
  
  .ept-metric-card {
    font-size: 12px;
  }
  
  .ept-score-number {
    font-size: 36px !important;
  }
}

/* Dark mode support (if WordPress dark mode is active) */
@media (prefers-color-scheme: dark) {
  .ept-validator-sidebar .components-text-control__input,
  .ept-validator-sidebar .components-select-control__input {
    background-color: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
  }
  
  .ept-metric-card {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
  }
  
  .ept-details-content {
    background-color: #0f172a !important;
  }
}

/* Print styles */
@media print {
  .ept-validator-sidebar .components-button {
    display: none;
  }
  
  .ept-toggle-button {
    display: none;
  }
  
  .ept-details-content {
    display: block !important;
    max-height: none !important;
  }
}

/* Accessibility improvements */
.ept-validator-sidebar *:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

.ept-validator-sidebar button:focus-visible {
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.5);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .ept-validator-sidebar .components-button.is-primary {
    background: #0000ff;
    color: #ffffff;
  }
  
  .ept-metric-card {
    border: 2px solid currentColor;
  }
}

/* Saved validation notice styling */
.ept-saved-notice.components-notice {
  background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
  border-left: 4px solid #3b82f6;
  margin-bottom: 12px;
}

.ept-saved-notice .components-notice__content {
  color: #1e40af;
}

.ept-saved-notice strong {
  color: #1e3a8a;
  font-weight: 600;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .ept-validator-sidebar * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
