/* ═══════════════════════════════════════════════════════════════════════════
   TECH-X — Push Notification Prompt + Toast
   Styled to match the Obsidian & Iris design system.
   Uses the same tokens from core.css — no ad-hoc hex values.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Subscription Prompt (bottom-right floating card) ────────────────────── */

.push-prompt {
  position: fixed;
  bottom: var(--s-5);
  right: var(--s-5);
  z-index: var(--z-toast, 3000);
  max-width: 380px;
  width: calc(100% - var(--s-6));
  pointer-events: none;
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition: opacity var(--d-slow, 520ms) var(--ease-out, cubic-bezier(.22,1,.36,1)),
              transform var(--d-slow, 520ms) var(--ease-out, cubic-bezier(.22,1,.36,1));
}

.push-prompt.is-visible {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.push-prompt__inner {
  position: relative;
  background: var(--surface, #0B0B15);
  border: 1px solid var(--line-2, rgba(255,255,255,.12));
  border-radius: var(--r-xl, 28px);
  padding: var(--s-6, 2rem);
  box-shadow: var(--sh-3, 0 24px 60px -18px rgba(0,0,0,.8));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Close button */
.push-prompt__close {
  position: absolute;
  top: var(--s-3, 0.75rem);
  right: var(--s-3, 0.75rem);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: var(--ink-4, #55556E);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--r-full, 999px);
  transition: background var(--d-fast, 160ms) var(--ease-soft, cubic-bezier(.4,0,.2,1)),
              color var(--d-fast, 160ms) var(--ease-soft, cubic-bezier(.4,0,.2,1));
}

.push-prompt__close:hover {
  background: var(--surface-2, #11111F);
  color: var(--ink, #F6F6FB);
}

/* Bell icon */
.push-prompt__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md, 14px);
  background: var(--brand-soft, rgba(108,99,255,.14));
  color: var(--brand, #8B84FF);
  margin-bottom: var(--s-4, 1rem);
  animation: push-ring 2.4s ease-in-out infinite;
}

@keyframes push-ring {
  0%, 100% { transform: rotate(0); }
  5%       { transform: rotate(12deg); }
  10%      { transform: rotate(-10deg); }
  15%      { transform: rotate(8deg); }
  20%      { transform: rotate(-4deg); }
  25%      { transform: rotate(0); }
}

/* Text */
.push-prompt__text {
  margin-bottom: var(--s-5, 1.5rem);
}

.push-prompt__text strong {
  display: block;
  font-family: var(--font-display, system-ui);
  font-size: var(--t-lg, 1.25rem);
  font-weight: 600;
  letter-spacing: var(--tr-snug, -0.014em);
  color: var(--ink, #F6F6FB);
  margin-bottom: var(--s-2, 0.5rem);
}

.push-prompt__text p {
  font-size: var(--t-sm, 0.875rem);
  line-height: var(--lh-body, 1.65);
  color: var(--ink-3, #7D7D99);
  margin: 0;
}

/* Buttons */
.push-prompt__actions {
  display: flex;
  gap: var(--s-3, 0.75rem);
}

.push-prompt__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--s-5, 1.5rem);
  border-radius: var(--r-full, 999px);
  font-family: var(--font-body, sans-serif);
  font-size: var(--t-sm, 0.875rem);
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  transition: transform var(--d-base, 280ms) var(--ease-out),
              box-shadow var(--d-base, 280ms) var(--ease-out),
              background var(--d-base, 280ms) var(--ease-out),
              color var(--d-base, 280ms) var(--ease-out);
}

.push-prompt__btn:hover {
  transform: translateY(-1px);
}

.push-prompt__btn:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 80ms;
}

.push-prompt__btn--primary {
  background: linear-gradient(135deg, var(--iris-500, #6C63FF) 0%, var(--iris-600, #5A4FE8) 55%, var(--iris-700, #4739C4) 100%);
  color: #FFFFFF;
  box-shadow: 0 8px 28px -6px rgba(108, 99, 255, .5);
  flex: 1;
}

.push-prompt__btn--primary:hover {
  box-shadow: 0 12px 36px -8px rgba(108, 99, 255, .7);
}

.push-prompt__btn--primary:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.push-prompt__btn--ghost {
  background: transparent;
  color: var(--ink-3, #7D7D99);
  border: 1px solid var(--line-2, rgba(255,255,255,.12));
}

.push-prompt__btn--ghost:hover {
  background: var(--surface-2, #11111F);
  color: var(--ink, #F6F6FB);
  border-color: var(--line-strong, rgba(255,255,255,.2));
}

/* ── Foreground Toast ────────────────────────────────────────────────────── */

.push-toast {
  position: fixed;
  top: var(--s-5, 1.5rem);
  right: var(--s-5, 1.5rem);
  z-index: var(--z-toast, 3000);
  max-width: 400px;
  width: calc(100% - var(--s-6));
  pointer-events: none;
  opacity: 0;
  transform: translateY(-16px) scale(0.96);
  transition: opacity var(--d-base, 280ms) var(--ease-out),
              transform var(--d-base, 280ms) var(--ease-out);
}

.push-toast.is-visible {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.push-toast__inner {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3, 0.75rem);
  background: var(--surface, #0B0B15);
  border: 1px solid var(--line-2, rgba(255,255,255,.12));
  border-radius: var(--r-lg, 20px);
  padding: var(--s-4, 1rem);
  box-shadow: var(--sh-3, 0 24px 60px -18px rgba(0,0,0,.8));
  cursor: pointer;
}

.push-toast__inner:hover {
  border-color: var(--brand, #8B84FF);
}

.push-toast__icon {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm, 10px);
  background: var(--brand-soft, rgba(108,99,255,.14));
  color: var(--brand, #8B84FF);
}

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

.push-toast__text strong {
  display: block;
  font-size: var(--t-sm, 0.875rem);
  font-weight: 600;
  color: var(--ink, #F6F6FB);
  margin-bottom: 2px;
}

.push-toast__text p {
  font-size: var(--t-xs, 0.8125rem);
  line-height: 1.4;
  color: var(--ink-3, #7D7D99);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.push-toast__close {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: var(--ink-4, #55556E);
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: var(--r-full, 999px);
  transition: background var(--d-fast) var(--ease-soft),
              color var(--d-fast) var(--ease-soft);
}

.push-toast__close:hover {
  background: var(--surface-2, #11111F);
  color: var(--ink, #F6F6FB);
}

/* ── Mobile: full-width prompt at bottom ─────────────────────────────────── */

@media (max-width: 480px) {
  .push-prompt {
    bottom: 0;
    right: 0;
    max-width: 100%;
    width: 100%;
  }
  .push-prompt__inner {
    border-radius: var(--r-xl, 28px) var(--r-xl, 28px) 0 0;
    border-bottom: none;
  }

  .push-toast {
    top: 0;
    right: 0;
    max-width: 100%;
    width: 100%;
  }
  .push-toast__inner {
    border-radius: 0 0 var(--r-lg, 20px) var(--r-lg, 20px);
    border-top: none;
  }
}
