/* ============================================================
   LivePlant Scanner — Production CSS v3
   Premium light-mode design. All classes prefixed `lps-` to
   avoid WordPress theme collisions. Fully responsive
   (mobile-first → tablet → desktop).
   ============================================================ */

/* ── Design Tokens ── */
.liveplant-scanner {
  --lps-primary: #43a882;
  --lps-primary-hover: #2d7a5d;
  --lps-primary-light: #5ec29e;
  --lps-primary-50: #f0fdf4;
  --lps-primary-100: #d1fae5;
  --lps-primary-200: #a7f3d0;

  --lps-bg: #ffffff;
  --lps-bg-page: #f8faf9;
  --lps-surface: #ffffff;

  --lps-text: #0f172a;
  --lps-text-secondary: #475569;
  --lps-text-muted: #94a3b8;
  --lps-text-green: #15803d;

  --lps-border: #e2e8f0;
  --lps-border-light: #f1f5f9;
  --lps-divider: #f1f5f9;

  --lps-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --lps-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --lps-shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --lps-shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --lps-shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --lps-shadow-green: 0 4px 14px -2px rgba(67, 168, 130, 0.25);
  --lps-shadow-green-lg: 0 8px 24px -4px rgba(67, 168, 130, 0.3);

  --lps-radius-sm: 8px;
  --lps-radius-md: 12px;
  --lps-radius-lg: 16px;
  --lps-radius-xl: 20px;
  --lps-radius-2xl: 24px;

  --lps-font:
    "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --lps-font-display: "Plus Jakarta Sans", -apple-system, sans-serif;

  --lps-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --lps-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --lps-duration: 0.25s;
}

/* ── Reset & Container ── */
.liveplant-scanner {
  font-family: var(--lps-font);
  color: var(--lps-text);
  line-height: 1.6;
  background: var(--lps-bg);
  border-radius: var(--lps-radius-2xl);
  padding: 0 24px;
  margin: 15px auto;
  max-width: 800px;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.liveplant-scanner *,
.liveplant-scanner *::before,
.liveplant-scanner *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Screen-reader only (hidden file input) */
.lps-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BUTTONS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.lps-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--lps-radius-lg);
  font-family: var(--lps-font);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background var(--lps-duration) var(--lps-ease),
    box-shadow var(--lps-duration) var(--lps-ease),
    transform var(--lps-duration) var(--lps-ease);
  border: none;
  text-decoration: none;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.lps-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.lps-btn:focus-visible {
  outline: 2px solid var(--lps-primary);
  outline-offset: 2px;
}

/* Primary (green filled) */
.lps-btn--primary {
  background: linear-gradient(
    135deg,
    var(--lps-primary-light) 0%,
    var(--lps-primary) 50%,
    var(--lps-primary-hover) 100%
  );
  color: #fff;
  box-shadow: var(--lps-shadow-green);
}

.lps-btn--primary:hover {
  box-shadow: var(--lps-shadow-green-lg);
  transform: translateY(-1px);
}

.lps-btn--primary:active {
  transform: translateY(0);
  box-shadow: var(--lps-shadow-green);
}

.lps-btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Outline (white with border) */
.lps-btn--outline {
  background: var(--lps-surface);
  color: var(--lps-text);
  border: 1.5px solid var(--lps-border);
  box-shadow: var(--lps-shadow-xs);
}

.lps-btn--outline:hover {
  background: var(--lps-primary-50);
  border-color: var(--lps-primary-200);
  color: var(--lps-text-green);
  box-shadow: var(--lps-shadow-sm);
}

/* Full-width modifier */
.lps-btn--full {
  width: 100%;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STATE 1 — UPLOAD
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.lps-upload {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 500px;
  margin: 0 auto;
  animation: lps-fadeIn 0.3s var(--lps-ease);
}

/* Dashed dropzone (green border, tall, tappable) */
.lps-upload__dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2.5px dashed var(--lps-primary);
  border-radius: var(--lps-radius-xl);
  background: var(--lps-primary-50);
  cursor: pointer;
  transition:
    background var(--lps-duration) var(--lps-ease),
    border-color var(--lps-duration) var(--lps-ease),
    box-shadow var(--lps-duration) var(--lps-ease);
  padding: 48px 24px;
  aspect-ratio: 1 / 1;
  width: min(500px, 100%);
  max-width: 500px;
  margin: 0 auto;
  -webkit-tap-highlight-color: transparent;
}

