@import url('../shared/life-data.css');

.chp-title { margin-bottom: 1rem; }
.chp-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .625rem 1.125rem;
  border-block-end: 1px solid var(--kt-line);
  padding-block-end: 1rem;
  margin-block-end: 1rem;
}
.chp-year { width: min(100%, 10rem); }
.chp-year select { min-height: 44px; background: var(--kt-panel); }
.chp-budget { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.chp-budgets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.chp-budgets label { min-width: 0; }
.chp-budgets label span {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 44px;
  min-width: 3.65rem;
  padding: .375rem .5rem;
  border: 1px solid var(--kt-line);
  background: var(--kt-panel);
  cursor: pointer;
  text-align: center;
  font-size: .875rem;
  font-weight: 600;
}
.chp-budgets label + label span { border-inline-start: 0; }
.chp-budgets label:first-child span { border-radius: 5px 0 0 5px; }
.chp-budgets label:last-child span { border-radius: 0 5px 5px 0; }
.chp-budgets label input:checked + span { background: var(--kt-tint); color: var(--kt-accent); box-shadow: inset 0 -2px var(--kt-accent); }
.chp-budgets label input:focus-visible + span { position: relative; z-index: 1; outline: 2px solid var(--kt-accent); outline-offset: 2px; }
.chp-results-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .125rem 1rem; margin-block-end: .625rem; }
.chp-results-header h2 { margin: 0; line-height: 1.3; font-size: 1.25rem; }
.chp-results-header h2 span { color: var(--kt-accent); }
.chp-results-header p { margin: 0; color: var(--kt-muted); font-size: .875rem; }
.chp-status { margin-block: .5rem; }
.chp-results { display: grid; gap: .75rem; }
.chp-plan-head { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: .375rem .75rem; }
.chp-plan-head h3 { margin: 0; font-size: 1.125rem; line-height: 1.3; overflow-wrap: anywhere; }
.chp-shared { margin: 0 0 .25rem; color: var(--kt-accent); font-size: .8125rem; font-weight: 650; }
.chp-range { margin: .125rem 0 0; color: var(--kt-muted); font-size: .875rem; }
.chp-plan time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.chp-total { margin: 0; color: var(--kt-accent); white-space: nowrap; font-size: .875rem; font-weight: 650; }
.chp-total strong { font-size: 1.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.chp-facts { margin-block: .75rem; }
.chp-facts dd { font-size: .875rem; }
.chp-facts dd span { display: block; }
.chp-facts [data-makeup='inside'] { color: var(--kt-error); }
.chp-days {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(4.4rem, 1fr));
  gap: .25rem;
}
.chp-day {
  display: flex;
  flex-direction: column;
  min-height: 3.25rem;
  border: 1px solid var(--kt-line);
  border-radius: 4px;
  background: var(--kt-bg);
  padding: .3rem .35rem;
  line-height: 1.25;
  text-align: center;
  font-size: .75rem;
  overflow-wrap: anywhere;
}
.chp-day time { margin-bottom: .1rem; font-weight: 700; }
.chp-day[data-kind='holiday'] { background: var(--kt-tint); color: var(--kt-accent); }
.chp-day[data-kind='leave'] { background: light-dark(#fff2d7, #342a17); color: light-dark(#694911, #f8d499); }
.chp-day[data-kind='makeup_leave'] { background: light-dark(#fff0ee, #442722); color: var(--kt-error); }
.chp-share { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .625rem; margin-block-start: .625rem; }
.chp-share .kt-button { min-height: 44px; cursor: pointer; }
.chp-share-status { color: var(--kt-accent); font-size: .875rem; }
.chp-copy-fallback { min-width: 0; flex: 1 1 100%; }
.chp-method { margin-block-start: 1.25rem; }
.chp-method h2 { margin: 0 0 .25rem; font-size: 1.0625rem; }
.chp-method p { margin: 0; color: var(--kt-muted); }

@media (max-width: 34rem) {
  .chp-budget { flex: 1 1 100%; }
  .chp-days { grid-template-columns: repeat(auto-fit, minmax(4.125rem, 1fr)); }
  .chp-plan { padding: .75rem; }
}
