/* ─────────────────────────────────────────────
   Rosie Shopping — rosie.css
   Warm & friendly theme, AUD, family-first
───────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;600&family=Nunito:wght@400;600;700;800&display=swap');

.rosie-wrap {
  --r-cream:    #FFF8F2;
  --r-warm:     #F6EDE1;
  --r-border:   #E8D9C8;
  --r-orange:   #E07A2F;
  --r-orange-l: #FDF1E6;
  --r-green:    #4E9468;
  --r-green-l:  #EBF5EF;
  --r-red:      #B84F46;
  --r-red-l:    #FAEAE9;
  --r-blue:     #3A7CB8;
  --r-blue-l:   #E8F2FA;
  --r-text:     #3A2A1E;
  --r-muted:    #8A7060;
  font-family: 'Nunito', sans-serif;
  color: var(--r-text);
  max-width: 700px;
  margin: 0 auto;
  padding: 8px 0;
  box-sizing: border-box;
}
.rosie-wrap *, .rosie-wrap *::before, .rosie-wrap *::after { box-sizing: border-box; }

/* ── Header ── */
.rosie-header {
  display: flex; align-items: center; gap: 12px;
  background: var(--r-warm); border: 1px solid var(--r-border);
  border-radius: 14px; padding: 14px 18px; margin-bottom: 12px;
}
.rosie-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--r-orange); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Lora', serif; font-size: 20px; font-weight: 600; flex-shrink: 0;
}
.rosie-title   { font-family: 'Lora', serif; font-size: 22px; }
.rosie-subtitle { font-size: 12px; color: var(--r-muted); margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rosie-claw-pill {
  background: var(--r-blue-l); color: var(--r-blue);
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px;
}

/* ── Tabs ── */
.rosie-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.rosie-tab {
  padding: 7px 15px; border-radius: 8px; border: 1px solid var(--r-border);
  background: var(--r-warm); font-family: 'Nunito', sans-serif;
  font-size: 13px; font-weight: 700; color: var(--r-muted); cursor: pointer; transition: all .15s;
}
.rosie-tab.active { background: var(--r-orange); border-color: var(--r-orange); color: #fff; }
.rosie-tab:hover:not(.active) { background: var(--r-orange-l); }

/* ── Panels ── */
.rosie-panel { display: none; }
.rosie-panel.active { display: block; }

/* ── Cards ── */
.rosie-card {
  background: #fff; border: 1px solid var(--r-border);
  border-radius: 14px; padding: 14px 18px; margin-bottom: 10px;
}
.rosie-section-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; color: var(--r-muted); margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: center;
}

/* ── Tip box ── */
.rosie-tip {
  background: var(--r-orange-l); border: 1px solid #F5C49A;
  border-radius: 12px; padding: 12px 16px;
  display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px;
}
.rosie-tip-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.rosie-tip span:last-child { font-size: 13.5px; line-height: 1.6; color: var(--r-text); }
.rosie-tip strong { color: var(--r-orange); font-weight: 800; }

/* ── Budget bar ── */
.rosie-budget-total { font-family: 'Lora', serif; font-size: 30px; margin: 4px 0; }
.rosie-budget-note  { font-size: 12px; color: var(--r-muted); margin-bottom: 10px; }
.rosie-bar-track { height: 7px; background: var(--r-warm); border-radius: 4px; overflow: hidden; }
.rosie-bar-fill  { height: 100%; background: var(--r-orange); border-radius: 4px; transition: width .4s ease; }

/* ── Add row ── */
.rosie-add-row { display: flex; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.rosie-add-row input,
.rosie-add-row select {
  flex: 1; min-width: 80px; padding: 8px 12px;
  border: 1px solid var(--r-border); border-radius: 8px;
  font-family: 'Nunito', sans-serif; font-size: 13px;
  background: var(--r-cream); color: var(--r-text);
}
.rosie-add-row input:focus,
.rosie-add-row select:focus { outline: none; border-color: var(--r-orange); }
.rosie-add-row input::placeholder { color: var(--r-muted); }
.rosie-btn-add {
  padding: 8px 16px; background: var(--r-orange); border: none;
  border-radius: 8px; color: #fff; font-family: 'Nunito', sans-serif;
  font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: opacity .15s;
}
.rosie-btn-add:hover { opacity: .87; }

/* ── List items ── */
.rosie-list-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid var(--r-border);
}
.rosie-list-item:last-child { border-bottom: none; }
.rosie-item-main { flex: 1; min-width: 0; }
.rosie-item-name { font-size: 14px; font-weight: 700; }
.rosie-item-name.done { text-decoration: line-through; color: var(--r-muted); font-weight: 400; }
.rosie-item-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.rosie-item-est      { font-size: 12px; color: var(--r-muted); }
.rosie-item-est.known { color: var(--r-green); font-weight: 700; }
.rosie-who-badge {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 5px;
}
.rosie-claw-badge {
  background: var(--r-blue-l); color: var(--r-blue);
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 5px;
}
.rosie-qty-ctrl { display: flex; align-items: center; gap: 3px; }
.rosie-qty-btn {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--r-border); background: var(--r-warm);
  font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--r-muted); font-weight: 800; line-height: 1; flex-shrink: 0;
}
.rosie-qty-btn:hover { background: var(--r-orange-l); border-color: var(--r-orange); color: var(--r-orange); }
.rosie-qty-num { font-size: 12px; font-weight: 700; min-width: 14px; text-align: center; }
.rosie-price-in {
  width: 68px; padding: 5px 8px; border: 1px solid var(--r-border);
  border-radius: 7px; font-family: 'Nunito', sans-serif; font-size: 13px;
  background: var(--r-cream); color: var(--r-text);
}
.rosie-price-in:focus { outline: none; border-color: var(--r-green); }
.rosie-btn-got {
  padding: 5px 10px; border: none; border-radius: 7px;
  background: var(--r-green); color: #fff; font-family: 'Nunito', sans-serif;
  font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: opacity .15s;
}
.rosie-btn-got:hover { opacity: .85; }
.rosie-btn-del {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--r-border); background: var(--r-warm);
  font-size: 15px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; color: var(--r-muted); flex-shrink: 0; line-height: 1;
}
.rosie-btn-del:hover { background: var(--r-red-l); border-color: var(--r-red); color: var(--r-red); }
.rosie-done-check { color: var(--r-green); font-size: 12px; font-weight: 800; white-space: nowrap; align-self: center; }
.rosie-btn-clear {
  padding: 3px 10px; border: 1px solid var(--r-border);
  border-radius: 6px; background: var(--r-warm);
  font-family: 'Nunito', sans-serif; font-size: 11px; font-weight: 700;
  color: var(--r-muted); cursor: pointer; margin-left: auto;
}
.rosie-btn-clear:hover { background: var(--r-red-l); border-color: var(--r-red); color: var(--r-red); }