.lps-upload__dropzone:hover {
  background: var(--lps-primary-100);
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.1);
}

.lps-upload__dropzone.drag-over {
  border-color: var(--lps-primary-hover);
  background: var(--lps-primary-100);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

/* Camera-plus icon (rounded soft-green square) */
.lps-upload__icon {
  width: 72px;
  height: 72px;
  border-radius: var(--lps-radius-lg);
  background: var(--lps-primary-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lps-primary);
  margin-bottom: 20px;
  transition: transform var(--lps-duration) var(--lps-ease);
}

.lps-upload__dropzone:hover .lps-upload__icon {
  transform: scale(1.05);
}

.lps-upload__title {
  font-family: var(--lps-font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--lps-text);
  margin: 0 0 6px;
  text-align: center;
}

.lps-upload__hint {
  font-size: 14px;
  color: var(--lps-text-muted);
  margin: 0;
  text-align: center;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STATE 2 — PREVIEW
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.lps-preview {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 500px;
  margin: 0 auto;
  animation: lps-fadeInUp 0.4s var(--lps-ease);
}

/* Image frame */
.lps-preview__frame {
  position: relative;
  border-radius: var(--lps-radius-xl);
  overflow: hidden;
  background: var(--lps-bg-page);
  box-shadow: var(--lps-shadow-md);
  border: 1px solid var(--lps-border-light);
  max-width: 500px;
  margin: 0 auto;
}

.lps-preview__frame img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: var(--lps-bg-page);
}

/* Close / X button (top-right) */
.lps-preview__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--lps-surface);
  border: 1px solid var(--lps-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--lps-text);
  box-shadow: var(--lps-shadow-md);
  transition:
    background var(--lps-duration) var(--lps-ease),
    transform var(--lps-duration) var(--lps-ease);
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}

.lps-preview__close:hover {
  background: #f1f5f9;
  transform: scale(1.08);
}

.lps-preview__close:active {
  transform: scale(0.95);
}

/* Action row: Retake + Identify side by side */
.lps-preview__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STATE 3 — CAMERA
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.lps-camera {
  border-radius: var(--lps-radius-xl);
  overflow: hidden;
  background: #000;
  position: relative;
  animation: lps-fadeIn 0.3s var(--lps-ease);
  box-shadow: var(--lps-shadow-lg);
}

.lps-camera video {
  width: 100%;
  display: block;
}

.lps-camera__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 20px;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
}

.lps-camera__capture {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 4px solid rgba(255, 255, 255, 0.4);
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s var(--lps-ease-spring);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lps-camera__capture:hover {
  transform: scale(1.08);
}

.lps-camera__capture:active {
  transform: scale(0.92);
}

.lps-camera__capture-ring {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  margin: auto;
}

.lps-camera__cancel {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--lps-font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--lps-radius-md);
  transition: all var(--lps-duration) var(--lps-ease);
}

.lps-camera__cancel:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STATE 4 — LOADING
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.lps-loading {
  text-align: center;
  padding: 32px 24px;
  animation: lps-fadeIn 0.4s var(--lps-ease);
}

/* ── Scanner Image Container ── */
.lps-scanner {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 24px;
  border-radius: var(--lps-radius-lg);
  overflow: hidden;
  background: var(--lps-bg-page);
}

.lps-scanner__image {
  width: 100%;
  height: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
}

/* Animated scan line — green glow, sweeps top → bottom → top */
.lps-scanner__line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--lps-primary-light) 20%,
    var(--lps-primary) 50%,
    var(--lps-primary-light) 80%,
    transparent 100%
  );
  box-shadow:
    0 0 12px 4px rgba(67, 168, 130, 0.5),
    0 0 24px 8px rgba(67, 168, 130, 0.2);
  animation: lps-scanLine 2s ease-in-out infinite;
}

