/* Paycheck calendar page.
   Goes with: js/screens/calendar.js. */

/* Title and hint on top, the year picker centered under them. */
.cal-hint {
  margin: -6px 0 12px;
}
/* The year picker spans a wide, centered bar: arrows at the ends, a large year. */
.cal-yearpick {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  margin: 4px auto 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-sizing: border-box;
}
.cal-yearpick .btn {
  min-width: 48px;
  justify-content: center;
}
.cal-yearpick b {
  flex: 1;
  text-align: center;
  font-size: 26px;
  letter-spacing: -.01em;
}
.cal-legend {
  justify-content: center;
  margin: 12px 0 14px;
}
/* Each month box is centered: name, label line, dots, amount, "take-home". */
.cal {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(150px,1fr));
  gap: 10px;
}
.cal .m {
  border: 1px solid var(--line);
  padding: 12px 14px;
  border-radius: 14px;
  text-align: center;
}
/* Highlights use a 1px inner ring on top of the 1px border, so a highlighted
   box is exactly the same size as the others. */
.cal .m.extra {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: color-mix(in srgb,var(--accent) 7%,var(--card));
}
/* The current month: a darker border and a "Now" label, different from the
   accent used for extra-paycheck months. */
.cal .m.now {
  border-color: var(--ink2);
  box-shadow: inset 0 0 0 1px var(--ink2);
}
.cal .m.now.extra {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.cal .m b {
  display: block;
  font-size: 14px;
}
.cal .tags {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  height: 20px;
  margin: 4px 0 0;
}
.cal .dots {
  margin: 6px 0;
  justify-content: center;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.cal .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.cal .amt {
  display: block;
  font-size: 16px;
  font-weight: 700;
}
.cal .m small {
  display: block;
  font-size: 12px;
  color: var(--mute);
}
@media screen and (max-width:640px) {
  .cal {
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 8px;
  }
  .cal .m {
    padding: 9px 6px;
  }
  .cal .m b {
    font-size: 13px;
  }
  .cal .amt {
    font-size: 14px;
  }
  .cal .m small {
    font-size: 11px;
  }
  .cal .dots {
    margin: 4px 0;
  }
  .cal .dot {
    width: 7px;
    height: 7px;
  }
}
@media screen and (min-width:900px) {
  .cal {
    grid-template-columns: repeat(6,minmax(0,1fr));
  }
}

