diff --git a/src/app/_components/payment/__tests__/payment-method-selector.test.tsx b/src/app/_components/payment/__tests__/payment-method-selector.test.tsx index e2e2a56a..6f0e6ed0 100644 --- a/src/app/_components/payment/__tests__/payment-method-selector.test.tsx +++ b/src/app/_components/payment/__tests__/payment-method-selector.test.tsx @@ -81,7 +81,7 @@ describe("PaymentMethodSelector", () => { expect(html).toContain('data-density="compact"'); expect(html).toContain("Payment Method"); expect(html).not.toContain("This caption is hidden"); - expect(html).toContain("min-h-11"); + expect(html).toContain("min-h-13"); }); it("does not render when payment method selection is unavailable", () => { diff --git a/src/app/_components/payment/payment-method-selector.tsx b/src/app/_components/payment/payment-method-selector.tsx index 9ac7d964..2e709a37 100644 --- a/src/app/_components/payment/payment-method-selector.tsx +++ b/src/app/_components/payment/payment-method-selector.tsx @@ -54,7 +54,7 @@ export function PaymentMethodSelector({ return (
@@ -63,7 +63,7 @@ export function PaymentMethodSelector({ >

Payment Method @@ -78,7 +78,7 @@ export function PaymentMethodSelector({ {paymentMethods.map((method) => { const selected = method.channel === value; const classes = [ - `flex cursor-pointer items-center justify-center text-center font-[inherit] text-[#3c3b3b] transition-[border-color,box-shadow,transform] duration-150 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent active:enabled:scale-98 disabled:cursor-not-allowed disabled:opacity-72 ${isCompact ? "min-h-11 rounded-2xl px-2 py-1.5" : "min-h-[clamp(54px,11.481vw,62px)] rounded-(--responsive-card-radius-sm,18px) px-[clamp(12px,2.593vw,14px)] py-[clamp(9px,1.852vw,10px)]"}`, + `flex cursor-pointer items-center justify-center text-center font-[inherit] text-[#3c3b3b] transition-[border-color,box-shadow,transform] duration-150 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent active:enabled:scale-98 disabled:cursor-not-allowed disabled:opacity-72 ${isCompact ? "min-h-13 rounded-[18px] px-3 py-2" : "min-h-[clamp(54px,11.481vw,62px)] rounded-(--responsive-card-radius-sm,18px) px-[clamp(12px,2.593vw,14px)] py-[clamp(9px,1.852vw,10px)]"}`, selected ? "border-2 border-[#f657a0] bg-[#fff4f9] shadow-[0_8px_18px_rgba(217,47,127,0.24),0_0_0_3px_rgba(217,47,127,0.18)] -translate-y-0.5" : "border border-[rgba(246,87,160,0.18)] bg-white shadow-[0_5px_7px_0_rgba(247,89,168,0.08)]", @@ -105,7 +105,7 @@ export function PaymentMethodSelector({ aria-hidden="true" width={122} height={29} - className={`block object-contain ${isCompact ? "max-h-7 w-[min(100%,80px)]" : "max-h-8.5 w-[min(100%,92px)]"}`} + className={`block object-contain ${isCompact ? "max-h-8 w-[min(100%,92px)]" : "max-h-8.5 w-[min(100%,92px)]"}`} /> ) : ( diff --git a/src/app/tip/__tests__/tip-screen.checkout.test.tsx b/src/app/tip/__tests__/tip-screen.checkout.test.tsx index 88c3b5dc..921ac19b 100644 --- a/src/app/tip/__tests__/tip-screen.checkout.test.tsx +++ b/src/app/tip/__tests__/tip-screen.checkout.test.tsx @@ -188,7 +188,7 @@ describe("TipScreen checkout", () => { }); }); - it("renders the compact purchase flow with character atmosphere", () => { + it("renders the enlarged purchase flow without a character Cover", () => { renderScreen(); expect(container.textContent).toContain("Send Maya a gift"); @@ -204,14 +204,10 @@ describe("TipScreen checkout", () => { ).toBe("compact"); expect(container.textContent).not.toContain("A little sweetness for today"); expect(container.textContent).not.toContain("Tip Maya"); - expect( - container - .querySelector("main") - ?.getAttribute("style"), - ).toContain('--tip-cover-image: url("/images/cover/maya.png")'); + expect(container.querySelector("main")?.getAttribute("style")).toBeNull(); expect( container.querySelectorAll('main > div[aria-hidden="true"]'), - ).toHaveLength(3); + ).toHaveLength(2); }); it.each([ diff --git a/src/app/tip/tip-screen.module.css b/src/app/tip/tip-screen.module.css index a3758a4d..310a1ddd 100644 --- a/src/app/tip/tip-screen.module.css +++ b/src/app/tip/tip-screen.module.css @@ -1,4 +1,6 @@ .shell { + --responsive-icon-button-size: 48px; + position: relative; display: flex; width: 100%; @@ -7,10 +9,10 @@ box-sizing: border-box; flex-direction: column; padding: - calc(var(--app-safe-top, 0px) + 14px) - calc(var(--app-safe-right, 0px) + clamp(14px, 4vw, 22px)) - calc(var(--app-safe-bottom, 0px) + 14px) - calc(var(--app-safe-left, 0px) + clamp(14px, 4vw, 22px)); + calc(var(--app-safe-top, 0px) + 16px) + calc(var(--app-safe-right, 0px) + clamp(16px, 4.5vw, 24px)) + calc(var(--app-safe-bottom, 0px) + 16px) + calc(var(--app-safe-left, 0px) + clamp(16px, 4.5vw, 24px)); overflow-x: hidden; overflow-y: auto; background: @@ -29,7 +31,6 @@ isolation: isolate; } -.bgImage, .bgGlowOne, .bgGlowTwo { position: absolute; @@ -37,21 +38,6 @@ pointer-events: none; } -.bgImage { - inset: 0 0 auto; - height: clamp(230px, 42vh, 330px); - background: - linear-gradient( - 180deg, - rgba(255, 242, 232, 0.3) 0%, - rgba(255, 242, 232, 0.64) 64%, - #fff2e8 96% - ), - var(--tip-cover-image) center 18% / cover no-repeat; - filter: saturate(0.95) blur(0.2px); - opacity: 0.36; -} - .bgGlowOne, .bgGlowTwo { border-radius: 999px; @@ -78,7 +64,7 @@ position: relative; z-index: 1; display: flex; - min-height: 46px; + min-height: 50px; align-items: center; } @@ -96,14 +82,15 @@ display: flex; width: 100%; min-width: 0; + flex-direction: column; align-items: center; justify-content: center; - gap: 10px; + gap: 8px; } .headerAvatar { - width: 42px; - height: 42px; + width: 48px; + height: 48px; flex: 0 0 auto; border: 2px solid rgba(255, 255, 255, 0.94); border-radius: 999px; @@ -113,16 +100,16 @@ } .headerTitle { - max-width: 220px; + max-width: 250px; margin: 0; overflow: hidden; color: #2a1a1d; font-family: var(--font-athelas), Georgia, serif; - font-size: clamp(18px, 5vw, 24px); + font-size: clamp(21px, 5.7vw, 27px); font-weight: 760; letter-spacing: -0.025em; line-height: 1.05; - text-align: left; + text-align: center; text-overflow: ellipsis; white-space: nowrap; } @@ -130,22 +117,17 @@ .supportPrompt { position: relative; z-index: 1; - min-height: 3.7em; + width: min(100%, 340px); box-sizing: border-box; - margin: 10px 0 0; - padding: 9px 13px; - border: 1px solid rgba(255, 255, 255, 0.64); - border-radius: 18px; - background: rgba(255, 255, 255, 0.7); + margin: 12px auto 0; + padding: 0 4px; color: #684d51; - font-size: clamp(12.5px, 3.45vw, 14px); + font-size: clamp(14px, 3.7vw, 15px); font-weight: 650; line-height: 1.35; text-align: center; text-wrap: balance; opacity: 0.78; - box-shadow: 0 10px 26px rgba(91, 55, 52, 0.08); - backdrop-filter: blur(12px); transition: opacity 0.24s ease; } @@ -160,8 +142,8 @@ min-height: 0; flex: 0 1 auto; flex-direction: column; - gap: 12px; - margin-top: 12px; + gap: 13px; + margin-top: 13px; } .productCard { @@ -169,10 +151,10 @@ flex: 0 1 auto; grid-template-columns: minmax(0, 1fr); align-items: center; - gap: 10px; - padding: 12px; + gap: 11px; + padding: 13px; border: 1px solid rgba(118, 61, 55, 0.09); - border-radius: 24px; + border-radius: 26px; background: rgba(255, 255, 255, 0.86); box-shadow: 0 16px 36px rgba(119, 72, 67, 0.11), @@ -182,12 +164,12 @@ .coffeeStage { position: relative; - width: clamp(136px, 40vw, 176px); + width: clamp(150px, 42vw, 184px); aspect-ratio: 1; align-self: center; justify-self: center; overflow: hidden; - border-radius: 20px; + border-radius: 22px; background: #c59b7d; box-shadow: 0 10px 24px rgba(102, 53, 39, 0.16), @@ -231,8 +213,8 @@ .tierList { display: grid; - max-height: 176px; - gap: 6px; + max-height: 190px; + gap: 7px; padding: 2px; overflow-x: hidden; overflow-y: auto; @@ -243,14 +225,14 @@ .tierOption { position: relative; display: grid; - min-height: 50px; - grid-template-columns: minmax(0, 1fr) auto 20px; + min-height: 54px; + grid-template-columns: minmax(0, 1fr) auto 22px; align-items: center; gap: 7px; box-sizing: border-box; - padding: 7px 8px 7px 10px; + padding: 8px 9px 8px 11px; border: 1px solid rgba(112, 71, 65, 0.12); - border-radius: 15px; + border-radius: 17px; background: rgba(255, 255, 255, 0.72); cursor: pointer; transition: @@ -302,7 +284,7 @@ overflow: hidden; color: #2a1b1e; font-family: var(--font-athelas), Georgia, serif; - font-size: clamp(13px, 3.7vw, 16px); + font-size: clamp(15px, 4vw, 18px); font-weight: 750; letter-spacing: -0.015em; line-height: 1.05; @@ -317,15 +299,15 @@ .tierPrice { color: #d23f79; - font-size: clamp(12px, 3.2vw, 14px); + font-size: clamp(13px, 3.5vw, 16px); font-weight: 900; white-space: nowrap; } .tierCheck { display: grid; - width: 19px; - height: 19px; + width: 22px; + height: 22px; place-items: center; border: 1px solid rgba(111, 76, 73, 0.2); border-radius: 999px; @@ -333,8 +315,8 @@ } .tierCheck svg { - width: 12px; - height: 12px; + width: 14px; + height: 14px; } .tierOption[data-selected="true"] .tierCheck { @@ -355,7 +337,7 @@ border-radius: 22px; background: rgba(255, 255, 255, 0.78); color: #76575c; - font-size: 14px; + font-size: 16px; font-weight: 700; line-height: 1.45; text-align: center; @@ -367,15 +349,15 @@ } .catalogStatus button { - min-height: 40px; - padding: 0 18px; + min-height: 44px; + padding: 0 20px; border: 0; border-radius: 999px; background: #2b1a1e; color: #ffffff; cursor: pointer; font: inherit; - font-size: 13px; + font-size: 14px; font-weight: 850; } @@ -397,21 +379,21 @@ } .skeletonImage { - width: clamp(136px, 40vw, 176px); + width: clamp(150px, 42vw, 184px); aspect-ratio: 1; justify-self: center; - border-radius: 20px; + border-radius: 22px; } .skeletonList { display: grid; - gap: 6px; + gap: 7px; } .skeletonList span { display: block; - min-height: 50px; - border-radius: 15px; + min-height: 54px; + border-radius: 17px; } .paymentMethodSlot { @@ -424,7 +406,7 @@ .checkoutButton { width: 100%; - min-height: 52px; + min-height: 58px; border: 0; border-radius: 999px; background: @@ -433,7 +415,7 @@ color: #ffffff; cursor: pointer; font: inherit; - font-size: clamp(15px, 4vw, 18px); + font-size: clamp(17px, 4.5vw, 20px); font-weight: 900; letter-spacing: -0.01em; box-shadow: @@ -456,7 +438,7 @@ .checkoutError { margin: 7px 0 0; color: #b2474f; - font-size: 12px; + font-size: 14px; font-weight: 700; line-height: 1.35; text-align: center; @@ -464,99 +446,100 @@ @media (max-width: 350px) { .shell { - padding-right: calc(var(--app-safe-right, 0px) + 11px); - padding-left: calc(var(--app-safe-left, 0px) + 11px); + padding-right: calc(var(--app-safe-right, 0px) + 12px); + padding-left: calc(var(--app-safe-left, 0px) + 12px); } .header { - min-height: 40px; + min-height: 44px; } .headerIdentity { - gap: 7px; + gap: 6px; } .headerTitle { - max-width: 170px; - font-size: 17px; + max-width: 200px; + font-size: 20px; } .productCard { - gap: 7px; - padding: 9px; + gap: 9px; + padding: 11px; } .tierOption { - grid-template-columns: minmax(0, 1fr) auto 18px; - gap: 5px; - padding-right: 6px; - padding-left: 8px; + grid-template-columns: minmax(0, 1fr) auto 20px; + gap: 6px; + padding-right: 7px; + padding-left: 9px; } .tierName { - font-size: 12px; + font-size: 14px; } .tierPrice { - font-size: 11px; + font-size: 13px; } .tierCheck { - width: 17px; - height: 17px; + width: 20px; + height: 20px; } } @media (max-height: 700px) { .shell { - padding-top: calc(var(--app-safe-top, 0px) + 9px); - padding-bottom: calc(var(--app-safe-bottom, 0px) + 9px); + --responsive-icon-button-size: 44px; + + padding-top: calc(var(--app-safe-top, 0px) + 10px); + padding-bottom: calc(var(--app-safe-bottom, 0px) + 10px); } .header { - min-height: 40px; + min-height: 44px; } .headerAvatar { - width: 38px; - height: 38px; + width: 44px; + height: 44px; } .purchaseFlow { - gap: 8px; - margin-top: 8px; + gap: 10px; + margin-top: 10px; } .supportPrompt { - min-height: 0; - margin-top: 7px; - padding: 7px 11px; - font-size: 12px; - line-height: 1.3; + margin-top: 9px; + padding: 0 3px; + font-size: 13.5px; + line-height: 1.35; } .productCard { - padding: 9px; + padding: 11px; } .coffeeStage, .skeletonImage { - width: 128px; + width: 148px; justify-self: center; } .tierList { - max-height: 148px; - gap: 5px; + max-height: 162px; + gap: 6px; } .tierOption, .skeletonList span { - min-height: 44px; + min-height: 48px; } .checkoutButton { - min-height: 48px; + min-height: 54px; } } diff --git a/src/app/tip/tip-screen.tsx b/src/app/tip/tip-screen.tsx index c53e92b8..a4c24787 100644 --- a/src/app/tip/tip-screen.tsx +++ b/src/app/tip/tip-screen.tsx @@ -1,6 +1,6 @@ "use client"; -import { useEffect, type CSSProperties } from "react"; +import { useEffect } from "react"; import { BackButton, CharacterAvatar } from "@/app/_components"; import { MobileShell } from "@/app/_components/core"; @@ -201,15 +201,7 @@ export function TipScreen({ return ( -
-