@keyframes lps-scanLine {
  0% {
    top: 0;
  }
  50% {
    top: calc(100% - 3px);
  }
  100% {
    top: 0;
  }
}

.lps-loading__text {
  font-family: var(--lps-font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--lps-text);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.lps-loading__subtext {
  font-size: 14px;
  color: var(--lps-text-muted);
  margin: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STATE 5 — RESULT (Premium UI)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Extra color tokens for result UI */
.lps-result {
  --lps-amber-50: #fffbeb;
  --lps-amber-100: #fef3c7;
  --lps-amber-200: #fde68a;
  --lps-amber-700: #b45309;
  --lps-amber-800: #92400e;
  --lps-red-50: #fef2f2;
  --lps-red-100: #fee2e2;
  --lps-red-200: #fecaca;
  --lps-red-600: #dc2626;
  --lps-red-800: #991b1b;
  --lps-blue-50: #eff6ff;
  --lps-blue-200: #bfdbfe;
  --lps-blue-600: #2563eb;
  --lps-blue-800: #1e40af;
  --lps-ink: #0f172a;
  --lps-ink-muted: #475569;
  animation: lps-fadeInUp 0.5s var(--lps-ease);
}

/* ── Hero ── */
.lps-hero {
  position: relative;
  height: 400px;
  border-radius: var(--lps-radius-xl);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.lps-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
}

.lps-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(
    to top,
    #fff 0%,
    rgba(255, 255, 255, 0.8) 40%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
}

.lps-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.lps-hero-info {
  flex: 1;
}

.lps-hero-name {
  font-family: var(--lps-font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--lps-ink);
  line-height: 1.1;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.lps-hero-latin {
  font-family: var(--lps-font);
  font-style: italic;
  font-size: 16px;
  font-weight: 600;
  color: #059669;
  margin: 0;
}

/* Confidence pill badge */
.lps-match-badge {
  background: var(--lps-primary-100);
  border: 2px solid var(--lps-primary-200);
  border-radius: 999px;
  padding: 8px 18px;
  font-family: var(--lps-font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--lps-primary);
  white-space: nowrap;
  margin-bottom: 6px;
  flex-shrink: 0;
}

/* Toxicity warning bar */
.lps-toxicity-warning {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--lps-radius-md);
  padding: 10px 16px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #991b1b;
}

/* Body wrap */
.lps-body-wrap {
  padding: 0 0 20px;
}

/* ── Info Card Grid ── */
.lps-info-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
  animation: lps-slideIn 0.5s 0.05s ease both;
}

@keyframes lps-slideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lps-info-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--lps-radius-md);
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.lps-info-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.4) 0%,
    transparent 50%,
    transparent 100%
  );
  pointer-events: none;
}

.lps-info-card--amber {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
}
.lps-info-card--rose {
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
}
.lps-info-card--sky {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
}
.lps-info-card--emerald {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}
.lps-info-card--violet {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
}
.lps-info-card--indigo {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
}

.lps-info-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  position: relative;
}

.lps-info-card-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.lps-info-card-icon--amber {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}
.lps-info-card-icon--rose {
  background: linear-gradient(135deg, #fb7185, #e11d48);
}
.lps-info-card-icon--sky {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
}
.lps-info-card-icon--emerald {
  background: linear-gradient(135deg, #34d399, #059669);
}
.lps-info-card-icon--violet {
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
}
.lps-info-card-icon--indigo {
  background: linear-gradient(135deg, #818cf8, #4f46e5);
}

.lps-info-card-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lps-ink-muted);
  flex: 1;
}

.lps-info-card-chevron {
  width: 14px;
  height: 14px;
  color: var(--lps-ink-muted);
  opacity: 0.4;
}

.lps-info-card-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--lps-ink);
  line-height: 1.3;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Section Title ── */
.lps-section-title {
  font-family: var(--lps-font);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lps-text-muted);
  margin: 0 0 12px 0;
  padding: 0 4px;
}

/* ── Care Essentials ──
   Reuses .lps-care-card component (same as Care Schedule).
   No additional styles needed — see Care Schedule section. */

/* ── Fun Fact ── */
.lps-fun-fact {
  margin: 16px 0 0;
  background: var(--lps-primary-50);
  border-radius: var(--lps-radius-md);
  padding: 14px 18px;
}

