/* TELEGOZO PWA 1.0 */

#tgPwaBubble,
#tgPwaOverlay {
  font-family: inherit;
}

#tgPwaBubble[hidden],
#tgPwaOverlay[hidden] {
  display: none !important;
}

/* FLOATING INVITATION */

#tgPwaBubble {
  position: fixed;
  right: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #202124;
  border: 1px solid #f2c94c;
  border-radius: 50px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 5px 25px #0008;
  animation: tgPwaArrival .6s ease both;
}

#tgPwaBubble img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

#tgPwaBubble strong {
  display: block;
  font-size: 13px;
}

#tgPwaBubble small {
  display: block;
  color: #f2c94c;
  font-size: 11px;
}

/* INSTALLATION POPUP */

#tgPwaOverlay {
  position: fixed;
  inset: 0;
  z-index: 10010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(5px);
}

.tg-pwa-card {
  position: relative;
  width: min(440px, 100%);
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  padding: 24px 20px 18px;
  border-radius: 22px;
  background: #202124;
  color: #f5f7fa;
  text-align: center;
  box-shadow: 0 20px 70px #0009;
  animation: tgPwaArrival .35s ease both;
}

.tg-pwa-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 0;
  color: #b5b5b5;
  font-size: 24px;
  cursor: pointer;
  z-index: 3;
}

/* PHONE ILLUSTRATION */

.tg-pwa-art {
  position: relative;
  width: 100%;
  height: 225px;
  margin: 0 auto 14px;
}

.tg-pwa-phone {
  position: absolute;
  top: 12px;
  left: 50%;
  width: 108px;
  height: 198px;
  transform: translateX(-50%) rotate(-10deg);
  border: 4px solid #686b73;
  border-radius: 26px;
  background: #111315;
  padding: 9px;
  box-shadow: 0 12px 25px #0003;
}

.tg-pwa-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background: #292b30;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tg-pwa-screen img {
  width: 82%;
  height: auto;
  object-fit: contain;
}

.tg-pwa-screen::before {
  content: "";
  position: absolute;
  top: 8px;
  width: 34px;
  height: 7px;
  border-radius: 10px;
  background: #111315;
}

.tg-pwa-screen::after {
  content: "";
  position: absolute;
  bottom: 8px;
  width: 32px;
  height: 4px;
  border-radius: 5px;
  background: #dedede;
}

/* EIGHT EDITORIAL CONFETTI STARS */

.tg-pwa-star {
  position: absolute;
  color: var(--star-color);
  font-size: var(--star-size, 30px);
  line-height: 1;
  font-weight: 800;
  pointer-events: none;
  animation: tgPwaConfetti 3.8s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.tg-pwa-star:nth-of-type(1) {
  --star-color: #f2c94c;
  --star-size: 31px;
  --delay: -.4s;
  --angle: 8deg;
  top: 54%;
  left: 89%;
}

.tg-pwa-star:nth-of-type(2) {
  --star-color: #ef7d57;
  --star-size: 29px;
  --delay: -1.8s;
  --angle: 18deg;
  top: 82%;
  left: 76%;
}

.tg-pwa-star:nth-of-type(3) {
  --star-color: #b779e8;
  --star-size: 27px;
  --delay: -.9s;
  --angle: 32deg;
  top: 86%;
  left: 24%;
}

.tg-pwa-star:nth-of-type(4) {
  --star-color: #6fa8ff;
  --star-size: 32px;
  --delay: -2.4s;
  --angle: 42deg;
  top: 62%;
  left: 8%;
}

.tg-pwa-star:nth-of-type(5) {
  --star-color: #57c7a5;
  --star-size: 29px;
  --delay: -1.2s;
  --angle: -25deg;
  top: 29%;
  left: 5%;
}

.tg-pwa-star:nth-of-type(6) {
  --star-color: #ff9f43;
  --star-size: 34px;
  --delay: -3s;
  --angle: -15deg;
  top: 9%;
  left: 24%;
}

.tg-pwa-star:nth-of-type(7) {
  --star-color: #79c267;
  --star-size: 30px;
  --delay: -.6s;
  --angle: 4deg;
  top: 4%;
  left: 72%;
}

.tg-pwa-star:nth-of-type(8) {
  --star-color: #d6b56d;
  --star-size: 27px;
  --delay: -2s;
  --angle: 20deg;
  top: 31%;
  left: 85%;
}

/* POPUP COPY */

.tg-pwa-card h2 {
  margin: 0 0 8px;
  color: #f2c94c;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.6px;
}

.tg-pwa-card h3 {
  margin: 0 0 12px;
  font-size: 19px;
  color: #fff;
}

.tg-pwa-card h3 span {
  color: #f2c94c;
}

.tg-pwa-card p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #dedede;
}

.tg-pwa-card .tg-pwa-slogan {
  font-size: 12px;
  color: #bfc1c5;
}

/* BUTTONS */

#tgPwaInstall {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 14px 12px;
  border: 0;
  border-radius: 12px;
  background: #f2c94c;
  color: #111315;
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
}

#tgPwaInstall:hover {
  background: #ffda69;
}

#tgPwaLater,
#tgPwaNever {
  display: block;
  margin: 12px auto 0;
  padding: 9px;
  border: 0;
  background: transparent;
  color: #dedede;
  font-size: 13px;
  cursor: pointer;
}

#tgPwaLater {
  font-weight: 700;
}

#tgPwaNever {
  color: #a8a8a8;
  text-decoration: underline;
}

/* INSTALLATION INSTRUCTIONS */

#tgPwaInstructions {
  margin-top: 14px;
  padding: 14px;
  background: #15171a;
  border: 1px solid #40434a;
  border-radius: 12px;
  color: #dedede;
  font-size: 13px;
  line-height: 1.7;
  text-align: left;
}

#tgPwaInstructions[hidden] {
  display: none !important;
}

/* EIGHT-COLOR SIGNATURE */

.tg-pwa-colors {
  height: 4px;
  margin-top: 12px;
  border-radius: 5px;
  background: linear-gradient(
    to right,
    #f2c94c 0% 12.5%,
    #ef7d57 12.5% 25%,
    #b779e8 25% 37.5%,
    #6fa8ff 37.5% 50%,
    #57c7a5 50% 62.5%,
    #ff9f43 62.5% 75%,
    #79c267 75% 87.5%,
    #d6b56d 87.5% 100%
  );
}

/* ANIMATIONS */

@keyframes tgPwaArrival {
  from {
    opacity: 0;
    translate: 0 12px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes tgPwaConfetti {
  0%, 100% {
    transform: translateY(-4px) rotate(var(--angle));
  }
  50% {
    transform: translateY(7px) rotate(calc(var(--angle) + 12deg));
  }
}

@media (max-width: 480px) {
  .tg-pwa-card {
    padding: 20px 16px 15px;
  }

  .tg-pwa-art {
    height: 210px;
  }

  .tg-pwa-phone {
    width: 100px;
    height: 183px;
  }

  .tg-pwa-card h2 {
    font-size: 23px;
  }

  #tgPwaBubble {
    right: 12px;
    padding: 8px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #tgPwaBubble,
  .tg-pwa-card,
  .tg-pwa-star {
    animation: none;
  }
}

@media (display-mode: standalone) {
  #tgPwaBubble,
  #tgPwaOverlay {
    display: none !important;
  }
}