/* Turu's cry (public/turu.js): Sally's and henry's button in the composer and the HRRRHAHH bubble.
   Turu's own colours, the same in light and dark: wing violet, night-back violet, beak orange, mouth pink, tooth white. */
:root { --turu: #5b3a9c; --turu-night: #241640; --turu-beak: #e8892c; --turu-gum: #f2708c; --turu-tooth: #fffaf2; }

/* the button: Turu's head in profile on a violet disk, beside the field like Send */
.turu-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; background: var(--turu); overflow: hidden;
  display: grid; place-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.turu-btn[hidden] { display: none; }
.turu-btn svg { width: 38px; height: 38px; margin-top: 4px; }
.turu-btn .tb-skull { fill: #8e6ad8; }
.turu-btn .tb-crest { fill: var(--turu-night); }
.turu-btn .tb-beak { fill: var(--turu-beak); }
.turu-btn .tb-mouth { fill: var(--turu-gum); }
.turu-btn .tb-tooth, .turu-btn .tb-eye { fill: var(--turu-tooth); }
.turu-btn .tb-pupil { fill: var(--turu-night); }
.turu-btn .tb-brow { fill: none; stroke: var(--turu-night); stroke-width: 1.7; stroke-linecap: round; }
.turu-btn .tb-jaw { transform-origin: 19px 23px; transition: transform .12s ease-out; }
.turu-btn:focus-visible { outline: 3px solid var(--signal, #ffc53d); outline-offset: 2px; }
/* pressed: the bill gapes and the head shudders for as long as the cry lasts */
.turu-btn.cry .tb-jaw { transform: rotate(24deg); }
.turu-btn.cry svg { animation: turu-shudder .09s linear 14; }
@keyframes turu-shudder { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-1px, .6px); } 75% { transform: translate(1px, -.6px); } }

/* the message: his open mouth, beak-orange rim, a row of fangs top and bottom, the cry in night violet */
.msg .bubble.turu, .msg.own .bubble.turu { position: relative; background: var(--turu-gum); color: var(--turu-night);
  border: 3px solid var(--turu-beak); padding: 17px 18px 17px; font-weight: 700; font-size: 26px; line-height: 1;
  letter-spacing: .06em; box-shadow: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.msg .bubble.turu::before, .msg .bubble.turu::after { content: ''; position: absolute; left: 9px; right: 9px; height: 8px;
  pointer-events: none; background-repeat: repeat-x; background-size: 13px 8px; }
.msg .bubble.turu::before { top: 0; background-image: conic-gradient(from -40deg at 50% 100%, var(--turu-tooth) 80deg, transparent 0); }
.msg .bubble.turu::after { bottom: 0; background-image: conic-gradient(from 140deg at 50% 0, var(--turu-tooth) 80deg, transparent 0); }
/* arriving (and tapped): the letters stretch out with the cry and settle back */
.msg .bubble.turu.roar { animation: turu-roar 1.4s cubic-bezier(.2, .8, .3, 1); }
@keyframes turu-roar { 0% { letter-spacing: .06em; } 12% { letter-spacing: .32em; } 55% { letter-spacing: .2em; } 100% { letter-spacing: .06em; } }
html.big-text .msg .bubble.turu { font-size: 29px; }

@media (prefers-reduced-motion: reduce) {
  .turu-btn.cry svg, .msg .bubble.turu.roar { animation: none; }
}