.lps-fun-fact p {
  font-family: var(--lps-font);
  font-size: 13px;
  color: var(--lps-text);
  line-height: 1.5;
  margin: 0;
}

.lps-fun-fact strong {
  color: var(--lps-primary);
  font-weight: 700;
}

/* ── Risk Box ── */
.lps-risk-box {
  background: var(--lps-red-50);
  border: 1.5px solid var(--lps-red-200);
  border-radius: var(--lps-radius-md);
  padding: 16px;
  margin-top: 12px;
  animation: lps-slideIn 0.5s 0.1s ease both;
}

.lps-risk-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.lps-risk-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--lps-red-100);
  border: 1px solid var(--lps-red-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.lps-risk-box h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--lps-red-800);
  margin: 0;
}

.lps-risk-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.lps-risk-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--lps-red-600);
  line-height: 1.4;
}

.lps-risk-list li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lps-red-600);
  margin-top: 5px;
  flex-shrink: 0;
}

/* ── Section Label ── */
.lps-section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lps-ink-muted);
  margin: 24px 0 10px;
}

/* ── Care Card ── */
.lps-care-card {
  background: #fff;
  border: 1px solid var(--lps-border);
  border-radius: var(--lps-radius-xl);
  overflow: hidden;
  animation: lps-slideIn 0.5s 0.2s ease both;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.04);
}

.lps-care-card-header {
  background: linear-gradient(135deg, #5ec29e 0%, #43a882 50%, #2d7a5d 100%);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lps-care-card-header-left h3 {
  font-family: var(--lps-font-display);
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin: 0;
}

.lps-care-card-header-left p {
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
  margin: 2px 0 0;
}

.lps-today-badge {
  background: var(--lps-primary-100);
  color: var(--lps-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

.lps-care-row {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.lps-care-row:last-child {
  border-bottom: none;
}

.lps-care-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.lps-care-icon-wrap--water {
  background: #e0f2fe;
}
.lps-care-icon-wrap--mist {
  background: #e8f5e9;
}
.lps-care-icon-wrap--prune {
  background: #fce4ec;
}
.lps-care-icon-wrap--fert {
  background: #fff8e1;
}
.lps-care-icon-wrap--light {
  background: #fef3c7;
}
.lps-care-icon-wrap--temp {
  background: #ffe4e6;
}
.lps-care-icon-wrap--soil {
  background: #dcfce7;
}
.lps-care-icon-wrap--humidity {
  background: #f3f4f6;
}

.lps-care-row-text {
  flex: 1;
  min-width: 0;
}

.lps-care-row-text h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--lps-ink);
  margin: 0 0 2px;
}

.lps-care-row-text p {
  font-size: 12px;
  color: var(--lps-ink-muted);
  margin: 0;
}

.lps-care-row-text p strong {
  color: var(--lps-primary);
  font-weight: 600;
}

.lps-care-status-ok {
  font-size: 11px;
  font-weight: 600;
  color: var(--lps-primary);
  background: var(--lps-primary-100);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Locked Rows ── */
.lps-locked-rows {
  position: relative;
}

.lps-locked-blur {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
  opacity: 0.5;
}

.lps-lock-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.85) 60%,
    #ffffff 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 20px;
  gap: 8px;
  z-index: 10;
}

.lps-lock-chip {
  background: var(--lps-primary-100);
  border: 1px solid var(--lps-primary-200);
  color: var(--lps-primary-hover);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lps-lock-chip-icon {
  width: 13px;
  height: 13px;
}

/* ── Overdue Preview ── */
.lps-overdue-preview {
  background: var(--lps-blue-50);
  border: 1.5px dashed var(--lps-blue-200);
  border-radius: var(--lps-radius-md);
  padding: 12px 16px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: lps-slideIn 0.5s 0.25s ease both;
}

.lps-overdue-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lps-blue-600);
  flex-shrink: 0;
  animation: lps-pulse 1.5s ease-in-out infinite;
}

@keyframes lps-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.lps-overdue-preview p {
  font-size: 12.5px;
  color: var(--lps-blue-800);
  line-height: 1.4;
  margin: 0;
}

