/* Error Boundary Modal Styles */
.error-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(8px);
}

.error-modal.hidden {
  display: none;
}

.error-modal-content {
  background: var(--glass-surface, var(--film-2));
  border: 1px solid var(--border-color, var(--film-2));
  border-radius: 16px;
  padding: 32px;
  max-width: 480px;
  text-align: center;
  box-shadow: 0 8px 32px var(--shadow-tint);
}

.error-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.error-modal h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary, #fff);
  margin-bottom: 12px;
}

.error-message {
  color: var(--text-muted, var(--text-muted));
  line-height: 1.6;
  margin-bottom: 24px;
  text-align: left;
}

.error-details {
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid rgba(255, 0, 0, 0.3);
  border-radius: 8px;
  padding: 12px;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--neg-ink);
  white-space: pre-wrap;
  text-align: left;
  margin-bottom: 24px;
  max-height: 200px;
  overflow-y: auto;
}

.error-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.error-actions .btn {
  min-width: 180px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .error-actions {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

  .error-actions .btn {
    margin: 0;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .error-modal {
    backdrop-filter: none;
    transition: none;
  }

  .error-modal-content {
    animation: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .error-modal-content {
    border: 2px solid #fff;
  }

  .error-details {
    border: 2px solid var(--neg-ink);
  }
}
