|
1 | 1 | /* certStyles.css |
2 | | - ONLY extra styles for certificate-manager page elements + hamburger |
3 | | - (Relies on variables & base layout from styles.css) |
| 2 | + Only the extra rules needed for certificate manager page + hamburger fixes. |
| 3 | + Assumes variables & base layout exist in styles.css. |
4 | 4 | */ |
5 | 5 |
|
6 | | -/* ---------- Sidebar active item ---------- */ |
| 6 | +/* --- Ensure active sidebar item styling (scoped) --- */ |
7 | 7 | .sidebar-item.active{ |
8 | 8 | color: var(--text); |
9 | 9 | background: linear-gradient(90deg, rgba(78,229,255,0.04), rgba(139,92,246,0.03)); |
10 | 10 | border-color: rgba(78,229,255,0.08); |
11 | 11 | box-shadow: 0 6px 18px rgba(78,229,255,0.03); |
12 | 12 | } |
13 | 13 |
|
14 | | -/* ---------- Recommended box (small summary card) ---------- */ |
| 14 | +/* --- Prevent horizontal overflow caused by panel/content area --- */ |
| 15 | +.content-area{ |
| 16 | + /* avoid accidental horizontal overflow from children */ |
| 17 | + overflow-x: hidden; |
| 18 | + position: relative; /* needed for positioned children like update popup */ |
| 19 | +} |
| 20 | + |
| 21 | +/* Panel should not create horizontal scroll and should scroll vertically within the content-area */ |
| 22 | +.panel{ |
| 23 | + overflow-x: hidden; /* no horizontal scroll */ |
| 24 | + overflow-y: auto; /* vertical scrolling inside the panel */ |
| 25 | + min-height: 0; /* allow proper flexbox scrolling */ |
| 26 | + box-sizing: border-box; |
| 27 | +} |
| 28 | + |
| 29 | +/* --- Recommended box / cert grid (scoped) --- */ |
15 | 30 | .recommended-box{ |
16 | 31 | width:100%; |
17 | 32 | margin-bottom:12px; |
|
20 | 35 | padding: 12px; |
21 | 36 | border-radius: 10px; |
22 | 37 | color: var(--muted); |
23 | | -} |
24 | | -.recommended-box h3{ |
25 | | - margin:0 0 6px 0; |
26 | | - font-size: 0.98rem; |
27 | | - color: var(--accent); |
28 | | - font-weight:700; |
29 | | -} |
30 | | -.recommended-box p{ |
31 | | - margin:0; |
32 | | - color: var(--text); |
33 | | - font-weight:600; |
34 | | - line-height:1.25; |
35 | | -} |
36 | | - |
37 | | -/* ---------- Controls row (placeholder) ---------- */ |
38 | | -.controls-row{ |
39 | | - display:flex; |
40 | | - gap:10px; |
41 | | - align-items:center; |
42 | | - margin: 8px 0 12px 0; |
| 38 | + box-sizing: border-box; |
43 | 39 | } |
44 | 40 |
|
45 | | -/* ---------- Certificate cards grid ---------- */ |
| 41 | +/* grid of cert cards */ |
46 | 42 | .cert-list{ |
47 | 43 | display:grid; |
48 | 44 | grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); |
49 | 45 | gap: 14px; |
50 | 46 | margin-top:6px; |
| 47 | + box-sizing: border-box; |
51 | 48 | } |
52 | 49 |
|
53 | | -/* card */ |
| 50 | +/* cert card basics */ |
54 | 51 | .cert-card{ |
55 | 52 | background: rgba(255,255,255,0.013); |
56 | 53 | border: 1px solid var(--card-border); |
|
62 | 59 | flex-direction:column; |
63 | 60 | justify-content:space-between; |
64 | 61 | min-height:92px; |
| 62 | + box-sizing: border-box; |
65 | 63 | } |
66 | | -.cert-card:focus{ |
67 | | - outline: 3px solid rgba(78,229,255,0.08); |
68 | | - outline-offset: 3px; |
69 | | -} |
70 | | -.cert-card:hover{ |
71 | | - transform: translateY(-6px); |
72 | | - box-shadow: 0 22px 48px rgba(2,6,23,0.5); |
73 | | -} |
74 | | - |
75 | | -/* card internals */ |
76 | | -.card-top{ |
77 | | - display:flex; |
78 | | - justify-content:space-between; |
79 | | - align-items:center; |
80 | | - gap:10px; |
81 | | - margin-bottom:8px; |
82 | | -} |
83 | | -.card-title{ |
84 | | - font-weight:700; |
85 | | - color: var(--text); |
86 | | - font-size: 1rem; |
87 | | -} |
88 | | -.card-meta{ |
89 | | - color: var(--muted); |
90 | | - font-size: 0.88rem; |
91 | | - margin-top:4px; |
92 | | -} |
| 64 | +.cert-card:focus{ outline: 3px solid rgba(78,229,255,0.08); outline-offset:3px; } |
93 | 65 |
|
94 | | -/* badge */ |
95 | | -.badge{ |
96 | | - font-size: 0.78rem; |
97 | | - padding: 6px 8px; |
98 | | - border-radius: 999px; |
99 | | - font-weight:800; |
100 | | - display:inline-block; |
101 | | - line-height:1; |
102 | | - white-space:nowrap; |
103 | | -} |
104 | | -.badge.signed{ |
105 | | - background: linear-gradient(90deg, rgba(78,229,255,0.12), rgba(139,92,246,0.08)); |
106 | | - color: #021018; /* dark text like our primary buttons */ |
107 | | - box-shadow: 0 6px 14px rgba(78,229,255,0.03); |
108 | | -} |
109 | | -.badge.revoked{ |
110 | | - background: linear-gradient(90deg, rgba(255,107,107,0.12), rgba(255,107,107,0.06)); |
111 | | - color: var(--text); |
112 | | - box-shadow: none; |
113 | | -} |
| 66 | +/* badges */ |
| 67 | +.badge.signed{ background: linear-gradient(90deg, rgba(78,229,255,0.12), rgba(139,92,246,0.08)); color:#021018; } |
| 68 | +.badge.revoked{ background: linear-gradient(90deg, rgba(255,107,107,0.12), rgba(255,107,107,0.06)); color:var(--text); } |
114 | 69 |
|
115 | | -/* footer small info */ |
116 | | -.card-footer .small{ |
117 | | - color: var(--muted); |
118 | | - font-size: 0.85rem; |
119 | | - margin-top:6px; |
120 | | -} |
121 | | - |
122 | | -/* ---------- Updates area (collapsible) ---------- */ |
123 | | -/* lightweight styles only */ |
| 70 | +/* --- Updates: expand UPWARDS and overlay cert list --- */ |
124 | 71 | .updates-box{ |
125 | 72 | margin-top:12px; |
126 | 73 | padding:12px; |
127 | 74 | background: var(--glass); |
128 | 75 | border-radius:10px; |
129 | 76 | border:1px solid var(--card-border); |
130 | 77 | box-sizing: border-box; |
131 | | - overflow: hidden; |
| 78 | + |
| 79 | + /* allow the inner popup to overflow upward */ |
| 80 | + overflow: visible; |
| 81 | + position: relative; /* anchor for the absolute-updates-inner */ |
132 | 82 | } |
| 83 | + |
| 84 | +/* header row */ |
133 | 85 | .updates-header{ |
134 | 86 | display:flex; |
135 | 87 | justify-content:space-between; |
136 | 88 | align-items:center; |
137 | 89 | gap:10px; |
138 | 90 | } |
139 | | -.updates-title{ |
140 | | - margin:0; |
141 | | - font-size:0.96rem; |
142 | | - color: var(--muted); |
143 | | - font-weight:700; |
144 | | -} |
| 91 | +.updates-title{ margin:0; font-size:0.96rem; color: var(--muted); font-weight:700; } |
| 92 | + |
| 93 | +/* toggle button (visual only) */ |
145 | 94 | .updates-toggle{ |
146 | 95 | background:transparent; |
147 | 96 | border:1px solid rgba(255,255,255,0.04); |
|
150 | 99 | cursor:pointer; |
151 | 100 | color: var(--muted); |
152 | 101 | transition: transform .18s ease, color .14s; |
| 102 | + box-sizing: border-box; |
153 | 103 | } |
154 | 104 | .updates-toggle.rotated{ transform: rotate(180deg); color: var(--accent); } |
155 | 105 |
|
| 106 | +/* the inner content will float ABOVE (expand upwards) */ |
156 | 107 | .updates-inner{ |
157 | | - margin-top:10px; |
158 | | - max-height:0; |
159 | | - overflow:hidden; |
| 108 | + position: absolute; |
| 109 | + left: 0; |
| 110 | + right: 0; |
| 111 | + bottom: calc(100% + 8px); /* sit above the updates header, with a small gap */ |
| 112 | + max-height: 0; |
| 113 | + overflow: auto; |
| 114 | + background: linear-gradient(180deg, rgba(255,255,255,0.012), rgba(255,255,255,0.01)); |
| 115 | + border: 1px solid var(--card-border); |
| 116 | + border-radius: 10px; |
| 117 | + box-shadow: 0 18px 50px rgba(2,6,23,0.6); |
| 118 | + padding-left: 8px; |
| 119 | + padding-right: 8px; |
160 | 120 | transition: max-height .22s ease, padding .18s ease; |
161 | | - padding-top:0; |
162 | | - padding-bottom:0; |
| 121 | + z-index: 1300; /* sit above cert cards */ |
| 122 | + box-sizing: border-box; |
163 | 123 | } |
| 124 | + |
| 125 | +/* visual spacing for items inside the floating updates panel */ |
164 | 126 | .update-item{ |
165 | 127 | padding:8px 10px; |
166 | 128 | border-radius:8px; |
167 | 129 | background: rgba(255,255,255,0.008); |
168 | 130 | border:1px solid transparent; |
169 | 131 | color: var(--text); |
170 | 132 | font-size:0.95rem; |
171 | | - margin-bottom:8px; |
| 133 | + margin:8px; |
172 | 134 | } |
173 | 135 |
|
174 | | -/* when expanded some small padding fallback (JS resets exact height) */ |
| 136 | +/* when JS expands, JS will set maxHeight; ensure padding exists as fallback */ |
175 | 137 | .updates-box.expanded .updates-inner{ padding-top:8px; padding-bottom:8px; } |
176 | 138 |
|
177 | | -/* ---------- Modal (certificate details) ---------- */ |
178 | | -.modal{ |
179 | | - position: fixed; |
180 | | - inset: 0; |
181 | | - display:flex; |
182 | | - align-items:center; |
183 | | - justify-content:center; |
184 | | - background: rgba(2,6,23,0.6); |
185 | | - z-index: 1400; |
186 | | - opacity: 0; |
187 | | - pointer-events: none; |
188 | | - transition: opacity .16s ease; |
189 | | -} |
190 | | -.modal.show{ |
191 | | - opacity:1; |
192 | | - pointer-events: auto; |
193 | | -} |
| 139 | +/* --- Modal adjustments (scoped) --- */ |
194 | 140 | .modal-panel{ |
195 | | - background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); |
196 | | - border:1px solid var(--card-border); |
197 | | - padding: 20px; |
198 | | - border-radius: 12px; |
199 | | - width: clamp(320px, 72vw, 760px); |
| 141 | + box-sizing: border-box; |
200 | 142 | max-height: 90vh; |
201 | | - overflow:auto; |
202 | | - position:relative; |
203 | | - box-shadow: 0 30px 80px rgba(2,6,23,0.75); |
204 | | -} |
205 | | -.modal-close{ |
206 | | - position:absolute; |
207 | | - top:10px; |
208 | | - right:10px; |
209 | | - background:transparent; |
210 | | - border:none; |
211 | | - color: var(--muted); |
212 | | - font-size:1.05rem; |
213 | | - cursor:pointer; |
214 | | - padding:6px; |
215 | | - border-radius:8px; |
216 | | -} |
217 | | -.modal-close:focus-visible{ outline: 3px solid rgba(78,229,255,0.12); } |
218 | | -.modal-meta, .modal-dates{ color: var(--muted); margin-top:8px; font-weight:600; } |
219 | | -.modal-download{ margin-top:12px; } |
220 | | - |
221 | | -/* Download link inside modal styled as primary button */ |
222 | | -.download-link{ |
223 | | - display:inline-block; |
224 | | - padding:10px 14px; |
225 | | - border-radius:10px; |
226 | | - background: linear-gradient(90deg, var(--accent), var(--accent-2)); |
227 | | - color:#021018; |
228 | | - font-weight:700; |
229 | | - text-decoration:none; |
230 | | -} |
231 | | - |
232 | | -/* Accessibility focus for interactive elements inside the cert area */ |
233 | | -.recommended-box a:focus, |
234 | | -.cert-card:focus, |
235 | | -.updates-toggle:focus, |
236 | | -.download-link:focus{ |
237 | | - outline: 3px solid rgba(78,229,255,0.10); |
238 | | - outline-offset: 3px; |
| 143 | + overflow:auto; /* allow modal content to scroll vertically */ |
239 | 144 | } |
240 | 145 |
|
241 | | -/* ---------- Hamburger (visual) ---------- */ |
242 | | -/* only the minimal visual tweaks here; behaviour is JS-driven */ |
243 | | -.hamburger{ |
244 | | - display:none; /* base layout shows/hides in styles.css media queries; keep safe here */ |
245 | | - background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent); |
246 | | - border: 1px solid rgba(255,255,255,0.04); |
247 | | - color: var(--muted); |
248 | | - padding: 10px; |
249 | | - border-radius: 10px; |
250 | | - cursor: pointer; |
251 | | - backdrop-filter: blur(6px); |
| 146 | +/* small-screen niceties */ |
| 147 | +@media (max-width: 520px){ |
| 148 | + .updates-inner{ right: auto; left: 6px; bottom: calc(100% + 6px); max-width: calc(100vw - 12px); } |
| 149 | + .cert-list{ gap: 10px; } |
252 | 150 | } |
253 | | -/* shown by styles.css media query — keep visual consistent */ |
0 commit comments