.lps-overdue-preview strong {
  font-weight: 700;
}

/* ── Social Proof ── */
.lps-social-proof {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--lps-border);
  border-radius: var(--lps-radius-md);
  padding: 12px 14px;
  margin-top: 14px;
  animation: lps-slideIn 0.5s 0.4s ease both;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.lps-avatars {
  display: flex;
}

.lps-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  margin-left: -7px;
  color: #fff;
  flex-shrink: 0;
}

.lps-avatar:first-child {
  margin-left: 0;
}

.lps-avatar--a1 {
  background: #3b6d11;
}
.lps-avatar--a2 {
  background: #854f0b;
}
.lps-avatar--a3 {
  background: #185fa5;
}
.lps-avatar--a4 {
  background: #993556;
}

.lps-social-text {
  flex: 1;
}

.lps-social-text strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--lps-ink);
}

.lps-social-text span {
  font-size: 11.5px;
  color: var(--lps-ink-muted);
}

/* ── Download CTA Card ── */
.lps-download-cta-card {
  background: linear-gradient(135deg, #5ec29e 0%, #43a882 50%, #2d7a5d 100%);
  border-radius: var(--lps-radius-2xl);
  padding: 32px 24px;
  margin-top: 16px;
  text-align: center;
  animation: lps-slideIn 0.5s 0.3s ease both;
  position: relative;
  overflow: hidden;
}

.lps-download-cta-card::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  pointer-events: none;
}

.lps-download-cta-card::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.025);
  pointer-events: none;
}

.lps-cta-eyebrow {
  font-family: var(--lps-font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #bbf7d0;
  margin: 0 0 12px;
  position: relative;
  z-index: 2;
}

.lps-cta-headline {
  font-family: var(--lps-font-display);
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin: 0 0 16px;
  position: relative;
  z-index: 2;
  letter-spacing: -0.01em;
}

.lps-cta-sub {
  font-family: var(--lps-font);
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  line-height: 1.5;
  margin: 0 auto 24px;
  max-width: 380px;
  position: relative;
  z-index: 2;
}

.lps-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: #0f172a;
  font-family: var(--lps-font);
  font-size: 16px;
  font-weight: 800;
  padding: 16px 24px;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  width: 100%;
  position: relative;
  z-index: 2;
  transition: transform 0.12s ease;
}

.lps-cta-btn:hover {
  transform: scale(1.02);
}

.lps-cta-btn:active {
  transform: scale(0.97);
}

.lps-apple-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.lps-cta-note {
  font-family: var(--lps-font);
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  margin: 14px 0 0;
  position: relative;
  z-index: 2;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STATE 6 — ERROR
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.lps-error {
  text-align: center;
  animation: lps-fadeInUp 0.4s var(--lps-ease);
}

.lps-error__card {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  border-radius: var(--lps-radius-lg);
  padding: 28px;
  margin-bottom: 16px;
}

.lps-error__icon {
  font-size: 36px;
  display: block;
  margin-bottom: 12px;
}

.lps-error__message {
  font-size: 14px;
  color: #991b1b;
  margin: 0;
  line-height: 1.7;
  font-weight: 500;
}

/* Admin unconfigured error */
.liveplant-error {
  padding: 16px 20px;
  background: #fffbeb;
  border: 1px solid #fef08a;
  border-radius: var(--lps-radius-md);
  color: #92400e;
  font-family: var(--lps-font);
}

.liveplant-error a {
  color: #d97706;
  font-weight: 600;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TURNSTILE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.lps-turnstile {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FOOTER / BADGE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.lps-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--lps-divider);
}

.lps-footer__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--lps-text-muted);
  text-decoration: none;
  transition: color var(--lps-duration) var(--lps-ease);
  font-weight: 500;
}

.lps-footer__badge:hover {
  color: var(--lps-primary);
}

