/* =============================================
   Plant Watering Calculator - Mobile First
   ============================================= */

.pwc-container { max-width: 900px; margin: 0 auto; padding: 20px; }

.pwc-body {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* ---- Step Section ---- */
.step-section {
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    animation: fadeUp 0.4s;
}

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

.step-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    font-size: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-header h3 {
    color: #1e293b;
    font-size: 20px;
    font-weight: 700;
    flex: 1;
    margin: 0;
}

.reset-btn {
    padding: 8px 18px;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s;
}
.reset-btn:hover { background: #dcfce7; border-color: #22c55e; color: #166534; }

/* ---- Search Box ---- */
.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    font-size: 20px;
    pointer-events: none;
}

#plantSearch {
    width: 100%;
    padding: 16px 50px 16px 50px;
    border: 3px solid #e2e8f0;
    border-radius: 14px;
    font-size: 16px;
    color: #1e293b;
    background: #f8fafc;
    transition: all 0.3s;
    box-sizing: border-box;
}

#plantSearch:focus {
    outline: none;
    border-color: #22c55e;
    background: white;
    box-shadow: 0 0 0 4px rgba(34,197,94,0.1);
}

.clear-search {
    position: absolute;
    right: 16px;
    background: #e2e8f0;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.clear-search:hover { background: #fecaca; color: #dc2626; }

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #22c55e;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 100;
    max-height: 280px;
    overflow-y: auto;
}

.search-result-item {
    padding: 14px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
    border-bottom: 1px solid #f0fdf4;
}
.search-result-item:last-child { border: none; }
.search-result-item:hover { background: #f0fdf4; }

.result-emoji { font-size: 24px; }
.result-info strong { display:block; color:#1e293b; font-size:15px; }
.result-info span   { color:#64748b; font-size:12px; }

.search-box { position: relative; margin-bottom: 20px; }

/* ---- Popular Chips ---- */
.popular-label { color: #64748b; font-size: 14px; font-weight: 600; margin-bottom: 12px; }

.popular-chips { display: flex; flex-wrap: wrap; gap: 10px; }

.popular-chip {
    padding: 8px 16px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #86efac;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    color: #166534;
    cursor: pointer;
    transition: all 0.3s;
}
.popular-chip:hover {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34,197,94,0.2);
}

/* ---- Conditions Grid ---- */
.conditions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.condition-group label {
    display: block;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    font-size: 14px;
}

.option-btns { display: flex; flex-wrap: wrap; gap: 8px; }

.opt-btn {
    padding: 8px 14px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s;
}
.opt-btn:hover { border-color: #22c55e; background: #f0fdf4; color: #166534; }
.opt-btn.active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border-color: #22c55e;
}

/* ---- Calculate Button ---- */
.calculate-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.5px;
}
.calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(34,197,94,0.4);
}

/* ---- Results ---- */
/* Main watering card */
.main-water-card {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    color: white;
    margin-bottom: 20px;
}

.plant-result-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.plant-result-emoji { font-size: 48px; }
.plant-result-name  { font-size: 26px; font-weight: 800; }
.plant-result-latin { font-size: 14px; opacity: 0.8; font-style: italic; }

.water-frequency-display {
    background: rgba(255,255,255,0.2);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
}

.freq-main {
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 6px;
}

.freq-label { font-size: 16px; opacity: 0.9; }

.water-amount-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 16px;
}

.amount-item { text-align: center; }
.amount-value { font-size: 22px; font-weight: 800; }
.amount-label { font-size: 12px; opacity: 0.8; }

/* Season adjustment badge */
.season-badge {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(255,255,255,0.25);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-top: 12px;
}

/* Info cards row */
.info-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.mini-card {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    border: 2px solid #bbf7d0;
}

.mini-card .icon   { font-size: 28px; margin-bottom: 8px; }
.mini-card .label  { font-size: 11px; color: #15803d; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.mini-card .value  { font-size: 14px; color: #166534; font-weight: 800; }

/* Warning / Tip cards */
.tips-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.tip-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-radius: 12px;
    align-items: flex-start;
}

.tip-card.water-tip  { background: #e0f2fe; border-left: 5px solid #0ea5e9; }
.tip-card.warn-tip   { background: #fef3c7; border-left: 5px solid #f59e0b; }
.tip-card.care-tip   { background: #f0fdf4; border-left: 5px solid #22c55e; }

.tip-icon { font-size: 24px; flex-shrink: 0; }
.tip-text strong { display:block; color:#1e293b; font-size:14px; margin-bottom:4px; }
.tip-text p      { color:#475569; font-size:13px; margin:0; line-height:1.6; }

/* Weekly Schedule */
.weekly-schedule {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
}

.weekly-schedule h4 { color: #1e293b; margin-bottom: 16px; font-size: 16px; }

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.day-item { text-align: center; }

.day-name {
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.day-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 18px;
}

.day-icon.water-day { background: linear-gradient(135deg, #e0f2fe, #bae6fd); border: 2px solid #0ea5e9; }
.day-icon.rest-day  { background: #f8fafc; border: 2px solid #e2e8f0; }

/* Seasonal Guide */
.seasonal-guide {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 14px;
    padding: 20px;
}

.seasonal-guide h4 { color: #92400e; margin-bottom: 14px; font-size: 16px; }

.season-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(251,191,36,0.3);
}
.season-row:last-child { border: none; }

.season-name { color: #78350f; font-weight: 600; font-size: 14px; }
.season-freq { color: #92400e; font-weight: 800; font-size: 14px; }
.season-row.current { background: rgba(255,255,255,0.4); margin: 0 -8px; padding: 10px 8px; border-radius: 8px; }

/* ---- Browse Section ---- */
.browse-section {
    border-top: 2px solid #f0fdf4;
    padding-top: 25px;
}

.browse-section h3 { color: #1e293b; margin-bottom: 16px; }

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.cat-tab {
    padding: 8px 18px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s;
}
.cat-tab:hover { border-color: #22c55e; color: #166634; }
.cat-tab.active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border-color: #22c55e;
}

.category-plants {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.plant-browse-card {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #bbf7d0;
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}
.plant-browse-card:hover {
    border-color: #22c55e;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(34,197,94,0.2);
}
.plant-browse-card .p-emoji { font-size: 30px; margin-bottom: 8px; }
.plant-browse-card .p-name  { font-size: 13px; font-weight: 700; color: #166534; }
.plant-browse-card .p-freq  { font-size: 11px; color: #15803d; margin-top: 4px; }



.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.info-item {
    padding: 20px;
    background: white;
    border-radius: 10px;
    color: #666;
}

.info-item strong {
    display: block;
    color: #667eea;
    margin-bottom: 5px;
    font-size: 15px;
    font-weight: 700;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
	.info-grid {
        grid-template-columns: 1fr;
    }
    .pwc-body { padding: 20px 15px; gap: 20px; }
    .conditions-grid { grid-template-columns: 1fr; }
    .info-cards-row { grid-template-columns: repeat(3, 1fr); }
    .week-grid { gap: 4px; }
    .day-icon { width: 34px; height: 34px; font-size: 16px; }
    .freq-main { font-size: 32px; }
    .category-plants { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .pwc-container { padding: 10px 5px; }
    .pwc-body { padding: 15px 10px; }
    .info-cards-row { grid-template-columns: repeat(3, 1fr); }
    .mini-card { padding: 12px 8px; }
    .mini-card .value { font-size: 12px; }
    .water-amount-row { gap: 16px; }
    .freq-main { font-size: 28px; }
    .step-section { padding: 18px 12px; }
}