/* Import Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;700&family=DM+Sans:wght@400;500;600&display=swap");

/* Design tokens based on the brief */
:root {
  --background: #ffffff;
  --foreground: #475569;
  --card: #f1f5f9;
  --card-foreground: #475569;
  --popover: #ffffff;
  --popover-foreground: #374151;
  --primary: #059669;
  --primary-foreground: #ffffff;
  --secondary: #f1f5f9;
  --secondary-foreground: #475569;
  --muted: #f1f5f9;
  --muted-foreground: #9ca3af;
  --accent: #10b981;
  --accent-foreground: #ffffff;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --border: #e5e7eb;
  --input: #f1f5f9;
  --ring: rgba(5, 150, 105, 0.5);
  --radius: 0.5rem;
}

/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "DM Sans", sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
.heading {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

/* Layout utilities */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.card {
  background-color: var(--card);
  color: var(--card-foreground);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background-color: #047857;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background-color: var(--muted-foreground);
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

/* Upload area styles */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  background-color: var(--background);
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--primary);
  background-color: var(--muted);
}

.upload-area.drag-over {
  border-style: solid;
  background-color: rgba(5, 150, 105, 0.05);
}

.upload-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  color: var(--muted-foreground);
}

.file-input {
  display: none;
}

/* Progress bar */
.progress-container {
  width: 100%;
  height: 4px;
  background-color: var(--muted);
  border-radius: 2px;
  overflow: hidden;
  margin: 1rem 0;
  display: none;
}

.progress-bar {
  height: 100%;
  background-color: var(--primary);
  width: 0%;
  transition: width 0.3s ease;
}

/* Notification styles */
.notification {
  padding: 1rem;
  border-radius: var(--radius);
  margin: 1rem 0;
  display: none;
}

.notification.success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.notification.error {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--destructive);
  border: 1px solid var(--destructive);
}

/* File info display */
.file-info {
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
  display: none;
}

.file-info h4 {
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.file-meta {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.file-summary {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--card-foreground);
  background-color: var(--muted);
  padding: 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  margin-top: 0.75rem;
}

/* Responsive design */
@media (max-width: 640px) {
  .container {
    padding: 1rem 0.5rem;
  }

  .card {
    padding: 1.5rem;
  }

  .upload-area {
    padding: 2rem 1rem;
  }
}

/* Focus styles for accessibility */
.btn:focus,
.upload-area:focus {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary-foreground);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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