/* "Refer & earn" announcement (refer-news.js): the site's paper card, with a
   gift on top. It took over the slot the old service notice used. */

html.refer-news-open {
  overflow: hidden;
}

.refer-news-pop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(30, 22, 14, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.refer-news-pop.is-in {
  opacity: 1;
}

.refer-news-card {
  position: relative;
  width: min(500px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 28px 26px 22px;
  color: #2a2016;
  background: linear-gradient(180deg, rgba(255, 252, 244, 0.72), rgba(255, 252, 244, 0) 40%), #fbf7f0;
  border: 1px solid #3a2c1e;
  border-radius: 14px;
  box-shadow: 0 4px 14px -10px rgba(42, 32, 22, 0.24), 0 30px 80px rgba(0, 0, 0, 0.45);
  transform: translateY(24px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.refer-news-pop.is-in .refer-news-card {
  transform: none;
}

/* A sketched gift that pops in and gives one small wiggle. */
.refer-news-gift {
  width: 64px;
  height: 64px;
  margin: 0 0 8px;
  transform-origin: 50% 80%;
  animation: refer-news-gift 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.4) 0.25s both;
}

.refer-news-gift svg {
  width: 100%;
  height: 100%;
  fill: #f2c14e;
  stroke: #3a2c1e;
  stroke-width: 2.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.refer-news-gift svg path {
  fill: none;
  stroke: #8e3a1c;
}

@keyframes refer-news-gift {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }
  60% {
    opacity: 1;
    transform: scale(1.08);
  }
  80% {
    transform: scale(0.98);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

.refer-news-badge {
  display: inline-block;
  margin: 0 0 10px;
  padding: 5px 14px;
  border-radius: 999px;
  background: #8e3a1c;
  color: #fcf9f3;
  font: 800 12px "Sora", sans-serif;
  letter-spacing: 0.16em;
}

.refer-news-title {
  margin: 0 0 10px;
  font: 800 25px/1.15 "Sora", sans-serif;
  letter-spacing: -0.02em;
}

.refer-news-sub {
  margin: 0 0 14px;
  font-size: 15.5px;
  line-height: 1.55;
}

.refer-news-points {
  margin: 0 0 12px;
  padding: 12px 14px 12px 32px;
  background: rgba(255, 252, 244, 0.6);
  border: 1px solid rgba(58, 44, 30, 0.35);
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.5;
}

.refer-news-points li + li {
  margin-top: 6px;
}

.refer-news-points strong {
  color: #6e2c14;
}

.refer-news-fine {
  margin: 0 0 16px;
  color: #5a4630;
  font-size: 12.5px;
  line-height: 1.45;
}

.refer-news-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.refer-news-go {
  padding: 12px 22px;
  border: 1px solid #3a2c1e;
  border-radius: 12px;
  background: #8e3a1c;
  color: #fff;
  text-decoration: none;
  font: 700 15px "Sora", sans-serif;
  box-shadow: 0 4px 14px -10px rgba(42, 32, 22, 0.24);
}

.refer-news-go:hover {
  background: #743016;
}

.refer-news-later {
  padding: 11px 16px;
  border: 0;
  background: transparent;
  color: #5a4630;
  cursor: pointer;
  font: 600 14.5px "Sora", sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.refer-news-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #3a2c1e;
  border-radius: 50%;
  background: #fbf7f0;
  color: #2a2016;
  cursor: pointer;
  box-shadow: 0 4px 14px -10px rgba(42, 32, 22, 0.24);
}

.refer-news-close:hover {
  background: #f3ece0;
}

.refer-news-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
}

.refer-news-go:focus-visible,
.refer-news-later:focus-visible,
.refer-news-close:focus-visible {
  outline: 3px solid #8e3a1c;
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .refer-news-card {
    padding: 24px 18px 18px;
  }

  .refer-news-title {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .refer-news-pop,
  .refer-news-card,
  .refer-news-gift {
    transition: none;
    animation: none;
  }
}
