progress.css 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. /* Container for 2 synced rows */
  2. .steps { margin-bottom: 1rem; }
  3. /* Top row = your existing arrows (kept as-is) */
  4. .step-menu {
  5. display: flex;
  6. flex-wrap: wrap;
  7. padding: 0;
  8. list-style: none;
  9. justify-content: center;
  10. margin: 0 0 .25rem 0;
  11. }
  12. .step-menu li {
  13. position: relative;
  14. flex: 1 1 auto;
  15. min-width: 120px;
  16. max-width: 160px; /* match date row to keep columns aligned */
  17. text-align: center;
  18. background: #e9ecef;
  19. color: #6c757d;
  20. font-weight: 600;
  21. padding: .8rem 1rem 1rem 2rem;
  22. margin: .25rem;
  23. transition: all .3s ease;
  24. z-index: 1;
  25. }
  26. .step-menu li:before {
  27. content: '';
  28. position: absolute;
  29. border: 27px solid transparent;
  30. border-left-color: #fff;
  31. top:0; right: -60px;
  32. }
  33. .step-menu li:after {
  34. content: '';
  35. position: absolute;
  36. border: 26px solid transparent;
  37. border-left-color: #ddd;
  38. top:0; right: -50px;
  39. }
  40. /* keep your special paddings so arrows look right */
  41. .step-menu li:nth-child(1){ z-index:700; margin-left:0; padding-left:50px; }
  42. .step-menu li:nth-child(2){ z-index:600; }
  43. .step-menu li:nth-child(3){ z-index:500; }
  44. .step-menu li:nth-child(4){ z-index:400; }
  45. .step-menu li:nth-child(5){ z-index:300; }
  46. .step-menu li:nth-child(6){ z-index:200; }
  47. .step-menu li:nth-child(7){ z-index:100; padding-right:10px; }
  48. .step-menu li:nth-child(7):after,
  49. .step-menu li:nth-child(7):before { border:none; }
  50. /* State colours (same as you had) */
  51. .step-menu li.current { background:#97846E; color:#EADFD7; }
  52. .step-menu li.current:after { border-left-color:#97846E; }
  53. .step-menu li.pending { background:#e9ecef; color:#055160; }
  54. .step-menu li.pending:after { border-left-color:#e9ecef; }
  55. .step-menu li.complete { background:#d1e7dd; color:#0f5132; }
  56. .step-menu li.complete:after { border-left-color:#d1e7dd; }
  57. .step-menu li.upcoming { background:#dee2e6; color:#495057; }
  58. .step-menu li.upcoming:after { border-left-color:#dee2e6; }
  59. /* Bottom row = dates */
  60. .step-dates{
  61. display:flex;
  62. flex-wrap:wrap;
  63. padding:0;
  64. list-style:none;
  65. justify-content:center;
  66. margin: 0;
  67. }
  68. .step-dates li{
  69. flex: 1 1 auto;
  70. min-width: 120px;
  71. max-width: 160px; /* == step-menu li */
  72. text-align:center;
  73. margin: .25rem;
  74. padding: .25rem 1rem .5rem 1rem; /* mirror left pad so column widths match */
  75. font-size: .95rem;
  76. line-height: 1.2;
  77. white-space: nowrap;
  78. }
  79. .step-dates li:nth-child(1){ padding-left:50px; }
  80. .step-dates li:nth-child(7){ padding-right:10px; }
  81. /* Date colours by state */
  82. .step-dates li.complete { color:#0f5132; }
  83. .step-dates li.current { color:#7c6a57; font-weight:600; }
  84. .step-dates li.pending,
  85. .step-dates li.upcoming { color:#6c757d; }
  86. /* Mobile: stack nicely */
  87. @media (max-width: 1399px) {
  88. .step-menu li, .step-dates li { flex: 1 1 100%; max-width: 100%; }
  89. .step-menu li, .step-dates li { padding-left: 1rem; padding-right: 1rem; }
  90. .step-menu li::before,
  91. .step-menu li::after {
  92. content: none !important; /* removes the generated box */
  93. /* fallback (older browsers): */
  94. display: none !important;
  95. border: 0 !important;
  96. }
  97. }
  98. .step-menu li.complete.current {
  99. background-color: #d1e7dd; /* keep the 'complete' green */
  100. color: #0f5132;
  101. box-shadow: 0 0 0.5rem rgba(99, 90, 74, .35);
  102. border: 2px solid #97846E; /* subtle emphasis */
  103. }
  104. /* inline date under each arrow on mobile */
  105. .date-inline { display:block; }
  106. @media (max-width: 1399px) {
  107. .step-menu li {
  108. flex: 1 1 100%;
  109. margin: 0.5rem 0;
  110. }
  111. }
  112. /* Countdown container */
  113. .countdown{
  114. --number-color: #635A4A;
  115. --text-color: #D9CCC1;
  116. --dot-color: #635A4A;
  117. --dot-color-remaining: #D9CCC1;
  118. --dot-color-active: green;
  119. font-family: system-ui, sans-serif;
  120. display: grid;
  121. grid-template-columns: repeat(4, 1fr);
  122. gap: 1rem;
  123. width: min(40rem, 100%);
  124. margin-inline: auto;
  125. container: inline-size;
  126. > .part {
  127. aspect-ratio: 1/1;
  128. display: grid;
  129. place-items: center;
  130. > .remaining {
  131. grid-area: 1/1;
  132. color: hsl(0 0% 100%);
  133. display: grid;
  134. text-align: center;
  135. font-size: 3cqi;
  136. >.number {
  137. color: var(--number-color);
  138. line-height: 5rem;
  139. }
  140. >.text {
  141. color: var(--text-color);
  142. text-transform: uppercase;
  143. font-size: 0.2em;
  144. font-weight: bold;
  145. }
  146. }
  147. > .dot-container {
  148. grid-area: 1/1;
  149. height: 100%;
  150. width: 4%;
  151. rotate: calc(360deg / var(--dots) * var(--dot-idx));
  152. > .dot {
  153. width: 100%;
  154. aspect-ratio: 1/1;
  155. background-color: var(--dot-color);
  156. border-radius: 50%;
  157. transition: background-color .25s;
  158. &[data-active=true]{
  159. background-color: var(--dot-color-remaining);
  160. &[data-lastactive=true]{
  161. background-color: var(--dot-color-active);
  162. }
  163. }
  164. }
  165. }
  166. }
  167. }
  168. /* Timeline base */
  169. .timeline {
  170. position: relative;
  171. padding: 1rem 0;
  172. }
  173. .timeline::before {
  174. content: '';
  175. position: absolute;
  176. top: 0; bottom: 0; left: 50%;
  177. width: 2px; background: #e9ecef;
  178. transform: translateX(-50%);
  179. }
  180. .timeline-item {
  181. position: relative;
  182. display: flex;
  183. margin: 1rem 0;
  184. }
  185. .timeline-badge {
  186. position: absolute;
  187. left: 50%; transform: translate(-50%, 0);
  188. z-index: 2;
  189. background: #fff; border: 2px solid #dee2e6; color: #6c757d;
  190. width: 38px; height: 38px; border-radius: 50%;
  191. display: grid; place-items: center;
  192. }
  193. .timeline-panel {
  194. width: 46%;
  195. background: #fff;
  196. border: 1px solid #e9ecef;
  197. border-radius: 0;
  198. padding: .75rem .9rem;
  199. box-shadow: 0 2px 6px rgba(16,24,40,.04);
  200. }
  201. /* Left/right alternation on xl+ */
  202. @media (min-width: 1200px) {
  203. .timeline-item:nth-child(odd) .timeline-panel { margin-right: auto; }
  204. .timeline-item:nth-child(even) .timeline-panel { margin-left: auto; }
  205. }
  206. /* Pinned accent */
  207. .timeline-item.pinned .timeline-badge {
  208. border-color: #f7e7a7;
  209. background: #fff8dc;
  210. color: #856404;
  211. }
  212. /* Mobile: single column, line on the left */
  213. @media (max-width: 1199.98px) {
  214. .timeline::before { left: 20px; transform: none; }
  215. .timeline-badge { left: 20px; transform: none; }
  216. .timeline-panel { width: 100%; margin-left: 56px; }
  217. }
  218. /* base */
  219. .timeline-panel {
  220. border-left: 3px solid transparent;
  221. background: #fff;
  222. }
  223. /* incoming (council -> you) */
  224. .timeline-panel.type-incoming {
  225. border-left-color: var(--bs-primary);
  226. background-image: linear-gradient(to right, rgba(13,110,253,.06), rgba(13,110,253,0));
  227. }
  228. /* outgoing (you -> council) */
  229. .timeline-panel.type-outgoing {
  230. border-left-color: var(--bs-success);
  231. background-image: linear-gradient(to right, rgba(25,135,84,.07), rgba(25,135,84,0));
  232. }
  233. /* notes */
  234. .timeline-panel.type-note {
  235. border-left-color: var(--bs-warning);
  236. background-image: linear-gradient(to right, rgba(255,193,7,.10), rgba(255,193,7,0));
  237. }
  238. /* optional: tint the badge ring to match (if you added type-* to .timeline-item too) */
  239. .timeline-item.type-incoming .timeline-badge { border-color: rgba(13,110,253,.35); }
  240. .timeline-item.type-outgoing .timeline-badge { border-color: rgba(25,135,84,.35); }
  241. .timeline-item.type-note .timeline-badge { border-color: rgba(255,193,7,.45); }