/* styles.css — minimal, mobile-first. Design tokens live at the top so colors
   and spacing are defined once and reused everywhere. */

:root {
  --bg: oklch(97% 0.01 250);
  --surface: oklch(100% 0 0);
  --text: oklch(25% 0.02 260);
  --muted: oklch(55% 0.02 260);
  --accent: oklch(58% 0.18 255);
  --accent-press: oklch(50% 0.18 255);
  --border: oklch(90% 0.01 260);
  --radius: 16px;
  --space: 1rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--space);
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

.card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: calc(var(--space) * 1.5);
  box-shadow: 0 10px 30px oklch(25% 0.02 260 / 0.08);
}

h1 {
  margin: 0 0 0.25rem;
  font-size: 1.6rem;
}

.subtitle {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* The big tap-to-upload area. */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: oklch(58% 0.18 255 / 0.05);
}

.dropzone-icon {
  font-size: 2rem;
  line-height: 1;
  color: var(--accent);
}

.dropzone-text {
  font-size: 0.95rem;
}

.file-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border-radius: 10px;
}

/* The file name takes the free space; size + remove sit at the end. */
.file-list .file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-list .file-size {
  color: var(--muted);
  flex-shrink: 0;
  margin-left: auto;
}

/* Small round ✕ button to remove one file from the list. */
.file-remove {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  line-height: 1;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.file-remove:hover {
  background: oklch(55% 0.2 25 / 0.12);
  color: oklch(55% 0.2 25);
}

/* Row that holds the Clear + Create PDF buttons side by side. */
.actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.btn {
  flex: 1;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 150ms ease, transform 80ms ease;
}

.btn:hover:not(:disabled) {
  background: var(--accent-press);
}

.btn:active:not(:disabled) {
  transform: scale(0.99);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Secondary (Clear) button: outlined, low-emphasis next to the primary. */
.btn-secondary {
  flex: 0 0 auto;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg);
  color: var(--text);
}

.status {
  margin: 1rem 0 0;
  min-height: 1.25rem;
  font-size: 0.9rem;
  text-align: center;
}

.status.error {
  color: oklch(55% 0.2 25);
}

.status.success {
  color: oklch(55% 0.15 150);
}
