/* Parvin's new look (November 2026)
   Turned on by <html data-look="fresh">, which assets/look.js sets from Settings > Look.
   Every rule is scoped to that attribute, so "Classic look" (data-look="classic") shows the app
   exactly as before. To retire the new look, remove this file, look.js and their two lines in
   caregiver-preview.html.

   Based on the Parvin design system: Poppins for interface text, Caveat for the wordmark, the
   original Heart P logo (the #i-logo symbol, unchanged), the Sunrise-Rose-Berry gradient for one
   moment per screen, rounder cards (28px) and controls (16px), and calmer, softer surfaces.
   Ideas borrowed: one clear summary at the top (Apple Health), only what needs you (Things 3),
   the day as one timeline (Structured), Parvin always one tap away. */

/* ---------- The centre Parvin button on phones only exists in the new look ---------- */
html:not([data-look="fresh"]) .ek-nav-talk {
  display: none !important;
}

html[data-look="fresh"] {
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-surface: 28px;
  --r-control: 16px;
  --line-strong: #e6cfc8;
  --ek-gradient: linear-gradient(135deg, #ff9a3c 0%, #ff4d6d 55%, #c9306b 100%);
  --ek-shadow: 0 1px 2px #1e14160a, 0 8px 24px #c9306b0f;
}

/* ---------- Base ---------- */
html[data-look="fresh"] body {
  font-size: 16px;
  line-height: 1.55;
}
html[data-look="fresh"] h1,
html[data-look="fresh"] h2,
html[data-look="fresh"] h3,
html[data-look="fresh"] h4 {
  font-weight: 600;
  letter-spacing: -0.01em;
}
html[data-look="fresh"] h2 {
  font-size: 20px;
}
html[data-look="fresh"] h3 {
  font-size: 17px;
}
html[data-look="fresh"] .ek-brand,
html[data-look="fresh"] .ek-brand-word {
  font-family: var(--font-brand);
  font-weight: 700;
}

/* ---------- Surfaces ---------- */
html[data-look="fresh"] .card {
  border-radius: var(--r-surface);
  border-color: var(--line);
  box-shadow: var(--ek-shadow);
  padding: clamp(18px, 2.4vw, 24px);
  margin-bottom: 20px;
}
html[data-look="fresh"] .card .card {
  border-radius: 20px;
  box-shadow: none;
}
html[data-look="fresh"] .note,
html[data-look="fresh"] .result {
  border-radius: 16px;
}
html[data-look="fresh"] fieldset {
  border-radius: 20px;
}

/* ---------- Buttons and fields ---------- */
html[data-look="fresh"] .primary,
html[data-look="fresh"] .secondary,
html[data-look="fresh"] .ek-button {
  min-height: 48px;
  padding: 12px 20px;
  border-radius: var(--r-control);
  font-weight: 600;
}
html[data-look="fresh"] .primary {
  box-shadow: 0 4px 12px #c9306b29;
}
html[data-look="fresh"] .secondary {
  color: var(--ink);
  border-color: var(--line);
  background: var(--paper);
}
html[data-look="fresh"] .secondary:hover {
  background: var(--mist);
  border-color: var(--line-strong);
}
html[data-look="fresh"] .secondary[aria-pressed="true"] {
  border: 2px solid var(--pine);
  background: var(--pine-soft);
  color: var(--pine-deep);
}
/* Arrange your screens: the row's small buttons stay compact, or a row runs past the card on a
   phone and the down arrow is cut off. */
html[data-look="fresh"] .ek-arrange-row {
  gap: 6px;
}
html[data-look="fresh"] .ek-arrange-row .secondary {
  min-height: 40px;
  padding: 0 10px;
}
html[data-look="fresh"] .ek-arrange-row .ek-arrange-step {
  width: 40px;
  padding: 0;
}
html[data-look="fresh"] .ek-link {
  font-weight: 600;
  text-decoration: none;
}
html[data-look="fresh"] .ek-link:hover {
  text-decoration: underline;
}
html[data-look="fresh"] input,
html[data-look="fresh"] select,
html[data-look="fresh"] textarea {
  border-radius: var(--r-control);
  border-color: var(--line-strong);
  min-height: 48px;
  padding: 12px 14px;
}
html[data-look="fresh"] input[type="checkbox"],
html[data-look="fresh"] input[type="radio"] {
  min-height: 0;
  padding: 0;
  border-radius: 6px;
}
html[data-look="fresh"] .pill,
html[data-look="fresh"] .badge {
  font-weight: 600;
}
html[data-look="fresh"] .ek-tabs {
  border-radius: 999px;
  padding: 4px;
}
html[data-look="fresh"] .ek-tabs button {
  border-radius: 999px;
  font-weight: 600;
}
html[data-look="fresh"] .ek-tabs button.active {
  box-shadow: 0 1px 3px #1e14161f;
}

/* ---------- Desktop sidebar: light, with the original Heart P logo ---------- */
html[data-look="fresh"] #ekDesktopNav {
  background: var(--paper);
  color: var(--ink);
  border-right: 1px solid var(--line);
  padding: 22px 14px;
}
html[data-look="fresh"] #ekDesktopNav .ek-brand {
  font-size: 32px;
  line-height: 1;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 10px 18px;
}
html[data-look="fresh"] #ekDesktopNav .ek-brand .ek-icon {
  width: 30px;
  height: 30px;
}
html[data-look="fresh"] .ek-nav-group {
  color: var(--sage);
}
html[data-look="fresh"] #ekDesktopNav button {
  color: var(--ink);
  font-weight: 500;
  font-size: 15px;
  border-radius: 14px;
}
html[data-look="fresh"] #ekDesktopNav button .ek-icon {
  color: var(--sage);
}
html[data-look="fresh"] #ekDesktopNav button:hover {
  background: var(--mist);
}
html[data-look="fresh"] #ekDesktopNav button.active {
  background: var(--pine-soft);
  color: var(--pine-deep);
  font-weight: 600;
}
html[data-look="fresh"] #ekDesktopNav button.active .ek-icon {
  color: var(--pine);
}
html[data-look="fresh"] .ek-nav-foot {
  color: var(--sage);
}

