/* Push subscribe modal — injected by cosmos-push.js on all eligible shells */

.cosmos-push-subscribe-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--navy, #0B1F33) 55%, transparent);
}

.cosmos-push-subscribe-overlay.open {
  display: flex;
}

.cosmos-push-subscribe-modal {
  width: min(100%, 360px);
  max-height: min(92vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border-radius: var(--radius-lg, 16px);
  background: var(--card, #fff);
  box-shadow: var(--shadow-lg, 0 8px 32px rgba(15, 23, 42, 0.18));
}

.cosmos-push-subscribe-modal__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: var(--space-5, 20px) var(--space-5, 20px) var(--space-3, 12px);
}

.cosmos-push-subscribe-modal__footer {
  flex-shrink: 0;
  padding: var(--space-3, 12px) var(--space-5, 20px) max(var(--space-5, 20px), env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border, #E2E8F0);
  background: var(--card, #fff);
}

.cosmos-push-subscribe-modal__title {
  margin: 0 0 var(--space-2, 8px);
  font-size: 18px;
  font-weight: 700;
  color: var(--text1);
  line-height: 1.3;
}

.cosmos-push-subscribe-modal__body {
  margin: 0 0 var(--space-3, 12px);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text2);
}

.cosmos-push-subscribe-modal__error {
  margin: 0 0 var(--space-3, 12px);
  font-size: 13px;
  line-height: 1.45;
  color: var(--red);
}

.cosmos-push-subscribe-step-hint {
  margin: 0 0 var(--space-2, 8px);
  padding: var(--space-2, 8px) var(--space-3, 12px);
  border-radius: var(--radius-md, 10px);
  background: var(--accL, #EFF6FF);
  border: 1px solid color-mix(in srgb, var(--acc, #2563EB) 25%, var(--border, #E2E8F0));
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--acc2, #2563EB);
  text-align: center;
}

.cosmos-push-subscribe-notice-toggle {
  display: block;
  width: 100%;
  margin: 0 0 var(--space-2, 8px);
  padding: 8px 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--acc2, #2563EB);
  text-decoration: underline;
  cursor: pointer;
  text-align: center;
}

.cosmos-push-subscribe-notice--collapsed {
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  overflow: hidden !important;
  border-width: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.cosmos-push-subscribe-ack--focus {
  outline: 2px solid var(--acc, #2563EB);
  outline-offset: 2px;
  border-radius: var(--radius-md, 10px);
  animation: cosmos-push-ack-pulse 1.2s ease-in-out 2;
}

@keyframes cosmos-push-ack-pulse {
  0%, 100% { background: transparent; }
  50% { background: var(--accL, #EFF6FF); }
}

.cosmos-push-subscribe-notice {
  margin: 0 0 var(--space-3, 12px);
  padding: var(--space-3, 12px);
  border-radius: var(--radius-md, 10px);
  background: var(--bg, #F8FAFC);
  border: 1px solid var(--border, #E2E8F0);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text2);
  max-height: min(36vh, 200px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--text3) 40%, transparent) transparent;
}

.cosmos-push-subscribe-notice__summary {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text1);
}

.cosmos-push-subscribe-notice__list {
  margin: 4px 0 8px 18px;
  padding: 0;
}

.cosmos-push-subscribe-notice__link {
  color: var(--acc2, #2563EB);
}

.cosmos-push-subscribe-ack {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text2);
  cursor: pointer;
}

.cosmos-push-subscribe-ack input {
  margin-top: 3px;
  flex-shrink: 0;
  min-width: 18px;
  min-height: 18px;
}

.cosmos-push-subscribe-modal__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 8px);
}

.cosmos-push-subscribe-modal__actions .btn {
  width: 100%;
  min-height: var(--tap-target-mobile, 44px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md, 10px);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  padding: 0 16px;
}

.cosmos-push-subscribe-modal__actions .btn.primary {
  background: linear-gradient(135deg, var(--acc, #2563EB) 0%, var(--accD, #1D4ED8) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--acc, #2563EB) 35%, transparent);
}

.cosmos-push-permissions-popup__cta.btn.primary {
  background: linear-gradient(135deg, var(--acc, #2563EB) 0%, var(--accD, #1D4ED8) 100%);
  border-color: transparent;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--acc, #2563EB) 35%, transparent);
}

.cosmos-push-permissions-popup__cta.btn.primary:active {
  transform: scale(0.98);
}

.cosmos-push-subscribe-overlay--blocking {
  z-index: 10100;
}

body.cosmos-push-gate-active .cosmos-app-scroll,
body.cosmos-push-gate-active #screen-hub,
body.cosmos-push-gate-active .cosmos-bottom-tabs,
body.cosmos-push-gate-active .cosmos-top-tabs {
  pointer-events: none;
}

.cosmos-push-permissions-popup {
  text-align: center;
  width: min(100%, 340px);
}

.cosmos-push-permissions-popup__hero {
  position: relative;
  width: 120px;
  height: 100px;
  margin: 0 auto var(--space-4, 16px);
}

.cosmos-push-permissions-popup__blob {
  position: absolute;
  inset: 8px 4px 0;
  border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%;
  background: color-mix(in srgb, var(--accL, #DBEAFE) 85%, var(--tealL, #CCFBF1));
  opacity: 0.9;
}

.cosmos-push-permissions-popup__bell {
  position: relative;
  z-index: 1;
  margin: 12px auto 0;
  display: block;
  color: var(--gold, #F59E0B);
}

.cosmos-push-permissions-popup__bell-ring {
  color: var(--acc2, #2563EB);
}

.cosmos-push-permissions-popup__title {
  text-align: center;
  font-size: 20px;
  margin-bottom: var(--space-2, 8px);
}

.cosmos-push-permissions-popup__body,
.cosmos-push-permissions-popup__sub {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 280px;
}

.cosmos-push-permissions-popup__sub {
  margin: 0 auto var(--space-3, 12px);
  font-size: 13px;
  color: var(--text3);
  line-height: 1.45;
}

.cosmos-push-permissions-popup__actions {
  margin-top: 0;
}

.cosmos-push-permissions-popup__cta {
  width: 100%;
}

.cosmos-push-permissions-popup__bypass {
  width: 100%;
  background: transparent;
  color: var(--text2);
  border-color: var(--border);
}

.cosmos-push-permissions-popup__signout {
  display: block;
  width: 100%;
  margin-top: var(--space-3, 12px);
  padding: 8px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--text3);
  text-decoration: underline;
  cursor: pointer;
}

.cosmos-push-permissions-popup__signout:hover {
  color: var(--text2);
}

.cosmos-push-subscribe-notice {
  text-align: left;
}

.cosmos-push-subscribe-notice::-webkit-scrollbar {
  width: 6px;
}

.cosmos-push-subscribe-notice::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text3) 45%, transparent);
  border-radius: 999px;
}

.cosmos-push-subscribe-ack {
  text-align: left;
}

.cosmos-push-subscribe-overlay--blocking .cosmos-push-subscribe-modal__actions .btn:not(.primary):not(.cosmos-push-permissions-popup__bypass) {
  display: none;
}

@media (max-width: 768px) {
  .cosmos-push-subscribe-modal {
    max-height: min(94vh, 680px);
  }

  .cosmos-push-subscribe-modal__scroll {
    padding-top: var(--space-4, 16px);
  }
}
