/* =================================================================
   PGI Pithoragarh — floating "Admission Open" badge (bottom right).

   Built from live text + brand tokens rather than a flat image, so it
   stays crisp on any DPR, scales cleanly to the phone size, needs no
   asset request, and the words are readable by search engines and
   screen readers. To swap in a supplied artwork file later, replace the
   three spans with a single <img> and keep .admission-badge as-is.

   Stacking: .side-rail is z-index 70 and .mobile-cta is 75, and every
   drawer/overlay on the site sits at 9999+. 74 puts the badge above the
   page and the rail, but never over the bottom bar or a modal.
   ================================================================= */

.admission-badge {
  position: fixed;
  right: 28px;
  bottom: 18px;
  z-index: 74;
  display: block;
  width: 152px;
  text-decoration: none;
  filter: drop-shadow(0 14px 26px rgba(10, 33, 72, .34));
  transition: transform .28s cubic-bezier(.165, .84, .44, 1);
}
.admission-badge:hover,
.admission-badge:focus-visible { transform: translateY(-4px) scale(1.03); }
.admission-badge:focus-visible {
  outline: 3px solid var(--c-gold-bright, #E5C158);
  outline-offset: 4px;
  border-radius: 12px;
}

/* The badge is a supplied PNG. Size it here rather than relying on the global
   `img { max-width: 100% }` in style.css — the ad landing pages set Layout = null
   and never load that file, where the image would otherwise render at its full
   1316px natural width. */
.admission-badge img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}

/* ---------------- TABLET / MOBILE ( < 992px ) ----------------
   .mobile-cta is a fixed bottom bar here. body reserves 64px for it, but the
   bar measures ~74px on a 390px phone, so the badge clears 92px — the same
   offset the existing .wa-float-btn rule uses — plus the safe-area inset so
   it never sits under a phone home indicator. */
@media (max-width: 991.98px) {
  .admission-badge {
    width: 104px;
    right: 12px;
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }
}

/* very small phones — keep it clear of the thumb without shrinking to a chip */
@media (max-width: 380px) {
  .admission-badge { width: 90px; right: 10px; }
}

/* Short viewports: .side-rail is fixed to the right edge (44px wide, vertically
   centred, ~430px tall) and is shown on phones too. On a tall window its bottom
   clears the badge, but under roughly 700px of height the two collide — on a
   360x640 phone as well as a short laptop window. Shift the badge clear of the
   rail rather than pushing it down, so it stays on the bottom line. */
@media (max-height: 700px) {
  .admission-badge { right: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  .admission-badge { transition: none; }
  .admission-badge:hover, .admission-badge:focus-visible { transform: none; }
}

@media print { .admission-badge { display: none; } }
