/* ============================================================
   Pest & Wildlife Identifier — Stylesheet
   Version: 1.0.0
   ============================================================ */

/* Reset & Base */
.pest-id-wrap *,
.pest-id-wrap *::before,
.pest-id-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.pest-id-wrap {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1a2e20;
    font-size: 16px;
    line-height: 1.5;
    padding: 1.5rem 0 2.5rem;
}

/* ── HEADER ────────────────────────────────────────────────── */
.pest-id-header {
    background: #0f1f15;
    border-radius: 20px;
    padding: 2.75rem 2rem 2.25rem;
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.pest-id-header::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(76,175,125,0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.pest-id-header::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -30px;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(200,117,26,0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.pest-id-eyebrow {
    font-size: 11px;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: #4caf7d;
    font-weight: 500;
    margin-bottom: 0.65rem;
}

.pest-id-title {
    font-family: 'Syne', sans-serif !important;
    font-size: clamp(1.75rem, 4.5vw, 2.5rem) !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    line-height: 1.1 !important;
    margin: 0 0 0.85rem !important;
    border: none !important;
    padding: 0 !important;
}

.pest-id-title span {
    color: #4caf7d;
}

.pest-id-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.58);
    max-width: 440px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ── SECTION ───────────────────────────────────────────────── */
.pest-id-section {
    margin-bottom: 1.25rem;
}

.pest-id-step-label {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #5a7060;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pest-id-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1a5c3a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.pest-id-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #8aA090;
    font-size: 11px;
}

/* ── DROP ZONE ─────────────────────────────────────────────── */
.pest-id-dropzone {
    border: 2px dashed #c8ddd0;
    border-radius: 16px;
    background: #ffffff;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    position: relative;
    overflow: hidden;
}

.pest-id-dropzone:hover,
.pest-id-dropzone.dragover,
.pest-id-dropzone:focus {
    border-color: #4caf7d;
    background: #e8f5ee;
    outline: none;
}

.pest-id-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.pest-id-drop-inner {
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.pest-id-drop-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
}

.pest-id-drop-title {
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #1a2e20;
    margin-bottom: 0.3rem;
}

.pest-id-drop-hint {
    font-size: 13px;
    color: #5a7060;
}

.pest-id-drop-hint span {
    color: #2d7a52;
    font-weight: 500;
    text-decoration: underline;
}

/* ── PREVIEW ───────────────────────────────────────────────── */
.pest-id-preview {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    max-height: 340px;
}

.pest-id-preview img {
    width: 100%;
    max-height: 340px;
    object-fit: cover;
    display: block;
    opacity: 0.9;
}

.pest-id-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    line-height: 1;
}

.pest-id-remove-btn:hover {
    background: rgba(180,30,30,0.85);
}

/* ── TEXTAREA ──────────────────────────────────────────────── */
.pest-id-textarea {
    width: 100% !important;
    background: #ffffff !important;
    border: 1.5px solid #c8ddd0 !important;
    border-radius: 12px !important;
    padding: 0.9rem 1.1rem !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 14px !important;
    color: #1a2e20 !important;
    resize: vertical !important;
    min-height: 100px !important;
    transition: border-color 0.2s !important;
    outline: none !important;
    line-height: 1.6 !important;
    box-shadow: none !important;
}

.pest-id-textarea::placeholder {
    color: #9ab0a2;
}

.pest-id-textarea:focus {
    border-color: #4caf7d !important;
}

.pest-id-hint-text {
    font-size: 12px;
    color: #8aA090;
    margin-top: 0.4rem;
    text-align: center;
}

/* ── SUBMIT BUTTON ─────────────────────────────────────────── */
.pest-id-submit-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: #1a5c3a;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.pest-id-submit-btn:hover {
    background: #2d7a52;
}

.pest-id-submit-btn:active {
    transform: scale(0.985);
}

.pest-id-submit-btn:disabled {
    background: #a0b8a8;
    cursor: not-allowed;
    transform: none;
}

.pest-id-submit-icon {
    font-size: 18px;
}

/* ── ERROR ─────────────────────────────────────────────────── */
.pest-id-error {
    background: #fff0f0;
    border: 1px solid #f0c0c0;
    border-left: 4px solid #d03030;
    border-radius: 10px;
    padding: 0.875rem 1.1rem;
    margin-top: 0.875rem;
    font-size: 14px;
    color: #b83030;
    line-height: 1.55;
}

/* ── LOADING ───────────────────────────────────────────────── */
.pest-id-loading {
    background: #ffffff;
    border: 1px solid #c8ddd0;
    border-radius: 16px;
    padding: 2.75rem 1.5rem;
    text-align: center;
    margin-top: 1.25rem;
}

.pest-id-spinner {
    width: 46px;
    height: 46px;
    margin: 0 auto 1.1rem;
    border: 3px solid #e8f5ee;
    border-top-color: #1a5c3a;
    border-radius: 50%;
    animation: pest-id-spin 0.8s linear infinite;
}

@keyframes pest-id-spin {
    to { transform: rotate(360deg); }
}

