/* 0.62 «Букет» (club-bouquets.js, the pictures club-bouquets-art.js): the bouquet from painted layers, its card in the
   shop, the arrival, «Мои цветы» on the profile and a bouquet large. Phones first; reduced motion: no sway. */

/* --- The picture: layers in a 4:5 box; paper and bow take their colour under their own mask ---------------------- */
.bq { position: relative; display: inline-block; flex: none; width: var(--bq, 120px); aspect-ratio: 4 / 5; vertical-align: middle; isolation: isolate; }
.bq > i { position: absolute; display: block; background-position: center; background-repeat: no-repeat; background-size: contain; pointer-events: none; }
.bq-t { background-image: var(--img), linear-gradient(var(--c), var(--c)); background-size: contain, cover; background-position: center; background-repeat: no-repeat; background-blend-mode: multiply;
  -webkit-mask: var(--img) center / contain no-repeat; mask: var(--img) center / contain no-repeat; }
.bq-back { left: 2%; top: 15%; width: 96%; height: 77%; }
.bq-green { left: 6%; top: 1%; width: 88%; height: 66%; }
.bq-h { width: 44%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(var(--k, 1)); filter: drop-shadow(0 2px 2px rgba(40, 20, 30, .28)); }
.bq-front { left: 22%; top: 41%; width: 56%; height: 58%; }
.bq-bow { left: 30%; top: 63%; width: 40%; height: 32%; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.bq[data-n="1"] .bq-green, .bq[data-n="2"] .bq-green { left: 12%; width: 76%; }
/* Dried after a week: the same bouquet, faded warm, its heads a little bowed — kept, smaller where it stands. */
.bq.dry { filter: sepia(.55) saturate(.62) hue-rotate(-8deg) brightness(.97) contrast(.96); }
.bq.dry .bq-h { transform: translate(-50%, -46%) rotate(calc(var(--r, 0deg) * 1.5 + 6deg)) scale(calc(var(--k, 1) * .92)); }
.bq-one { display: inline-block; flex: none; background: center / contain no-repeat; }
.bq-sw { display: inline-block; flex: none; width: 34px; height: 34px; }

/* --- The shop's card ------------------------------------------------------------------------------------------------- */
.bq-shop .bq-k { display: flex; justify-content: space-between; gap: 8px; margin: 14px 0 6px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.bq-shop .bq-k small { font-weight: 600; letter-spacing: 0; text-transform: none; }
.bq-stage { display: flex; align-items: flex-end; justify-content: center; gap: 14px; min-height: 196px; padding: 8px 6px 4px; border-radius: 14px; background: radial-gradient(ellipse at 50% 85%, rgba(255, 214, 170, .16), transparent 70%); }
.bq-stage .bq { animation: bqSway 5s ease-in-out infinite alternate; transform-origin: 50% 95%; }
@keyframes bqSway { from { transform: rotate(-1.5deg); } to { transform: rotate(1.5deg); } }
.bq-stems { display: flex; flex-wrap: wrap; gap: 6px; min-height: 44px; }
.bq-stem { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px 0 4px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255, 255, 255, .05); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.bq-stem b { color: var(--muted); font-size: 16px; font-weight: 400; }
.bq-stem:hover, .bq-stem:focus-visible { border-color: rgba(255, 140, 140, .6); }
.bq-empty { display: flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 13px; }
.bq-picks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.bq-pick, .bq-chip { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; min-height: 44px; margin: 0; padding: 4px 2px 5px; border: 2px solid transparent; border-radius: 10px; background: rgba(255, 255, 255, .04); color: var(--text); font: inherit; font-size: 11.5px; line-height: 1.15; cursor: pointer; }
.bq-pick span, .bq-chip span { max-width: 100%; overflow: hidden; text-align: center; white-space: nowrap; text-overflow: ellipsis; }
.bq-pick:hover, .bq-chip:hover { background: rgba(255, 255, 255, .08); }
.bq-pick:disabled { opacity: .45; cursor: default; }
.bq-pick em { position: absolute; top: 2px; right: 4px; min-width: 18px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #1a1205; font-size: 11px; font-style: normal; font-weight: 800; line-height: 18px; }
.bq-chips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.bq-chip[aria-pressed="true"] { border-color: var(--accent); background: rgba(255, 255, 255, .08); }
.bq-pick:focus-visible, .bq-chip:focus-visible, .bq-stem:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bq-shop .pcard-q, .bq-shop .bq-note { box-sizing: border-box; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; font-size: 15px; }
.bq-shop .bq-note:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.bq-count { display: flex; justify-content: space-between; gap: 8px; min-height: 16px; margin-top: 4px; color: var(--muted); font-size: 12px; }
.bq-why, .bq-count.over .bq-n { color: #ff8f8f; }
.bq-today { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
/* The tile: a small bouquet. */
.bq-tile { display: flex; align-items: flex-end; justify-content: center; width: 84px; height: 84px; }
/* «Букет» beside the name on somebody else's profile (the look of «Открытка» beside it). */
.pp-sub .bq-pp-send { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; min-height: 32px; padding: 0 10px 0 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.pp-sub .bq-pp-send:hover, .pp-sub .bq-pp-send:focus-visible { border-color: var(--accent); }

/* --- «Мои цветы» on the profile: fresh ones tall, dried ones small after them ------------------------------------- */
.bq-pp { margin: 14px 0 2px; }
.bq-pp-h { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; }
.bq-pp-h b { color: var(--muted); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.bq-pp-h span { color: var(--muted); font-size: 12px; }
.bq-pp-row { display: flex; align-items: flex-end; gap: 6px; padding: 4px 2px 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; }
.bq-thumb { position: relative; display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; width: 92px; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; cursor: pointer; scroll-snap-align: start; }
.bq-thumb.bq-dried { width: 64px; }
.bq-thumb .bq { transition: transform .18s ease; }
.bq-thumb:hover .bq, .bq-thumb:focus-visible .bq { transform: translateY(-2px) rotate(-1.5deg); }
.bq-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bq-thumb-by { display: block; max-width: 100%; margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.bq-hid .bq { opacity: .42; filter: grayscale(.6); }
.bq-thumb-h { position: absolute; top: 4px; left: 4px; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 10.5px; font-style: normal; }

/* --- The arrival (bottom right; a bottom sheet on a phone) and a bouquet large ---------------------------------------- */
.bq-in { position: fixed; right: 20px; bottom: 20px; z-index: 2350; box-sizing: border-box; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; width: 360px; max-width: calc(100vw - 20px); padding: 14px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 18px; background: var(--panel-2); color: var(--text); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); animation: bqIn .42s cubic-bezier(.2, .9, .3, 1.2) both; }
.bq-in .bq { grid-row: 1 / span 3; }
.bq-in-t { margin: 0; font-size: 16px; line-height: 1.25; }
.bq-in q, .bq-view q { display: block; margin: 0; color: var(--text); font-size: 14px; font-style: italic; line-height: 1.35; overflow-wrap: anywhere; }
.bq-in q::before, .bq-in q::after, .bq-view q::before, .bq-view q::after { content: none; }
.bq-off { color: var(--muted); font-size: 12.5px; }
.bq-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.bq-in .bq-acts { grid-column: 2; }
.bq-ok { flex: 1 1 auto; min-height: 44px; padding: 0 16px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent); color: #1a1205; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.bq-sec { flex: 0 1 auto; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .06); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.bq-sec:hover { background: rgba(255, 255, 255, .1); }
.bq-ok:disabled, .bq-sec:disabled { opacity: .6; cursor: default; }
.bq-danger { border-color: rgba(255, 120, 120, .4); color: #ffa3a3; }
.bq-in.bq-out { pointer-events: none; animation: bqOut .26s ease both; }
@keyframes bqIn { from { opacity: 0; transform: translateY(30px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes bqOut { to { opacity: 0; transform: translateY(20px); } }
.bq-modal.stats-modal { padding: 20px; }
.bq-view { box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(420px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 14px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 18px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); color: var(--text); }
.bq-view-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.bq-view-top b { font-size: 16px; }
.bq-view-x { width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 24px; cursor: pointer; }
.bq-view-x:hover, .bq-view-x:focus-visible { background: var(--line); color: var(--text); }
.bq-view-date { color: var(--muted); font-size: 12.5px; text-align: center; }
.bq-view .bq-acts { justify-content: center; width: 100%; }
@media (max-width: 600px) {
  .bq-in { right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); left: 10px; width: auto; max-width: none; }
  .bq-picks { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .bq-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .bq-stage .bq, .bq-in { animation: none; }
  .bq-in.bq-out { animation: none; opacity: 0; }
  .bq-thumb .bq { transition: none; }
}
