/* Additional Enhanced Styles for Modern Energy Tech Theme */
/* Professional Web Design Improvements */

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--leaf-bg-1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid var(--leaf-border);
  border-top: 3px solid var(--energy-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Enhanced Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--leaf-bg-1);
}

::-webkit-scrollbar-thumb {
  background: var(--energy-gradient);
  border-radius: 6px;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--energy-secondary);
}

/* Enhanced Focus States */
body.theme-leaf *:focus {
  outline: 2px solid var(--energy-cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Print Styles */
@media print {
  body.theme-leaf {
    background: white !important;
    color: black !important;
  }
  
  body.theme-leaf .site-header,
  body.theme-leaf .site-footer,
  body.theme-leaf .contact-form,
  body.theme-leaf .mobile-menu-btn {
    display: none !important;
  }
  
  body.theme-leaf .page {
    background: white !important;
    box-shadow: none !important;
    border: none !important;
  }
  
  body.theme-leaf * {
    color: black !important;
    text-shadow: none !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  body.theme-leaf {
    --leaf-bg-1: #000000;
    --leaf-bg-2: #1a1a1a;
    --leaf-text: #ffffff;
    --leaf-border: #ffffff;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  body.theme-leaf *,
  body.theme-leaf *::before,
  body.theme-leaf *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: light) {
  body.theme-leaf {
    --leaf-bg-1: #f8fafc;
    --leaf-bg-2: #f1f5f9;
    --leaf-text: #1e293b;
    --leaf-muted: #64748b;
    --leaf-border: rgba(0, 0, 0, 0.1);
  }
}

/* Enhanced Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--energy-primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 6px;
}

/* Breadcrumb Navigation */
.breadcrumbs {
  padding: var(--space-3) 0;
  margin-bottom: var(--space-6);
}

.breadcrumbs ol {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--space-2);
}

.breadcrumbs li {
  font-weight: var(--font-medium);
  font-size: var(--text-sm);
  color: var(--leaf-muted);
}

.breadcrumbs a {
  color: var(--energy-cyan);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumbs a:hover {
  color: var(--energy-accent);
}

.breadcrumbs li:not(:last-child)::after {
  content: '/';
  margin-left: var(--space-2);
  color: var(--leaf-muted);
}

/* Search Results */
.search-results {
  margin-top: var(--space-6);
}

.search-result-item {
  background: var(--leaf-surface);
  border: 1px solid var(--leaf-border);
  border-radius: var(--leaf-radius);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
  transition: all 0.3s ease;
}

.search-result-item:hover {
  border-color: var(--leaf-border-accent);
  box-shadow: var(--leaf-soft-shadow);
}

.search-result-title {
  font-weight: var(--font-semibold);
  font-size: var(--text-lg);
  color: var(--leaf-text);
  margin-bottom: var(--space-2);
}

.search-result-excerpt {
  color: var(--leaf-muted);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

.search-result-url {
  font-size: var(--text-sm);
  color: var(--energy-cyan);
  text-decoration: none;
}

/* Enhanced Error Pages */
.error-page {
  text-align: center;
  padding: var(--space-16) var(--space-6);
}

.error-code {
  font-size: 8rem;
  font-weight: var(--font-extrabold);
  background: var(--energy-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-6);
}

.error-title {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  color: var(--leaf-text);
  margin-bottom: var(--space-4);
}

.error-message {
  font-size: var(--text-lg);
  color: var(--leaf-muted);
  margin-bottom: var(--space-8);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Enhanced Tooltips */
.tooltip {
  position: relative;
  cursor: help;
}

.tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--leaf-bg-1);
  color: var(--leaf-text);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--leaf-radius);
  font-size: var(--text-sm);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  border: 1px solid var(--leaf-border);
  z-index: 1000;
}

.tooltip::after {
  content: '';
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--leaf-bg-1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.tooltip:hover::before,
.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Enhanced Progress Indicators */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--leaf-surface);
  border-radius: 4px;
  overflow: hidden;
  margin: var(--space-4) 0;
}

.progress-fill {
  height: 100%;
  background: var(--energy-gradient);
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Status Indicators */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--leaf-radius);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge.success {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.warning {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.error {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.info {
  background: rgba(6, 182, 212, 0.2);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.3);
}