site.css 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. :root {
  2. --control-bar-height: 44px;
  3. }
  4. body {
  5. font-family: 'Helvetica Neue', Verdana, Helvetica, Arial, sans-serif;
  6. max-width: 600px;
  7. margin: 0;
  8. padding-bottom: var(--control-bar-height);
  9. -webkit-font-smoothing: antialiased;
  10. font-size: 1.125em;
  11. color: #333;
  12. line-height: 1.5em;
  13. }
  14. /* On narrow screens, contain scroll to the sheet area so position:fixed
  15. stays anchored to the viewport rather than the document bottom. */
  16. @media (max-width: 767px) {
  17. html, body {
  18. height: 100%;
  19. overflow: hidden;
  20. padding-bottom: 0;
  21. }
  22. #app {
  23. height: 100%;
  24. display: flex;
  25. flex-direction: column;
  26. }
  27. #main-layout {
  28. flex: 1;
  29. display: flex;
  30. flex-direction: column;
  31. min-height: 0;
  32. }
  33. .sheet-container {
  34. flex: 1;
  35. overflow: auto;
  36. min-height: 0;
  37. padding-bottom: var(--control-bar-height);
  38. }
  39. }
  40. h1, h2, h3 {
  41. color: #000;
  42. }
  43. h1 {
  44. font-size: 2.5em
  45. }
  46. h2 {
  47. font-size: 2em
  48. }
  49. h3 {
  50. font-size: 1.5em
  51. }
  52. a {
  53. text-decoration: none;
  54. color: #09f;
  55. }
  56. a:hover {
  57. text-decoration: underline;
  58. }
  59. #main-table {
  60. /*position: fixed;
  61. top: 0;
  62. left: 0;*/
  63. }
  64. table {
  65. border-collapse: separate;
  66. border-spacing: 0;
  67. border-top: 1px solid black;
  68. border-left: 1px solid black;
  69. }
  70. td, th {
  71. border-right: 1px solid black;
  72. border-bottom: 1px solid black;
  73. padding: 0;
  74. }
  75. /* Sticky column headers (top row) */
  76. #main-table tr:first-child th {
  77. position: sticky;
  78. top: 0;
  79. z-index: 1;
  80. background: white;
  81. }
  82. /* Sticky row headers (left column) */
  83. #main-table tr:not(:first-child) th {
  84. position: sticky;
  85. left: 0;
  86. z-index: 1;
  87. background: white;
  88. }
  89. /* Corner cell: sticky in both directions */
  90. #main-table tr:first-child th:first-child {
  91. left: 0;
  92. z-index: 2;
  93. }
  94. /* Totals row: pinned to the bottom of the viewport, just above the control bar */
  95. #main-table .totals-row th,
  96. #main-table .totals-row td {
  97. position: sticky;
  98. bottom: var(--control-bar-height);
  99. z-index: 1;
  100. background: #e8edf5;
  101. border-top: 2px solid #333;
  102. }
  103. /* Bottom-left corner: sticky in both directions, like the top-left corner cell */
  104. #main-table .totals-row th:first-child {
  105. z-index: 2;
  106. }
  107. .totals-row td {
  108. padding: 5px;
  109. text-align: right;
  110. font-weight: 600;
  111. }
  112. .totals-row .totals-error {
  113. color: #b00020;
  114. }
  115. th {
  116. text-align: center;
  117. min-width: 40px;
  118. }
  119. td {
  120. text-align: right;
  121. position: relative;
  122. }
  123. td input.highlighted {
  124. background-color: lightblue;
  125. }
  126. td input {
  127. border: none;
  128. padding: 5px;
  129. width: 80px;
  130. }
  131. td input:hover {
  132. background-color: #ccc;
  133. }
  134. td input:focus {
  135. background-color: #ccf;
  136. }
  137. td input:not(:focus) {
  138. text-align: right;
  139. }
  140. /* ── Control bar ── */
  141. #control-bar {
  142. position: fixed;
  143. bottom: 0;
  144. left: 0;
  145. right: 0;
  146. height: var(--control-bar-height);
  147. display: flex;
  148. align-items: center;
  149. background: #f5f5f5;
  150. border-top: 1px solid #ccc;
  151. z-index: 999;
  152. }
  153. #bar-logo {
  154. height: var(--control-bar-height);
  155. width: 44px;
  156. flex-shrink: 0;
  157. display: flex;
  158. align-items: center;
  159. justify-content: center;
  160. border-right: 1px solid #ccc;
  161. }
  162. #bar-logo img {
  163. width: 100%;
  164. height: 100%;
  165. }
  166. .bar-btn {
  167. height: 100%;
  168. padding: 0 16px;
  169. border: none;
  170. border-right: 1px solid #ccc;
  171. background: none;
  172. cursor: pointer;
  173. font-size: 0.9em;
  174. color: #333;
  175. }
  176. .bar-btn:hover {
  177. background: #e8e8e8;
  178. }
  179. /* ── About modal ── */
  180. #about-modal-overlay {
  181. position: fixed;
  182. inset: 0;
  183. background: rgba(0, 0, 0, 0.45);
  184. z-index: 1000;
  185. display: flex;
  186. align-items: center;
  187. justify-content: center;
  188. padding: 16px;
  189. }
  190. #about-modal {
  191. background: white;
  192. border-radius: 8px;
  193. padding: 24px;
  194. max-width: 480px;
  195. width: 100%;
  196. max-height: 80vh;
  197. overflow-y: auto;
  198. box-shadow: 0 4px 24px rgba(0,0,0,0.2);
  199. }
  200. #about-modal button {
  201. margin-top: 12px;
  202. padding: 8px 20px;
  203. border: 1px solid #ccc;
  204. border-radius: 4px;
  205. background: #f5f5f5;
  206. cursor: pointer;
  207. }
  208. #about-modal button:hover {
  209. background: #e0e0e0;
  210. }
  211. .smartborder {
  212. width: calc(100% + 2px);
  213. height: calc(100% + 2px);
  214. border: 3px solid blue;
  215. position: absolute;
  216. left: -4px;
  217. top: -4px;
  218. background: none;
  219. z-index: 999;
  220. /*pointer-events: none;*/
  221. }
  222. td input:not(:focus) + .smartborder {
  223. visibility: hidden;
  224. }
  225. .smartborder .button {
  226. --button-size: 20px;
  227. --half-button-size: 10px;
  228. /*pointer-events: all;/* TODO check this (what is "initial"?) */
  229. width: var(--button-size);
  230. height: var(--button-size);
  231. background-color: blue;
  232. color: white;
  233. border-radius: var(--half-button-size);
  234. position: absolute;
  235. }
  236. .extendrange.button {
  237. left: 100%;
  238. top: 100%;
  239. }
  240. .fillrange.button {
  241. top: 100%;
  242. left: calc(50% - var(--half-button-size));
  243. }
  244. .moverange.button {
  245. top: calc(50% - var(--half-button-size));
  246. left: calc(0px - var(--button-size));
  247. }
  248. .emptyrange.button {
  249. top: calc(0px - var(--button-size));
  250. left: calc(100% - var(--button-size) - 5px);
  251. }
  252. .deleterange.button {
  253. top: calc(0px - var(--button-size));
  254. left: 100%;
  255. }
  256. .copyrange.button {
  257. top: calc(0px - var(--button-size));
  258. left: 0;
  259. }