/* ==========================================================================
   Cover photo (profile hero) + modern gallery (bento grid, lightbox, manager)
   Tokens come from styles/modern.css.
   ========================================================================== */

/* ---------- Cover photo ---------- */
.bc-hero-cover.has-photo {
  background:
    var(--cover-img) center var(--cover-y, 50%) / cover no-repeat,
    linear-gradient(120deg, color-mix(in srgb, var(--belt, #5b4bd1) 80%, #0b0b10) 0%, #5b4bd1 100%);
}
/* Bottom shade so the avatar edge and the stitched line read on any photo */
.bc-cover-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 11, 16, 0) 38%, rgba(11, 11, 16, 0.18) 68%, rgba(11, 11, 16, 0.5) 100%);
  transition: background-color 0.25s var(--bc-ease);
}
.bc-hero-cover:not(.has-photo) .bc-cover-shade { background: none; }
.bc-hero-cover .bc-cover-shade { z-index: 0; }
.bc-hero-cover::after { z-index: 1; }

/* Editable (own profile / admin): the whole cover opens the picker */
.bc-hero-cover.is-editable { cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.bc-hero-cover.is-editable:focus-visible { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.85); }
.bc-hero-avatar { position: relative; z-index: 2; }
.bc-hero-cover .bc-cover-menu { z-index: 5; }
.bc-hero-cover.menu-open .bc-cover-chip { z-index: 5; }
@media (max-width: 520px) {
  /* The avatar sits over the lower half of the cover on phones */
  .bc-hero-cover .bc-cover-progress { top: 30%; }
  .bc-hero-cover .bc-cover-drag-hint { top: 10px; left: 10px; transform: none; padding: 0 11px; height: 32px; }
  .bc-hero-cover .bc-cover-savebar { top: 10px; right: 10px; bottom: auto; }
}

.bc-cover-hover {
  position: absolute;
  left: 50%;
  top: 44%;
  z-index: 2;
  transform: translate(-50%, -50%) scale(0.96);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  background: rgba(11, 11, 16, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--bc-ease), transform 0.25s var(--bc-ease);
  white-space: nowrap;
}
@media (hover: hover) {
  .bc-hero-cover.is-editable:hover .bc-cover-shade,
  .bc-hero-cover.is-editable:focus-visible .bc-cover-shade { background-color: rgba(11, 11, 16, 0.28); }
  .bc-hero-cover.is-editable:not(.is-busy):not(.is-repositioning):not(.menu-open):hover .bc-cover-hover,
  .bc-hero-cover.is-editable:not(.is-busy):not(.is-repositioning):focus-visible .bc-cover-hover { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Corner chip: always visible on touch, on hover elsewhere */
.bc-cover-chip { position: absolute; top: 12px; right: 12px; z-index: 3; }
.bc-cover-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  font: 600 12.5px/1 var(--bc-font);
  color: #fff;
  background: rgba(11, 11, 16, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  cursor: pointer;
  transition: background 0.2s var(--bc-ease), opacity 0.2s var(--bc-ease);
}
.bc-cover-chip-btn:hover { background: rgba(11, 11, 16, 0.72); }
@media (hover: hover) {
  .bc-cover-chip { opacity: 0; transition: opacity 0.2s var(--bc-ease); }
  .bc-hero-cover:hover .bc-cover-chip,
  .bc-hero-cover:focus-within .bc-cover-chip,
  .bc-hero-cover.menu-open .bc-cover-chip { opacity: 1; }
}
@media (hover: none) {
  .bc-cover-chip-text { display: none; }
  .bc-cover-chip-btn { width: 36px; height: 36px; padding: 0; justify-content: center; font-size: 14px; }
}
.bc-cover-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 190px;
  padding: 6px;
  border-radius: var(--bc-r);
  background: var(--bc-surface);
  box-shadow: var(--bc-shadow-3), 0 0 0 1px var(--bc-line);
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.16s var(--bc-ease), transform 0.2s var(--bc-ease);
}
.bc-hero-cover.menu-open .bc-cover-menu { opacity: 1; transform: none; pointer-events: auto; }
.bc-cover-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--bc-r-sm);
  background: none;
  font: 500 13.5px/1.2 var(--bc-font);
  color: var(--bc-ink);
  text-align: left;
  cursor: pointer;
}
.bc-cover-menu button i { width: 16px; color: var(--bc-muted); text-align: center; }
.bc-cover-menu button:hover, .bc-cover-menu button:focus-visible { background: var(--bc-surface-2); outline: none; }
.bc-cover-menu button.is-danger, .bc-cover-menu button.is-danger i { color: var(--bc-red); }
.bc-hero-cover:not(.has-photo) [data-needs-photo] { display: none; }