.lps-footer__badge strong {
  color: var(--lps-primary);
  font-weight: 700;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ANIMATIONS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@keyframes lps-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes lps-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE — Tablet (641px–1024px)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (min-width: 641px) {
  .liveplant-scanner {
    padding: 32px;
  }

  .lps-upload__dropzone {
    padding: 56px 32px;
  }

  .lps-upload__icon {
    width: 80px;
    height: 80px;
  }

  .lps-upload__title {
    font-size: 20px;
  }

  .lps-hero {
    height: 440px;
  }

  .lps-hero-name {
    font-size: 24px;
  }

  .lps-info-card-grid {
    gap: 12px;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE — Desktop (1025px+)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (min-width: 1025px) {
  .liveplant-scanner {
    padding: 36px;
  }

  .lps-upload__dropzone {
    padding: 64px 40px;
  }

  .lps-hero {
    height: 480px;
  }

  .lps-hero-name {
    font-size: 26px;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE — Small mobile (≤380px)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 380px) {
  .liveplant-scanner {
    padding: 16px;
    margin: 12px auto;
  }

  .lps-upload__dropzone {
    padding: 36px 16px;
  }

  .lps-upload__icon {
    width: 64px;
    height: 64px;
  }

  .lps-btn {
    padding: 13px 20px;
    font-size: 15px;
  }

  .lps-hero {
    height: 320px;
  }

  .lps-info-card-grid {
    gap: 8px;
  }

  .lps-info-card {
    padding: 12px;
  }

  .lps-cta-btn {
    font-size: 14px;
    padding: 14px 20px;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DIAGNOSE MODE — Styles
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Red glowing scan line for diagnose mode */
.lps-mode-diagnose .lps-scanner__line {
  background: linear-gradient(
    90deg,
    transparent 0%,
    #fca5a5 20%,
    #ef4444 50%,
    #fca5a5 80%,
    transparent 100%
  );
  box-shadow:
    0 0 12px 4px rgba(239, 68, 68, 0.5),
    0 0 24px 8px rgba(239, 68, 68, 0.2);
}

/* ── Severity Badge ── */
.lps-severity-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: var(--lps-font);
  font-size: 12px;
  font-weight: 700;
  margin-top: 16px;
}

.lps-severity--mild {
  background: #fef9c3;
  color: #854d0e;
}

.lps-severity--moderate {
  background: #fee2e2;
  color: #991b1b;
}

.lps-severity--severe {
  background: #991b1b;
  color: #fff;
}

/* ── Disease Info ── */
.lps-disease-info {
  margin-top: 8px;
}

.lps-disease-name {
  font-family: var(--lps-font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--lps-text);
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.lps-disease-meta {
  font-family: var(--lps-font);
  font-size: 14px;
  color: var(--lps-text-muted);
  margin: 0;
}

/* ── Symptoms Card ── */
.lps-symptoms-card {
  margin-top: 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--lps-radius-md);
  padding: 16px 18px;
}

.lps-symptoms-title {
  font-family: var(--lps-font);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #991b1b;
  margin: 0 0 8px;
}

.lps-symptoms-text {
  font-family: var(--lps-font);
  font-size: 14px;
  color: var(--lps-text);
  line-height: 1.5;
  margin: 0;
}

/* ── Treatment Plan ── */
.lps-treatment {
  margin-top: 20px;
  background: var(--lps-primary-50);
  border-radius: var(--lps-radius-lg);
  padding: 20px;
}

.lps-treatment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.lps-treatment-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lps-primary);
  flex-shrink: 0;
}

.lps-treatment-title {
  font-family: var(--lps-font);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lps-primary);
  margin: 0;
}

/* Tabs */
.lps-treatment-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.lps-treatment-tab {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid var(--lps-border-light);
  border-radius: var(--lps-radius-md);
  background: var(--lps-bg);
  font-family: var(--lps-font);
  font-size: 13px;
  font-weight: 600;
  color: var(--lps-text-muted);
  cursor: pointer;
  transition: all var(--lps-duration) var(--lps-ease);
  -webkit-tap-highlight-color: transparent;
}

.lps-treatment-tab:hover {
  border-color: var(--lps-primary);
  color: var(--lps-primary);
}

.lps-treatment-tab--active {
  background: var(--lps-primary);
  border-color: var(--lps-primary);
  color: #fff;
}

.lps-treatment-tab--active:hover {
  color: #fff;
}

/* Treatment Steps */
.lps-treatment-step {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.lps-treatment-step:last-child {
  margin-bottom: 0;
}

.lps-treatment-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--lps-primary);
  color: #fff;
  font-family: var(--lps-font);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lps-treatment-step-body strong {
  display: block;
  font-family: var(--lps-font);
  font-size: 14px;
  font-weight: 700;
  color: var(--lps-text);
  margin-bottom: 2px;
}

.lps-treatment-step-body p {
  font-family: var(--lps-font);
  font-size: 13px;
  color: var(--lps-text-muted);
  line-height: 1.4;
  margin: 0;
}

/* Treatment Content */
.lps-treatment-content {
  min-height: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TOXICITY MODE — Styles
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Amber glowing scan line for toxicity mode */
.lps-mode-toxicity .lps-scanner__line {
  background: linear-gradient(
    90deg,
    transparent 0%,
    #fcd34d 20%,
    #f59e0b 50%,
    #fcd34d 80%,
    transparent 100%
  );
  box-shadow:
    0 0 12px 4px rgba(245, 158, 11, 0.5),
    0 0 24px 8px rgba(245, 158, 11, 0.2);
}

/* ── Toxicity Level Badge ── */
.lps-toxicity-level {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-family: var(--lps-font);
  font-size: 13px;
  font-weight: 700;
  margin-top: 16px;
  letter-spacing: 0.02em;
}

.lps-toxicity--safe {
  background: #dcfce7;
  color: #166534;
}

.lps-toxicity--mild {
  background: #fef9c3;
  color: #854d0e;
}

.lps-toxicity--moderate {
  background: #fee2e2;
  color: #991b1b;
}

.lps-toxicity--high {
  background: #991b1b;
  color: #fff;
}

/* ── Section Title (shared across toxicity sections) ── */
.lps-section-title {
  font-family: var(--lps-font);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lps-text-muted);
  margin: 0 0 10px;
}

/* ── Species Chips ── */
.lps-toxic-species {
  margin-top: 20px;
}

.lps-toxic-species-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lps-species-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  font-family: var(--lps-font);
  font-size: 13px;
  font-weight: 600;
}

.lps-species-chip--safe {
  background: #dcfce7;
  color: #166534;
}

.lps-species-chip--toxic {
  background: #fee2e2;
  color: #991b1b;
}

/* ── Toxic Parts Tags ── */
.lps-toxic-parts {
  margin-top: 20px;
}

.lps-toxic-parts-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lps-part-tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  font-family: var(--lps-font);
  font-size: 12px;
  font-weight: 600;
  color: #991b1b;
}