/* ── Family grid ── */
.rosie-fam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.rosie-fam-card {
  background: #fff; border: 1px solid var(--r-border); border-radius: 12px;
  padding: 12px 8px; text-align: center;
}
.rosie-fam-av {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; margin: 0 auto 6px; color: #fff;
}
.rosie-fam-name  { font-size: 12px; font-weight: 700; }
.rosie-fam-count { font-size: 11px; color: var(--r-muted); }
.rosie-fam-del {
  margin-top: 6px; font-size: 11px; color: var(--r-muted);
  cursor: pointer; background: none; border: none; font-family: 'Nunito', sans-serif;
}
.rosie-fam-del:hover { color: var(--r-red); }
.rosie-color-picks { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.rosie-cpick {
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: border .1s; flex-shrink: 0;
}
.rosie-cpick.sel { border-color: var(--r-text); }

/* ── Price memory ── */
.rosie-pm-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--r-border); font-size: 13px;
}
.rosie-pm-item:last-child { border-bottom: none; }
.rosie-pm-name { font-weight: 700; }
.rosie-pm-hist { font-size: 11px; color: var(--r-muted); margin-top: 2px; }
.rosie-pm-est {
  background: var(--r-green-l); color: var(--r-green);
  font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px;
}
.rosie-btn-forget {
  padding: 3px 8px; border: 1px solid var(--r-border); border-radius: 6px;
  background: var(--r-warm); font-family: 'Nunito', sans-serif;
  font-size: 11px; font-weight: 700; cursor: pointer; color: var(--r-muted);
}
.rosie-btn-forget:hover { background: var(--r-red-l); border-color: var(--r-red); color: var(--r-red); }

/* ── Fam stats ── */
.rosie-stat-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--r-border);
}
.rosie-stat-row:last-child { border-bottom: none; }
.rosie-stat-av {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
}
.rosie-stat-name  { flex: 1; font-size: 13px; font-weight: 700; }
.rosie-stat-count { font-size: 13px; font-weight: 700; color: var(--r-orange); }

/* ── Empty / misc ── */
.rosie-empty { text-align: center; padding: 2rem 1rem; color: var(--r-muted); font-size: 13px; }
.rosie-empty-icon { font-size: 28px; margin-bottom: 6px; }
.rosie-footnote { font-size: 12px; color: var(--r-muted); padding: 0 4px; margin-top: -4px; }
.rosie-loading { text-align: center; padding: 1rem; color: var(--r-muted); font-size: 13px; }