/* Upload progress */
.bc-cover-progress {
  position: absolute;
  left: 50%;
  top: 44%;
  z-index: 2;
  transform: translate(-50%, -50%);
  width: min(240px, 60%);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.bc-cover-progress::before {
  content: "";
  position: absolute;
  inset: -12px -16px;
  border-radius: 16px;
  background: rgba(11, 11, 16, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: -1;
}
.bc-cover-progress-bar {
  display: block;
  width: 100%;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.25) linear-gradient(90deg, #fff, #fff) no-repeat 0 0 / var(--p, 0%) 100%;
  transition: background-size 0.2s linear;
}
.bc-cover-progress-label { font-size: 12px; font-weight: 600; color: #fff; }
.bc-hero-cover.is-busy .bc-cover-progress { display: flex; }
.bc-hero-cover.is-busy { cursor: progress; }
.bc-hero-cover.is-busy .bc-cover-chip { display: none; }

/* Reposition mode */
.bc-cover-drag-hint {
  position: absolute;
  left: 50%;
  top: 40%;
  z-index: 2;
  transform: translate(-50%, -50%);
  display: none;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  background: rgba(11, 11, 16, 0.5);
  pointer-events: none;
  white-space: nowrap;
}
.bc-cover-savebar {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: none;
  gap: 6px;
}
.bc-cover-savebar button {
  height: 32px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  font: 600 12.5px/1 var(--bc-font);
  color: #fff;
  background: rgba(11, 11, 16, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  cursor: pointer;
}
.bc-cover-savebar button.is-primary { background: var(--bc-surface); color: var(--bc-ink); box-shadow: var(--bc-shadow-2); }
.bc-hero-cover.is-repositioning { cursor: grab; touch-action: none; }
.bc-hero-cover.is-repositioning.is-dragging { cursor: grabbing; }
.bc-hero-cover.is-repositioning .bc-cover-drag-hint,
.bc-hero-cover.is-repositioning .bc-cover-savebar { display: inline-flex; }
.bc-hero-cover.is-repositioning.is-dragging .bc-cover-drag-hint { opacity: 0; }
.bc-hero-cover.is-repositioning .bc-cover-chip,
.bc-hero-cover.is-repositioning::after { display: none; }
.bc-cover-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Stand-alone preview on the edit-profile picture page */
.bc-cover-editor { position: relative; border-radius: var(--bc-r-lg); overflow: hidden; box-shadow: var(--bc-shadow-2), 0 0 0 1px var(--bc-line); }
.bc-cover-editor .bc-hero-cover { height: 150px; }
.bc-cover-editor-avatar { position: absolute; left: 22px; top: 108px; border-radius: 50%; padding: 4px; background: var(--bc-surface); box-shadow: var(--bc-shadow-2); z-index: 4; pointer-events: none; line-height: 0; }
.bc-cover-editor-avatar img, .bc-cover-editor-avatar > * { margin: 0 !important; }
.bc-cover-editor-foot { height: 40px; background: var(--bc-surface); }
.bc-cover-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.bc-cover-help { font-size: 12.5px; color: var(--bc-muted); margin-top: 10px; }
@media (max-width: 520px) {
  .bc-cover-editor .bc-hero-cover { height: 110px; }
  .bc-cover-editor-avatar { top: 68px; }
}

/* Shared small buttons */
.bc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  font: 600 13.5px/1 var(--bc-font);
  color: var(--bc-ink);
  background: var(--bc-surface-2);
  box-shadow: 0 0 0 1px var(--bc-line-strong) inset;
  cursor: pointer;
  transition: background 0.2s var(--bc-ease), transform 0.2s var(--bc-ease);
}
.bc-btn:hover { background: var(--bc-surface-3); }
.bc-btn:active { transform: scale(0.97); }
.bc-btn.is-primary { color: var(--bc-on-ink); background: var(--bc-ink); box-shadow: none; }
.bc-btn.is-primary:hover { background: #26262e; }
.bc-btn.is-danger { color: var(--bc-red); }
.bc-btn[hidden] { display: none; }

/* ---------- Gallery grid (profile + academy) ---------- */
.bc-gallery-wrap { container-type: inline-size; }
.bc-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 8px;
  margin: 0 0 4px;
}
.bc-gallery--one { grid-template-columns: 1fr; }
.bc-gallery--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bc-gallery-tile {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--bc-r);
  background: var(--bc-surface-2);
  box-shadow: 0 0 0 1px var(--bc-line) inset;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
.bc-gallery--one .bc-gallery-tile { aspect-ratio: 16 / 10; }
.bc-gallery--two .bc-gallery-tile { aspect-ratio: 4 / 5; }
.bc-gallery--bento .bc-gallery-tile:first-child { grid-column: span 2; grid-row: span 2; }
.bc-gallery-tile.is-extra { display: none; }
.bc-gallery-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--bc-ease), filter 0.3s var(--bc-ease);
}
a.bc-gallery-tile { cursor: zoom-in; }
a.bc-gallery-tile:focus-visible { outline: none; box-shadow: var(--bc-ring); }
@media (hover: hover) {
  a.bc-gallery-tile:hover img { transform: scale(1.06); }
  a.bc-gallery-tile:hover .bc-gallery-caption { opacity: 1; transform: none; }
}
.bc-gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 26px 11px 9px;
  font-size: 12px;
  line-height: 1.3;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(11, 11, 16, 0.66));
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s var(--bc-ease), transform 0.25s var(--bc-ease);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
@media (hover: none) {
  .bc-gallery--bento .bc-gallery-tile:first-child .bc-gallery-caption,
  .bc-gallery--one .bc-gallery-caption { opacity: 1; transform: none; }
}
.bc-gallery-tile.has-more img { filter: brightness(0.5) saturate(0.8); }
.bc-gallery-more {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
/* Wide cards: four columns, so the lead photo doesn't take over the page */
@container (min-width: 620px) {
  .bc-gallery--bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.bc-gallery--one .bc-gallery-tile { max-height: 440px; }

/* ---------- Lightbox ---------- */
.bc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  background: rgba(8, 8, 12, 0.96);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  opacity: 0;
  transition: opacity 0.22s var(--bc-ease);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  font-family: var(--bc-font);
}
.bc-lightbox.is-open { opacity: 1; }
.bc-lightbox-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) 14px 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent);
}
.bc-lightbox-counter { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; opacity: 0.85; padding-left: 6px; }
.bc-lightbox-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  font-size: 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 0.2s var(--bc-ease), opacity 0.2s var(--bc-ease);
}
.bc-lightbox-btn:hover { background: rgba(255, 255, 255, 0.2); }
.bc-lightbox-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.bc-lightbox-prev, .bc-lightbox-next { position: absolute; top: 50%; z-index: 3; transform: translateY(-50%); }
.bc-lightbox-prev { left: 14px; }
.bc-lightbox-next { right: 14px; }
.bc-lightbox-btn[disabled] { opacity: 0.25; cursor: default; }
@media (hover: none) {
  .bc-lightbox-prev, .bc-lightbox-next { display: none; }
}
.bc-lightbox-stage { position: relative; flex: 1; overflow: hidden; }
.bc-lightbox-track { position: absolute; inset: 0; display: flex; will-change: transform; }
.bc-lightbox-slide { position: relative; flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 64px 16px 76px; box-sizing: border-box; }
@media (min-width: 768px) { .bc-lightbox-slide { padding: 64px 80px 80px; } }
.bc-lightbox-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  transform-origin: 0 0;
  -webkit-user-drag: none;
  user-select: none;
}
.bc-lightbox-slide img.is-zoomed { border-radius: 0; }
.bc-lightbox-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 18px 20px max(18px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent);
  pointer-events: none;
}
.bc-lightbox-caption:empty { display: none; }
.bc-lightbox.is-zoomed .bc-lightbox-caption,
.bc-lightbox.is-zoomed .bc-lightbox-prev,
.bc-lightbox.is-zoomed .bc-lightbox-next { opacity: 0; pointer-events: none; }
html.bc-lightbox-lock, html.bc-lightbox-lock body { overflow: hidden !important; }

