/* The mascot variant (site-mascot): «Паспортик» and its speech bubbles. Copied into site-mascot/assets by
   node site-src/build.mjs --mascot; the main site does not load it. The mascot keeps to two places, so it never
   covers a picture or the words: one hint under each page's first buttons, and the home page's four steps. */

/* the speech bubble: one card of plain words, the mascot's name over them, a tail toward the mascot */
.bubble {
  position: relative; display: grid; gap: var(--s-1); padding: var(--s-3) var(--s-4);
  background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
}
.bubble p { margin: 0; }
.bubble__who { font-size: var(--t-label); font-weight: 500; color: var(--accent); letter-spacing: 0.02em; }
.bubble__say { font-size: var(--t-small); line-height: 1.45; }
.bubble__who + .bubble__say { margin-top: 2px; }

/* the hero's hint: the bubble, then the mascot at its right, the tail between them.
   A laptop with room (1024px wide, 850px tall and more) shows it under the buttons, beside the words;
   a smaller screen shows it at the foot of the map instead of the map's fact card, so it never pushes the words */
.mascot-tip { display: flex; align-items: flex-end; gap: var(--s-2); }
.mascot-tip > .bubble { flex: 1 1 auto; }
.mascot-tip > .bubble::after {
  content: ""; position: absolute; right: -8px; bottom: 22px; width: 14px; height: 14px; background: var(--bg);
  border-top: 1px solid var(--line); border-right: 1px solid var(--line); transform: rotate(45deg);
}
.mascot-tip > .mascot { flex: none; height: auto; }
.hero__text > .mascot-tip--text { display: none; }
.hero__media > .ly-float--with-tip { display: none; }
.hero__media > .mascot-tip--media { position: absolute; z-index: 2; left: var(--s-4); right: var(--s-3); bottom: var(--s-3); }
.mascot-tip--media > .bubble { max-width: 340px; margin-bottom: var(--s-4); }
.hero__media > .mascot-tip--media > .mascot { width: 92px; inset: auto; position: static; }
@media (max-width: 639px) { .hero__media > .mascot-tip--media > .mascot { width: 86px; } }
@media (min-width: 1024px) and (min-height: 850px) {
  .hero__text > .mascot-tip--text { display: flex; margin-top: var(--s-6); max-width: 500px; }
  .mascot-tip--text > .bubble { margin-bottom: var(--s-6); background: var(--surface); border-color: transparent; }
  .mascot-tip--text > .bubble::after { background: var(--surface); border-color: transparent; }
  .mascot-tip--text > .mascot { width: 150px; }
  .hero__media > .mascot-tip--media { display: none; }
  .hero__media > .ly-float--with-tip { display: grid; }
}

/* the four steps: the mascot does each one, on the mint, the step's card is its bubble */
.pc-visual--mascot { background: #eaf0eb; }
[data-moment="pinned-chapters"] .pc-visual--mascot > img { object-fit: contain; object-position: 50% 100%; padding: 8% 5% 5% 50%; background: #eaf0eb; }
[data-moment="pinned-chapters"]:not(.is-live) .pc-visual--mascot > img { padding: 5%; object-position: 50% 50%; }
.pc-visual--mascot > .pc-card {
  top: var(--s-5); bottom: auto; width: min(calc(48% - var(--s-5)), 340px);
  background: #ffffff; color: #17231b; border-color: #d9e2da; border-radius: 14px;
}
.pc-visual--mascot > .pc-card .t-label { color: #465642; }
.pc-visual--mascot > .pc-card::after {
  content: ""; position: absolute; width: 14px; height: 14px; background: #ffffff;
  border-top: 1px solid #d9e2da; border-right: 1px solid #d9e2da; right: -8px; top: 60%; transform: rotate(45deg);
}
