/*
  BiteBuddy — Profile page styles (the extra looks JUST for profile.html)
  We also load the shared styles.css first, so colours/fonts/topbar/footer match.
  This file only adds the NEW pieces: the banner, badges, milestones, shop, etc.
  Updated to use the shared design "tokens" (--r, --shadow, etc.) so it stays
  in sync with the playful homepage look. 🍴
*/

/* The whole profile sits in a centred column, like the other pages */
.profile {
  max-width: 680px;
  margin: 0 auto;
  padding: 22px 20px 60px;
}

/* ===== THE PROFILE CARD (banner + avatar + name) ===== */
.profile-card {
  background: var(--white);
  border-radius: var(--r-lg);
  overflow: hidden;                 /* keeps the banner corners rounded */
  box-shadow: var(--shadow);
}

/* The custom banner = a colourful strip at the top.
   We start it on-brand; clicking a colour swatch below changes it. */
.banner {
  height: 130px;
  background: var(--grad-brand);
}

/* The avatar (Forky) overlaps the banner a little, like real profiles */
.avatar-wrap { text-align: center; margin-top: -48px; }
.avatar {
  width: 96px;
  height: 96px;
  background: var(--white);
  border-radius: 50%;               /* makes it a circle */
  padding: 10px;
  box-shadow: 0 6px 18px rgba(47, 128, 237, 0.25);
}

/* a real photo (e.g. from Google sign-in) fills the circle neatly */
#avatar-img.is-photo { object-fit: cover; border-radius: 50%; padding: 3px; }

.profile-name { text-align: center; font-family: "Baloo 2", sans-serif; font-size: 28px; font-weight: 800; margin-top: 10px; }
.profile-handle { text-align: center; color: var(--muted); font-weight: 600; margin-bottom: 20px; }

/* ===== STATS ROW (points / streak / places) ===== */
.stats {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;                  /* stack nicely on small phones */
  padding: 0 18px 24px;
}
.stat {
  flex: 1;
  min-width: 120px;
  background: var(--bg);
  border-radius: var(--r);
  padding: 18px;
  text-align: center;
  transition: transform var(--fast);
}
.stat:hover { transform: translateY(-4px); }
/* gradient numbers so the big stats really pop */
.stat-num {
  font-family: "Baloo 2", sans-serif;
  font-size: 28px;
  font-weight: 800;
  background: var(--grad-blue);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-num.green { background: var(--grad-green); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { color: var(--muted); font-size: 14px; font-weight: 600; margin-top: 4px; }

/* ===== SHARED LOOK FOR EACH SECTION BELOW ===== */
.panel {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 24px 26px;
  margin-top: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--fast), box-shadow var(--fast);
}
.panel:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.panel h2 { font-family: "Baloo 2", sans-serif; font-size: 21px; margin-bottom: 6px; }
.panel .hint { color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 16px; }

/* ===== MY TASTES (likes & dislikes) ===== */
.taste-add { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.taste-input {
  flex: 1;
  min-width: 160px;
  border: 2px solid #DCE6F5;
  border-radius: var(--r-sm);
  padding: 12px 16px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 600;
  color: var(--ink);
  outline: none;
  transition: border-color var(--fast), box-shadow var(--fast);
}
.taste-input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47, 128, 237, 0.12); }
/* the Dislike button reuses the ghost look but needs a white background on a <button> */
.taste-dislike-btn { background: var(--white); font-size: 16px; cursor: pointer; font-family: inherit; }

.taste-h { font-family: "Baloo 2", sans-serif; font-size: 16px; margin: 18px 0 8px; }
.taste-list { display: flex; flex-wrap: wrap; gap: 8px; }
.taste-empty { color: var(--muted); font-size: 14px; font-weight: 600; }

