/* WineInsight Web Push – tilmeldingsboks
 * Idé: en ægte notifikation "hælder" ud af et vinrødt felt, så man ser, hvad man siger ja til. */

.wiwp-slide,
.wiwp-card {
  --wiwp-wine: #790d16;
  --wiwp-wine-deep: #4a0710;
  --wiwp-wine-glow: #a3212c;
  --wiwp-paper: #fffdfb;
  --wiwp-ink: #2b2522;
  --wiwp-muted: #6f655e;
  --wiwp-line: #ece4dd;
  --wiwp-serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
  --wiwp-ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  font-family: inherit;
  color: var(--wiwp-ink);
  background: var(--wiwp-paper);
  border-radius: 16px;
  box-shadow: 0 28px 60px -24px rgba(74, 7, 16, 0.5), 0 2px 8px rgba(43, 37, 34, 0.08);
  -webkit-font-smoothing: antialiased;
}
.wiwp-slide *,
.wiwp-card * { box-sizing: border-box; }

/* ---------- placering ---------- */

.wiwp-slide {
  position: fixed;
  z-index: 99999;
  right: 24px;
  bottom: 24px;
  width: 372px;
  max-width: calc(100vw - 20px);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.4s var(--wiwp-ease), transform 0.5s var(--wiwp-ease);
}
.wiwp-slide.is-open { opacity: 1; transform: none; }

.wiwp-card {
  max-width: 560px;
  margin: 32px 0;
}

/* ---------- det vinrøde felt med notifikationen ---------- */

.wiwp-stage {
  position: relative;
  height: 124px;
  padding: 46px 20px 0;
  background:
    radial-gradient(120% 160% at 88% -30%, var(--wiwp-wine-glow) 0%, rgba(163, 33, 44, 0) 55%),
    radial-gradient(90% 120% at 0% 120%, var(--wiwp-wine-deep) 0%, rgba(74, 7, 16, 0) 70%),
    var(--wiwp-wine);
}
/* en blød "vinoverflade" i bunden af feltet */
.wiwp-stage::after {
  content: '';
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -22px;
  height: 44px;
  border-radius: 50%;
  background: var(--wiwp-paper);
}

.wiwp-note {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 11px;
  align-items: flex-start;
  width: 100%;
  max-width: 330px;
  margin: 0 auto;
  padding: 11px 12px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 28px -10px rgba(40, 4, 9, 0.55), 0 1px 2px rgba(0, 0, 0, 0.08);
  transform: translateY(8px);
}
.wiwp-slide .wiwp-note,
.wiwp-card .wiwp-note {
  opacity: 0;
  transform: translateY(-10px) scale(0.97);
  transition: opacity 0.45s var(--wiwp-ease) 0.3s, transform 0.6s var(--wiwp-ease) 0.3s;
}
.wiwp-slide.is-open .wiwp-note,
.wiwp-card.is-open .wiwp-note {
  opacity: 1;
  transform: translateY(8px);
}

.wiwp-note-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--wiwp-wine);
}
.wiwp-note-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }

.wiwp-note-text { min-width: 0; flex: 1; line-height: 1.3; }
.wiwp-note-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--wiwp-muted);
  margin-bottom: 2px;
}
.wiwp-note-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--wiwp-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wiwp-note-body {
  font-size: 12.5px;
  color: var(--wiwp-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- indhold ---------- */

.wiwp-body { padding: 30px 24px 22px; }

.wiwp-title {
  margin: 0 0 8px !important;
  padding: 0 !important;
  font-family: var(--wiwp-serif) !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.01em;
  color: var(--wiwp-ink) !important;
  text-transform: none !important;
}
.wiwp-text {
  margin: 0 0 18px !important;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--wiwp-muted);
}

.wiwp-label { display: block; margin: 0 0 14px; }
.wiwp-label-text {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--wiwp-ink);
}
.wiwp-input {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  color: var(--wiwp-ink);
  background: #fff;
  border: 1px solid #d8cec5;
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.wiwp-input:focus {
  outline: none;
  border-color: var(--wiwp-wine);
  box-shadow: 0 0 0 3px rgba(121, 13, 22, 0.15);
}

.wiwp-actions { display: flex; align-items: center; gap: 14px; }
.wiwp-btn {
  position: relative;
  flex: 1;
  height: 48px;
  padding: 0 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background: var(--wiwp-wine);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 8px 18px -8px rgba(121, 13, 22, 0.7);
  transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.wiwp-btn:hover { background: var(--wiwp-wine-deep); box-shadow: 0 10px 22px -8px rgba(74, 7, 16, 0.8); }
.wiwp-btn:active { transform: translateY(1px); }
.wiwp-btn:disabled { cursor: default; }
.wiwp-btn.is-busy { color: transparent; }
.wiwp-btn.is-busy::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: wiwp-spin 0.7s linear infinite;
}
@keyframes wiwp-spin { to { transform: rotate(360deg); } }

.wiwp-later {
  flex: 0 0 auto;
  padding: 8px 2px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--wiwp-muted);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(111, 101, 94, 0.4);
  text-underline-offset: 4px;
}
.wiwp-later:hover { color: var(--wiwp-ink); text-decoration-color: currentColor; }

.wiwp-msg { margin: 12px 0 0; font-size: 13.5px; line-height: 1.45; }
.wiwp-msg:empty { display: none; }
.wiwp-msg.is-error { color: var(--wiwp-wine); }

.wiwp-fine {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--wiwp-line);
  font-size: 12px;
  line-height: 1.5;
  color: var(--wiwp-muted);
}

.wiwp-close {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 9px;
  width: 30px;
  height: 30px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s;
}
.wiwp-close:hover { background: rgba(255, 255, 255, 0.26); }

.wiwp-btn:focus-visible,
.wiwp-later:focus-visible { outline: 2px solid var(--wiwp-wine); outline-offset: 3px; }
.wiwp-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- efter tilmelding ---------- */

.wiwp-body.is-done { text-align: center; padding-top: 26px; }
.wiwp-done-badge {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--wiwp-wine);
  border-radius: 50%;
  animation: wiwp-pop 0.5s var(--wiwp-ease);
}
.wiwp-body.is-done .wiwp-text { margin-bottom: 0 !important; }
@keyframes wiwp-pop {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}
.wiwp-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- mobil ---------- */

@media (max-width: 600px) {
  .wiwp-slide {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-width: none;
    border-radius: 18px;
  }
  .wiwp-stage { height: 116px; padding-top: 42px; }
  .wiwp-body { padding: 26px 20px 18px; }
  .wiwp-title { font-size: 20px !important; }
  .wiwp-text { font-size: 14px; margin-bottom: 16px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .wiwp-slide,
  .wiwp-slide .wiwp-note,
  .wiwp-card .wiwp-note { transition: none; }
  .wiwp-done-badge { animation: none; }
}
