diff --git a/src/app/tip/__tests__/tip-screen.checkout.test.tsx b/src/app/tip/__tests__/tip-screen.checkout.test.tsx index 340ae25b..88c3b5dc 100644 --- a/src/app/tip/__tests__/tip-screen.checkout.test.tsx +++ b/src/app/tip/__tests__/tip-screen.checkout.test.tsx @@ -209,6 +209,9 @@ describe("TipScreen checkout", () => { .querySelector("main") ?.getAttribute("style"), ).toContain('--tip-cover-image: url("/images/cover/maya.png")'); + expect( + container.querySelectorAll('main > div[aria-hidden="true"]'), + ).toHaveLength(3); }); it.each([ diff --git a/src/app/tip/tip-screen.module.css b/src/app/tip/tip-screen.module.css index 9f7c60be..a3758a4d 100644 --- a/src/app/tip/tip-screen.module.css +++ b/src/app/tip/tip-screen.module.css @@ -14,42 +14,87 @@ overflow-x: hidden; overflow-y: auto; background: - radial-gradient(circle at 88% 8%, rgba(255, 116, 151, 0.14), transparent 28%), - linear-gradient(180deg, #fff2e8 0%, #fff9f4 58%, #ffffff 100%); + radial-gradient( + circle at 18% 12%, + rgba(255, 181, 105, 0.34), + transparent 32% + ), + radial-gradient( + circle at 86% 24%, + rgba(255, 85, 139, 0.2), + transparent 30% + ), + linear-gradient(180deg, #fff2e8 0%, #fff8f2 46%, #ffffff 100%); color: #25191b; isolation: isolate; } -.bgImage { +.bgImage, +.bgGlowOne, +.bgGlowTwo { position: absolute; z-index: 0; + pointer-events: none; +} + +.bgImage { inset: 0 0 auto; height: clamp(230px, 42vh, 330px); background: linear-gradient( 180deg, - rgba(255, 242, 232, 0.18) 0%, - rgba(255, 246, 239, 0.5) 62%, - #fff9f4 100% + rgba(255, 242, 232, 0.3) 0%, + rgba(255, 242, 232, 0.64) 64%, + #fff2e8 96% ), - var(--tip-cover-image) center 20% / cover no-repeat; - filter: saturate(0.9); - opacity: 0.48; - pointer-events: none; + var(--tip-cover-image) center 18% / cover no-repeat; + filter: saturate(0.95) blur(0.2px); + opacity: 0.36; +} + +.bgGlowOne, +.bgGlowTwo { + border-radius: 999px; + filter: blur(10px); +} + +.bgGlowOne { + top: 192px; + right: -86px; + width: 190px; + height: 190px; + background: rgba(255, 92, 142, 0.16); +} + +.bgGlowTwo { + bottom: 108px; + left: -98px; + width: 210px; + height: 210px; + background: rgba(255, 181, 104, 0.18); } .header { position: relative; z-index: 1; - display: grid; + display: flex; min-height: 46px; - grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: center; - gap: 8px; +} + +.contentFlow { + position: relative; + z-index: 1; + display: flex; + min-height: 0; + flex: 0 1 auto; + flex-direction: column; + margin-top: auto; } .headerIdentity { display: flex; + width: 100%; min-width: 0; align-items: center; justify-content: center; @@ -82,12 +127,6 @@ white-space: nowrap; } -.headerBalance { - display: block; - width: 42px; - height: 1px; -} - .supportPrompt { position: relative; z-index: 1; @@ -119,7 +158,7 @@ z-index: 1; display: flex; min-height: 0; - flex: 1 1 auto; + flex: 0 1 auto; flex-direction: column; gap: 12px; margin-top: 12px; @@ -128,7 +167,7 @@ .productCard { display: grid; flex: 0 1 auto; - grid-template-columns: clamp(98px, 28vw, 118px) minmax(0, 1fr); + grid-template-columns: minmax(0, 1fr); align-items: center; gap: 10px; padding: 12px; @@ -143,9 +182,10 @@ .coffeeStage { position: relative; - width: 100%; + width: clamp(136px, 40vw, 176px); aspect-ratio: 1; align-self: center; + justify-self: center; overflow: hidden; border-radius: 20px; background: #c59b7d; @@ -341,6 +381,7 @@ .productSkeleton { min-height: 174px; + margin-top: 0; } .skeletonImage, @@ -356,8 +397,9 @@ } .skeletonImage { - width: 100%; + width: clamp(136px, 40vw, 176px); aspect-ratio: 1; + justify-self: center; border-radius: 20px; } @@ -378,7 +420,6 @@ .checkoutSlot { flex: 0 0 auto; - margin-top: auto; } .checkoutButton { @@ -428,8 +469,7 @@ } .header { - grid-template-columns: 40px minmax(0, 1fr) 40px; - gap: 5px; + min-height: 40px; } .headerIdentity { @@ -442,7 +482,6 @@ } .productCard { - grid-template-columns: 82px minmax(0, 1fr); gap: 7px; padding: 9px; } @@ -497,10 +536,15 @@ } .productCard { - grid-template-columns: 92px minmax(0, 1fr); padding: 9px; } + .coffeeStage, + .skeletonImage { + width: 128px; + justify-self: center; + } + .tierList { max-height: 148px; gap: 5px; diff --git a/src/app/tip/tip-screen.tsx b/src/app/tip/tip-screen.tsx index eb6b27a4..c53e92b8 100644 --- a/src/app/tip/tip-screen.tsx +++ b/src/app/tip/tip-screen.tsx @@ -210,6 +210,8 @@ export function TipScreen({ } >
+ +- {supportPrompt.prompt} -
++ {supportPrompt.prompt} +
-+ {showCatalogError + ? "We could not load gifts for this character." + : "This character does not have any gifts available yet."} +
+ {showCatalogError ? ( + + ) : null}- {showCatalogError - ? "We could not load gifts for this character." - : "This character does not have any gifts available yet."} -
- {showCatalogError ? ( - - ) : null} -