/* ============================================================
   kid.css — Kid mode (playful): dashboard, submit-request, mood editor.
   Split out of site.css in Phase 2.
   ============================================================ */

/* ---------- Kid Dashboard ---------- */
.kid-dashboard h1,
.kid-dashboard h3 { font-weight: 800; }

.dashboard-hero {
    background: linear-gradient(135deg, var(--c-brand-1), var(--c-brand-2));
    color: white;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.22);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.dashboard-hero h1 { margin-bottom: 8px; }
.dashboard-hero p { margin-bottom: 0; opacity: 0.95; }

.hero-actions { flex-shrink: 0; }

.summary-card {
    border-radius: 18px;
    padding: 20px;
    min-height: 125px;
    background: white;
    box-shadow: var(--shadow-card);
    border: 1px solid #eef2f7;
}

.summary-label { color: var(--c-text-muted); font-weight: 700; font-size: 0.85rem; margin-bottom: 12px; }
.summary-value { font-size: 1.65rem; font-weight: 900; color: var(--c-text-strong); }

.balance-card { border-left: 6px solid var(--c-brand-1); }
.earned-card { border-left: 6px solid var(--c-income); }
.deduction-card { border-left: 6px solid var(--c-deduction); }
.request-card { border-left: 6px solid #f59e0b; }
.approved-card { border-left: 6px solid var(--c-brand-2); }
.goal-card { border-left: 6px solid #9333ea; }

.dashboard-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
    border: 1px solid #eef2f7;
}

.dashboard-card h3 { font-size: 1.25rem; margin-bottom: 18px; }

.goal-box { background: #f8fafc; border-radius: 16px; padding: 16px; border: 1px solid var(--c-border); }

.achievement-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border-radius: 18px;
    padding: 16px;
    min-height: 130px;
    border: 1px solid var(--c-border);
    transition: all 0.2s ease-in-out;
}

.achievement-card.earned { background: linear-gradient(135deg, #ffffff, #f0fdf4); box-shadow: 0 10px 22px rgba(22, 163, 74, 0.12); }
.achievement-card.locked { background: #f8fafc; opacity: 0.58; filter: grayscale(60%); }
.achievement-card:hover { transform: translateY(-2px); }

.achievement-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
}

.achievement-name { font-weight: 900; font-size: 1rem; color: var(--c-text-strong); }
.achievement-desc { color: var(--c-text-muted); font-size: 0.88rem; }

.badge-english .achievement-icon { background: #fef3c7; }
.badge-clean .achievement-icon { background: #dcfce7; }
.badge-helping .achievement-icon { background: #ffedd5; }
.badge-room .achievement-icon { background: #f3e8ff; }
.badge-behavior .achievement-icon { background: #dcfce7; }

/* Goal display card */
.goal-display-card { background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); }
.goal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.goal-title { font-size: 1rem; color: var(--c-text-muted); font-weight: 700; }
.goal-big-percent { font-size: 3.4rem; font-weight: 900; color: var(--c-brand-1); line-height: 1; }
.goal-progress-bar { height: 24px; border-radius: var(--radius-pill); overflow: hidden; }
.goal-money-row {
    display: flex; justify-content: space-between; gap: 16px;
    background: #ffffff; border-radius: 16px; padding: 14px; border: 1px solid var(--c-border);
}
.goal-money-row > div { display: flex; flex-direction: column; }
.goal-money-label { font-size: 0.8rem; color: var(--c-text-muted); font-weight: 700; margin-bottom: 4px; }
.goal-message { background: #eef2ff; border-radius: 14px; padding: 12px; color: #3730a3; font-weight: 700; }

.compact-badge { min-height: 210px; flex-direction: column; align-items: center; text-align: center; justify-content: flex-start; }
.compact-badge .achievement-icon { margin-bottom: 8px; }

/* ---------- Today's Medicine card (Phase 3, kid dashboard) ---------- */
.medicine-card .dose-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-card);
    margin-bottom: 10px;
}

.medicine-card .dose-row.done { background: #f0fdf4; border-color: #bbf7d0; }
.dose-took-btn {
    min-height: var(--tap-kid);
    border-radius: var(--radius-pill);
    font-weight: 800;
    padding: 0 22px;
}

/* ---------- Medicine — weekly motivation banner ---------- */
.med-week-banner {
    background: linear-gradient(135deg, var(--c-kid-accent), var(--c-brand-2));
    color: #fff;
    border-radius: var(--radius-card);
    padding: 16px 20px;
    box-shadow: var(--shadow-card);
}

.med-week-target {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.med-week-label { font-weight: 800; opacity: 0.95; }
.med-week-amount { font-size: 1.8rem; font-weight: 900; line-height: 1; }
.med-week-sub { margin-top: 6px; font-size: 0.9rem; opacity: 0.95; }
.med-week-warn { display: inline-block; margin-left: 4px; font-weight: 700; }

/* ---------- Medicine — per-plan block ---------- */
.med-plan-block {
    padding: 12px 14px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-card);
    margin-bottom: 12px;
}

.med-plan-block .dose-row { border: none; padding: 8px 0; margin-bottom: 0; }
.med-plan-block .dose-row.done { background: transparent; }

.med-plan-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.med-plan-title { font-weight: 900; font-size: 1.05rem; color: var(--c-text-strong); }

.streak-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    border-radius: var(--radius-pill);
    padding: 4px 12px;
    font-weight: 800;
    font-size: 0.82rem;
}

.streak-chip.streak-won {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.med-rule-line {
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--c-text-muted);
    font-weight: 600;
}

.med-rule-money { color: var(--c-deduction); font-weight: 800; }
.med-rule-reward { color: var(--c-income); }

/* ---------- Medicine — 7-day week strip ---------- */
.med-week-strip {
    display: flex;
    gap: 6px;
    justify-content: space-between;
}

.med-day-col { flex: 1; text-align: center; }

.med-day {
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1rem;
    border: 1px solid transparent;
}

.med-day.all { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.med-day.partial { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.med-day.none { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.med-day.pending { background: #eef2ff; color: var(--c-kid-accent); border-color: #c7d2fe; }
.med-day.empty { background: #f1f5f9; color: #cbd5e1; }
.med-day.future { background: #f8fafc; color: #e2e8f0; border-style: dashed; border-color: #e2e8f0; }

.med-day-label {
    margin-top: 4px;
    font-size: 0.7rem;
    color: var(--c-text-muted);
    font-weight: 700;
}

.med-strip-legend {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    font-size: 0.78rem;
    color: var(--c-text-muted);
    font-weight: 600;
}

.med-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 4px;
    vertical-align: -1px;
    margin-right: 2px;
}

.med-dot.all { background: #86efac; }
.med-dot.partial { background: #fcd34d; }
.med-dot.none { background: #fca5a5; }

/* ---------- Medicine — dashboard card head + target pill ---------- */
.med-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.med-target-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--c-kid-accent), var(--c-brand-2));
    color: #fff;
    border-radius: var(--radius-pill);
    padding: 8px 16px;
    font-weight: 800;
    font-size: 0.85rem;
    text-decoration: none;
    box-shadow: var(--shadow-card);
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.med-target-pill:hover,
.med-target-pill:focus {
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 12px 24px rgba(124, 58, 237, 0.28);
}

.med-target-pill strong { font-size: 1rem; }
.med-target-arrow { font-size: 1.15rem; line-height: 1; opacity: 0.9; }

/* ---------- Submit Request ---------- */
.submit-request-page h1,
.submit-request-page h3 { font-weight: 900; }

.submit-hero {
    background: linear-gradient(135deg, #2563eb, var(--c-brand-2));
    color: white;
    border-radius: 22px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

.submit-hero h1 { margin-bottom: 8px; }
.submit-hero p { margin-bottom: 0; opacity: 0.95; font-size: 1.05rem; }

.submit-card {
    background: white;
    border-radius: 20px;
    padding: 22px;
    box-shadow: var(--shadow-card);
    border: 1px solid #eef2f7;
    margin-bottom: 24px;
}

.submit-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.submit-card-header h3 { margin-bottom: 4px; }
.submit-card-header p { color: var(--c-text-muted); margin-bottom: 0; }

.selected-count-box { background: #eef2ff; color: #3730a3; border-radius: var(--radius-pill); padding: 8px 14px; font-weight: 800; white-space: nowrap; }

.date-role-message { border-radius: 16px; border: none; background: #eef6ff; color: #1e3a8a; font-weight: 600; }
.date-role-title { font-weight: 900; margin-bottom: 4px; }

.activity-group { margin-top: 22px; }
.activity-group:first-of-type { margin-top: 0; }
.activity-group-title { font-size: 0.9rem; font-weight: 900; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }

.activity-button-grid { display: flex; flex-wrap: wrap; gap: 12px; }

.activity-choice-btn {
    border-radius: 16px;
    padding: 14px 18px;
    min-width: 190px;
    min-height: var(--tap-kid);
    font-weight: 800;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.07);
    transition: all 0.18s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
}

.activity-choice-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12); }
.activity-choice-btn.selected-activity { background: var(--c-income); color: white; border-color: var(--c-income); }
.activity-choice-btn.selected-activity .badge { background: white !important; color: #166534; }

.activity-name { line-height: 1.2; }
.preview-card { background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%); }
.submit-action-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* ---------- Mood editor (dashboard / chat) ---------- */
.current-mood-editor { display: flex; align-items: center; gap: 6px; }
.current-mood-text { cursor: pointer; }
.current-mood-text:hover { text-decoration: underline; }
.mood-edit-btn { padding: 0; font-size: 0.75rem; text-decoration: none; }
.mood-edit-panel { margin-top: 8px; }
.mood-inline-input { max-width: 260px; border-radius: var(--radius-pill); padding: 4px 10px; font-size: 0.85rem; }

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    .dashboard-hero { flex-direction: column; align-items: flex-start; padding: 20px; }
    .hero-actions { width: 100%; }
    .hero-actions .btn { width: 100%; }
    .summary-value { font-size: 1.35rem; }
    .dashboard-card { padding: 18px; }
    .goal-money-row { flex-direction: column; }
    .goal-big-percent { font-size: 2.7rem; }

    .submit-card-header { flex-direction: column; }
    .selected-count-box { width: 100%; text-align: center; }
    .activity-choice-btn { width: 100%; }
    .submit-action-bar { justify-content: stretch; }
    .submit-action-bar .btn { width: 100%; }
}
