diff --git a/src/components/ServiceAlert.tsx b/src/components/ServiceAlert.tsx index 6b7ec97..f1d7c6a 100644 --- a/src/components/ServiceAlert.tsx +++ b/src/components/ServiceAlert.tsx @@ -56,34 +56,38 @@ export function ServiceAlert({ alerts }: ServiceAlertProps) { >
- +
-
-
- {alert.title ?? t("serviceAlert.sectionTitle")} -
- {alert.startsAt && ( -

- {new Date(alert.startsAt).toLocaleTimeString([], { - hour: "numeric", - minute: "2-digit", - })} -

- )} +
+ {alert.title ?? t("serviceAlert.sectionTitle")}
{alert.message && ( -

{alert.message}

+

+ {alert.message} +

)}
- + {/* X + timestamp share a right-hand column so the time sits tucked + under the close button, right-aligned and clear of the text flow. */} +
+ + {alert.startsAt && ( +

+ {new Date(alert.startsAt).toLocaleTimeString([], { + hour: "numeric", + minute: "2-digit", + })} +

+ )} +
))} diff --git a/src/index.css b/src/index.css index f6e09de..a793eff 100644 --- a/src/index.css +++ b/src/index.css @@ -42,6 +42,10 @@ All colors MUST be HSL. --smart-green: 143 72% 14%; /* #114533 from logo - kept for logo only */ --smart-train-green: 157 82% 37%; /* #11ab75 - real train green for UI */ --smart-gold: 36 69% 54%; /* rgb(216, 146, 63) */ + /* Deeper gold for text that needs to read clearly on light surfaces (e.g. + the service-alert card). Darkened in light mode for contrast; the .dark + override below brightens it so it stays legible on dark backgrounds. */ + --smart-gold-dark: 34 74% 38%; /* rgb(169, 107, 25) */ /* Removed --smart-light-gold - now using direct HSL values for accent */ --smart-dark-green: 143 72% 10%; /* Darker green for depth */ --smart-light-green: 143 72% 20%; /* Lighter green for accents */ @@ -141,6 +145,9 @@ All colors MUST be HSL. /* SMART Train dark theme colors */ + /* Brighter gold so alert text stays legible on the dark card. */ + --smart-gold-dark: 40 85% 62%; /* rgb(240, 186, 76) */ + /* Brighter my-trip dot so it stays vivid against dark backgrounds. */ --my-trip: 211 90% 60%; diff --git a/tailwind.config.ts b/tailwind.config.ts index 297ba18..2a94b2a 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -86,6 +86,8 @@ export default { "train-green": "hsl(var(--smart-train-green))" /* #11ab75 - main UI */, gold: "hsl(var(--smart-gold))" /* rgb(216, 146, 63) */, + "gold-dark": + "hsl(var(--smart-gold-dark))" /* deeper gold for legible text */, "dark-green": "hsl(var(--smart-dark-green))", "light-green": "hsl(var(--smart-light-green))", neutral: "hsl(228deg 2.65% 45%)" /* default sheet header */,