/* ---------- Top bar ---------- */
html[data-look="fresh"] #ekWelcomeBanner {
  background: #fff6f3eb;
  border-bottom-color: transparent;
  box-shadow: 0 1px 0 var(--line);
}
html[data-look="fresh"] .ek-icon-button,
html[data-look="fresh"] .ek-avatar-button {
  border-radius: 16px;
}

/* ---------- Pages ---------- */
html[data-look="fresh"] .ek-page-head {
  margin-bottom: 22px;
}
html[data-look="fresh"] .ek-page-head h1 {
  font-weight: 600;
  font-size: clamp(26px, 3vw, 30px);
}
html[data-look="fresh"] .ek-list-head {
  margin-bottom: 10px;
}

/* ---------- Today: a summary card with the one gradient moment ---------- */
html[data-look="fresh"] .ek-today-head {
  align-items: stretch;
  margin: 4px 0 24px;
}
html[data-look="fresh"] .ek-today-head > div:first-child {
  position: relative;
  flex: 1 1 420px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  box-shadow: var(--ek-shadow);
  padding: 30px 24px 22px;
  overflow: hidden;
}
html[data-look="fresh"] .ek-today-head > div:first-child::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: var(--ek-gradient);
}
html[data-look="fresh"] .ek-today-date {
  font-size: 14px;
}
html[data-look="fresh"] #ekTodaySummary {
  font-weight: 600;
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.3;
  max-width: 34ch;
}
/* The care recipient's card beside it: a proper card the same height as the summary, not a pill
   (it holds the latest update and the Call, Emergency info and Post an update buttons). */
html[data-look="fresh"] .ekRecipientCard {
  align-self: stretch;
  flex: 1 1 340px;
  max-width: 460px;
  border-radius: var(--r-surface);
  box-shadow: var(--ek-shadow);
}
html[data-look="fresh"] .ek-today-head .ekRecipientCard {
  margin-top: 0;
}
html[data-look="fresh"] .ekRecipientCard.ek-now-card {
  align-content: start;
  padding: 20px;
  gap: 12px 14px;
}
html[data-look="fresh"] .ekRecipientCard .secondary {
  border-radius: var(--r-control);
}
@media (max-width: 900px) {
  html[data-look="fresh"] .ekRecipientCard {
    max-width: none;
  }
}

