/* The busy evening on ehtii.fi: the owner's phone in the middle, and
   customers' phones floating around it, booking at the same time in their
   own languages (rush.js). The owner's phone is the app at night; the
   customers' are the booking page. */

.rush { margin: 0 auto 8px; }
/* Wider than the page's column, so the customers float beside the owner. */
.rush-stage { position: relative; width: min(1000px, calc(100vw - 32px)); height: 720px; left: 50%; translate: -50% 0; }
.rush .phone { position: absolute; display: flex; flex-direction: column; overflow: hidden; border: 9px solid #000; border-radius: 38px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45); font-size: 14px; line-height: 1.45; }
.rush .phone-status { display: flex; justify-content: space-between; padding: 8px 18px 4px; font-size: 11px; font-weight: 600; }
.rush .phone-top { padding: 4px 14px 10px; text-align: center; }
.rush .phone-top strong { display: block; font-size: 15px; }
.rush .phone-top span { font-size: 12px; }
.rush .body { flex: 1; overflow: hidden; padding: 10px; display: flex; flex-direction: column; gap: 7px; }
.rush .body > :first-child { margin-top: auto; }
.rush .foot { display: flex; gap: 6px; padding: 8px 10px 14px; align-items: center; }
.rush .field { flex: 1; min-height: 36px; padding: 8px 12px; border-radius: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rush .send { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.rush .msg { margin: 0; max-width: 86%; padding: 7px 11px; border-radius: 14px; animation: r-in .25s ease-out; }
.rush .msg.me { align-self: flex-end; border-bottom-right-radius: 4px; }
.rush .msg.bot { align-self: flex-start; border-bottom-left-radius: 4px; }
.rush .dots { display: flex; gap: 4px; padding: 11px 12px; }
.rush .dots i { width: 6px; height: 6px; border-radius: 50%; background: #9a93a1; animation: r-dot 1.2s infinite; }
.rush .dots i:nth-child(2) { animation-delay: .15s; }
.rush .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes r-dot { 0%, 60%, 100% { opacity: .3 } 30% { opacity: 1; transform: translateY(-3px) } }
@keyframes r-in { from { opacity: 0; transform: translateY(6px) } }
.rush .chips { display: flex; flex-wrap: wrap; gap: 5px; animation: r-in .3s ease-out; }
.rush .chip { border: 1px solid var(--acc); color: var(--acc); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.rush .chip.on { background: var(--acc); color: #fff; }
.rush .card { align-self: stretch; padding: 8px 10px; border: 1px solid #e7e3ea; border-left: 4px solid var(--acc); border-radius: 10px; background: #fff; font-size: 13px; animation: r-in .3s; }
.rush .card b { display: block; }

/* A customer's phone: the business's booking page. */
.rush .customer { --acc: #3f7a6c; width: 270px; height: 470px; background: #faf9fb; color: #2b2730; }
.rush .customer .phone-top { background: #fff; border-bottom: 1px solid #e7e3ea; }
.rush .customer .url { margin: 0 auto 4px; width: fit-content; padding: 1px 9px; border-radius: 999px; background: #f0edf2; color: #8a8290; font-size: 10px; }
.rush .customer .phone-top span { color: #8a8290; }
.rush .customer .foot { background: #fff; border-top: 1px solid #e7e3ea; }
.rush .customer .field { border: 1px solid #e7e3ea; color: #2b2730; }
.rush .customer .field:empty::before { content: attr(data-ph); color: #a49dab; }
.rush .customer .send { background: var(--acc); color: #fff; }
.rush .customer .msg.me { background: var(--acc); color: #fff; }
.rush .customer .msg.bot { background: #f3f0f6; }
.rush .flag { position: absolute; top: 46px; right: 12px; font-size: 18px; }

/* The owner's phone: the app, at night. */
.rush .owner { --acc: #7ee0c3; width: 340px; height: 660px; left: calc(50% - 170px); top: 0; z-index: 2; background: #0e1412; color: #e4efeb;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(126, 224, 195, .15), 0 0 80px rgba(126, 224, 195, .12); }
.rush .owner .phone-top span { color: #8fa39d; }
.rush .owner .foot { border-top: 1px solid #1f2a27; }
.rush .owner .field { border: 1.5px solid #7ee0c3; color: #8fa39d; }
.rush .owner .send, .rush .owner .msg.me { background: linear-gradient(135deg, #7ee0c3, #b9f3e0); color: #0b1714; }
.rush .owner .msg.bot { background: #1b2422; }
.rush .owner .chip.on { color: #0b1714; }
.rush .day { align-self: stretch; padding: 10px; border: 1px solid #25312e; border-radius: 12px; background: #141c1a; animation: r-in .3s; }
.rush .day header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.rush .day header span { color: #8fa39d; font-size: 11px; }
.rush .day ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.rush .day li { border: 1px solid #25312e; border-left: 4px solid #7ee0c3; border-radius: 8px; padding: 4px 8px; font-size: 12px; }
.rush .day li b { display: block; }
.rush .day li span { color: #8fa39d; }
.rush .day li.free { border-style: dashed; border-left-color: #25312e; color: #6f817c; }
.rush .day li.new { animation: r-fill 2.4s ease-out; }
@keyframes r-fill { 0% { background: rgba(126, 224, 195, .35); transform: scale(.94) } 25% { transform: none } 100% { background: transparent } }
.rush .banner { position: absolute; z-index: 3; top: 30px; left: 8px; right: 8px; padding: 9px 11px; border-radius: 14px;
  background: rgba(32, 40, 38, .97); color: #e4efeb; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); font-size: 12px; display: flex; gap: 9px;
  transform: translateY(calc(-100% - 40px)); transition: transform .45s cubic-bezier(.2, .9, .3, 1.2); }
.rush .banner.show { transform: none; }
.rush .banner img { width: 26px; height: 26px; border-radius: 7px; flex: none; }
.rush .banner b { display: block; }

/* The customers float around the owner, and change as one finishes. */
.rush .float { position: absolute; transition: opacity .8s ease; }
.rush .float .phone { position: relative; }
.rush .f1 { left: 0; top: -20px; animation: r-drift1 14s ease-in-out infinite; }
.rush .f2 { right: 0; top: 90px; animation: r-drift2 17s ease-in-out infinite; }
.rush .f3 { left: 30px; top: 330px; animation: r-drift3 15s ease-in-out infinite; }
.rush .f1 .phone { transform: scale(.72) rotate(-4deg); }
.rush .f2 .phone { transform: scale(.72) rotate(3deg); }
.rush .f3 .phone { transform: scale(.66) rotate(-2deg); }
@keyframes r-drift1 { 0%, 100% { translate: 0 0 } 50% { translate: 18px 26px } }
@keyframes r-drift2 { 0%, 100% { translate: 0 0 } 50% { translate: -22px 20px } }
@keyframes r-drift3 { 0%, 100% { translate: 0 0 } 50% { translate: -14px -24px } }

.rush-caption { min-height: 28px; margin: 14px 0 0; text-align: center; font-size: 18px; font-weight: 700; color: var(--accent); transition: opacity .25s; }
.rush-caption.fade { opacity: 0; }
.rush-counter { margin: 2px 0 0; text-align: center; color: var(--muted); font-size: 14px; min-height: 20px; }

/* On a phone: the customers' phones small in a row, the owner's below. */
@media (max-width: 1020px) {
  .rush-stage { height: auto; width: auto; left: auto; translate: none; display: flex; flex-wrap: wrap; justify-content: space-between; }
  .rush .float { position: relative; left: auto; right: auto; top: auto; width: 32%; height: calc(488px * var(--mini, .4)); margin-bottom: 10px; }
  .rush .float .phone { transform: scale(var(--mini, .4)); transform-origin: top left; }
  .rush .owner { position: relative; left: auto; width: min(340px, 100%); height: min(600px, calc(100svh - 140px)); min-height: 460px; margin: 0 auto; }
  .rush .owner .banner { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rush *, .rush *::before { animation: none !important; transition: none !important; }
}
