/**
 * TreeIdentify — scanner + result styles (standalone subset).
 *
 * This is the part of the ported site stylesheet the [treeidentify]
 * shortcode needs when it runs in any theme. The full design lives in
 * the TreeIdentify theme's style.css; these rules are duplicated here
 * deliberately so the shortcode still looks right if the theme is not
 * active. Colours: green #16a34a / #15803d, ink #0f172a, muted #64748b,
 * border #e2e8f0, radius 12px. Plus Jakarta Sans (loaded by the theme).
 */

.ti-scanner, .scanner-card { max-width: 640px; margin: 0 auto; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 22px; box-shadow: 0 8px 30px rgba(15,23,42,.06); }
.dropzone { border: 2px dashed #a7f3d0; border-radius: 12px; padding: 32px 18px; cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone.drag-over { border-color: #16a34a; background: #f0fdf4; }
.upload-icon { font-size: 2.6rem; }
.upload-title { font-weight: 700; font-size: 1.05rem; margin: 8px 0 4px; }
.upload-subtitle { color: #64748b; font-size: .92rem; margin-bottom: 14px; }
.btn-browse { background: #16a34a; color: #fff; border: 0; padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; display: inline-block; }
.btn-browse:hover { background: #15803d; }
.preview-wrap img { max-height: 320px; border-radius: 10px; display: block; margin: 0 auto 10px; }
.preview-actions { display: flex; gap: 10px; justify-content: center; }
.btn-small { background: #e2e8f0; color: #334155; border: 0; padding: 7px 14px; border-radius: 6px; cursor: pointer; font-weight: 600; }
.btn-danger-outline { background: #fee2e2; color: #b91c1c; }
.identify-controls { margin: 16px 0; text-align: left; }
.identify-controls label { font-weight: 600; display: block; margin-bottom: 6px; }
.identify-controls select { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.scan-action-row { margin-top: 8px; }
.btn-scan { background: linear-gradient(135deg,#22c55e,#16a34a 55%,#15803d); color: #fff; border: 0; padding: 14px 30px; border-radius: 10px; font-size: 1.05rem; font-weight: 700; cursor: pointer; width: 100%; box-shadow: 0 10px 24px rgba(22,163,74,.35); }
.btn-scan:disabled { opacity: .55; cursor: not-allowed; }
.btn-scan:hover:not(:disabled) { background: linear-gradient(135deg,#22c55e,#16a34a 55%,#15803d); }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: ti-spin .8s linear infinite; vertical-align: -3px; margin-left: 8px; }
@keyframes ti-spin { to { transform: rotate(360deg); } }
.scan-error { background: #fee2e2; color: #b91c1c; padding: 12px; border-radius: 8px; margin-top: 12px; text-align: left; }
.loading { color: #64748b; padding: 20px 0; }

/* Results */
.result-card { border: 1px solid #86efac; border-radius: 14px; padding: 22px; margin-top: 20px; text-align: left; background: #fff; box-shadow: 0 18px 40px rgba(21,101,52,.10); }
.result-card h2 { margin-top: 0; }
.result-name { font-size: 1.4rem; font-weight: 800; }
.result-sci { font-style: italic; color: #166534; }
.conf-badge { display: inline-block; background: #16a34a; color: #fff; border-radius: 999px; padding: 4px 12px; font-size: .85rem; font-weight: 700; }
.result-section { margin: 14px 0; }
.result-section h4 { margin: 0 0 4px; font-size: .95rem; color: #166534; text-transform: uppercase; letter-spacing: .04em; }
.result-section p, .result-section li { margin: 0; color: #334155; }
.alt-list { list-style: none; padding: 0; margin: 0; }
.alt-list li { padding: 8px 0; border-bottom: 1px solid #bbf7d0; }
.alt-list li:last-child { border-bottom: 0; }
.warning-box { background: #fef3c7; border: 1px solid #f59e0b; color: #78350f; padding: 14px; border-radius: 10px; margin: 14px 0; }
.info-box { background: #eff6ff; border: 1px solid #bfdbfe; padding: 16px; border-radius: 10px; margin: 20px 0; }
.source-label { font-size: .8rem; color: #64748b; font-style: italic; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn-secondary { background: #e2e8f0; color: #334155; border: 0; padding: 10px 18px; border-radius: 8px; cursor: pointer; font-weight: 600; text-decoration: none; display: inline-block; }
.btn-secondary:hover { background: #cbd5e1; text-decoration: none; }
.btn-primary { background: linear-gradient(135deg,#22c55e,#16a34a 55%,#15803d); color: #fff; border: 0; padding: 10px 18px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.btn-primary:hover { background: linear-gradient(135deg,#22c55e,#16a34a 55%,#15803d); }
.result-photo img { max-height: 320px; border-radius: 14px; box-shadow: 0 16px 36px rgba(15,23,42,.18); border: 1px solid #e2e8f0; }
.details-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; margin: 18px 0; }
.detail-item { background: #fff; border: 1px solid #bbf7d0; border-radius: 12px; padding: 14px; box-shadow: 0 8px 20px rgba(21,101,52,.08); }
.detail-icon { font-size: 1.4rem; margin-bottom: 4px; }
.detail-label { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #15803d; }
.detail-value { font-size: .95rem; color: #0f172a; margin-top: 2px; }
.more-detail-row { margin: 22px 0 6px; padding-top: 16px; border-top: 1px solid #bbf7d0; }
.more-detail-row h4 { margin: 0 0 10px; font-size: .95rem; color: #166534; text-transform: uppercase; letter-spacing: .04em; }
.more-detail-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.more-btn { display: inline-block; text-decoration: none; }
.btn-lens { background: linear-gradient(135deg,#2563eb,#1d4ed8); box-shadow: 0 10px 24px rgba(37,99,235,.35); }
.btn-lens:hover { background: linear-gradient(135deg,#3b82f6,#2563eb); }
.lens-explain { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 12px; padding: 16px; margin: 16px 0; }
.lens-explain h4 { margin: 0 0 6px; color: #1e40af; }
.lens-explain p { color: #334155; }
.risk-section { background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 14px; }
.risk-section h4 { color: #b91c1c; }
.lens-card { background: #fff; border: 1px solid #86efac; border-radius: 14px; padding: 20px; margin: 18px 0; box-shadow: 0 12px 30px rgba(21,101,52,.12); }
.lens-card h4 { margin: 0 0 8px; color: #14532d; }
.lens-card p { margin: 0 0 12px; }
.lens-card .btn-primary { display: inline-block; text-decoration: none; }

/* Name lookup box + Gemini setup card */
.lookup-box { background: #fff; border: 1px solid #86efac; border-radius: 14px; padding: 18px; margin: 18px 0; box-shadow: 0 12px 28px rgba(21,101,52,.10); }
.lookup-box h4 { margin: 0 0 6px; color: #14532d; }
.lookup-box p { margin: 0 0 10px; color: #334155; }
.lookup-form { display: flex; gap: 8px; flex-wrap: wrap; }
.lookup-form input[type=search] { flex: 1; min-width: 200px; padding: 11px 14px; border: 1px solid #86efac; border-radius: 10px; font-size: 1rem; background: #fff; }
.lookup-form input[type=search]:focus { outline: 2px solid #16a34a; outline-offset: 1px; }
.setup-card { background: linear-gradient(135deg,#fffbeb,#fef3c7); border: 2px solid #f59e0b; border-radius: 14px; padding: 20px; margin: 18px 0; box-shadow: 0 14px 32px rgba(245,158,11,.16); }
.setup-card h4 { margin: 0 0 8px; color: #92400e; }
.setup-card p { color: #451a03; }
.setup-card ol { margin: 8px 0 8px 20px; color: #451a03; }
.setup-card li { margin-bottom: 4px; }

/* FAQ */
.faq-list { max-width: 800px; }
.faq-item { border: 1px solid #e2e8f0; border-radius: 10px; margin-bottom: 10px; padding: 4px 16px; background: #fff; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { color: #64748b; }
