/* ═══════════════════════════════════════════════════════════════════════════
   interactive/planted_style.css
   "Real gardeners planted" module — styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── "Community Forecast" block — inserted inside .timing-section ────────── */
.planted-crowd-block {
    margin-top: 22px;
    border-top: 1px solid var(--border-color, rgba(0,0,0,.08));
    padding-top: 18px;
}

.planted-crowd-title {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted, #888);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Planting range summary ─────────────────────────────────────────────── */
.planted-range-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.planted-range-card {
    flex: 1 1 160px;
    background: rgba(45,106,79,.06);
    border: 1px solid rgba(45,106,79,.18);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 140px;
}

.planted-range-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, #888);
    font-weight: 600;
}

.planted-range-val {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--green-deep, #2d6a4f);
    line-height: 1.1;
}

.planted-range-sub {
    font-size: 0.75rem;
    color: var(--text-muted, #888);
}

/* Shift card relative to the official forecast */
.planted-shift-card {
    flex: 1 1 160px;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 140px;
    border: 1px solid transparent;
}

.planted-shift-card.shift--early {
    background: rgba(239,68,68,.06);
    border-color: rgba(239,68,68,.20);
}
.planted-shift-card.shift--late {
    background: rgba(234,179,8,.06);
    border-color: rgba(234,179,8,.22);
}
.planted-shift-card.shift--aligned {
    background: rgba(45,106,79,.06);
    border-color: rgba(45,106,79,.18);
}

.planted-shift-val {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.1;
}
.shift--early  .planted-shift-val { color: #dc2626; }
.shift--late   .planted-shift-val { color: #b45309; }
.shift--aligned .planted-shift-val { color: var(--green-deep, #2d6a4f); }

/* ── Community dates timeline strip ──────────────────────────────────────────
   Visualizes P25–P75 (IQR) on the time axis.
   The official forecast date is marked with a separate needle.
─────────────────────────────────────────────────────────────────────────── */
.planted-timeline-wrap {
    margin: 4px 0 14px;
    position: relative;
}

.planted-timeline-label {
    font-size: 0.75rem;
    color: var(--text-muted, #888);
    margin-bottom: 6px;
}

.planted-bar-outer {
    height: 20px;
    background: rgba(0,0,0,.06);
    border-radius: 10px;
    position: relative;
    overflow: visible;
    margin: 0 8px;
}

/* IQR range (P25–P75) — main green bar */
.planted-bar-iqr {
    position: absolute;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(45,106,79,.25), rgba(45,106,79,.55));
    border-radius: 10px;
    border: 1px solid rgba(45,106,79,.35);
    transition: left 0.4s, width 0.4s;
}

/* Median needle (P50) */
.planted-bar-median {
    position: absolute;
    top: -4px;
    width: 3px;
    height: calc(100% + 8px);
    background: var(--green-deep, #2d6a4f);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: left 0.4s;
    z-index: 2;
}
.planted-bar-median::after {
    content: attr(data-label);
    position: absolute;
    top: calc(100% + 3px);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--green-deep, #2d6a4f);
    background: #fff;
    padding: 1px 4px;
    border-radius: 4px;
    border: 1px solid rgba(45,106,79,.25);
}

/* Official forecast needle (for comparison) */
.planted-bar-official {
    position: absolute;
    top: -4px;
    width: 2px;
    height: calc(100% + 8px);
    background: rgba(100,100,100,.45);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: left 0.4s;
    z-index: 1;
}
.planted-bar-official::before {
    content: attr(data-label);
    position: absolute;
    bottom: calc(100% + 3px);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.66rem;
    color: #777;
    background: #fff;
    padding: 1px 4px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,.10);
}

/* Edge labels (P25 / P75) */
.planted-bar-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    color: var(--text-muted, #888);
    margin: 4px 8px 0;
}

/* ── Planting date input form ────────────────────────────────────────────── */
.planted-form-wrap {
    background: rgba(0,0,0,.025);
    border: 1px solid var(--border-color, rgba(0,0,0,.08));
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 4px;
}

.planted-form-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main, #1a1a1a);
    margin: 0 0 10px;
}

.planted-form-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.planted-date-input {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color, rgba(0,0,0,.15));
    background: #fff;
    font-size: 0.88rem;
    font-family: inherit;
    color: var(--text-main, #1a1a1a);
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}
.planted-date-input:focus {
    border-color: var(--green-deep, #2d6a4f);
    box-shadow: 0 0 0 2px rgba(45,106,79,.12);
}

.planted-submit-btn {
    flex: 0 0 auto;
    padding: 7px 16px;
    border-radius: 8px;
    border: 2px solid var(--green-deep, #2d6a4f);
    background: var(--green-deep, #2d6a4f);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
}
.planted-submit-btn:hover   { background: #1a4a35; border-color: #1a4a35; }
.planted-submit-btn:active  { transform: scale(.97); }
.planted-submit-btn:disabled { opacity: .55; cursor: default; transform: none; }

.planted-form-hint {
    font-size: 0.75rem;
    color: var(--text-muted, #888);
    margin-top: 6px;
    font-style: italic;
}

/* Success state after submission */
.planted-form-success {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--green-deep, #2d6a4f);
    font-weight: 600;
    padding: 4px 0;
}

/* No location — call to action to select one */
.planted-no-loc-hint {
    font-size: 0.82rem;
    color: var(--text-muted, #888);
    font-style: italic;
    padding: 8px 0 4px;
}

/* ── Skeleton placeholder while data is loading ──────────────────────────── */
.planted-skeleton {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.planted-skeleton-card {
    flex: 1 1 160px;
    min-width: 140px;
    height: 68px;
    background: linear-gradient(90deg, rgba(0,0,0,.06) 25%, rgba(0,0,0,.10) 50%, rgba(0,0,0,.06) 75%);
    background-size: 200% 100%;
    animation: planted-shimmer 1.4s infinite;
    border-radius: 10px;
}
@keyframes planted-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Responsive design ─────────────────────────────────────────────────────── */
@media (max-width: 540px) {
    .planted-range-row { gap: 8px; }
    .planted-range-card,
    .planted-shift-card { flex: 1 1 100%; min-width: unset; }
    .planted-form-row { flex-direction: column; align-items: flex-start; }
    .planted-date-input,
    .planted-submit-btn { width: 100%; text-align: center; }
}
