/* profile.css — styles for profile.html */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-sans); line-height: 1.5;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
a { color: var(--cta); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 720px; margin: 0 auto; padding: 32px 32px 80px; }

/* Without this rule, elements toggled via classList.add/remove('hidden')
   (e.g. #gateHero) render visibly regardless of JS state — app.css defines
   .hidden but profile.html doesn't load app.css. */
.hidden { display: none !important; }
header {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px; margin-bottom: 28px;
}
h1 {
  margin: 0; font-family: var(--font-serif); font-weight: 500;
  font-size: 24px; letter-spacing: 0.01em;
}
h1 .accent { color: var(--accent); }

/* Mobile header: the brand title + " · Profile" suffix plus the action
   buttons don't fit on one line on a phone, so the title overflowed into the
   buttons. Let the header wrap, shrink the title, drop the redundant
   " · Profile" suffix (you're already on the profile page), and trim the big
   side padding so content isn't crammed against the edges. */
@media (max-width: 640px) {
  .wrap { padding: 20px 16px 64px; }
  header {
    flex-wrap: wrap; gap: 8px 12px; align-items: center;
  }
  h1 { font-size: 19px; }
  .page-suffix { display: none; }
  .brand-title { min-width: 0; }
  /* Let the receipts table scroll inside its card instead of spilling past
     the viewport (which the root overflow-x:hidden would otherwise clip). */
  .card table { display: block; overflow-x: auto; white-space: nowrap; }
}
h2 {
  font-family: var(--font-serif); font-weight: 500;
  font-size: 18px; margin: 0 0 16px;
}
.card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 4px; padding: 24px; margin-bottom: 16px;
}
button:not([class*="cl-"]) {
  font-family: var(--font-sans); font-size: 14px;
  padding: 10px 18px; border-radius: 3px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card); color: var(--text); cursor: pointer;
}
button.primary {
  background: var(--cta); color: var(--cta-text);
  border-color: var(--cta); font-weight: 600;
}
button.primary:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
button.danger { color: var(--danger); border-color: rgba(214, 125, 111, 0.4); }
button.ghost { background: transparent; }

.status-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
}
.badge.active   { background: rgba(168, 198, 134, 0.15); color: var(--success); }
.badge.past_due { background: var(--accent-dim); color: var(--accent); }
.badge.canceled, .badge.inactive {
  background: rgba(214, 125, 111, 0.15); color: var(--danger);
}
.quota-bar {
  height: 6px; background: var(--bg-card); border-radius: 3px;
  overflow: hidden; margin: 12px 0 6px;
}
.quota-bar-fill { height: 100%; background: var(--accent); width: 0%; transition: width 0.3s; }
.meta { color: var(--text-muted); font-size: 13px; }
/* On the subscribed/current plan button (.primary) the whole button text is
   white; the .meta price line needs an explicit override since .meta sets its
   own muted color that would otherwise win over the inherited white. */
.planBtn.primary .meta { color: #fff; }

table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 10px 8px; text-align: left;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
th { color: var(--text-muted); font-weight: 500; text-transform: uppercase; font-size: 11px; letter-spacing: 0.1em; }
td.amount { font-family: var(--font-mono); text-align: right; }

.row { display: flex; gap: 12px; flex-wrap: wrap; }

.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--bg-card); border: 1px solid var(--success); color: var(--success);
  padding: 12px 18px; border-radius: 3px; font-size: 13px;
}

.fbTypeBtn {
  font-size: 13px; padding: 8px 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card); color: var(--text);
  border-radius: 3px; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.fbTypeBtn.active {
  border-color: var(--accent); background: var(--accent-dim); color: var(--accent);
}

.starBtn {
  font-size: 26px; padding: 2px 4px;
  background: transparent; border: none;
  color: var(--border-strong); cursor: pointer;
  transition: color 0.1s; line-height: 1;
}
.starBtn.lit { color: var(--accent); }
.starBtn:hover { color: var(--accent); }
