/* ═══════════════════════════════════════════════════════════
   AsilMedia Push Notification — Top modal (consent-gate style)
   Aggressive UX: only "Accept" button, no dismiss. Backdrop
   blocks page interaction to force a decision.
   ═══════════════════════════════════════════════════════════ */

.push-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 0s linear 300ms;
}
.push-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 300ms ease, visibility 0s linear 0s;
}

.push-banner {
  position: fixed;
  left: 50%;
  z-index: 10000;
  max-width: 520px;
  width: calc(100% - 24px);
  padding: 20px 22px;
  background: var(--bg-card, #141c24);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
  visibility: hidden;
  transition:
    transform 500ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 300ms ease,
    visibility 0s linear 500ms;
}
/* Position: top — offset from the browser chrome so it feels grounded, not stuck */
.push-banner--top {
  top: calc(env(safe-area-inset-top, 0px) + 72px);
  transform: translate(-50%, -220%);
}
.push-banner--top.is-visible { transform: translate(-50%, 0); }

/* Position: bottom */
.push-banner--bottom {
  bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
  transform: translate(-50%, 220%);
}
.push-banner--bottom.is-visible { transform: translate(-50%, 0); }

@media (max-width: 540px) {
  .push-banner--top    { top:    calc(env(safe-area-inset-top, 0px) + 48px); }
  .push-banner--bottom { bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); }
}

.push-banner.is-visible {
  opacity: 1;
  visibility: visible;
  transition:
    transform 500ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 300ms ease,
    visibility 0s linear 0s;
}

/* Plain banner variant (no backdrop) uses a lighter shadow */
.push-banner--plain {
  box-shadow: var(--shadow-xl, 0 12px 40px rgba(0,0,0,0.5));
}

/* Small "escape hatch" X in the top-right corner. Semi-transparent so
   it doesn't compete visually with the primary Accept button, but is
   still findable by anyone actively looking to close. */
.push-banner__close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted, #78909C);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 150ms, color 150ms;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.push-banner__close:hover {
  opacity: 1;
  color: var(--text-primary, #e6edf3);
  background: rgba(128, 128, 128, 0.1);
}
.push-banner__close svg { width: 14px; height: 14px; }
.push-banner { position: fixed; } /* re-affirm for absolute close positioning */

.push-banner__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-glow, rgba(63, 185, 80, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent, #3fb950);
}

.push-banner__icon svg {
  width: 24px;
  height: 24px;
}

.push-banner__body {
  flex: 1;
  min-width: 0;
}

.push-banner__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #e6edf3);
  line-height: 1.3;
  margin: 0 0 3px;
}

.push-banner__text {
  font-size: 12.5px;
  color: var(--text-secondary, #8b949e);
  line-height: 1.4;
  margin: 0;
}

.push-banner__actions {
  display: flex;
  flex-shrink: 0;
}

.push-banner__btn {
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
  transition: background 200ms, transform 100ms, box-shadow 200ms;
  font-family: inherit;
  white-space: nowrap;
}

.push-banner__btn:active {
  transform: scale(0.96);
}

.push-banner__btn--accept {
  background: var(--accent, #3fb950);
  color: #fff;
  box-shadow: 0 4px 14px rgba(63, 185, 80, 0.35);
}

.push-banner__btn--accept:hover {
  background: var(--accent-hover, #2ea043);
  box-shadow: 0 6px 18px rgba(63, 185, 80, 0.5);
}

.push-banner__btn--dismiss {
  background: transparent;
  color: var(--text-secondary, #8b949e);
  padding: 10px 14px;
}
.push-banner__btn--dismiss:hover {
  color: var(--text-primary, #e6edf3);
  background: rgba(255,255,255,0.05);
}
/* When both buttons show, add spacing */
.push-banner__actions { gap: 8px; }

/* Mid-narrow (tablet portrait / phone landscape) — icon on left, body middle, buttons on next row */
@media (max-width: 640px) {
  .push-banner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 18px;
    padding-right: 34px; /* room for close X */
  }
  .push-banner__body {
    flex: 1 1 calc(100% - 60px);
    min-width: 0;
  }
  .push-banner__body .push-banner__title { font-size: 15px; }
  .push-banner__body .push-banner__text  { font-size: 13px; }
  .push-banner__actions {
    flex-basis: 100%;
    order: 3;
  }
  .push-banner__btn {
    flex: 1 1 auto;
    padding: 11px 16px;
    font-size: 14px;
  }
  .push-banner__btn--dismiss { flex: 0 0 auto; }
}

/* Small phone — even more compact */
@media (max-width: 380px) {
  .push-banner { padding: 14px 14px; padding-right: 30px; gap: 10px; }
  .push-banner__icon { width: 38px; height: 38px; }
  .push-banner__icon svg { width: 20px; height: 20px; }
  .push-banner__body { flex-basis: calc(100% - 52px); }
  .push-banner__body .push-banner__title { font-size: 14px; }
  .push-banner__body .push-banner__text  { font-size: 12px; }
  .push-banner__btn { padding: 10px 12px; font-size: 13px; }
}

/* Toast for "subscribed successfully" */
.push-toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 100px);
  z-index: 10001;
  padding: 12px 20px;
  background: var(--accent, #3fb950);
  color: #fff;
  border-radius: var(--radius-sm, 8px);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,0.5));
  opacity: 0;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), opacity 200ms;
}

.push-toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}
