/* Web push prompt card (um-push.php). Fixed, non-modal: never covers the headline,
   no backdrop, page stays usable. It is painted as site chrome (the black of the
   region rail and footer, under the schwarz-rot-gold keyline), so it reads apart
   from the white article and the ads. The theme scopes --um-* to .um-subscribe, so
   the card maps them from the theme's --umde-* tokens itself. */
.um-push {
  --um-accent: var(--umde-red, #d0000f);
  --um-accent-dk: var(--umde-red-hover, #a3000b);
  --um-paper: var(--umde-black, #16161a);
  --um-ink: var(--umde-on-black, #f0f0f2);
  --um-muted: var(--umde-on-black-muted, #a3a3ab);
  --um-line: #6a6a72;
  --um-raised: #2a2a30;
  --um-bold: "proxima_nova_rgbold", sans-serif; /* the theme's bold is a family, not a weight */
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9998;
  box-sizing: border-box;
  width: 360px;
  max-width: calc(100vw - 32px);
  padding: 20px 18px 18px;
  overflow: hidden;
  background: var(--um-paper);
  color: var(--um-ink);
  border-radius: var(--umde-radius, 8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
  font-size: 15px;
  line-height: 1.35;
  animation: um-push-in .28s cubic-bezier(.2, .6, .3, 1) both;
}
@keyframes um-push-in { from { opacity: 0; transform: translateY(14px); } }
.um-push::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--umde-keyline, linear-gradient(90deg, #2c333b 0 33.333%, #d0000f 33.333% 66.666%, #f6c500 66.666% 100%));
}
.um-push *, .um-push *::before { box-sizing: border-box; }
.um-push svg { display: block; }

.um-push__head { display: flex; align-items: center; gap: 10px; margin: 0 32px 12px 0; }
.um-push__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--um-accent);
  color: #fff;
}
/* .um-push .x: the theme colours every p inside .single-post. */
.um-push .um-push__title { margin: 0; color: var(--um-ink); font-family: var(--um-bold); font-weight: normal; font-size: 17px; line-height: 1.2; }

.um-push__boxes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.um-push__opt {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: 0;
  padding: 4px 14px 4px 10px;
  border: 1px solid var(--um-line);
  border-radius: 20px;
  color: var(--um-muted);
  font-size: 14px;
  cursor: pointer;
}
.um-push__opt:has(input:checked) { background: var(--um-raised); color: #fff; }
.um-push__opt input {
  flex: 0 0 auto;
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 2px solid #8a8a92;
  border-radius: 50%;
  background: transparent center / 14px no-repeat;
  cursor: pointer;
}
.um-push__opt input:checked {
  border-color: var(--um-accent);
  background-color: var(--um-accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.um-push .um-push__note { margin: 0 0 12px; color: var(--um-muted); font-size: 13px; }
.um-push__note a { color: inherit; text-decoration: underline; }

.um-push__row { display: flex; gap: 8px; }
.um-push__yes, .um-push__no {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--umde-radius, 8px);
  font: inherit;
  cursor: pointer;
}
.um-push__yes {
  flex: 1 1 auto;
  background: var(--um-accent);
  color: #fff;
  border: 0;
  font-family: var(--um-bold);
  font-size: 16px;
}
.um-push__yes:hover { background: var(--um-accent-dk); }
.um-push__no { flex: 0 0 auto; background: transparent; color: var(--um-ink); border: 1px solid var(--um-line); }
.um-push__no:hover { border-color: #fff; }
.um-push__yes:disabled, .um-push__no:disabled { opacity: .6; cursor: default; }

.um-push__x {
  position: absolute;
  top: 8px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--um-muted);
  cursor: pointer;
}
.um-push__x:hover { color: #fff; }

.um-push .um-push__status { margin: 0 0 10px; color: var(--um-ink); font-size: 13px; }
.um-push .um-push__status:empty { margin: 0; } /* stays in the tree: it is the live region */

/* After "Ja": the form gives way to the one status line. */
.um-push--done .um-push__head,
.um-push--done .um-push__boxes,
.um-push--done .um-push__note,
.um-push--done .um-push__row { display: none; }
.um-push.um-push--done .um-push__status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  margin: 0 32px 0 0;
  font-size: 15px;
}
.um-push--done .um-push__status::before {
  content: "";
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--um-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 20px no-repeat;
}

.um-push button:focus-visible,
.um-push input:focus-visible,
.um-push a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.um-push-off { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

@media (max-width: 600px) {
  .um-push {
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    max-width: none;
    max-height: 40vh;
    overflow-y: auto;
    padding: 18px 16px max(14px, env(safe-area-inset-bottom));
    border-radius: 14px 14px 0 0;
  }
  .um-push .um-push__note { margin-bottom: 10px; }
}
/* Short phones: 40vh is about 256px, so the bell goes and the gaps tighten to keep both buttons in view. */
@media (max-width: 600px) and (max-height: 700px) {
  .um-push { padding-top: 14px; }
  .um-push__icon { display: none; }
  .um-push__head { min-height: 24px; margin-bottom: 8px; }
  .um-push__x { top: 6px; }
  .um-push__boxes { gap: 6px; margin-bottom: 8px; }
  .um-push .um-push__note { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { .um-push { animation: none; } }