/* ---------- Gallery manager (edit profile → Gallery) ---------- */
.bc-gm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.bc-gm-head h1 { margin: 0 !important; }
.bc-gm-count { font-size: 13px; font-weight: 600; color: var(--bc-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bc-gm-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 28px 18px;
  border: 2px dashed var(--bc-line-strong);
  border-radius: var(--bc-r-lg);
  background: var(--bc-surface-2);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s var(--bc-ease), background 0.2s var(--bc-ease), transform 0.2s var(--bc-ease);
}
.bc-gm-drop:hover, .bc-gm-drop:focus-within { border-color: var(--bc-accent); }
.bc-gm-drop.is-over { border-color: var(--bc-accent); background: color-mix(in srgb, var(--bc-accent) 7%, var(--bc-surface)); transform: scale(1.01); }
.bc-gm-drop.is-disabled { opacity: 0.55; cursor: not-allowed; }
.bc-gm-drop-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--bc-accent);
  background: var(--bc-surface);
  box-shadow: var(--bc-shadow-2);
  margin-bottom: 4px;
}
.bc-gm-drop strong { font-size: 15px; color: var(--bc-ink); }
.bc-gm-drop span { font-size: 12.5px; color: var(--bc-muted); }
.bc-gm-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.bc-gm-drop-desktop { display: none; }
@media (hover: hover) and (pointer: fine) { .bc-gm-drop-desktop { display: inline; } .bc-gm-drop-touch { display: none; } }

