/* ===================================
   EMPTY STATES & ERROR PAGES
   =================================== */

/* Empty State Container */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  min-height: 400px;
}

.empty-state-icon {
  width: 120px;
  height: 120px;
  margin-bottom: 2rem;
  opacity: 0.6;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.empty-state-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
}

.empty-state-description {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 0 2rem;
  line-height: 1.6;
}

.empty-state-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Empty State Variants */
.empty-state.no-results .empty-state-icon {
  fill: var(--text-tertiary);
}

.empty-state.no-content .empty-state-icon {
  fill: var(--accent-primary);
}

.empty-state.error .empty-state-icon {
  fill: #ef4444;
}

/* Error Page */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
  background: var(--bg-primary);
}

.error-code {
  font-size: 8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  line-height: 1;
  animation: glitch 2s infinite;
}

@keyframes glitch {
  0%, 100% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
}

.error-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1rem 0 0.75rem;
}

.error-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 0 2rem;
  line-height: 1.6;
}

.error-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.error-illustration {
  width: 300px;
  height: 300px;
  margin-bottom: 2rem;
  opacity: 0.8;
}

/* 404 Page Specific */
.error-404 .error-code {
  font-size: 10rem;
}

.error-404 .error-illustration {
  animation: spin-slow 20s linear infinite;
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Error Message Box */
.error-message {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  animation: shake 0.5s ease;
}

.error-message-icon {
  width: 24px;
  height: 24px;
  fill: #ef4444;
  flex-shrink: 0;
  margin-top: 2px;
}

.error-message-content {
  flex: 1;
}

.error-message-title {
  font-size: 1rem;
  font-weight: 600;
  color: #ef4444;
  margin: 0 0 0.5rem;
}

.error-message-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.error-message-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.error-message-close {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.error-message-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Success Message Box */
.success-message {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  animation: slideInDown 0.3s ease;
}

.success-message-icon {
  width: 24px;
  height: 24px;
  fill: #10b981;
  flex-shrink: 0;
  margin-top: 2px;
}

.success-message-title {
  font-size: 1rem;
  font-weight: 600;
  color: #10b981;
  margin: 0 0 0.5rem;
}

/* Warning Message Box */
.warning-message {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.warning-message-icon {
  width: 24px;
  height: 24px;
  fill: #f59e0b;
  flex-shrink: 0;
  margin-top: 2px;
}

.warning-message-title {
  font-size: 1rem;
  font-weight: 600;
  color: #f59e0b;
  margin: 0 0 0.5rem;
}

/* Info Message Box */
.info-message {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.info-message-icon {
  width: 24px;
  height: 24px;
  fill: #3b82f6;
  flex-shrink: 0;
  margin-top: 2px;
}

.info-message-title {
  font-size: 1rem;
  font-weight: 600;
  color: #3b82f6;
  margin: 0 0 0.5rem;
}

/* No Results State */
.no-results {
  padding: 3rem 2rem;
  text-align: center;
}

.no-results-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  opacity: 0.5;
}

.no-results-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.no-results-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
}

.no-results-suggestions {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 500px;
  margin: 0 auto;
  text-align: left;
}

.no-results-suggestions-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem;
}

.no-results-suggestions-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.no-results-suggestions-list li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.no-results-suggestions-list li::before {
  content: '•';
  color: var(--accent-primary);
  font-weight: bold;
}

/* Loading Error State */
.loading-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
}

.loading-error-icon {
  width: 64px;
  height: 64px;
  fill: #ef4444;
  margin-bottom: 1.5rem;
  animation: pulse 2s infinite;
}

.loading-error-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.loading-error-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
  max-width: 400px;
}

.loading-error-actions {
  display: flex;
  gap: 1rem;
}

/* Offline State */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #ef4444;
  color: white;
  padding: 1rem;
  text-align: center;
  z-index: 10000;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.offline-banner.visible {
  transform: translateY(0);
}

.offline-banner-text {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}

/* Maintenance Mode */
.maintenance-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
  background: var(--bg-primary);
}

.maintenance-icon {
  width: 150px;
  height: 150px;
  margin-bottom: 2rem;
  animation: rotate 4s linear infinite;
}

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

.maintenance-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1rem;
}

.maintenance-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 0 2rem;
  line-height: 1.6;
}

.maintenance-eta {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  margin: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .error-code {
    font-size: 5rem;
  }

  .error-404 .error-code {
    font-size: 6rem;
  }

  .error-title {
    font-size: 1.5rem;
  }

  .error-description {
    font-size: 1rem;
  }

  .error-illustration {
    width: 200px;
    height: 200px;
  }

  .empty-state {
    padding: 3rem 1.5rem;
    min-height: 300px;
  }

  .empty-state-icon {
    width: 80px;
    height: 80px;
  }

  .empty-state-title {
    font-size: 1.25rem;
  }

  .empty-state-description {
    font-size: 0.9rem;
  }

  .error-message,
  .success-message,
  .warning-message,
  .info-message {
    padding: 1rem;
  }
}

/* Accessibility */
.error-message:focus-within,
.success-message:focus-within,
.warning-message:focus-within,
.info-message:focus-within {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
