1+ /* certStyles.css
2+ Works with your existing styles.css (which you pasted).
3+ - Forces .panel to allow full-width children (fixes centering/overflow)
4+ - Responsive grid: multiple cards per row (auto-fit / auto-fill)
5+ - Cards sized sensibly (not too tall) and content clipped elegantly
6+ - Keeps light theme visual look
7+ */
8+
19: root {
210 --bg : # f6f7fb ;
311 --panel : # ffffff ;
1220 font-family : 'Inter' , system-ui, -apple-system, "Segoe UI" , Roboto, "Helvetica Neue" , Arial;
1321}
1422
15- /* Layout basics */
16- html , body {
17- height : 100% ;
18- margin : 0 ;
19- background : var (--bg );
20- color : var (--text );
21- -webkit-font-smoothing : antialiased;
22- -moz-osx-font-smoothing : grayscale;
23- font-size : 14px ;
24- }
25-
26- .app-root {
27- min-height : 100vh ;
28- display : flex;
29- flex-direction : column;
30- }
31-
32- /* Header */
33- .header-bar {
34- display : flex;
35- align-items : center;
36- padding : 12px 18px ;
37- background : transparent;
38- }
39- .header-left { display : flex; align-items : center; gap : 12px ; }
40- .dot-container { display : flex; gap : 6px ; align-items : center; }
41- .dot { width : 12px ; height : 12px ; border-radius : 50% ; box-shadow : rgba (2 , 6 , 23 , 0.06 ) 0 1px 2px ; }
42- .app-title { margin : 0 ; font-weight : 600 ; font-size : 16px ; color : var (--text ); }
43-
44- /* Main content area */
45- .content-area {
46- flex : 1 ;
47- display : flex;
48- gap : 12px ;
49- padding : 12px ;
50- box-sizing : border-box;
51- align-items : stretch;
52- }
53-
54- /* Sidebar */
55- .sidebar {
56- width : 220px ;
57- min-width : 160px ;
58- max-width : 240px ;
59- background : transparent;
60- display : flex;
61- flex-direction : column;
62- gap : 8px ;
63- }
64- .sidebar-item {
65- padding : 10px 12px ;
66- border-radius : 8px ;
67- cursor : pointer;
68- color : var (--muted );
69- font-weight : 600 ;
70- }
71- .sidebar-item .active {
72- color : var (--primary );
73- background : linear-gradient (180deg , rgba (37 , 99 , 235 , 0.06 ), rgba (37 , 99 , 235 , 0.03 ));
74- }
23+ /* -------------------------
24+ Panel / layout adjustments
25+ ------------------------- */
7526
76- /* Panel: main scroll area */
77- .panel {
78- flex : 1 ;
27+ /* Make sure panel lets children use full width and allows proper scrolling.
28+ Using higher specificity to safely override your styles.css align-items:center. */
29+ main .panel {
30+ align-items : stretch; /* allow grid to expand horizontally */
31+ padding : 18px ; /* consistent inner padding */
7932 background : var (--panel );
80- padding : 18px ;
8133 border-radius : 12px ;
8234 box-shadow : var (--shadow );
83- display : flex;
84- flex-direction : column;
85- gap : 12px ;
86- min-height : 0 ; /* important so children can scroll */
35+ display : flex;
36+ flex-direction : column;
37+ gap : 12px ;
38+ min-height : 0 ; /* critical for flex children to scroll */
8739 overflow : hidden;
40+ box-sizing : border-box;
41+ min-width : 0 ; /* critical to allow shrinking without forcing single-column */
8842}
8943
90- /* Make the content inside the panel scrollable if tall */
91- .cert-list , .updates-box , .recommended-box {
92- /* visual grouping only; cert-list will flex-grow */
93- }
44+ /* If your base styles are even more specific, this extra selector helps ensure override */
45+ body main .panel { min-width : 0 ; }
9446
95- /* Recommended box */
47+ /* -------------------------
48+ Recommended box
49+ ------------------------- */
9650.recommended-box {
9751 border-left : 4px solid var (--primary );
9852 padding : 12px 14px ;
9953 background : linear-gradient (180deg , # ffffff, # fbfcff );
10054 border-radius : 8px ;
55+ box-sizing : border-box;
10156}
10257.recommended-box h3 { margin : 0 0 6px 0 ; color : var (--primary ); font-weight : 600 ; }
10358.recommended-box p { margin : 0 ; color : var (--muted ); }
10459
105- /* Certificate list area should scroll while keeping header + recommended + updates visible */
60+ /* -------------------------
61+ Cert list grid (RESPONSIVE)
62+ ------------------------- */
63+ /* Grid is the primary scrollable area inside the panel */
10664.cert-list {
10765 display : grid;
108- grid-template-columns : repeat (auto-fit, minmax (260px , 1fr ));
66+ width : 100% ;
67+ /* auto-fit/auto-fill combined with minmax ensures responsive multi-column */
68+ grid-template-columns : repeat (auto-fill, minmax (260px , 1fr ));
10969 gap : 12px ;
11070 margin-top : 6px ;
111- /* allow cert-list to take remaining space then scroll if overflowing */
71+
72+ /* allow grid to grow and scroll vertically inside the panel */
11273 flex : 1 1 auto;
113- min-height : 0 ; /* allow proper scroll */
114- overflow : auto;
74+ min-height : 0 ; /* critical for children scrolling inside flex container */
75+ overflow-y : auto;
76+ overflow-x : hidden;
11577 padding-right : 6px ; /* room for scrollbar */
78+ box-sizing : border-box;
79+ }
80+
81+ /* Small tweak for very narrow screens */
82+ @media (max-width : 360px ) {
83+ .cert-list { grid-template-columns : 1fr ; gap : 10px ; }
11684}
11785
118- /* individual card */
86+ /* -------------------------
87+ Certificate card
88+ ------------------------- */
89+ /* Make card compact (not too tall) while still flexible */
11990.cert-card {
12091 background : var (--panel );
12192 border : 1px solid var (--card-border );
12293 padding : 12px ;
12394 border-radius : 10px ;
12495 cursor : pointer;
12596 transition : transform .12s ease, box-shadow .12s ease;
126- display : flex;
127- flex-direction : column;
128- gap : 8px ;
97+ display : flex;
98+ flex-direction : column;
99+ justify-content : space-between; /* pushes footer down without needing huge height */
100+ gap : 10px ;
101+ box-sizing : border-box;
102+
103+ /* sensible size constraints so card never gets huge */
104+ min-height : 100px ;
105+ max-height : 160px ;
106+ height : auto;
107+ overflow : hidden; /* clip overflowing text nicely */
129108}
109+
110+ /* hover pop */
130111.cert-card : hover {
131112 transform : translateY (-6px );
132113 box-shadow : 0 10px 26px rgba (15 , 23 , 36 , 0.08 );
133114}
115+
116+ /* Top row: title + badge */
134117.card-top {
135118 display : flex;
136- align-items : center ;
119+ align-items : flex-start ;
137120 justify-content : space-between;
121+ gap : 10px ;
138122}
123+
124+ /* title: clamp lines so long names don't expand the card too much */
139125.card-title {
140126 font-weight : 600 ;
141127 font-size : 15px ;
142128 color : var (--text );
143129 line-height : 1.2 ;
130+ margin : 0 ;
131+ overflow : hidden;
132+ text-overflow : ellipsis;
133+ display : -webkit-box;
134+ -webkit-line-clamp : 2 ; /* show up to 2 lines */
135+ -webkit-box-orient : vertical;
136+ word-break : break-word;
144137}
145- .card-meta { font-size : 13px ; color : var (--muted ); }
138+
139+ /* meta smaller and muted */
140+ .card-meta {
141+ font-size : 13px ;
142+ color : var (--muted );
143+ margin-top : 4px ;
144+ overflow : hidden;
145+ text-overflow : ellipsis;
146+ white-space : nowrap;
147+ }
148+
149+ /* Badges */
146150.badge {
147151 padding : 6px 8px ;
148152 border-radius : 999px ;
149153 font-size : 12px ;
150154 font-weight : 700 ;
151- display : inline-block;
152- white-space : nowrap;
155+ display : inline-flex;
156+ align-items : center;
157+ justify-content : center;
153158 min-width : 78px ;
154159 text-align : center;
155160}
@@ -164,23 +169,36 @@ html,body{
164169 border : 1px solid rgba (14 , 165 , 164 , 0.12 );
165170}
166171
167- /* small footer row inside card */
172+ /* Footer row */
168173.card-footer {
169174 display : flex;
170175 justify-content : space-between;
171176 align-items : center;
172177 gap : 10px ;
173178 margin-top : 6px ;
179+ font-size : 13px ;
180+ color : var (--muted );
174181}
175- .card-footer .small { font-size : 12 px ; color : var (--muted ); }
182+ .card-footer .small { font-size : 13 px ; color : var (--muted ); }
176183
177- /* Updates box */
184+ /* If content needs a little vertical spacing but we want to keep max-height */
185+ .card-main {
186+ display : flex;
187+ flex-direction : column;
188+ gap : 8px ;
189+ overflow : hidden;
190+ }
191+
192+ /* -------------------------
193+ Updates area
194+ ------------------------- */
178195.updates-box {
179196 margin-top : 6px ;
180197 padding : 12px ;
181198 background : var (--glass );
182199 border-radius : 10px ;
183200 border : 1px solid var (--card-border );
201+ box-sizing : border-box;
184202}
185203.updates-title { margin : 0 0 8px 0 ; font-weight : 600 ; color : var (--text ); }
186204.updates-inner {
@@ -190,7 +208,9 @@ html,body{
190208}
191209.update-item { margin-bottom : 8px ; font-size : 13px ; color : var (--muted ); }
192210
193- /* Modal */
211+ /* -------------------------
212+ Modal styles (keeps modal consistent)
213+ ------------------------- */
194214.modal {
195215 position : fixed;
196216 inset : 0 ;
@@ -208,6 +228,7 @@ html,body{
208228 padding : 20px ;
209229 box-shadow : 0 20px 60px rgba (2 , 6 , 23 , 0.35 );
210230 position : relative;
231+ box-sizing : border-box;
211232}
212233.modal-close {
213234 position : absolute;
@@ -232,32 +253,24 @@ html,body{
232253 font-weight : 600 ;
233254}
234255
235- /* small responsive tweaks */
236- @media (max-width : 880px ){
237- .sidebar { display : none; }
238- .content-area { padding : 12px ; }
239- }
240- @media (max-width : 420px ){
241- .modal-panel { padding : 14px ; }
242- .cert-list { gap : 10px ; }
243- }
244-
245- /* 🚨 CRITICAL FIX: allow grid to use full width */
246- .panel {
247- min-width : 0 ;
256+ /* -------------------------
257+ Accessibility / focus
258+ ------------------------- */
259+ .cert-card : focus {
260+ outline : 3px solid rgba (37 , 99 , 235 , 0.12 );
261+ outline-offset : 2px ;
248262}
249263
250- /* allow cert grid to expand and wrap properly */
251- . cert-list {
252- width : 100 % ;
253- min -width: 0 ;
254- display : grid;
255- grid-template-columns : repeat (auto-fill , minmax ( 280 px , 1 fr ));
256- align-items : stretch;
264+ /* -------------------------
265+ Responsive tweaks
266+ ------------------------- */
267+ @media ( max -width: 880 px ) {
268+ /* Hide sidebar on small screens - keep panel full width */
269+ . sidebar { display : none !important ; }
270+ . content-area { padding : 12 px ; }
257271}
258272
259- /* ensure flex parents don’t force single column */
260- .content-area ,
261- .panel {
262- box-sizing : border-box;
273+ @media (max-width : 420px ) {
274+ .cert-list { grid-template-columns : 1fr ; gap : 10px ; }
275+ .modal-panel { padding : 14px ; }
263276}
0 commit comments