/* Een Warm Begin: the wrapped gift in front of the tree and the dialog it opens.
   The gift shares the canvas's grid cell, so it always lies at the foot of the tree,
   whatever sits below the canvas on this screen size. The canvas is placed explicitly
   too: otherwise auto-placement moves it out of the cell the gift claims. */
.tree-stage > .canvas-wrap { grid-row: 1; grid-column: 1; }

.gift {
  grid-row: 1;
  grid-column: 1;
  align-self: end;
  justify-self: center;
  position: relative;
  left: 9%;
  bottom: 1.5%;
  z-index: 1;
  width: clamp(68px, min(9vw, 11vh), 100px);
  aspect-ratio: 120 / 112;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
}

.gift svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 12px rgba(214, 179, 106, .28));
  transform-origin: 50% 94%;
  animation: gift-nudge 7s ease-in-out 2s infinite;
  transition: transform .25s ease-out;
}

.gift:hover svg { animation: none; transform: translateY(-3px) scale(1.04); }
.gift:focus-visible { outline: 3px solid var(--pink); outline-offset: 4px; }

.gift-shadow { fill: #12060F; fill-opacity: .55; }

.gift-lid, .gift-light, .gift-sparkles {
  transform-box: fill-box;
  transition: transform .5s cubic-bezier(.3, 1.4, .5, 1), opacity .4s ease-out;
}

.gift-lid { transform-origin: 15% 100%; }
.gift-light { opacity: 0; transform-origin: 50% 100%; transform: scale(.4); }
.gift-sparkles { opacity: 0; transform-origin: 50% 100%; }

/* A small wiggle now and then, so the gift is noticed without being loud. */
@keyframes gift-nudge {
  0%, 86%, 100% { transform: rotate(0); }
  89% { transform: rotate(-4deg); }
  92% { transform: rotate(3deg); }
  95% { transform: rotate(-1.5deg); }
}

.gift.is-opening svg { animation: none; transform: none; }
.gift.is-opening .gift-lid { transform: translate(-4px, -30px) rotate(-16deg); }
.gift.is-opening .gift-light { opacity: 1; transform: scale(1.2); }
.gift.is-opening .gift-sparkles { opacity: 1; transform: translateY(-10px); transition-delay: .15s; }

.gift-dialog .eyebrow { color: #8C2239; }
.gift-dialog h2 { margin-bottom: 4px; }

.gift-dialog .gift-core {
  margin: 10px 0 18px;
  color: var(--plum-deep);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
}

.gift-date {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 20px 0 6px;
  padding: 14px 18px;
  background: var(--lilac-soft);
  border-left: 4px solid #8C2239;
  border-radius: 4px 16px 16px 4px;
}

.gift-date span {
  color: #8C2239;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.gift-date strong { color: var(--ink); font-size: 20px; font-weight: 600; }

.gift-bags {
  display: inline-block;
  margin: 12px 0 4px;
  padding: 14px 26px;
  background: var(--plum);
  color: var(--white);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s;
}

.gift-bags:hover { background: var(--plum-deep); }

/* Sideways phones: the tree is short, so is the gift. */
@media (max-height: 520px) and (min-width: 560px) {
  .gift { width: 60px; bottom: 1%; }
}

@media (max-width: 800px) {
  .gift-dialog .gift-core { font-size: 17px; }
}

/* The list of Een Warm Begin, under the save the date. */
.gift-list {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.gift-list h3 {
  margin: 0 0 4px;
  color: var(--plum-deep);
  font-size: 22px;
  line-height: 1.3;
}

.gift-list .optional { font-weight: 400; color: var(--muted); }
.gift-list legend { margin-top: 6px; }
.gift-list .list-people { max-width: 9rem; }
.gift-list .consent { margin-top: 22px; align-items: flex-start; font-size: 15px; }
.gift-list .consent input { flex: none; margin-top: 3px; }
.gift-list .list-privacy-link { margin: 6px 0 0 30px; }
.gift-list .list-privacy-link a { color: var(--plum-deep); }

.field-error {
  margin: 6px 0 0;
  color: #8A1F3D;
  font-size: 14px;
  font-weight: 600;
}

.gift-list input[aria-invalid="true"] { border-color: #8A1F3D; }
.gift-list .consent input[aria-invalid="true"] { outline: 2px solid #8A1F3D; outline-offset: 2px; }

.list-done {
  margin: 16px 0 0;
  padding: 14px 18px;
  background: var(--lilac-soft);
  border-left: 4px solid #8C2239;
  border-radius: 4px 16px 16px 4px;
  color: var(--ink);
  font-weight: 600;
}

.list-done:focus { outline: none; }

.list-privacy {
  margin-top: 24px;
  color: var(--muted);
}

.list-privacy:focus { outline: none; }
.list-privacy h4 { margin: 0 0 4px; color: var(--ink); font-size: 15px; }
.gift-dialog .list-privacy p { margin: 0 0 8px; font-size: 14px; line-height: 1.6; }