/* "Needs attention": a coloured dot instead of a side bar, rows that breathe */
html[data-look="fresh"] .ek-attention-row {
  grid-template-columns: 12px minmax(0, 1fr) auto;
  padding: 14px 8px;
  border-radius: 16px;
  border-bottom: 0;
}
html[data-look="fresh"] .ek-attention li + li {
  border-top: 1px solid var(--line);
}
html[data-look="fresh"] .ek-attention-row::before {
  align-self: center;
  width: 12px;
  height: 12px;
  border-radius: 6px;
}
html[data-look="fresh"] .ek-attention-title {
  font-weight: 600;
}
html[data-look="fresh"] .ek-when {
  font-weight: 600;
}

/* "Coming up": the day as one timeline */
html[data-look="fresh"] .ekUpcomingRow {
  position: relative;
  border-bottom: 0;
  padding: 12px 8px;
  border-radius: 16px;
}
html[data-look="fresh"] .ekUpcomingRow::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
html[data-look="fresh"] .ekUpcomingRow:first-child::before {
  top: 50%;
}
html[data-look="fresh"] .ekUpcomingRow:last-child::before {
  bottom: 50%;
}
html[data-look="fresh"] .ekUpcomingRow:only-child::before {
  display: none;
}
html[data-look="fresh"] .ekUpcomingIcon {
  position: relative;
  z-index: 1;
  border-radius: 18px;
  box-shadow: 0 0 0 4px var(--paper);
}
html[data-look="fresh"] .ekUpcomingTitle {
  font-weight: 600;
}
html[data-look="fresh"] .ekUpcomingBadge {
  font-weight: 600;
}

/* The small "Talk to Parvin" pill on Today becomes a proper button */
html[data-look="fresh"] .ek-pip-summon {
  min-height: 44px;
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  box-shadow: var(--ek-shadow);
  font-weight: 600;
}

/* ---------- Phone bottom bar, with a raised Parvin button (original logo) in the middle ---------- */
@media (max-width: 900px) {
  html[data-look="fresh"] #ekBottomNav {
    align-items: end;
    border-top-color: var(--line);
    box-shadow: 0 -6px 20px #1e14160d;
    padding-top: 8px;
  }
  html[data-look="fresh"] #ekBottomNav button {
    font-size: 11px;
    gap: 4px;
  }
  html[data-look="fresh"] #ekBottomNav button .ek-icon {
    width: 40px;
    height: 28px;
    padding: 3px 9px;
    border-radius: 999px;
    box-sizing: border-box;
  }
  html[data-look="fresh"] #ekBottomNav button.active .ek-icon {
    background: var(--pine-soft);
  }
  html[data-look="fresh"] #ekBottomNav .ek-nav-talk {
    color: var(--pine-deep);
  }
  html[data-look="fresh"] #ekBottomNav .ek-nav-talk .ek-talk-disc {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-top: -26px;
    border-radius: 27px;
    background: var(--ek-gradient);
    color: #fff;
    border: 4px solid var(--mist);
    box-shadow: 0 6px 16px #c9306b40;
  }
  /* The voice button keeps working exactly as before; it just wears the brand gradient. */
  html[data-look="fresh"] .ek-talk-fab {
    background: var(--ek-gradient);
    width: 56px;
    height: 56px;
  }
}
@media (min-width: 901px) {
  #ekBottomNav .ek-nav-talk {
    display: none;
  }
}

/* ---------- Settings: the two look choices side by side ---------- */
html[data-look] .ek-look-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Today's top row (see everkin.css): no width cap or offset on the care recipient's card there. */
html[data-look="fresh"] .ek-today-top > .ekRecipientCard {
  max-width: none;
  margin-top: 0;
  flex: 1 1 340px;
}
html[data-look="fresh"] .ek-today-head > div:first-child {
  flex: none;
}
html[data-look="fresh"] .ek-today-top > .ekRecipientCard.ek-now-card {
  align-content: center;
}
html[data-look="fresh"] .ek-today-top > .ekRecipientCard.ek-now-card {
  padding: clamp(20px, 2.2vw, 32px);
}
html[data-look="fresh"] .ek-contact-delete {
  color: #b42318;
}
