/* Member offer dialog on the sign-in page (admin: Member offer) */
.gift { width: clamp(620px, 50vw, 820px); -webkit-user-select: none; user-select: none; max-width: none; max-height: calc(100dvh - 24px); margin: auto; padding: 0; border: 0; border-radius: 28px; background: #FFE9F0; color: #4A1230; overflow: auto; box-shadow: 0 0 0 1.5px #E2B84A, 0 30px 90px rgba(60, 6, 34, .5); }
.gift::backdrop { background: transparent; } /* the page stays fully visible around the card */
.gift[open] { animation: giftIn .55s cubic-bezier(.2, .9, .25, 1.12); }
@keyframes giftIn { from { opacity: 0; transform: translateY(26px) scale(.94); } }

.gift-card { position: relative; min-height: min(630px, calc(100dvh - 24px)); display: flex; justify-content: flex-end; align-items: center; background: #FFE4EC url("../img/offer/gift-for-her.jpg") left center / cover no-repeat; }
/* A soft veil behind the words, so they read well over the roses */
.gift-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 72% at 72% 50%, rgba(255, 247, 250, .88) 45%, rgba(255, 247, 250, 0) 100%); pointer-events: none; }
.gift-card { direction: ltr; } /* the photo stays on the left in every language */
.gift-photo { display: none; }
.gift-body { position: relative; z-index: 2; width: 57%; padding: 26px 46px 22px 10px; text-align: center; }
.gift-close { position: absolute; z-index: 3; top: 16px; right: 16px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .85); color: #4A1230; font-size: 20px; transition: transform .25s, background .25s; }
.gift-close:hover { background: #fff; transform: rotate(90deg); }
.gift:focus, .gift:focus-visible { outline: none; }
.gift :focus-visible { outline: 3px solid #B3124F; outline-offset: 3px; }

.gift-crown { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 8px; }
.gift-crown span { flex: 0 1 110px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, #B3124F); }
.gift-crown span:last-child { background: linear-gradient(90deg, #B3124F, transparent); }
.gift-crown svg { animation: giftBeat 1.8s ease-in-out infinite; }
@keyframes giftBeat { 0%, 40%, 100% { transform: scale(1); } 15% { transform: scale(1.1); } 28% { transform: scale(1.03); } }

.gift h2 { margin: 0 0 8px; font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.12; letter-spacing: -.01em; color: #6A0B33; }
.gift-lead { margin: 0 0 20px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(16px, 1.7vw, 20px); line-height: 1.45; color: #4F3A44; }
.gift-lead strong { color: #5B0A2D; }

.gift-prize { position: relative; display: inline-block; max-width: 100%; margin-bottom: 16px; padding-bottom: 22px; }
.gift-pill { position: relative; padding: 22px 44px 30px; border-radius: 999px; background: linear-gradient(180deg, #F52E74, #C70F52 55%, #9E0B42); box-shadow: 0 0 0 3px #F3CF74, 0 14px 30px rgba(179, 18, 79, .38), inset 0 2px 0 rgba(255, 255, 255, .5); font-family: Georgia, "Times New Roman", serif; line-height: 1; color: #fff; white-space: nowrap; overflow: hidden; }
.gift-pill::before { content: ""; position: absolute; inset: 8px; border: 1.5px dashed rgba(255, 255, 255, .75); border-radius: 999px; }
.gift-pill::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 28%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent); transform: skewX(-18deg); animation: giftShine 3.6s ease-in-out infinite; }
@keyframes giftShine { 0%, 55% { left: -40%; } 100% { left: 130%; } }
.gift-pill em { font-weight: 700; font-size: clamp(22px, 2.8vw, 36px); margin-inline-end: 8px; }
.gift-pill b { font-size: clamp(32px, 4.2vw, 54px); letter-spacing: .02em; background: linear-gradient(180deg, #FFF6D8, #F6D479 55%, #DDA832); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 1px rgba(80, 0, 30, .45)); }
.gift-bow { position: absolute; z-index: 2; width: 86px; top: -20px; right: -34px; transform: rotate(14deg); filter: drop-shadow(0 4px 5px rgba(80, 20, 20, .3)); pointer-events: none; }
.gift-tag { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); padding: 8px 28px; border-radius: 999px; background: linear-gradient(180deg, #FFEBB4, #F5CF76); box-shadow: 0 6px 14px rgba(120, 60, 0, .22); font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: clamp(15px, 1.6vw, 19px); color: #5B0A2D; white-space: nowrap; }

.gift-text { max-width: 480px; margin: 0 auto 8px; font-size: 15.5px; line-height: 1.6; color: #4A2F3B; }
.gift-line { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 12px; color: #B3124F; font-size: 16px; line-height: 1; }
.gift-line span { width: 70px; height: 1px; background: rgba(179, 18, 79, .3); }

.gift-join { display: inline-block; min-width: min(330px, 100%); padding: 16px 34px; border: 2px solid #fff; border-radius: 999px; background: linear-gradient(180deg, #A50F49, #5E0A2E); box-shadow: 0 12px 26px rgba(94, 10, 46, .38); font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 20px; color: #fff; transition: transform .2s, box-shadow .2s; }
.gift-join:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(94, 10, 46, .48); }
.gift-join span { display: inline-block; color: #FF5A7E; animation: giftBeat 1.8s ease-in-out infinite; }
.gift-later { display: block; margin: 6px auto 0; padding: 10px 14px; border: 0; background: none; font-family: Georgia, "Times New Roman", serif; font-size: 16px; color: #6A0B33; text-decoration: underline; text-underline-offset: 4px; }
.gift-note { margin: 2px auto 0; max-width: 350px; font-size: 12.5px; line-height: 1.5; color: #6B4A58; }

.gift-hearts { position: absolute; inset: 0; z-index: 1; overflow: hidden; border-radius: inherit; pointer-events: none; }
.gift-hearts span { position: absolute; bottom: -40px; color: #E0265F; opacity: 0; animation: giftFloat 9s linear infinite; }
.gift-hearts span:nth-child(1) { left: 5%; font-size: 20px; } .gift-hearts span:nth-child(2) { left: 16%; font-size: 14px; animation-delay: 2.2s; }
.gift-hearts span:nth-child(3) { left: 30%; font-size: 24px; animation-delay: 4.5s; } .gift-hearts span:nth-child(4) { left: 41%; font-size: 16px; animation-delay: 1.1s; }
.gift-hearts span:nth-child(5) { left: 47%; font-size: 22px; animation-delay: 6.2s; } .gift-hearts span:nth-child(6) { left: 62%; font-size: 13px; animation-delay: 3.3s; }
.gift-hearts span:nth-child(7) { left: 78%; font-size: 18px; animation-delay: 5.4s; } .gift-hearts span:nth-child(8) { left: 89%; font-size: 24px; animation-delay: .6s; }
.gift-hearts span:nth-child(9) { left: 95%; font-size: 15px; animation-delay: 7.3s; }
@keyframes giftFloat { 0% { transform: translateY(0) rotate(-8deg); opacity: 0; } 12% { opacity: .55; } 80% { opacity: .35; } 100% { transform: translateY(-680px) rotate(14deg); opacity: 0; } }

/* Phones and small tablets: photo on top, words below */
@media (max-width: 820px) {
  .gift { border-radius: 22px; width: min(350px, calc(100vw - 40px)); }
  .gift-card { display: block; min-height: 0; background: linear-gradient(180deg, #FFDFE9, #FFF5F8); }
  .gift-card::after { display: none; }
  .gift-photo { display: block; height: clamp(110px, 20dvh, 160px); background: url("../img/offer/gift-for-her.jpg") 3% 18% / auto 190% no-repeat; -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }
  .gift-body { width: auto; padding: 4px 18px 18px; }
  .gift-close { position: sticky; float: right; top: 10px; margin: 10px 10px -54px 0; right: 0; }
  .gift-crown { display: none; }
  .gift h2 { font-size: 26px; margin-bottom: 4px; }
  .gift-lead { margin-bottom: 18px; font-size: 15.5px; }
  .gift-line { display: none; }
  .gift-join { padding: 12px 26px; font-size: 18px; }
  .gift-later { padding: 7px 12px; font-size: 15px; }
  .gift-prize { margin-bottom: 10px; }
  .gift-pill { padding: 16px 26px 24px; }
  .gift-bow { width: 62px; top: -18px; right: -20px; }
  .gift-text { margin-bottom: 14px; font-size: 14px; line-height: 1.5; }
}

@media (max-width: 359px) {
  .gift-pill { padding: 17px 20px 25px; }
  .gift-pill em { font-size: 19px; } .gift-pill b { font-size: 28px; }
  .gift-bow { width: 52px; right: -12px; }
  .gift-tag { padding: 8px 18px; }
  .gift h2 { font-size: 25px; }
}
/* Computers: about a quarter of the screen; every size follows the card's width (--u = 1px on a 640px card) */
@media (min-width: 821px) {
  .gift { --u: calc(100cqi / 640); container-type: inline-size; border-radius: 20px; }
  .gift-card { min-height: calc(404 * var(--u)); }
  .gift-body { padding: calc(10 * var(--u)) calc(20 * var(--u)) calc(8 * var(--u)) 0; }
  .gift-close { top: 8px; right: 8px; width: 34px; height: 34px; font-size: 14px; }
  .gift-crown { gap: calc(10 * var(--u)); margin-bottom: calc(3 * var(--u)); }
  .gift-crown span { flex-basis: calc(62 * var(--u)); height: 1.5px; }
  .gift-crown svg { width: calc(29 * var(--u)); height: calc(33 * var(--u)); }
  .gift h2 { margin-bottom: calc(4 * var(--u)); font-size: calc(25 * var(--u)); }
  .gift-lead { margin-bottom: calc(13 * var(--u)); font-size: calc(13.5 * var(--u)); line-height: 1.35; }
  .gift-prize { margin-bottom: calc(9 * var(--u)); padding-bottom: calc(13 * var(--u)); }
  .gift-pill { padding: calc(13 * var(--u)) calc(28 * var(--u)) calc(19 * var(--u)); }
  .gift-pill::before { inset: calc(5 * var(--u)); border-width: 1px; }
  .gift-pill em { margin-inline-end: calc(5 * var(--u)); font-size: calc(21 * var(--u)); }
  .gift-pill b { font-size: calc(32 * var(--u)); }
  .gift-bow { width: calc(50 * var(--u)); top: calc(-12 * var(--u)); right: calc(-19 * var(--u)); }
  .gift-tag { padding: calc(5 * var(--u)) calc(17 * var(--u)); font-size: calc(12.5 * var(--u)); }
  .gift-text { max-width: calc(325 * var(--u)); margin-bottom: calc(9 * var(--u)); font-size: calc(12.5 * var(--u)); line-height: 1.45; }
  .gift-line { display: none; }
  .gift-join { min-width: calc(200 * var(--u)); padding: calc(9 * var(--u)) calc(22 * var(--u)); border-width: 1.5px; font-size: calc(15 * var(--u)); }
  .gift-later { margin-top: calc(2 * var(--u)); padding: calc(4 * var(--u)) calc(10 * var(--u)); font-size: calc(13 * var(--u)); }
  .gift-note { max-width: calc(285 * var(--u)); font-size: calc(11 * var(--u)); line-height: 1.4; }
}

.gift-pill b { padding-block: .14em; } /* tall letters such as Bengali are not clipped */
.lang-ms .gift-pill { padding-inline: 18px; }
.lang-ms .gift-pill b { font-size: 25px; }
.lang-ms .gift-pill em { font-size: 18px; }
@media (min-width: 821px) {
  .lang-ms .gift-pill { padding-inline: calc(22 * var(--u)); }
  .lang-ms .gift-pill em { font-size: calc(18 * var(--u)); }
  .lang-ms .gift-pill b { font-size: calc(25 * var(--u)); }
}

@media (prefers-reduced-motion: reduce) {
  .gift[open], .gift-crown svg, .gift-join span, .gift-pill::after { animation: none; }
  .gift-hearts { display: none; }
}
