/* ================================================================
   Atine JB — Push Notification UI Styles
   Navy (#003366) + Gold (#F5A623) theme
   Phase 28 — notification-ui.css
   ================================================================ */

/* ── Subscribe Banner ─────────────────────────────────────────── */
#atine-push-banner {
  position: fixed;
  bottom: 80px; /* above mobile bottom nav */
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  z-index: 9000;
  width: min(92vw, 520px);
  background: linear-gradient(135deg, #003366 0%, #004080 100%);
  border: 2px solid #F5A623;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 51, 102, 0.45), 0 0 0 1px rgba(245, 166, 35, 0.2);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

#atine-push-banner.push-banner-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.push-banner-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
}

.push-banner-icon {
  font-size: 2rem;
  flex-shrink: 0;
  animation: push-bell-ring 1.2s ease 0.5s 2;
}

@keyframes push-bell-ring {
  0%, 100% { transform: rotate(0deg); }
  15%       { transform: rotate(18deg); }
  30%       { transform: rotate(-14deg); }
  45%       { transform: rotate(10deg); }
  60%       { transform: rotate(-8deg); }
  75%       { transform: rotate(4deg); }
}

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

.push-banner-text strong {
  display: block;
  color: #F5A623;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
  letter-spacing: 0.01em;
}

.push-banner-text span {
  display: block;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.85rem;
  line-height: 1.4;
}

.push-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Subscribe button */
.push-btn-subscribe {
  background: linear-gradient(135deg, #F5A623 0%, #e8951a 100%);
  color: #003366;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  min-height: 40px;
  box-shadow: 0 2px 8px rgba(245, 166, 35, 0.4);
}

.push-btn-subscribe:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245, 166, 35, 0.55);
}

.push-btn-subscribe:active {
  transform: translateY(0);
}

.push-btn-subscribe:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Dismiss button */
.push-btn-dismiss {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}

.push-btn-dismiss:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* ── Floating Bell Button ─────────────────────────────────────── */
#atine-push-bell {
  position: fixed;
  bottom: 90px;    /* sits above back-to-top if present */
  right: 24px;
  z-index: 8900;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #003366 0%, #004080 100%);
  border: 2px solid #F5A623;
  color: #F5A623;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 51, 102, 0.45), 0 0 0 1px rgba(245, 166, 35, 0.25);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.2s ease,
              background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

#atine-push-bell:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(0, 51, 102, 0.5), 0 0 0 2px rgba(245, 166, 35, 0.5);
}

#atine-push-bell:active {
  transform: scale(0.95);
}

#atine-push-bell:focus-visible {
  outline: 3px solid #F5A623;
  outline-offset: 3px;
}

#atine-push-bell.push-bell-active {
  background: linear-gradient(135deg, #F5A623 0%, #e8951a 100%);
  border-color: #003366;
  color: #003366;
  font-size: 1.3rem;
}

/* Pulse animation for active bell */
#atine-push-bell.push-bell-active::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(245, 166, 35, 0.4);
  animation: push-bell-pulse 2s ease-out infinite;
}

@keyframes push-bell-pulse {
  0%   { transform: scale(1);   opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ── Toast Notification ──────────────────────────────────────── */
#atine-push-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 9500;
  background: linear-gradient(135deg, #003366 0%, #004080 100%);
  border: 1.5px solid #F5A623;
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0, 51, 102, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  max-width: min(90vw, 420px);
  white-space: nowrap;
}

#atine-push-toast.push-toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#atine-push-toast.push-toast-error {
  border-color: #e74c3c;
  background: linear-gradient(135deg, #4a0000 0%, #6b0000 100%);
}

.push-toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ── Dark Mode Overrides ─────────────────────────────────────── */
[data-theme="dark"] #atine-push-banner {
  background: linear-gradient(135deg, #001f3f 0%, #002d5a 100%);
  border-color: #F5A623;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(245, 166, 35, 0.3);
}

[data-theme="dark"] .push-banner-text span {
  color: rgba(255, 250, 240, 0.8);
}

[data-theme="dark"] #atine-push-bell {
  background: linear-gradient(135deg, #001f3f 0%, #002d5a 100%);
}

[data-theme="dark"] #atine-push-toast {
  background: linear-gradient(135deg, #001f3f 0%, #002d5a 100%);
  border-color: #F5A623;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  #atine-push-banner {
    width: calc(100vw - 24px);
    bottom: 76px;
    border-radius: 14px;
  }

  .push-banner-inner {
    padding: 14px 14px;
    gap: 10px;
  }

  .push-banner-icon {
    font-size: 1.6rem;
  }

  .push-banner-text strong {
    font-size: 0.9rem;
  }

  .push-banner-text span {
    font-size: 0.78rem;
  }

  .push-btn-subscribe {
    padding: 9px 14px;
    font-size: 0.8rem;
  }

  #atine-push-bell {
    width: 48px;
    height: 48px;
    right: 16px;
    bottom: 84px;
    font-size: 1.25rem;
  }

  #atine-push-toast {
    font-size: 0.82rem;
    padding: 10px 16px;
    max-width: calc(100vw - 32px);
    white-space: normal;
  }
}

/* ── Accessibility: reduced motion ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #atine-push-banner,
  #atine-push-toast,
  #atine-push-bell,
  .push-banner-icon {
    animation: none !important;
    transition: opacity 0.2s ease !important;
  }

  #atine-push-bell.push-bell-active::before {
    animation: none !important;
  }
}

/* ── Print: hide all push UI ─────────────────────────────────── */
@media print {
  #atine-push-banner,
  #atine-push-bell,
  #atine-push-toast {
    display: none !important;
  }
}
