site.css 4.5 KB

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