/* Tomatoro page: the art inside the feature tiles and the three widget mocks.
   Depends on tomatoro.css for the phase colours, the ring button and the panel pieces. */

/* ---------- Feature tiles ---------- */
/* A piece of the panel on an opaque card. */
.art-presets, .art-goal { padding: 6px 18px 16px; border-radius: 14px; background: var(--m-solid); box-shadow: 0 0 0 0.5px var(--m-edge), 0 8px 24px rgba(0, 0, 0, 0.12); }
.art-presets { width: min(336px, 100%); }
.art-goal { width: min(300px, 100%); padding-top: 0; }
/* Custom tab: the app's four cycle fields, two by two: a label over a 52x24 hairline field and its unit. */
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-top: 12px; }
.steps > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 11.5px; color: var(--m-muted); }
.st { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.st b { display: grid; place-items: center; flex: none; width: 52px; height: 24px; border-radius: 6px; border: 1px solid var(--m-edge); color: var(--m-fg); font-size: 13px; font-weight: 400; }
/* The app sets every label in the system font; a clock time keeps digits of one width. */
.tile-art.drift { flex-direction: column; gap: 22px; }
.drift-line { width: 78%; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--accent) 0 38%, transparent 38% 62%, var(--accent) 62%); position: relative; }
.drift-line::before { content: "sleep"; position: absolute; left: 38%; width: 24%; top: -22px; text-align: center; font: 500 11px/1 var(--body); color: var(--muted); letter-spacing: 0.02em; border-bottom: 1px dashed var(--line-strong); padding-bottom: 8px; }
.drift-mark { position: absolute; right: -8px; top: -7px; width: 17px; height: 17px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.drift-label { font: 500 12px/1 var(--body); font-variant-numeric: tabular-nums; color: var(--muted); }
.notif { display: flex; align-items: center; gap: 8px; width: min(330px, 100%); padding: 10px 14px 10px 10px; border-radius: 16px; background: var(--m-solid); box-shadow: 0 0 0 0.5px var(--m-edge), 0 8px 24px rgba(0, 0, 0, 0.14); }
.notif img { flex: none; }
.n-text { display: flex; flex-direction: column; min-width: 0; }
.n-text b { font-weight: 600; }
.n-time { align-self: flex-start; margin-left: auto; font-size: 11.5px; color: var(--m-muted); }
.tile-art.icons { flex-direction: column; gap: 16px; }
.mini-bars { display: flex; gap: 8px; }
.mini-bar { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 6px; font: 400 13px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif; font-variant-numeric: tabular-nums; }
.mini-bar.light { background: #F3F3F5; color: #111111; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06); }
.mini-bar.dark { background: #26262B; color: #FFFFFF; }
/* The eight menu bar glyphs, four by two: a column per phase (the first is idle and goal met), the
   running shape over the paused one. The three paused shapes share one label under a rule; the
   labels of a row stand on one line. */
.glyphs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; width: min(280px, 100%); color: var(--ink); }
.glyphs li { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 5px; font-size: 12px; line-height: 1.2; text-align: center; white-space: nowrap; color: var(--muted); }
.glyphs .gl { color: var(--ink); }
.glyphs .paused { grid-column: 2 / -1; }
.glyphs .paused span { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 8px; justify-items: center; width: 100%; padding-bottom: 5px; border-bottom: 1px solid var(--line-strong); }

/* ---------- Widgets section ---------- */
.widgets-section { background: var(--surface-2); margin-top: var(--section); padding-bottom: clamp(64px, 8vw, 120px); }
/* At every width a widget stands centred in a well inside a tile. Phones: the caption under the well. */
.widgets { --well: 338px; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.wtile { min-width: 0; padding: 12px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); }
.wtile-art { display: grid; place-items: center; padding: 16px 8px; border-radius: var(--r-m); background: var(--surface-2); }
.wtile-copy { padding: 16px 6px 6px; }
.wtile h3 { margin: 0 0 0.4rem; }
.wtile p { color: var(--muted); margin: 0; }
/* From 720px the caption stands beside the well. The wells are one width, so they line up down the page. */
@media (min-width: 720px) {
  .wtile { display: grid; grid-template-columns: var(--well) minmax(0, 1fr); align-items: center; gap: 28px; padding: 22px; }
  .wtile-art { align-self: stretch; padding: 16px; }
  .wtile-copy { padding: 0; }
}
/* Full page width: a bento with one top and one bottom edge. Small over medium on the left, as two
   equal tiles; the large widget takes the right column at full height, its caption under the well.
   The right column is a well plus the tile's frame (2 x 22px padding, 2 x 1px border). */
@media (min-width: 1160px) {
  .widgets { grid-template-columns: minmax(0, 1fr) calc(var(--well) + 46px); grid-template-rows: 1fr 1fr; }
  .wtile-large { grid-area: 1 / 2 / 3 / 3; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto; gap: 20px; }
}

/* A light or dark card in the panel tint; colour only marks the phase. The sizes below are the
   app's; the page shows every widget at nine tenths, so the wide ones fit a phone's tile. */
.widget { zoom: 0.9; border-radius: 22px; background: var(--m-solid); box-shadow: var(--shadow); }

/* Small: the ring fills the widget; the glyph, the countdown and the phase sit inside its button. */
.widget.small { width: 158px; height: 158px; display: grid; place-items: center; }
.widget.small .r-btn { gap: 1px; }
.widget.small .r-btn svg { width: 11px; height: 11px; }
.r-time { font-size: 22px; letter-spacing: -0.5px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.r-cap { font-size: 11px; font-weight: 500; color: var(--m-muted); }

/* Medium: phase, time, Skip and the day's tomatoes on the left, the ring on the right. */
.widget.medium { width: min(338px, 100%); height: 158px; padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.widget.medium .w-time { font-size: 42px; margin: 1px 0 3px -1px; }
.widget.medium .p-cmds { margin-top: 9px; }
.widget.medium .r-btn svg { width: 17px; height: 17px; }
.today-line { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.today-line b { font-size: 11px; font-weight: 600; }

/* Large: the panel's hero, the Today row, the preset tabs and two captions. */
.widget.large { width: min(338px, 100%); min-height: 355px; padding: 12px 20px 14px; display: flex; flex-direction: column; }
.w-top { display: flex; align-items: flex-end; gap: 10px; margin-bottom: auto; padding-bottom: 12px; }
.widget.large .w-time { font-size: 52px; }
.widget.large .p-cmds { margin: 12px 0 6px; gap: 20px; }
.widget.large .today { height: 44px; }
.w-caps { display: flex; flex-direction: column; gap: 3px; margin-top: 10px; font-size: 12px; color: var(--m-muted); }
.w-caps b { font-weight: 500; color: var(--m-fg); }
