/* Telegram promo popup — mirputeshestvii.ru
   All rules are scoped to #tg-promo so they cannot clash with the site template. */

#tg-promo {
  --tg-blue: #229ed9;
  --tg-blue-dark: #1b88bc;
  --ink: #1d2430;
  --muted: #5d6675;

  box-sizing: border-box;
  width: min(440px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(16, 24, 40, .28);
  overflow: hidden;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-align: left;
}
#tg-promo *, #tg-promo *::before, #tg-promo *::after { box-sizing: border-box; }

#tg-promo[open] { animation: tgp-in .35s cubic-bezier(.2, .8, .2, 1) both; }
#tg-promo::backdrop {
  background: rgba(15, 23, 35, .55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: tgp-fade .35s ease both;
}

/* Header band */
#tg-promo .tgp-top {
  position: relative;
  padding: 28px 28px 22px;
  background: linear-gradient(135deg, #2aabee 0%, #1b88bc 100%);
  color: #fff;
}
#tg-promo .tgp-top::after { /* soft "route" dots in the corner */
  content: "";
  position: absolute;
  right: -30px; bottom: -40px;
  width: 170px; height: 170px;
  border: 2px dashed rgba(255, 255, 255, .28);
  border-radius: 50%;
  pointer-events: none;
}
#tg-promo .tgp-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
}
#tg-promo .tgp-badge svg { width: 22px; height: 22px; flex: none; }
#tg-promo h2 {
  margin: 14px 0 0;
  padding: 0;
  font-family: inherit; font-size: 26px; font-weight: 700; line-height: 1.2;
  text-indent: 0; text-transform: none; letter-spacing: 0;
  color: #fff;
  text-align: left;
}

/* Body */
#tg-promo .tgp-body { padding: 22px 28px 26px; }
#tg-promo p {
  margin: 0 0 18px;
  padding: 0;
  font-size: 16px; line-height: 1.55;
  text-indent: 0; text-align: left;
  color: var(--muted);
}
#tg-promo p b { color: var(--ink); }

#tg-promo .tgp-facts {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 22px; padding: 0; list-style: none;
}
#tg-promo .tgp-facts li {
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef7fc;
  color: #145f84;
  font-size: 14px; font-weight: 600;
}

#tg-promo .tgp-cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 15px 20px;
  border: 0; border-radius: 12px;
  background: var(--tg-blue);
  color: #fff !important;
  font-family: inherit; font-size: 18px; font-weight: 600; line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
#tg-promo .tgp-cta:hover { background: var(--tg-blue-dark); transform: translateY(-1px); }
#tg-promo .tgp-cta svg { width: 22px; height: 22px; flex: none; }

#tg-promo .tgp-later {
  display: block;
  margin: 12px auto 0;
  padding: 6px 10px;
  border: 0; background: none;
  color: var(--muted);
  font-family: inherit; font-size: 15px; line-height: 1.2;
  cursor: pointer;
}
#tg-promo .tgp-later:hover { color: var(--ink); text-decoration: underline; }

#tg-promo .tgp-close {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  cursor: pointer;
  transition: background .2s;
}
#tg-promo .tgp-close:hover { background: rgba(255, 255, 255, .35); }
#tg-promo .tgp-close svg { width: 18px; height: 18px; }

#tg-promo:focus { outline: none; }
#tg-promo :focus-visible { outline: 3px solid #ffb020; outline-offset: 2px; }

/* Phones: slide up from the bottom like a sheet */
@media (max-width: 520px) {
  #tg-promo {
    width: 100%;
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
  }
  #tg-promo[open] { animation-name: tgp-up; }
  #tg-promo .tgp-top { padding: 24px 20px 18px; }
  #tg-promo h2 { font-size: 22px; }
  #tg-promo .tgp-body { padding: 18px 20px calc(20px + env(safe-area-inset-bottom)); }
}

@keyframes tgp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tgp-in { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes tgp-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  #tg-promo[open], #tg-promo::backdrop { animation: none; }
}
