/* ==========================================================================
   Profile preview slide-up (#userprofile, content from profile_preview_content.php)
   ========================================================================== */

#userprofile {
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 22px !important;
  max-width: 460px;
  margin-left: auto !important;
  margin-right: auto !important;
  left: 0 !important;
  right: 0 !important;
  height: auto !important;
  max-height: calc(100vh - 40px);
  background: var(--bc-surface, #fff) !important;
  box-shadow: 0 0 0 1px var(--bc-line, rgba(15, 15, 25, 0.07)), var(--bc-shadow-3, 0 18px 48px -12px rgba(16, 16, 30, 0.22)) !important;
}
/* The theme's big Close button: the card has its own close in the corner */
#userprofile > button.contactSubmitButton { display: none !important; }
#userprofile_content { overflow-y: auto; max-height: calc(100vh - 40px); }

.bc-pv { position: relative; }
.bc-pv-error { padding: 28px 20px; text-align: center; color: var(--bc-muted, #6b6b76); }

.bc-pv-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--bc-ink, #0b0b10);
  font-size: 15px;
  box-shadow: 0 1px 3px rgba(16, 16, 30, 0.15);
  cursor: pointer;
  transition: transform 0.15s var(--bc-ease, ease), background-color 0.15s var(--bc-ease, ease);
}
.bc-pv-close:hover { background: var(--bc-surface); transform: scale(1.06); }

/* Cover: reuses the hero cover (photo or belt colour), just shorter */
.bc-pv .bc-pv-cover {
  position: relative;
  height: 108px !important;
  min-height: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

.bc-pv-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 22px 20px;
  text-align: center;
}
.bc-pv-avatar {
  position: relative;
  z-index: 2; /* above the cover's stitch line */
  display: block;
  margin-top: -52px;
  margin-bottom: 10px;
  line-height: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bc-surface, #fff), 0 8px 24px -8px rgba(16, 16, 30, 0.35);
  transition: transform 0.2s var(--bc-ease, ease);
}
.bc-pv-avatar:hover { transform: scale(1.03); }
.bc-pv-avatar img, .bc-pv-avatar .bc-av {
  width: 96px !important;
  height: 96px !important;
  margin: 0 !important;
  border-radius: 50% !important;
  object-fit: cover;
  box-shadow: none !important;
}
.bc-pv-avatar .bc-av { font-size: 34px !important; }

.bc-pv-name {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 100%;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.bc-pv-name > a { color: var(--bc-ink, #0b0b10) !important; text-decoration: none !important; overflow-wrap: anywhere; }
.bc-pv-name > a:hover { color: var(--bc-accent, #5b4bd1) !important; }
.bc-pv-verified {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--bc-blue, #2563eb);
  color: #fff;
  font-size: 10px;
}
.bc-pv-flag { height: 13px; width: auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(15, 15, 25, 0.08); }
.bc-pv-realname { margin-top: 2px; color: var(--bc-muted, #6b6b76); font-size: 13px; }

.bc-pv-belt { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 12px; }
.bc-pv-beltdraw { display: block; width: 200px; line-height: 0; }
.bc-pv-beltdraw > div { width: 200px !important; margin: 0 !important; }
.bc-pv-beltname { color: var(--bc-muted, #6b6b76); font-size: 12.5px; font-weight: 550; }

.bc-pv-status {
  width: 100%;
  margin-top: 16px;
  padding: 11px 14px 12px;
  border-radius: 14px;
  text-align: left;
}
.bc-pv-status.is-ok { background: rgba(22, 163, 74, 0.08); --pv: #16a34a; --pv-ink: #15803d; }
.bc-pv-status.is-wait { background: rgba(245, 158, 11, 0.1); --pv: #f59e0b; --pv-ink: #a16207; }
.bc-pv-status.is-bad { background: rgba(225, 29, 72, 0.08); --pv: #e11d48; --pv-ink: #be123c; }
.bc-pv-status-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.bc-pv-status-top > span { display: inline-flex; align-items: center; gap: 7px; color: var(--pv-ink); font-size: 13px; font-weight: 650; }
.bc-pv-status-top > b { color: var(--bc-ink, #0b0b10); font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bc-pv-status-top small { color: var(--bc-muted, #6b6b76); font-size: 11.5px; font-weight: 500; }
.bc-pv-bar { height: 5px; border-radius: 999px; background: rgba(15, 15, 25, 0.07); overflow: hidden; }
.bc-pv-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--pv); }
.bc-pv-neg { margin-top: 6px; color: #be123c; font-size: 11.5px; font-weight: 600; }

.bc-pv-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; max-width: 100%; }
.bc-pv-facts > a, .bc-pv-facts > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--bc-surface-2, #f6f6f8);
  color: var(--bc-ink-2, #3a3a44) !important;
  font-size: 12.5px;
  text-decoration: none !important;
}
.bc-pv-facts > * > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-pv-facts i { color: var(--bc-faint, #9a9aa5); font-size: 11px; }
.bc-pv-facts > a:hover { background: rgba(91, 75, 209, 0.08); color: var(--bc-accent, #5b4bd1) !important; }

.bc-pv-open {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  margin-top: 18px;
  border-radius: 14px;
  background: var(--bc-ink, #0b0b10);
  color: var(--bc-on-ink) !important;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none !important;
  transition: transform 0.15s var(--bc-ease, ease), box-shadow 0.15s var(--bc-ease, ease);
}
.bc-pv-open:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(16, 16, 30, 0.5); }
.bc-pv-open i { font-size: 12px; }
.bc-pv-seen { margin-top: 10px; color: var(--bc-faint, #9a9aa5); font-size: 12px; }

@media (max-width: 600px) {
  #userprofile { border-radius: 22px 22px 0 0 !important; max-width: none; bottom: 0 !important; margin-bottom: 0 !important; }
  .bc-pv-body { padding: 0 18px calc(18px + env(safe-area-inset-bottom)); }
}

/* Closed slide-ups sit just below the screen edge: no ring or shadow, or they draw a line
   and a smudge over the bottom menu */
#userprofile:not(.menu-active) { visibility: hidden; box-shadow: none !important; }
.menu.menu-box-bottom:not(.menu-active) { box-shadow: none !important; }
