/* Reuse the panel's form, typography, button and light/dark theme tokens. */
.time-toolbar, .time-card-actions, .time-editor-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.time-help { padding: 20px; margin-bottom: 20px; }
.time-help p { color: var(--text-muted); margin: 8px 0 0; line-height: 1.6; }
.time-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 20px; }
.time-card { padding: 22px; min-width: 0; }
.time-card-heading { display: flex; gap: 12px; justify-content: space-between; align-items: start; }
.time-card h2, .time-editor h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.time-badge { flex-shrink: 0; padding: 5px 9px; border-radius: var(--radius-sm); background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border-subtle); font-size: 12px; }
.time-badge.is-match { color: var(--status-ok); }
.time-zone, .time-updated { color: var(--text-muted); }
.time-windows-summary { white-space: pre-line; line-height: 1.7; }
.time-destinations { display: grid; grid-template-columns: 70px 1fr; gap: 9px; border-top: 1px solid var(--border-subtle); padding-top: 16px; }
.time-destinations dt { color: var(--text-muted); }
.time-destinations dd { margin: 0; overflow-wrap: anywhere; }
.time-card-actions { margin: 20px 0 0; }
.time-editor { padding: 24px; }
.time-fields { min-width: 0; border: 0; padding: 0; margin: 24px 0; }
.time-rule-section h3, .time-preview h3 { font-size: 15px; margin: 0 0 8px; }
.time-window { border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 16px; margin: 14px 0; min-width: 0; }
.time-window legend { color: var(--text-muted); padding: 0 5px; }
.time-days { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 16px; }
.time-days label { display: flex; align-items: center; gap: 6px; cursor: pointer; margin: 0; }
.time-days input, .time-editor input[type="checkbox"] { width: auto; accent-color: var(--accent); }
.time-hours { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; }
.time-hours .form-field { flex: 1 1 130px; }
.time-hours .checkbox-row { align-self:end; display:inline-flex; align-items:center; gap:8px; min-height:42px; padding:9px 12px; box-sizing:border-box; margin:0; border:1px solid var(--border-strong); border-radius:var(--radius-sm); background:var(--bg-base); color:var(--text-primary); font-size:13px; line-height:1.4; white-space:nowrap; cursor:pointer; }
.time-hours .checkbox-row input[data-time-all-day] { appearance:auto; width:18px; height:18px; min-width:18px; min-height:18px; flex:0 0 18px; margin:0; padding:0; accent-color:var(--accent); color-scheme:inherit; cursor:pointer; }
.time-hours .checkbox-row:focus-within { outline:2px solid var(--accent); outline-offset:2px; }
.time-hours .checkbox-row:has(input:disabled) { opacity:0.6; cursor:not-allowed; }
.time-hours .checkbox-row input[data-time-all-day]:disabled { cursor:not-allowed; }
.time-preview { border-top: 1px solid var(--border-subtle); padding-top: 20px; }
.time-preview-controls { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; }
.time-preview-controls .form-field { flex: 1 1 240px; }
#timePreviewResult { overflow-wrap: anywhere; margin-top: 12px; }
.time-editor-actions { justify-content: flex-end; margin: 0; }
@media (max-width: 600px) {
  .time-editor, .time-card { padding: 16px; }
  .time-card-heading { flex-direction: column; }
  .time-hours, .time-preview-controls { align-items: stretch; }
}
