/* ═══════════════════════════════════════════════════════════════════
   Spray Schedule — minimal custom CSS
   Only JS-required state classes + legacy shared component styles
   that cannot be expressed with Tailwind utility classes.
   ═══════════════════════════════════════════════════════════════════ */

/* Tighter page section padding on mobile */
.spray-section.section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

@media (min-width: 1024px) {
    .spray-section.section {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

/* ── JS-required visibility states ───────────────────────────────── */
.stage-panel { display: none; }
.stage-panel.is-visible { display: block; }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

#seasonCalendar.hidden { display: none; }
#sprayModal.hidden { display: none; }

/* ── Accordion chevrons (toggled by JS) ──────────────────────────── */
.safety-chev.is-open,
.nutrient-chev.is-open { transform: rotate(180deg); }

/* ── JS-toggled active states (optimistic + post-PJAX) ───────────── */
.fruit-pill.is-active,
.region-tab-btn.active,
.tank-btn.is-active,
.spray-tab.is-active {
    background: var(--color-primary, #3CB371);
    border-color: var(--color-primary, #3CB371);
    color: #fff;
}
.spray-tab.is-active .tab-count { background: rgba(255,255,255,0.2); color: #fff; }

.stage-pill.is-selected {
    background: var(--color-primary-soft, rgba(60, 179, 113, 0.1));
    border-color: var(--color-primary, #3CB371);
}
.stage-pill.is-selected .stage-pill-lbl strong { color: var(--color-primary, #3CB371); }

/* ── Checklist states ────────────────────────────────────────────── */
.checklist-check.is-checked {
    background: currentColor;
}
.checklist-check.is-checked i {
    opacity: 1;
    color: #fff;
}
.checklist-item.is-done {
    opacity: 0.75;
}
.checklist-item.is-done .checklist-apply {
    display: none;
}

/* ── Modal animation ─────────────────────────────────────────────── */
#sprayModal {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
#sprayModal:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}
#sprayModal > div:last-child {
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (min-width: 640px) {
    #sprayModal > div:last-child {
        transform: translate(-50%, -45%) scale(0.96);
    }
}
#sprayModal:not(.hidden) > div:last-child {
    transform: translateY(0);
}
@media (min-width: 640px) {
    #sprayModal:not(.hidden) > div:last-child {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ── Sticky CTA safe area ────────────────────────────────────────── */
.spray-sticky-cta {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Smooth horizontal scrolling helpers ─────────────────────────── */
.scrollbar-hide,
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar,
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* ── Legacy disease card (shared component; keep compact) ────────── */
.disease-card {
    flex-shrink: 0;
    width: 220px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border-top: 3px solid var(--dc, #dc2626);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.25s ease;
}
.disease-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}
.disease-card-hero {
    height: 64px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 12px 8px;
}
.disease-hero-icon { font-size: 1.4rem; line-height: 1; }
.sev-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.sev-badge i { font-size: 0.58rem; }
.disease-card-body {
    padding: 8px 12px 6px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.disease-name { font-size: 0.88rem; font-weight: 700; color: #1A1A1A; margin: 0; line-height: 1.25; }
.disease-name-hi { font-family: 'Noto Sans Devanagari', 'DM Sans', sans-serif; font-size: 0.7rem; color: #A8A199; margin: 0; }
.disease-desc {
    font-size: 0.7rem;
    color: #6B6B6E;
    line-height: 1.45;
    margin: 4px 0 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.disease-card-actions {
    display: flex;
    gap: 6px;
    padding: 8px 10px 6px;
    flex-shrink: 0;
    border-top: 1px solid #EDE8E0;
}
.dis-act-btn {
    flex: 1;
    height: 30px;
    width: auto;
    border-radius: 20px;
    border: 1.5px solid #E0DAD2;
    background: #fafafa;
    color: #6B6B6E;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 600;
    gap: 5px;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    cursor: pointer;
}
.dis-act-btn:hover { background: #EDE8E0; color: #48484A; }
.dis-act-btn.reported { background: #fff7ed; border-color: rgba(249, 115, 22, 0.4); color: #f97316; }
.dis-act-btn.saved { background: #fffbeb; border-color: rgba(232, 184, 75, 0.45); color: #F5A623; }
.disease-learn-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    font-size: 0.64rem;
    font-weight: 600;
    color: var(--dc, #dc2626);
    text-decoration: none;
    padding: 0 12px 10px;
    transition: opacity 0.15s;
}
.disease-learn-btn:active { opacity: 0.7; }
.disease-learn-btn.disabled { opacity: 0.55; pointer-events: none; cursor: not-allowed; }
.coming-soon-tag {
    margin-left: auto;
    font-size: 0.55rem;
    background: #EDE8E0;
    color: #8E8E93;
    padding: 1px 6px;
    border-radius: 10px;
}

@media (min-width: 1024px) {
    .disease-card:hover { transform: translateY(-3px); }
}
