/* budget app */

div#sheetloader {
  margin-bottom:5px;
}
div#sheetloader > * {
  margin-left: 10px;
}

div#newsheet, div#deletesheet, div#updatesheet, div#exportsheet, div#csvimporter, div#csvexporter, #sheetrestore, #undoredo, #renamesheet, #today, #statstoggle, #stats {
  display: none;
}

div#newsheet div {
  display: inline-block;
  margin-left: 5px;
}

div#renamesheet div#sheetrenamer {
  display: none;
}

div#updatesheet div#csvupdater {
  border: 1px solid yellow;
  display: none;
}

div#updatesheet div#csvupdater * {
  font-weight: bold;
}

div#updatesheet div#csvupdater label {
  color: yellow; 
  padding-left: 5px;
  padding-right: 5px;
}

div#updatesheet div#csvupdater input {
  background-color: yellow;
  color: black;
}

div#updatesheet div#csvupdater input#updatesavebtn {
  display: none;
}

table {
  display: none;
  border: 1px solid grey;
  border-collapse: collapse;
  overflow-y: auto;
}

table#stats {
  margin: 0 0 1em 0;
  border-width: 3px;
  width: auto;
}

table#budget {
  height: calc(100vh - 50px);
}

td, th {
  border: 1px solid grey;
  padding: 3px;
  font-size: 13px;
  white-space: nowrap;
}

table#budget thead tr {
  position: sticky; 
  top: 0;
  background: black;
}

/* these need to be modified to match celltype='type' schema */
table#budget td[celltype="amount"],
table#budget td[celltype="acct"],
table#budget td[celltype="visa"],
table#budget td[celltype="reserve"],
table#budget td[celltype="net"],
table#budget td[celltype="date"] {
  font-family: monospace;
  text-align: right;
}
table#budget td[celltype="date"] input {
  width: 5em;
}

table#budget td[celltype="amount"].posamt {
  color: lightgreen;
  font-weight: bold;
}

table#budget td.accthi {
  color: green;
  font-weight: bold;
}

table#budget td select, table#budget td input {
  background: black;
  border: none;
}

table#budget tr.selected {
  background-color: darkgrey;
}

table#budget tr#initbal td select, table#budget td input {
  color: white;
}

table#budget td.past input {
  color: cornflowerblue;
}

table#budget td.error input {
  color: red;
}

table#budget td.controls {
  display: flex;
  flex-direction: row;
}

table#budget td#chainafter {
  text-align: left;
}

table#budget td#chaincell {
  position: relative;
  text-align: right;
}

table#budget td#chaincell #chainhover {
  visibility: hidden;
  color: white;
  background-color: black;
  border-radius: 5px;
  border: 1px solid orange;
  padding: 5px;
  width: 20em;
  position: absolute;
  bottom: 150%;
  right: 3em;
  z-index: 1;
}

table#budget td#chaincell:hover #chainhover {
  visibility: visible;
}

table#budget td[celltype="draghandle"] {
  color: orange;
  font-weight: bold;
  font-size: larger;
  padding: 0px 10px;
}

table#budget td.fail {
  background-color: pink;
  color: black;
}

table#budget td.error {
  color: red;
}

.dragover td {
  background-color: #333;
}

/* EOF */
