/* Working days calculator (olano.sg/tools/working-days-calculator).
   Only the pieces the shared tool skin has no class for: the panels the mode
   switch hides, a date field with a "Today" button beside it, the row of
   weekday checkboxes for a custom work week, and the example buttons. Built
   from /styles.css tokens only, so both themes follow. */

.wdc [hidden] {
  display: none !important;
}

.wdc fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.wdc legend {
  margin-bottom: 8px;
  padding: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.wdc-date {
  display: flex;
  gap: 8px;
  align-items: stretch;
  min-width: 0;
}

.wdc-date input {
  flex: 1 1 auto;
}

.wdc-date .tool-copy {
  flex: 0 0 auto;
}

.wdc-days {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.wdc-ph {
  display: grid;
  gap: 6px;
}

.wdc-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.wdc-examples .tool-hint {
  margin-right: 2px;
}

.wdc-list-title {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.wdc textarea {
  min-height: 84px;
}

.wdc .tool-stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* The output panel is --surface-2, the same as .button-secondary, so the
   secondary actions need their own fill and edge to read as buttons. */
.wdc .tool-output .button-secondary {
  border: 1px solid var(--border-strong);
  background: var(--surface);
}

.wdc .tool-output .button-secondary:hover {
  background: var(--surface-3);
}

.wdc button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.wdc .tool-list .tool-badge {
  flex: 0 0 auto;
  margin-top: 1px;
}

/* The guide's tables: on a phone the holiday tables scroll sideways inside
   their frame (.tool-table-wrap) rather than squeezing each date onto three
   lines, and the month names read as row labels without a filled cell. */
.wdc-holidays {
  min-width: 680px;
}

.wdc-holidays td:first-child {
  white-space: nowrap;
}

.wdc-months tbody th {
  background: transparent;
  font-size: 14px;
}

@media (max-width: 560px) {
  .wdc .tool-segmented {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wdc .tool-segmented label {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
}

@media print {
  .wdc-examples,
  .wdc-date .tool-copy {
    display: none !important;
  }
}
