/* The Calendar, its feed link, who's going to an event, and the More screen: the month grid with its dots (category
   color and icon, an amber or red ring for slipping or late), the picked day's list under the month on a phone and
   beside it on a laptop, the week as an agenda, and the event's list. Colors only from brand.css. */

.tag.on { background: var(--ok-bg); color: var(--ok); }

/* The month's or week's name, back and next, then Month or Week and Today. */
.cal-card { display: grid; gap: 16px; padding: 20px 12px; }
.cal-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 0 8px; }
.cal-title { font-size: 26px; font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; }
.cal-nav { display: flex; gap: 6px; }
.cal-tools { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.cal-tools .seg { flex-wrap: nowrap; gap: 6px; }
.cal-card .pad-note { padding: 0 8px; }
.cal-card[aria-busy="true"] .month { opacity: .55; }

/* The month: seven columns of days, each a button with its number and up to four dots. */
.month { display: grid; gap: 4px; transition: opacity .2s var(--ease); }
.month-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wd { padding: 2px 0 4px; text-align: center; font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--slate); overflow: hidden; }
.day {
  display: grid; align-content: start; justify-items: center; gap: 4px; min-width: 0; min-height: 72px; padding: 5px 2px 7px;
  border: 1.5px solid transparent; border-radius: 12px; background: var(--off); color: var(--navy); cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.day.out { background: none; }
.day.out .day-n { color: var(--slate); font-weight: 600; }
@media (hover: hover) { .day:hover { border-color: var(--hair); } }
.day[aria-selected="true"] { background: var(--ice); border-color: var(--navy); }
.day-n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.is-today .day-n { background: var(--fill); color: var(--on-fill); }
.holiday .day-n { text-decoration: underline dotted; text-underline-offset: 3px; }
.dots { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 5px; max-width: 42px; }
.cal-dot { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 5px; }
.cal-dot .ic { width: 12px; height: 12px; color: var(--on-color); stroke-width: 2.4; }
.more-n { font-size: 12px; font-weight: 900; color: var(--slate); line-height: 16px; }
.ring-slip { box-shadow: 0 0 0 1.5px var(--white), 0 0 0 3.5px var(--slip); }
.ring-late { box-shadow: 0 0 0 1.5px var(--white), 0 0 0 3.5px var(--late); }
.tile.proj { background: var(--panel); }

/* The picked day's list, and each item on it. */
.cal-split { display: grid; gap: 18px; }
.cal-day { display: grid; gap: 4px; padding-top: 14px; border-top: 1px solid var(--hair); }
.day-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 0 8px; font-size: 21px; font-weight: 900; line-height: 1.2; }
.day-head .tag { text-transform: uppercase; }
.cal-list { list-style: none; padding: 0; display: grid; }
.cal-item + .cal-item { border-top: 1px solid var(--hair); }
.cal-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 8px; border-radius: 12px; color: inherit; text-decoration: none; }
@media (hover: hover) { a.cal-row:hover { background: var(--off); } }
.cal-row .row-go { align-self: center; }
.cal-tile { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; margin: 2px; }
.cal-tile .ic { width: 24px; height: 24px; color: var(--on-color); }
.cal-go { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 0 8px 14px 68px; }
.going-n { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.going-n .ic { width: 20px; height: 20px; color: var(--deep); }
.go-wrap { display: grid; gap: 6px; }
.cal-none { padding: 8px; }
.coming-go { padding: 0 12px 12px 82px; }

/* The week: each day, its name over its list on a phone, beside it on a laptop. */
.week { list-style: none; padding: 0; display: grid; gap: 6px; }
.week-day { display: grid; gap: 2px; padding: 10px 0; }
.week-day + .week-day { border-top: 1px solid var(--hair); }
.week-day.is-today { background: var(--off); }
.week-day .day-head { font-size: 19px; }
.week-day .cal-none { padding: 2px 8px; }

/* The feed link. */
.feed { display: grid; gap: 14px; justify-items: start; }
.feed h2 { font-size: 26px; font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; }
.feed .note { max-width: 62ch; }
.feed-url { justify-self: stretch; padding: 12px 14px; border-radius: 12px; background: var(--off); font-weight: 700; overflow-wrap: anywhere; }
.feed-on { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.feed-on small { color: var(--slate); font-size: 17px; }

/* Who's going, on an event's page. */
.going { display: grid; gap: 12px; }
.going .eyebrow { margin-bottom: 0; }
.going-count { display: grid; gap: 2px; }
.going-count b { font-size: 22px; font-weight: 900; }
.going-count small { color: var(--slate); font-size: 17px; }
.going-list, .going-pick { list-style: none; padding: 0; display: grid; }
.going-list li, .going-pick li { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 0; }
.going-list li + li, .going-pick li + li { border-top: 1px solid var(--hair); }
.going .row-actions .btn, .going-pick .btn { flex: none; }

/* More, on a phone. */
.more-card { padding: 8px 20px; }
.more-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--ice); color: var(--deep); }

@media (min-width: 900px) {
  .cal-card { padding: 28px 24px; }
  .cal-bar { grid-template-columns: minmax(0, 1fr) auto auto; }
  .cal-tools { grid-column: 2; grid-row: 1; justify-content: flex-end; }
  .cal-nav { grid-column: 3; grid-row: 1; }
  .cal-title { font-size: 30px; }
  .cal-split { grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); gap: 24px; align-items: start; }
  .cal-day { position: sticky; top: 24px; padding: 0 0 0 20px; border-top: 0; border-left: 1px solid var(--hair); }
  .month, .month-row { gap: 6px; }
  .day { min-height: 104px; padding: 8px 4px; }
  .dots { gap: 6px; max-width: 76px; }
  .cal-dot { width: 22px; height: 22px; border-radius: 7px; }
  .cal-dot .ic { width: 15px; height: 15px; }
  .week-day { grid-template-columns: 200px minmax(0, 1fr); align-items: start; gap: 12px; padding: 12px 0; }
  .week-day .day-head { margin: 0; padding-top: 12px; }
  .week-day .cal-none { padding: 12px 8px; }
}
