/* Shared design tokens — Pets-Deli-inspired warm palette */
:root {
  --pd-dark: #2B1E17;
  --pd-accent: #A64A2E;
  --pd-accent-dark: #8B3A2B;
  --pd-cream: #F7F1E8;
  --pd-cream-alt: #EFE6D4;
  --pd-border: #D8C9B0;
  --pd-success: #4CAF50;
  --pd-warn: #F0A030;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--pd-cream);
  color: var(--pd-dark);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.hero {
  margin-bottom: 28px;
}

.hero h1 {
  font-size: 2rem;
  color: var(--pd-accent);
  margin: 0 0 10px;
  line-height: 1.2;
}

.hero p {
  color: #5a4d44;
  font-size: 1.05rem;
  margin: 0;
}

.card {
  background: white;
  border-radius: 14px;
  padding: 28px 24px;
  box-shadow: 0 2px 6px rgba(43, 30, 23, 0.06);
  margin-bottom: 20px;
}

.card h2 {
  margin: 0 0 16px;
  font-size: 1.15rem;
  color: var(--pd-accent);
}

label {
  display: block;
  font-size: 0.9rem;
  color: #5a4d44;
  margin-bottom: 6px;
  font-weight: 500;
}

input[type=text], input[type=email], input[type=number], select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--pd-border);
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  color: var(--pd-dark);
  font-family: inherit;
}

input:focus, select:focus {
  outline: 2px solid var(--pd-accent);
  outline-offset: 0;
}

.btn-primary {
  display: inline-block;
  padding: 14px 28px;
  background: var(--pd-accent);
  color: white;
  border: 0;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  width: 100%;
}

.btn-primary:hover { background: var(--pd-accent-dark); }
.btn-primary:disabled { background: #c9a86a; cursor: not-allowed; }

.btn-secondary {
  display: inline-block;
  padding: 10px 20px;
  background: white;
  color: var(--pd-accent);
  border: 1px solid var(--pd-accent);
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.field { margin-bottom: 16px; }

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.85rem;
  color: #5a4d44;
  margin: 16px 0;
}

.consent input { margin-top: 3px; flex-shrink: 0; }

/* Symptom grid */
.symptom-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.symptom-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: var(--pd-cream-alt);
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}

.symptom-tile input { display: none; }

.symptom-tile .emoji { font-size: 1.5rem; }
.symptom-tile .label { font-size: 0.95rem; font-weight: 500; }

.symptom-tile:hover { background: var(--pd-cream); }
.symptom-tile.selected {
  background: white;
  border-color: var(--pd-accent);
}

/* Drop zone (ingredient scanner) */
.drop-zone {
  border: 2px dashed var(--pd-border);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--pd-cream-alt);
  margin-bottom: 16px;
  transition: all .15s;
}

.drop-zone:hover { border-color: var(--pd-accent); background: white; }
.drop-zone.drag-over { border-color: var(--pd-accent); background: white; }
.drop-zone p { margin: 4px 0; color: #5a4d44; }
.drop-zone .big { font-size: 1.05rem; color: var(--pd-accent); font-weight: 600; }
.drop-zone img { max-width: 100%; max-height: 300px; border-radius: 10px; display: block; margin: 0 auto; }

/* Progress / success */
.success-message {
  background: var(--pd-success);
  color: white;
  padding: 18px;
  border-radius: 10px;
  text-align: center;
  font-weight: 500;
}

.error-message {
  background: #ffebee;
  color: #b71c1c;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-top: 10px;
}

.trust-line {
  font-size: 0.85rem;
  color: #8d7c72;
  margin-top: 10px;
  text-align: center;
}

footer {
  margin-top: 32px;
  text-align: center;
  font-size: 0.8rem;
  color: #8d7c72;
}

/* Small utility */
.hidden { display: none !important; }
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