/* each food shows as a coloured pill */
.taste-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--r-pill);
  padding: 9px 14px;
  font-weight: 700;
  font-size: 14px;
}
.taste-chip.like { background: #E3F9EC; color: var(--green-dark); }     /* soft green */
.taste-chip.dislike { background: #FDEAEA; color: #C0392B; }            /* soft red */
.taste-chip .x { cursor: pointer; font-weight: 800; opacity: 0.55; transition: opacity var(--fast); }
.taste-chip .x:hover { opacity: 1; }

/* ===== SAVED PLACES (favorites) ===== */
.saved-list { display: flex; flex-wrap: wrap; gap: 8px; }
.saved-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg);
  border-radius: var(--r-pill);
  padding: 5px 12px 5px 4px;
}
.saved-go {
  background: none;
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  color: var(--blue-dark);
  cursor: pointer;
  padding: 5px 8px;
  border-radius: var(--r-pill);
}
.saved-go:hover { text-decoration: underline; }
.saved-chip .x { cursor: pointer; font-weight: 800; opacity: 0.55; transition: opacity var(--fast); }
.saved-chip .x:hover { opacity: 1; }

/* ===== BADGES ===== */
.badge-row { display: flex; flex-wrap: wrap; gap: 12px; }
.badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border-radius: var(--r-pill);
  padding: 9px 16px;
  font-weight: 700;
  font-size: 14px;
  transition: transform var(--fast);
}
.badge:hover { transform: translateY(-3px) scale(1.03); }
.badge .emoji { font-size: 18px; }
/* A locked badge looks faded so you know it's not earned yet */
.badge.locked { opacity: 0.45; }
.badge.locked:hover { transform: none; }   /* locked ones don't react — they're not earned */

/* ===== MILESTONES (never-fade progress bars) ===== */
.milestone { margin-bottom: 18px; }
.milestone:last-child { margin-bottom: 0; }
.milestone-top { display: flex; justify-content: space-between; font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.bar {
  background: var(--bg);
  border-radius: var(--r-pill);
  height: 16px;
  overflow: hidden;
}
.bar-fill {
  background: var(--grad-green);
  height: 100%;
  border-radius: var(--r-pill);
  transition: width 0.6s ease;
}

/* ===== 🔥 WEEKLY STREAK ===== */
.streak-display { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.streak-num { font-family: "Baloo 2", sans-serif; font-size: 36px; font-weight: 800; color: var(--coral); }
.streak-label { color: var(--muted); font-weight: 700; }
.streak-zero { color: var(--muted); font-weight: 700; }

/* ===== 💎 BANNER SHOP (spend points to unlock) ===== */
.shop-balance { font-weight: 800; color: var(--blue-dark); margin-bottom: 14px; }
.shop-msg { margin-top: 12px; font-weight: 700; color: var(--green-dark); min-height: 20px; }
.swatches { display: flex; flex-wrap: wrap; gap: 28px 14px; padding-bottom: 4px; }
/* Each swatch is a clickable coloured circle */
.swatch {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  cursor: pointer;
  transition: transform var(--fast);
}
.swatch:hover { transform: scale(1.15) rotate(8deg); }
/* a locked banner is dimmed and shows its price */
.swatch.locked { filter: grayscale(0.4) brightness(0.85); }
.swatch.locked::after {
  content: "🔒";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.swatch .swatch-cost {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
}

/* ===== EXCLUSIVE (top-contender only) ===== */
.exclusive {
  background: linear-gradient(135deg, #6a3df0, #2F80ED);  /* special purple→blue, looks rare */
  color: var(--white);
  border-radius: var(--r-lg);
  padding: 24px 26px;
  margin-top: 18px;
  text-align: center;
  box-shadow: 0 14px 34px rgba(106, 61, 240, 0.28);
}
.exclusive h2 { font-family: "Baloo 2", sans-serif; color: var(--white); }
.exclusive .hint { color: rgba(255,255,255,0.85); font-weight: 600; }
.locked-pill {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border-radius: var(--r-pill);
  padding: 9px 18px;
  font-weight: 700;
  margin-top: 6px;
}
