/* On-screen message styles for the analytics messaging system.
   Prefixed .igm so nothing collides with Bootstrap or home.css. */

.igm {
  position: fixed;
  z-index: 99999;
  opacity: 0;
  transition: opacity .22s ease, transform .22s ease;
  font-family: inherit;
}
.igm.is-open { opacity: 1; }

.igm__box {
  position: relative;
  background: #fff;
  color: #16202f;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .28);
  overflow: hidden;
  max-width: 100%;
}
.igm--dark .igm__box { background: #16202f; color: #e6edf7; }

.igm__img { display: block; width: 100%; max-height: 190px; object-fit: cover; }
.igm__content { padding: 20px 22px; }
.igm__title { font-size: 18px; font-weight: 700; margin-bottom: 6px; line-height: 1.3; }
.igm__body { font-size: 14.5px; line-height: 1.6; color: inherit; opacity: .9; }
.igm__body p:last-child { margin-bottom: 0; }

.igm__cta {
  display: inline-block;
  margin-top: 14px;
  padding: 9px 20px;
  background: #1d4ed8;
  color: #fff !important;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none !important;
}
.igm__cta:hover { background: #1e40af; }

.igm__close {
  position: absolute;
  top: 8px; right: 10px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  opacity: .45;
  padding: 2px 6px;
}
.igm__close:hover { opacity: .9; }

/* ── Modal: centred, with a dimmed backdrop ─────────────────────────────── */
.igm--modal {
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, .55);
}
.igm--modal .igm__box { width: 420px; transform: translateY(10px); }
.igm--modal.is-open .igm__box { transform: translateY(0); transition: transform .22s ease; }

/* ── Toast / slide-in: corner card ──────────────────────────────────────── */
.igm--toast, .igm--slide_in { max-width: 360px; }
.igm--toast .igm__box, .igm--slide_in .igm__box { width: 100%; }
.igm--toast.igm--bottom_right, .igm--slide_in.igm--bottom_right { right: 20px; bottom: 20px; }
.igm--toast.igm--bottom_left,  .igm--slide_in.igm--bottom_left  { left: 20px;  bottom: 20px; }
.igm--toast.igm--top,          .igm--slide_in.igm--top          { right: 20px; top: 20px; }
.igm--toast.igm--bottom,       .igm--slide_in.igm--bottom       { right: 20px; bottom: 20px; }
.igm--toast.igm--center,       .igm--slide_in.igm--center       { right: 20px; bottom: 20px; }

/* ── Banner: full-width strip ───────────────────────────────────────────── */
.igm--banner { left: 0; right: 0; }
.igm--banner.igm--top { top: 0; }
.igm--banner.igm--bottom, .igm--banner.igm--center, .igm--banner.igm--bottom_right, .igm--banner.igm--bottom_left { bottom: 0; }
.igm--banner .igm__box { border-radius: 0; box-shadow: 0 -4px 20px rgba(15, 23, 42, .18); }
.igm--banner .igm__content { padding: 14px 46px 14px 22px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.igm--banner .igm__title { margin: 0; }
.igm--banner .igm__cta { margin-top: 0; margin-left: auto; }
.igm--banner .igm__img { display: none; }

@media (max-width: 480px) {
  .igm--toast, .igm--slide_in { left: 12px; right: 12px; max-width: none; }
  .igm--toast.igm--bottom_right, .igm--toast.igm--bottom_left,
  .igm--slide_in.igm--bottom_right, .igm--slide_in.igm--bottom_left { left: 12px; right: 12px; bottom: 12px; }
  .igm--modal .igm__box { width: 100%; }
}
