/* ═══════════════════════════════════════════════════════════════════════
   shared/hb-moments.css — "Lahzalar" (tug'ilgan kun / e'tirof salyuti,
   jarima xabari), tabrik yuborish oynasi va tabriklar devori
   (2026-09-26, mobil wave 3 "Contract A"). Mantiq: hb-moments.js.
   Ranglar faqat hb-tokens.css o'zgaruvchilaridan; qaymoq/kulrang fon yo'q.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Bayram oynasi (butun ekran) ─────────────────────────────────────── */
.hbm-ov {
  position: fixed; inset: 0; z-index: 1300;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: radial-gradient(120% 90% at 50% 30%, rgba(20, 24, 60, .82), rgba(4, 6, 16, .92));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: hbm-fade .25s ease both; }
.hbm-fx, .hbm-shower { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hbm-card {
  position: relative; width: 100%; max-width: 400px;
  background: var(--hb-sfc); color: var(--hb-txt);
  border: 1px solid var(--hb-brd); border-radius: var(--hb-radius);
  box-shadow: var(--hb-shadow-xl, var(--hb-shadow));
  padding: 28px 22px 20px; text-align: center;
  animation: hbm-pop .45s cubic-bezier(.2, .9, .3, 1.25) both; }
.hbm-hero { display: flex; justify-content: center; margin: -4px 0 12px; }
.hbm-hero img.hbm-sticker { width: 132px; height: 132px; object-fit: contain; }
.hbm-hero .hb-avatar { width: 104px; height: 104px; font-size: 34px;
  box-shadow: 0 0 0 4px var(--hb-sfc), 0 0 0 7px var(--hb-acc); }
.hbm-hero-wrap { position: relative; display: inline-block; }
.hbm-hero-wrap img.hbm-badge { position: absolute; right: -22px; bottom: -10px; width: 64px; height: 64px; }
.hbm-title { font-size: 21px; font-weight: 800; line-height: 1.25; margin: 0 0 8px; }
.hbm-msg { font-size: 14px; line-height: 1.5; color: var(--hb-mut); margin: 0 0 14px; white-space: pre-line; }
.hbm-meta { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.hbm-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: var(--hb-pill); font-weight: 700; font-size: 13px;
  background: rgba(var(--hb-acc-rgb), .14); color: var(--hb-acc-text); }
.hbm-by { display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; color: var(--hb-mut); margin: -4px 0 16px; }
.hbm-by .hb-avatar { width: 28px; height: 28px; font-size: 11px; }
.hbm-actions { display: flex; flex-direction: column; gap: 8px; }
.hbm-actions > * { width: 100%; justify-content: center; }

@keyframes hbm-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes hbm-pop { from { opacity: 0; transform: scale(.86) translateY(14px) } to { opacity: 1; transform: none } }

/* ── Jarima — vazmin oyna (UI.openModal ichida) ──────────────────────── */
.hbm-fine { display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.hbm-fine-reason { line-height: 1.5; }
.hbm-fine-rows { display: flex; flex-direction: column; gap: 6px;
  border: 1px solid var(--hb-brd); border-radius: var(--hb-radius-sm); padding: 10px 12px; }
.hbm-fine-row { display: flex; justify-content: space-between; gap: 12px; }
.hbm-fine-row span:first-child { color: var(--hb-mut); }
.hbm-fine-row b { font-weight: 700; }

/* ── Tabrik yuborish oynasi ──────────────────────────────────────────── */
.hbm-comp { display: flex; flex-direction: column; gap: 12px; }
.hbm-comp .hb-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.hbm-comp .hb-tabs::-webkit-scrollbar { display: none; }
.hbm-comp .hb-tab { white-space: nowrap; flex: none; }
.hbm-pane[hidden] { display: none !important; }
.hbm-pane { display: flex; flex-direction: column; gap: 10px; }
.hbm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hbm-chip { border: 1px solid var(--hb-brd); background: var(--hb-sfc2); color: var(--hb-txt);
  border-radius: var(--hb-pill); padding: 6px 12px; font: inherit; font-size: 12.5px;
  cursor: pointer; text-align: left; }
.hbm-chip:hover { border-color: var(--hb-acc); }
.hbm-ta { width: 100%; min-height: 96px; resize: vertical; }
.hbm-count { font-size: 11.5px; color: var(--hb-mut); text-align: right; margin-top: -6px; }
.hbm-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.hbm-grid.hbm-grid-gif { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.hbm-grid.hbm-grid-card { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.hbm-grid.hbm-grid-emoji { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
.hbm-tile { position: relative; border: 2px solid transparent; background: var(--hb-sfc2);
  border-radius: var(--hb-radius-sm); padding: 4px; cursor: pointer; aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center; overflow: hidden; font: inherit; }
.hbm-tile img { width: 100%; height: 100%; object-fit: contain; }
.hbm-grid-gif .hbm-tile, .hbm-grid-card .hbm-tile { aspect-ratio: 3 / 2; padding: 0; }
.hbm-grid-gif .hbm-tile img, .hbm-grid-card .hbm-tile img { object-fit: cover; }
.hbm-grid-emoji .hbm-tile { font-size: 24px; padding: 0; }
.hbm-tile.on { border-color: var(--hb-acc); box-shadow: 0 0 0 3px rgba(var(--hb-acc-rgb), .22); }
.hbm-tile-cap { position: absolute; left: 6px; bottom: 5px; font-size: 11px; font-weight: 700;
  color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.hbm-emoji-pick { min-height: 44px; display: flex; align-items: center; gap: 8px;
  border: 1px dashed var(--hb-brd2); border-radius: var(--hb-radius-sm); padding: 6px 10px; }
.hbm-emoji-pick .hbm-emoji-val { font-size: 28px; flex: 1; letter-spacing: 2px; }
.hbm-empty-hint { color: var(--hb-mut); font-size: 12.5px; flex: 1; }

/* Kartochka ko'rinishi (oldindan ko'rish va devorda) */
.hbm-cardview { position: relative; border-radius: var(--hb-radius-sm); overflow: hidden;
  aspect-ratio: 3 / 2; background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center; padding: 14% 18%; }
.hbm-cardview-txt { font-weight: 700; font-size: 15px; line-height: 1.4; text-align: center;
  white-space: pre-line; overflow-wrap: anywhere; }

/* Chizish doskasi */
.hbm-draw-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hbm-sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--hb-sfc);
  box-shadow: 0 0 0 1px var(--hb-brd2); cursor: pointer; padding: 0; }
.hbm-sw.on { box-shadow: 0 0 0 2px var(--hb-acc); }
.hbm-size { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--hb-brd);
  background: var(--hb-sfc2); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; }
.hbm-size i { display: block; border-radius: 50%; background: var(--hb-txt); }
.hbm-size.on { border-color: var(--hb-acc); box-shadow: 0 0 0 2px rgba(var(--hb-acc-rgb), .25); }
.hbm-tool { height: 32px; padding: 0 10px; border-radius: var(--hb-pill); border: 1px solid var(--hb-brd);
  background: var(--hb-sfc2); color: var(--hb-txt); font: inherit; font-size: 12.5px; cursor: pointer; }
.hbm-tool.on { border-color: var(--hb-acc); color: var(--hb-acc-text); }
.hbm-sep { width: 1px; height: 22px; background: var(--hb-brd); margin: 0 2px; }
.hbm-canvas { width: 100%; aspect-ratio: 4 / 3; background: #fff; border-radius: var(--hb-radius-sm);
  border: 1px solid var(--hb-brd); touch-action: none; cursor: crosshair; display: block; }

/* Rasm yuklash */
.hbm-photo-drop { border: 1px dashed var(--hb-brd2); border-radius: var(--hb-radius-sm);
  padding: 18px; text-align: center; color: var(--hb-mut); cursor: pointer; }
.hbm-photo-drop img { max-width: 100%; max-height: 320px; border-radius: var(--hb-radius-sm); display: block; margin: 0 auto; }

/* ── Tabriklar devori ────────────────────────────────────────────────── */
.hbm-wall-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.hbm-wall-head .hb-avatar { width: 56px; height: 56px; font-size: 18px; }
.hbm-wall-name { font-weight: 800; font-size: 16px; }
.hbm-wall-sub { color: var(--hb-mut); font-size: 12.5px; margin-top: 2px; }
.hbm-wall-list { display: flex; flex-direction: column; gap: 10px; }
.hbm-g { border: 1px solid var(--hb-brd); border-radius: var(--hb-radius-sm); padding: 10px 12px;
  background: var(--hb-sfc); }
.hbm-g-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.hbm-g-top .hb-avatar { width: 30px; height: 30px; font-size: 11px; }
.hbm-g-name { font-weight: 700; font-size: 13px; flex: 1; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.hbm-g-time { color: var(--hb-mut); font-size: 11.5px; }
.hbm-g-text { font-size: 14px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.hbm-g-emoji { font-size: 34px; letter-spacing: 3px; }
.hbm-g-img { display: block; max-width: 100%; max-height: 320px; border-radius: var(--hb-radius-sm); }
.hbm-g-sticker { width: 120px; height: 120px; object-fit: contain; }
.hbm-g-drawing { background: #fff; }
.hbm-wall-empty { color: var(--hb-mut); text-align: center; padding: 24px 8px; font-size: 13.5px; }

@media (max-width: 560px) {
  .hbm-card { padding: 24px 16px 16px; }
  .hbm-title { font-size: 19px; }
  .hbm-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .hbm-ov, .hbm-card { animation: none; }
}
