@@ -28,122 +28,93 @@ const TopMateCard: React.FC<TopMateCardProps> = ({
2828 initial = { { opacity : 0 , y : 20 } }
2929 animate = { { opacity : 1 , y : 0 } }
3030 transition = { { duration : 0.5 } }
31- className = { `relative w-full max-w-md mx-auto rounded-3xl shadow-2xl overflow-hidden hover:shadow-3xl transition-all duration-300 transform hover:-translate-y-1 ${
31+ className = { `group relative w-full mx-auto rounded-2xl sm:rounded- 3xl shadow-xl hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-1 min-h-[365px] flex flex-col overflow-hidden ${
3232 isDark ? "bg-[#1a1a1a] text-white" : "bg-white text-black"
3333 } `}
3434 >
35- { /* Decorative Arrows */ }
36- < div className = "absolute -top-4 -left-4 flex gap-2" >
37- { [ ...Array ( 3 ) ] . map ( ( _ , i ) => (
38- < motion . div
39- key = { i }
40- initial = { { opacity : 0 , x : - 10 } }
41- animate = { { opacity : 1 , x : 0 } }
42- transition = { { delay : i * 0.1 } }
43- className = "text-purple-500"
44- >
45- < ArrowUpRight size = { 24 } className = "transform rotate-45" />
46- </ motion . div >
47- ) ) }
48- </ div >
35+ { /* Gradient Overlay - Shows on Hover */ }
36+ < div className = "absolute inset-0 bg-gradient-to-br from-purple-500/0 via-pink-500/0 to-purple-500/0 group-hover:from-purple-500/10 group-hover:via-pink-500/10 group-hover:to-purple-500/10 transition-all duration-500 pointer-events-none hover:cursor-pointer" />
4937
5038 { /* Card Content */ }
51- < div className = "p-6" >
52- { /* Header */ }
53- < div className = "flex items-center justify-between mb-4" >
54- < div className = "flex items-center gap-2" >
55- < span
56- className = { `text-sm font-medium ${
57- isDark ? "text-gray-300" : "text-gray-600"
58- } `}
59- >
60- 1:1 CALL
61- </ span >
39+ < div className = "p-6 sm:p-8 flex flex-col h-full" >
40+ { /* Header - Badge and Close Button */ }
41+ < div className = "flex items-center justify-between mb-4 sm:mb-6" >
42+ < div className = "flex items-center gap-2 sm:gap-3" >
6243 < div
63- className = { `flex items-center gap-1 ${
64- isDark ? "text-gray-400 " : "text-gray-500 "
44+ className = { `flex items-center gap-2 px-3 py-1.5 rounded-full ${
45+ isDark ? "bg-purple-500/10 " : "bg-purple-50 "
6546 } `}
6647 >
67- < Clock size = { 16 } />
68- < span className = "text-sm" > { duration } </ span >
48+ < Clock size = { 14 } className = "sm:w-4 sm:h-4" />
49+ < span className = { `text-xs sm:text-sm font-medium ${
50+ isDark ? "text-purple-300" : "text-purple-700"
51+ } `} >
52+ { duration }
53+ </ span >
6954 </ div >
7055 </ div >
7156 < button
72- className = { `text-xl font-semibold ${
57+ className = { `p-1 rounded-full transition-all hover:rotate-90 ${
7358 isDark
74- ? "text-gray-500 hover:text-gray-300 "
75- : "text-gray-400 hover:text-gray-600 "
59+ ? "text-gray-400 hover:text-white hover:bg- gray-800 "
60+ : "text-gray-500 hover:text-gray-900 hover:bg-gray-100 "
7661 } `}
7762 onClick = { ( ) => setShowTopmate ( false ) }
63+ aria-label = "Close"
7864 >
79- < span className = "sr-only" > Close</ span > ×
65+ < svg xmlns = "http://www.w3.org/2000/svg" className = "h-5 w-5" viewBox = "0 0 20 20" fill = "currentColor" >
66+ < path fillRule = "evenodd" d = "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clipRule = "evenodd" />
67+ </ svg >
8068 </ button >
8169 </ div >
8270
8371 { /* Title */ }
8472 < h2
85- className = { `text-2xl font-bold mb-4 ${
73+ className = { `text-xl sm:text- 2xl font-bold mb-3 leading-tight ${
8674 isDark ? "text-white" : "text-gray-900"
8775 } `}
8876 >
8977 { title }
9078 </ h2 >
9179
9280 { /* Description */ }
93- < p className = { `${ isDark ? "text-gray-300" : "text-gray-600" } mb-6` } >
81+ < p className = { `text-sm sm:text-base leading-relaxed flex-grow ${
82+ isDark ? "text-gray-300" : "text-gray-600"
83+ } `} >
9484 { description }
9585 </ p >
9686
9787 { /* Profile Section */ }
98- < div className = "flex items-center justify-between flex-wrap md:flex-nowrap gap-y-3" >
99- < div className = "flex items-center gap-3 min-w-0" >
88+ < div className = { `mt-6 pt-4 sm:pt-5 border-t ${
89+ isDark ? "border-gray-700" : "border-gray-200"
90+ } `} >
91+ < div className = "flex items-center gap-3 sm:gap-4" >
10092 < img
10193 src = { profileImage }
10294 alt = "Profile"
103- className = "w-12 h-12 rounded-full object-cover border -2 border -purple-200 "
95+ className = "w-12 h-12 sm:w-14 sm:h-14 rounded-full object-cover ring -2 ring -purple-500/20 flex-shrink-0 "
10496 />
105- < div className = "flex flex-col" >
106- < span
107- className = { `text-sm ${
108- isDark ? "text-gray-300" : "text-gray-600"
109- } `}
110- >
111- Book a slot at
112- </ span >
97+ < div className = "flex-1 min-w-0" >
98+ < p className = { `text-xs mb-1 ${
99+ isDark ? "text-gray-500" : "text-gray-400"
100+ } `} >
101+ Book your session
102+ </ p >
113103 < a
114104 href = { `https://topmate.io/${ username } ` }
115105 target = "_blank"
116106 rel = "noopener noreferrer"
117- className = "text-purple-500 font-semibold hover:text-purple-600 transition-colors flex items-center gap-1 truncate"
107+ className = { `group inline-flex items-center gap-1.5 font-semibold hover:gap-2 transition-all ${
108+ isDark ? "text-purple-400 hover:text-purple-300" : "text-purple-600 hover:text-purple-700"
109+ } `}
118110 >
119- < span className = "truncate " > topmate.io/{ username } </ span >
120- < ArrowUpRight size = { 16 } />
111+ < span className = "text-sm sm:text-base " > topmate.io/{ username } </ span >
112+ < ArrowUpRight size = { 16 } className = "group-hover:translate-x-0.5 group-hover:-translate-y-0.5 transition-transform" />
121113 </ a >
122114 </ div >
123115 </ div >
124- < div className = "flex items-center gap-2 shrink-0" >
125- { /* Show only the circular icon part of the Topmate logo */ }
126- < div className = "h-4 w-4 overflow-hidden flex-shrink-0 rounded-sm" >
127- < img
128- src = "/icons/topmate.png"
129- alt = "Topmate icon"
130- className = "h-4 w-auto object-cover object-left opacity-90"
131- />
132- </ div >
133- { /* Theme-aware text to ensure readability on dark backgrounds */ }
134- < span
135- className = { `text-sm font-semibold shrink-0 ${
136- isDark ? "text-gray-200" : "text-gray-700"
137- } `}
138- >
139- topmate
140- </ span >
141- </ div >
142116 </ div >
143117 </ div >
144-
145- { /* Gradient Border Effect */ }
146- < div className = "absolute inset-0 border-2 border-transparent rounded-3xl bg-gradient-to-br from-purple-500/20 to-pink-500/20 -z-10" />
147118 </ motion . div >
148119 ) ;
149120} ;
0 commit comments