.pest-id-loading-title {
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #1a2e20;
    margin-bottom: 0.3rem;
}

.pest-id-loading-sub {
    font-size: 13px;
    color: #5a7060;
    max-width: 360px;
    margin: 0 auto;
    line-height: 1.55;
}

/* ── RESULT CARD ───────────────────────────────────────────── */
.pest-id-result {
    background: #ffffff;
    border: 1px solid #c8ddd0;
    border-radius: 20px;
    overflow: hidden;
    margin-top: 1.25rem;
    animation: pest-id-fadeup 0.4s ease;
}

@keyframes pest-id-fadeup {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

.pest-id-result-header {
    background: #0f1f15;
    padding: 1.35rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 14px;
}

.pest-id-result-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(76,175,125,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.pest-id-result-name {
    font-family: 'Syne', sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 2px;
}

.pest-id-result-sci {
    font-size: 12px;
    color: rgba(255,255,255,0.42);
    font-style: italic;
    margin-bottom: 3px;
}

.pest-id-result-conf {
    font-size: 12px;
    color: #4caf7d;
    font-weight: 500;
}

/* Result body */
.pest-id-result-body {
    padding: 1.5rem;
}

/* Info grid */
.pest-id-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 1.25rem;
}

@media (max-width: 480px) {
    .pest-id-info-grid { grid-template-columns: 1fr; }
}

.pest-id-info-box {
    background: #f4f9f6;
    border-radius: 10px;
    padding: 0.875rem 1rem;
}

.pest-id-info-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #5a7060;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.pest-id-info-value {
    font-size: 13px;
    font-weight: 600;
    color: #1a2e20;
    line-height: 1.4;
}

.pest-id-info-value.danger  { color: #b83030; }
.pest-id-info-value.caution { color: #c8751a; }
.pest-id-info-value.safe    { color: #2d7a52; }

.pest-id-info-note {
    font-size: 12px;
    color: #5a7060;
    margin-top: 3px;
    line-height: 1.4;
}

/* Urgency banner */
.pest-id-urgency {
    border-radius: 10px;
    padding: 0.9rem 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.pest-id-urgency.high   { background: #fff0f0; border-left: 4px solid #d03030; }
.pest-id-urgency.medium { background: #fff4e6; border-left: 4px solid #c8751a; }
.pest-id-urgency.low    { background: #e8f5ee; border-left: 4px solid #4caf7d; }

.pest-id-urgency-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.pest-id-urgency-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a2e20;
    margin-bottom: 3px;
}

.pest-id-urgency-detail {
    font-size: 13px;
    color: #3a5040;
    line-height: 1.5;
}

/* Section blocks */
.pest-id-block {
    margin-bottom: 1.25rem;
}

.pest-id-block-title {
    font-family: 'Syne', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #5a7060;
    margin-bottom: 0.45rem;
}

.pest-id-block p {
    font-size: 14px;
    color: #1a2e20;
    line-height: 1.65;
}

.pest-id-block ul {
    padding-left: 1.2rem;
}

.pest-id-block li {
    font-size: 14px;
    color: #1a2e20;
    line-height: 1.6;
    margin-bottom: 0.3rem;
}

/* CTA strip */
.pest-id-cta-strip {
    background: #0f1f15;
    border-radius: 12px;
    padding: 1.35rem 1.5rem;
}

.pest-id-cta-text {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    line-height: 1.55;
    margin-bottom: 0.9rem;
}

.pest-id-cta-text strong {
    color: #ffffff;
    font-weight: 600;
    display: block;
    margin-bottom: 3px;
    font-size: 14px;
}

.pest-id-cta-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pest-id-btn {
    flex: 1;
    min-width: 140px;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-align: center;
    text-decoration: none !important;
    display: block;
    transition: opacity 0.15s, transform 0.1s;
    letter-spacing: 0.02em;
}

.pest-id-btn:active {
    transform: scale(0.97);
}

.pest-id-btn.primary {
    background: #4caf7d;
    color: #ffffff !important;
}

.pest-id-btn.primary:hover {
    opacity: 0.88;
}

.pest-id-btn.secondary {
    background: transparent;
    color: #ffffff !important;
    border: 1.5px solid rgba(255,255,255,0.22);
}

.pest-id-btn.secondary:hover {
    background: rgba(255,255,255,0.07);
}

@media (max-width: 440px) {
    .pest-id-cta-buttons { flex-direction: column; }
    .pest-id-btn { min-width: unset; }
}

/* ── RETRY ─────────────────────────────────────────────────── */
.pest-id-retry-btn {
    display: block;
    width: 100%;
    margin-top: 0.875rem;
    padding: 0.75rem;
    background: transparent;
    border: 1.5px solid #c8ddd0;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #5a7060;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.pest-id-retry-btn:hover {
    border-color: #1a5c3a;
    color: #1a5c3a;
}

/* ── FOOTER ────────────────────────────────────────────────── */
.pest-id-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 12px;
    color: #8aA090;
    line-height: 1.65;
}

.pest-id-footer strong {
    color: #5a7060;
}
