/* A card silhouette identifies planned billing independently of earnings color. */
:root {
  --billing-marker-bg: #efedf7;
  --billing-marker-ink: #505469;
  --billing-marker-border: #c5c3d4;
}

[data-theme="dark"] {
  --billing-marker-bg: #373847;
  --billing-marker-ink: #e5e3f2;
  --billing-marker-border: #6d6c82;
}

.billing-marker {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 26px;
  height: 22px;
  border: 1px solid var(--billing-marker-border);
  border-radius: 7px;
  background: var(--billing-marker-bg);
  color: var(--billing-marker-ink);
  vertical-align: middle;
  line-height: 1;
  isolation: isolate;
}

.billing-marker svg {
  display: block;
  width: 18px;
  height: 15px;
  flex-shrink: 0;
}

.billing-marker-count {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 13px;
  height: 13px;
  padding: 0 2px;
  border: 1px solid var(--billing-marker-border);
  border-radius: 5px;
  background: var(--billing-marker-bg);
  color: var(--billing-marker-ink);
  font: 600 8px/1 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

.day-head .billing-marker { margin-block: -2px; }
.calendar-legend .billing-marker { width: 22px; height: 18px; border-radius: 5px; }
.calendar-legend .billing-marker svg { width: 15px; height: 12px; }

@media (max-width: 680px) {
  .day-head .billing-marker {
    width: 18px;
    height: 16px;
    border-radius: 5px;
    margin-block: 0;
  }
  .day-head .billing-marker svg { width: 14px; height: 12px; }
  .day-head .billing-marker-count {
    top: -4px;
    right: -3px;
    min-width: 10px;
    height: 10px;
    font-size: 7px;
    border-radius: 4px;
  }
}

@media (max-width: 430px) {
  /* Reserve a separate bottom row so neither date nor earnings are crowded. */
  .calendar-grid .day:has(.billing-marker) { padding-bottom: 23px; }
  .day-head .billing-marker {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 18px;
    height: 15px;
  }
  .day-head .billing-marker-count { display: none; }
}
