/* ==========================================================================
   Shared components — used by many pages. Page- or feature-specific styling
   belongs in assets/css/pages/* or assets/css/components/*.
   ========================================================================== */

/* ── Card ───────────────────────────────────────────────────────────────── */
.pb-card {
  background: var(--pb-surface);
  border-radius: var(--pb-r-lg);
  box-shadow: var(--pb-shadow-card);
  padding: 16px;
}
.pb-card--xl { border-radius: var(--pb-r-xl); }
.pb-card--flush { padding: 0; overflow: hidden; }

/* ── Section heading row ("Stories … See all →") ───────────────────────── */
.pb-sec-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.pb-sec-hd__title {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  font-family: var(--pb-font-head); font-weight: 800; font-size: 19px; color: var(--pb-text);
}
.pb-sec-hd__title i { color: var(--pb-amber); font-size: 22px; }
.pb-sec-hd--sm .pb-sec-hd__title { font-size: 17.5px; gap: 12px; white-space: nowrap; }
.pb-link-more {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-family: var(--pb-font-head); font-weight: 700; font-size: 16px; color: var(--pb-link);
}
.pb-sec-hd--sm .pb-link-more { font-weight: 800; font-size: 14.5px; gap: 6px; }
.pb-link-more i { font-size: 12px; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.pb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border: 0; border-radius: 22px; white-space: nowrap;
  font-family: var(--pb-font-head); font-weight: 800; font-size: 15px; line-height: 1;
  background: var(--pb-primary); color: #fff; transition: background .15s, transform .1s;
}
.pb-btn:hover { background: var(--pb-primary-hover); color: #fff; }
.pb-btn:active { transform: translateY(1px); }
.pb-btn[disabled] { opacity: .6; cursor: default; }
.pb-btn--sm { height: 38px; padding: 0 18px; border-radius: 19px; font-size: 14.5px; }
.pb-btn--xs { height: 32px; padding: 0 18px; border-radius: 16px; font-size: 15px; }
.pb-btn--white { background: #fff; color: var(--pb-text); box-shadow: var(--pb-shadow-btn); }
.pb-btn--white:hover { background: #fff; color: var(--pb-text); filter: brightness(.98); }
.pb-btn--soft { background: var(--pb-surface-warm); color: var(--pb-primary); }
.pb-btn--soft:hover { background: #fbe7bd; color: var(--pb-primary); }
.pb-btn--ghost { background: #fff; color: var(--pb-text); border: 1px solid var(--pb-border-2); }
.pb-btn--ghost:hover { background: #fafafa; color: var(--pb-text); }
.pb-btn i { font-size: .85em; }

.pb-round-btn {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--pb-surface-warm); color: var(--pb-primary); font-size: 12px;
}
.pb-round-btn--line { background: #fff; border: 1px solid #ececec; color: #2b2b30; width: 30px; height: 30px; font-size: 11px; }

/* ── Avatar ─────────────────────────────────────────────────────────────── */
.pb-avatar {
  flex: none; display: flex; align-items: center; justify-content: center; overflow: hidden;
  width: 52px; height: 52px; border-radius: 50%; background: var(--pb-text); color: #fff;
  font-family: var(--pb-font-head); font-weight: 700; font-size: 18px;
}
.pb-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-avatar--anon { background: #ecebe7; color: var(--pb-text-faint); font-size: 22px; }
.pb-avatar--sm { width: 40px; height: 40px; font-size: 15px; }

/* ── Tag pill (post category etc.) ──────────────────────────────────────── */
.pb-tag {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 17px;
  font-family: var(--pb-font-head); font-weight: 800; font-size: 13.5px; letter-spacing: .03em; text-transform: uppercase;
  background: var(--pb-surface-warm); color: #9a6a00;
}
.pb-tag i { font-size: 13px; }
.pb-tag--dogs     { background: #fdf1d8; color: #9a6a00; }
.pb-tag--cats     { background: var(--pb-purple-soft); color: var(--pb-purple); }
.pb-tag--pets     { background: var(--pb-green-soft); color: #167a3a; }
.pb-tag--info     { background: var(--pb-blue-soft); color: var(--pb-blue); }
.pb-tag--products { background: #e0f3ff; color: #1877b5; }
.pb-tag--shoutout { background: var(--pb-red-soft); color: #c0262c; }
.pb-tag--video    { background: #ffe9d6; color: #b45309; }
.pb-tag--blip     { background: #e7f0ff; color: #2b59c3; }
.pb-tag--featured { background: #fff3cd; color: #b45309; }

/* ── Login popup ────────────────────────────────────────────────────────── */
.pb-modal {
  position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center;
  padding: 20px; background: rgba(20, 16, 8, .5);
}
.pb-modal.is-open { display: flex; }
.pb-modal__box {
  width: 100%; max-width: 380px; padding: 28px 24px 20px; text-align: center;
  background: #fff; border-radius: 22px; box-shadow: var(--pb-shadow-pop);
  animation: pb-fade-up .2s ease;
}
.pb-modal__ico {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--pb-surface-warm); color: var(--pb-orange-2); font-size: 24px;
}
.pb-modal__box h3 { font-size: 22px; }
.pb-modal__box p { margin-top: 6px; color: var(--pb-text-muted); font-size: 15px; }
.pb-modal__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.pb-modal__btns .pb-btn--ghost { background: var(--pb-surface-2); border-color: transparent; }
.pb-modal__cancel { margin-top: 14px; border: 0; background: none; font-size: 14px; color: var(--pb-text-muted); }

/* ── Toast ──────────────────────────────────────────────────────────────── */
.pb-toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 300;
  padding: 10px 20px; border-radius: 12px; background: var(--pb-text); color: #fff;
  font-size: 14px; font-weight: 600; opacity: 1; transition: opacity .3s;
}
.pb-toast.is-hiding { opacity: 0; }

/* ── Lightbox ───────────────────────────────────────────────────────────── */
.pb-lightbox {
  position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .88);
}
.pb-lightbox.is-open { display: flex; }
.pb-lightbox img { max-width: 92%; max-height: 88vh; border-radius: 12px; object-fit: contain; }
.pb-lightbox__close {
  position: fixed; top: 16px; right: 20px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 16px;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.pb-footer {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; padding: 8px 16px 110px;
  font-size: 14px; color: var(--pb-text-faint);
}
.pb-footer a { color: var(--pb-text-muted); }
.pb-footer a:hover { color: var(--pb-link); }
@media (min-width: 900px) { .pb-footer { padding-bottom: 36px; } }

/* Pages without a footer keep clear of the mobile tab bar */
.pb-footer-space { height: 100px; }
@media (min-width: 900px) { .pb-footer-space { height: 28px; } }

.pb-footer-ad { max-width: 960px; margin: 8px auto 0; padding: 0 16px; }