.bc-gm-queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 12px; }
.bc-gm-queue:empty { display: none; }
.bc-gm-q {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--bc-r-sm);
  overflow: hidden;
  background: var(--bc-surface-3) center / cover no-repeat;
  box-shadow: 0 0 0 1px var(--bc-line) inset;
}
.bc-gm-q::before { content: ""; position: absolute; inset: 0; background: rgba(11, 11, 16, 0.45); transition: background 0.3s var(--bc-ease); }
.bc-gm-q-label { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; font-size: 12px; font-weight: 700; color: #fff; padding: 0 6px; }
.bc-gm-q-bar { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 4px; border-radius: 9px; background: rgba(255, 255, 255, 0.3) linear-gradient(#fff, #fff) no-repeat 0 0 / var(--p, 0%) 100%; transition: background-size 0.2s linear; }
.bc-gm-q.is-done::before { background: rgba(22, 163, 74, 0.35); }
.bc-gm-q.is-done .bc-gm-q-bar { display: none; }
.bc-gm-q.is-error::before { background: rgba(225, 29, 72, 0.72); }
.bc-gm-q.is-error .bc-gm-q-bar { display: none; }
.bc-gm-q.is-error .bc-gm-q-label { font-size: 10.5px; font-weight: 600; line-height: 1.25; }

.bc-gm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
@media (max-width: 520px) { .bc-gm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.bc-gm-item { position: relative; display: flex; flex-direction: column; gap: 6px; transition: opacity 0.2s var(--bc-ease), transform 0.2s var(--bc-ease); }
.bc-gm-item.is-removing { opacity: 0; transform: scale(0.92); }
.bc-gm-item.is-dragging { opacity: 0.35; }
.bc-gm-ghost { position: fixed; z-index: 10000; pointer-events: none; opacity: 0.92; transform: rotate(2deg) scale(1.04); box-shadow: var(--bc-shadow-3); border-radius: var(--bc-r); overflow: hidden; }
.bc-gm-thumb { position: relative; aspect-ratio: 1; border-radius: var(--bc-r); overflow: hidden; background: var(--bc-surface-2); box-shadow: 0 0 0 1px var(--bc-line) inset; }
.bc-gm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; transition: transform 0.35s var(--bc-ease); }
.bc-gm-item.is-busy .bc-gm-thumb img { opacity: 0.5; }
.bc-gm-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; z-index: 1; }
.bc-gm-handle { position: absolute; top: 8px; left: 8px; z-index: 1; cursor: grab; touch-action: none; }
.bc-gm-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  font-size: 13px;
  color: #fff;
  background: rgba(11, 11, 16, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  cursor: pointer;
  transition: background 0.2s var(--bc-ease), opacity 0.2s var(--bc-ease), transform 0.2s var(--bc-ease);
}
.bc-gm-icon:hover { background: rgba(11, 11, 16, 0.8); }
.bc-gm-icon.is-danger:hover { background: var(--bc-red); }
.bc-gm-icon:active { transform: scale(0.92); }
@media (hover: hover) and (pointer: fine) {
  .bc-gm-tools, .bc-gm-handle { opacity: 0; transition: opacity 0.2s var(--bc-ease); }
  .bc-gm-item:hover .bc-gm-tools, .bc-gm-item:hover .bc-gm-handle,
  .bc-gm-item:focus-within .bc-gm-tools, .bc-gm-item:focus-within .bc-gm-handle { opacity: 1; }
}
.bc-gm-desc {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--bc-r-sm);
  font: 13px/1 var(--bc-font);
  color: var(--bc-ink);
  background: transparent;
  box-shadow: 0 0 0 1px transparent inset;
  transition: box-shadow 0.2s var(--bc-ease), background 0.2s var(--bc-ease);
}
.bc-gm-desc::placeholder { color: var(--bc-faint); }
.bc-gm-desc:hover { background: var(--bc-surface-2); }
.bc-gm-desc:focus { outline: none; background: var(--bc-surface); box-shadow: 0 0 0 1px var(--bc-accent) inset, var(--bc-ring); }
.bc-gm-desc.is-saved { box-shadow: 0 0 0 1px var(--bc-green) inset; }
.bc-gm-empty { padding: 28px 0 10px; text-align: center; color: var(--bc-muted); font-size: 14px; }
.bc-gm-hint { font-size: 12.5px; color: var(--bc-muted); margin: -4px 0 14px; }

/* The edit-profile preview has its own buttons below */
.bc-cover-editor .bc-cover-chip { display: none; }

/* One label only: hover says "Change cover" in the middle; the corner chip is a small
   options button (reposition / remove), shown on desktop only when there is a photo.
   On touch there is no hover, so the chip is a camera icon that is always visible. */
.bc-cover-chip-btn { width: 34px; padding: 0; justify-content: center; font-size: 14px; }
.bc-chip-touch { display: none; }
@media (hover: none) {
  .bc-chip-touch { display: inline; }
  .bc-chip-mouse { display: none; }
}
@media (hover: hover) {
  .bc-hero-cover:not(.has-photo) .bc-cover-chip { display: none; }
  .bc-cover-menu [data-cover-action="pick"] { display: none; }
}

/* ---------- Rotate a photo (scripts/bc-rotate.js, owner / moderators only) ---------- */
.bc-lightbox-tools { display: inline-flex; align-items: center; gap: 8px; }
.bc-lightbox-rot { display: inline-flex; gap: 8px; padding-right: 8px; margin-right: 2px; border-right: 1px solid rgba(255, 255, 255, 0.18); }
.bc-lightbox-rot[hidden] { display: none; }
/* Busy: a spinner over the photo while the server writes the turned copy */
.bc-rot-busy { position: relative; }
.bc-rot-busy::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  animation: bc-rot-spin 0.8s linear infinite;
  pointer-events: none;
}
.bc-rot-busy [data-bc-rotate], .bc-rot-busy [data-gm-action="rotate"] { opacity: 0.5; pointer-events: none; }
@keyframes bc-rot-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bc-rot-busy::after { animation-duration: 2.4s; } }
/* Round buttons for a photo (settings picture, promotion slot) */
.bc-rot-bar { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.bc-rot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--bc-border, rgba(0, 0, 0, 0.12));
  border-radius: 999px;
  background: var(--bc-surface, #fff);
  color: var(--bc-text, #1b1b1f);
  font: 600 13px/1 var(--bc-font, inherit);
  cursor: pointer;
  transition: background 0.2s var(--bc-ease), border-color 0.2s var(--bc-ease), color 0.2s var(--bc-ease);
}
.bc-rot-btn:hover { border-color: var(--bc-accent, #3b6cf6); color: var(--bc-accent, #3b6cf6); }
.bc-rot-btn:focus-visible { outline: none; box-shadow: var(--bc-ring, 0 0 0 3px rgba(59, 108, 246, 0.35)); }
.bc-rot-btn i { font-size: 14px; }
.bc-rot-btn.is-overlay {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.bc-rot-btn.is-overlay::before { content: ""; position: absolute; inset: -7px; } /* 44px tap target */
.bc-rot-btn.is-overlay { position: relative; }
.bc-rot-btn.is-overlay:hover { background: var(--bc-accent, #3b6cf6); color: #fff; }