/* ── Toxic Compounds ── */
.lps-toxic-compounds {
  margin-top: 20px;
}

.lps-toxic-compounds-text {
  font-family: var(--lps-font);
  font-size: 14px;
  color: var(--lps-text);
  line-height: 1.5;
  margin: 0;
}

/* ── Toxic Symptoms (reuses diagnose symptom pattern) ── */
.lps-toxic-symptoms {
  margin-top: 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--lps-radius-md);
  padding: 16px 18px;
}

/* ── First Aid (red-themed treatment card) ── */
.lps-first-aid {
  margin-top: 20px;
  background: #fef2f2;
  border-radius: var(--lps-radius-lg);
  padding: 20px;
}

.lps-treatment-dot--red {
  background: #dc2626;
}

.lps-treatment-title--red {
  color: #dc2626;
}

.lps-first-aid .lps-treatment-step-num {
  background: #dc2626;
}

/* ── Safe Alternative ── */
.lps-safe-alternative {
  margin-top: 20px;
  padding: 14px 18px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--lps-radius-md);
}

.lps-safe-alternative p {
  font-family: var(--lps-font);
  font-size: 14px;
  color: var(--lps-text);
  line-height: 1.5;
  margin: 0;
}

.lps-safe-alternative strong {
  color: #166534;
}

/* ── Hide care sections in toxicity mode ── */
.lps-mode-toxicity .lps-body-wrap {
  display: none;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   REDUCED MOTION
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (prefers-reduced-motion: reduce) {
  .liveplant-scanner *,
  .liveplant-scanner *::before,
  .liveplant-scanner *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
