PluginProbe
AI Builder – Generate pages, blocks, images & translate with AI / 2.3.11
AI Builder – Generate pages, blocks, images & translate with AI v2.3.11
2.7.10 2.7.9 2.7.8 2.0.8 2.0.9 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.3.0 2.3.10 All 122 releases
ai-builder / admin / pages / credits.php

credits.php in AI Builder – Generate pages, blocks, images & translate with AI 2.3.11, at admin/pages/credits.php

770 lines 32.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH'))
3 exit; // Exit if accessed directly
4
5 // Vérifier si l'utilisateur a un token JWT
6 $jwt_token = get_option('aibui_jwt_token', '');
7 if (empty($jwt_token)) {
8 echo '<div class="ai-auth-container"><div class="ai-message error">' . esc_html__('Please sign in to access your credits.', 'ai-builder') . '</div></div>';
9 return;
10 }
11 ?>
12
13 <div class="ai-credits-container ai-fade-in">
14 <!-- Header -->
15 <div class="ai-credits-header">
16 <h1>AI Credits & Subscription</h1>
17 <p>Manage your AI credits and subscription plan</p>
18 </div>
19
20 <!-- Current Status -->
21 <div class="ai-status-section">
22 <div class="ai-status-card">
23 <div class="ai-status-icon">
24 <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
25 <circle cx="12" cy="12" r="10" stroke="currentColor" stroke-width="2" />
26 <path d="M12 6V12L16 14" stroke="currentColor" stroke-width="2" stroke-linecap="round"
27 stroke-linejoin="round" />
28 </svg>
29 </div>
30 <div class="ai-status-content">
31 <h3>Current Credits</h3>
32 <div class="ai-credits-display" id="current-credits">
33 <span class="ai-loading" style="display: none;"></span>
34 Loading...
35 </div>
36 </div>
37 </div>
38
39 <div class="ai-status-card">
40 <div class="ai-status-icon">
41 <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
42 <path d="M12 2L2 7L12 12L22 7L12 2Z" stroke="currentColor" stroke-width="2"
43 stroke-linejoin="round" />
44 <path d="M2 17L12 22L22 17" stroke="currentColor" stroke-width="2" stroke-linejoin="round" />
45 <path d="M2 12L12 17L22 12" stroke="currentColor" stroke-width="2" stroke-linejoin="round" />
46 </svg>
47 </div>
48 <div class="ai-status-content">
49 <h3>Subscription Plan</h3>
50 <div class="ai-plan-display" id="current-plan">
51 <span class="ai-loading" style="display: none;"></span>
52 Loading...
53 </div>
54 </div>
55 </div>
56 </div>
57
58 <!-- Subscription Management -->
59 <div class="ai-section">
60 <div class="ai-section-header">
61 <h2>Subscription Management</h2>
62 <p>Choose the perfect plan for your AI needs</p>
63 </div>
64
65 <div class="ai-subscription-actions" id="subscription-plans-container">
66 <!-- Plan Essential -->
67 <div class="ai-plan-card-wrapper" data-plan="essential">
68 <div class="ai-plan-card ai-plan-essential">
69 <div class="ai-plan-badge">Essential</div>
70 <div class="ai-plan-header">
71 <div class="ai-plan-title">
72 <h3>Essential</h3>
73 </div>
74 </div>
75
76 <div class="ai-plan-features">
77 <div class="ai-feature-item">
78 <div class="ai-feature-icon">
79 <svg width="18" height="18" viewBox="0 0 24 24" fill="none"
80 xmlns="http://www.w3.org/2000/svg">
81 <path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2.5"
82 stroke-linecap="round" stroke-linejoin="round" />
83 </svg>
84 </div>
85 <span class="ai-feature-text">750 credits every month</span>
86 </div>
87
88 <div class="ai-feature-item">
89 <div class="ai-feature-icon">
90 <svg width="18" height="18" viewBox="0 0 24 24" fill="none"
91 xmlns="http://www.w3.org/2000/svg">
92 <path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2.5"
93 stroke-linecap="round" stroke-linejoin="round" />
94 </svg>
95 </div>
96 <span class="ai-feature-text">Generation of pages, blocks, images & texts</span>
97 </div>
98
99 <div class="ai-feature-item">
100 <div class="ai-feature-icon">
101 <svg width="18" height="18" viewBox="0 0 24 24" fill="none"
102 xmlns="http://www.w3.org/2000/svg">
103 <path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2.5"
104 stroke-linecap="round" stroke-linejoin="round" />
105 </svg>
106 </div>
107 <span class="ai-feature-text">Site Copilot (AI assistant)</span>
108 </div>
109
110 <div class="ai-feature-item">
111 <div class="ai-feature-icon">
112 <svg width="18" height="18" viewBox="0 0 24 24" fill="none"
113 xmlns="http://www.w3.org/2000/svg">
114 <path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2.5"
115 stroke-linecap="round" stroke-linejoin="round" />
116 </svg>
117 </div>
118 <span class="ai-feature-text">Extra credits available on demand</span>
119 </div>
120 </div>
121
122 <div class="ai-plan-header">
123 <div class="ai-plan-title">
124 <div class="ai-plan-price">
125 <span class="ai-price-amount">$9</span>
126 <span class="ai-price-period">/month</span>
127 </div>
128 <span class="ai-price-credit">$0.012 per credit</span>
129 </div>
130 </div>
131
132 <div class="ai-plan-cta">
133 <button type="button" class="ai-cta-btn ai-plan-btn" data-subscription-type="essential">
134 <span class="ai-loading" style="display: none;"></span>
135 <span class="btn-text">Choose Essential</span>
136 </button>
137 </div>
138 </div>
139 </div>
140
141 <!-- Plan Premium -->
142 <div class="ai-plan-card-wrapper" data-plan="premium">
143 <div class="ai-plan-card ai-plan-premium ai-plan-popular">
144 <div class="ai-plan-badge ai-plan-badge-popular">Most Popular</div>
145 <div class="ai-plan-header">
146 <div class="ai-plan-title">
147 <h3>Premium</h3>
148 </div>
149 </div>
150
151 <div class="ai-plan-features">
152 <div class="ai-feature-item">
153 <div class="ai-feature-icon">
154 <svg width="18" height="18" viewBox="0 0 24 24" fill="none"
155 xmlns="http://www.w3.org/2000/svg">
156 <path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2.5"
157 stroke-linecap="round" stroke-linejoin="round" />
158 </svg>
159 </div>
160 <span class="ai-feature-text">2000 credits every month</span>
161 </div>
162
163 <div class="ai-feature-item">
164 <div class="ai-feature-icon">
165 <svg width="18" height="18" viewBox="0 0 24 24" fill="none"
166 xmlns="http://www.w3.org/2000/svg">
167 <path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2.5"
168 stroke-linecap="round" stroke-linejoin="round" />
169 </svg>
170 </div>
171 <span class="ai-feature-text">Generation of pages, blocks, images & texts</span>
172 </div>
173
174 <div class="ai-feature-item">
175 <div class="ai-feature-icon">
176 <svg width="18" height="18" viewBox="0 0 24 24" fill="none"
177 xmlns="http://www.w3.org/2000/svg">
178 <path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2.5"
179 stroke-linecap="round" stroke-linejoin="round" />
180 </svg>
181 </div>
182 <span class="ai-feature-text">Site Copilot (AI assistant)</span>
183 </div>
184
185 <div class="ai-feature-item">
186 <div class="ai-feature-icon">
187 <svg width="18" height="18" viewBox="0 0 24 24" fill="none"
188 xmlns="http://www.w3.org/2000/svg">
189 <path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2.5"
190 stroke-linecap="round" stroke-linejoin="round" />
191 </svg>
192 </div>
193 <span class="ai-feature-text">Multi Page Generator</span>
194 </div>
195
196 <div class="ai-feature-item">
197 <div class="ai-feature-icon">
198 <svg width="18" height="18" viewBox="0 0 24 24" fill="none"
199 xmlns="http://www.w3.org/2000/svg">
200 <path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2.5"
201 stroke-linecap="round" stroke-linejoin="round" />
202 </svg>
203 </div>
204 <span class="ai-feature-text">Extra credits available on demand</span>
205 </div>
206 </div>
207
208 <div class="ai-plan-header">
209 <div class="ai-plan-title">
210 <div class="ai-plan-price">
211 <span class="ai-price-amount">$19</span>
212 <span class="ai-price-period">/month</span>
213 </div>
214 <span class="ai-price-credit">$0.009 per credit</span>
215 </div>
216 </div>
217
218 <div class="ai-plan-cta">
219 <button type="button" class="ai-cta-btn ai-plan-btn" data-subscription-type="premium">
220 <span class="ai-loading" style="display: none;"></span>
221 <span class="btn-text">Choose Premium</span>
222 </button>
223 </div>
224 </div>
225 </div>
226
227 <!-- Plan Creator -->
228 <div class="ai-plan-card-wrapper" data-plan="creator">
229 <div class="ai-plan-card ai-plan-creator">
230 <div class="ai-plan-badge">Creator</div>
231 <div class="ai-plan-header">
232 <div class="ai-plan-title">
233 <h3>Creator</h3>
234 </div>
235 </div>
236
237 <div class="ai-plan-features">
238 <div class="ai-feature-item">
239 <div class="ai-feature-icon">
240 <svg width="18" height="18" viewBox="0 0 24 24" fill="none"
241 xmlns="http://www.w3.org/2000/svg">
242 <path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2.5"
243 stroke-linecap="round" stroke-linejoin="round" />
244 </svg>
245 </div>
246 <span class="ai-feature-text">6000 credits every month</span>
247 </div>
248
249 <div class="ai-feature-item">
250 <div class="ai-feature-icon">
251 <svg width="18" height="18" viewBox="0 0 24 24" fill="none"
252 xmlns="http://www.w3.org/2000/svg">
253 <path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2.5"
254 stroke-linecap="round" stroke-linejoin="round" />
255 </svg>
256 </div>
257 <span class="ai-feature-text">Generation of pages, blocks, images & texts</span>
258 </div>
259
260 <div class="ai-feature-item">
261 <div class="ai-feature-icon">
262 <svg width="18" height="18" viewBox="0 0 24 24" fill="none"
263 xmlns="http://www.w3.org/2000/svg">
264 <path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2.5"
265 stroke-linecap="round" stroke-linejoin="round" />
266 </svg>
267 </div>
268 <span class="ai-feature-text">Site Copilot (AI assistant)</span>
269 </div>
270
271 <div class="ai-feature-item">
272 <div class="ai-feature-icon">
273 <svg width="18" height="18" viewBox="0 0 24 24" fill="none"
274 xmlns="http://www.w3.org/2000/svg">
275 <path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2.5"
276 stroke-linecap="round" stroke-linejoin="round" />
277 </svg>
278 </div>
279 <span class="ai-feature-text">Multi Page Generator</span>
280 </div>
281
282 <div class="ai-feature-item">
283 <div class="ai-feature-icon">
284 <svg width="18" height="18" viewBox="0 0 24 24" fill="none"
285 xmlns="http://www.w3.org/2000/svg">
286 <path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2.5"
287 stroke-linecap="round" stroke-linejoin="round" />
288 </svg>
289 </div>
290 <span class="ai-feature-text">Extra credits available on demand</span>
291 </div>
292 </div>
293
294 <div class="ai-plan-header">
295 <div class="ai-plan-title">
296 <div class="ai-plan-price">
297 <span class="ai-price-amount">$49</span>
298 <span class="ai-price-period">/month</span>
299 </div>
300 <span class="ai-price-credit">$0.008 per credit</span>
301 </div>
302 </div>
303
304 <div class="ai-plan-cta">
305 <button type="button" class="ai-cta-btn ai-plan-btn" data-subscription-type="creator">
306 <span class="ai-loading" style="display: none;"></span>
307 <span class="btn-text">Choose Creator</span>
308 </button>
309 </div>
310 </div>
311 </div>
312 </div>
313
314 <div class="ai-section-header" style="margin-bottom: 120px;">
315 </div>
316 </div>
317
318
319
320 <!-- Credit Purchase -->
321 <div class="ai-section" id="credit-purchase-section">
322 <div class="ai-section-header">
323 <h2></h2>
324 <p></p>
325 </div>
326
327 <div class="ai-credit-actions">
328 <div class="ai-action-card" id="credit-purchase-card">
329 <div class="ai-action-icon">
330 <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
331 <path d="M12 1V23" stroke="currentColor" stroke-width="2" stroke-linecap="round"
332 stroke-linejoin="round" />
333 <path
334 d="M17 5H9.5C8.57174 5 7.6815 5.36875 7.02513 6.02513C6.36875 6.6815 6 7.57174 6 8.5C6 9.42826 6.36875 10.3185 7.02513 10.9749C7.6815 11.6313 8.57174 12 9.5 12H14.5C15.4283 12 16.3185 12.3687 16.9749 13.0251C17.6313 13.6815 18 14.5717 18 15.5C18 16.4283 17.6313 17.3185 16.9749 17.9749C16.3185 18.6313 15.4283 19 14.5 19H6"
335 stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
336 </svg>
337 </div>
338 <div class="ai-action-content">
339 <h3>Purchase 750 Credits</h3>
340 <p>Buy credits immediately, pay once.</p>
341
342 <!-- Message pour utilisateurs sans abonnement -->
343 <div id="subscription-required-message" class="ai-subscription-required" style="display: none;">
344 <div class="ai-warning-icon">
345 <svg width="20" height="20" viewBox="0 0 24 24" fill="none"
346 xmlns="http://www.w3.org/2000/svg">
347 <path
348 d="M10.29 3.86L1.82 18A2 2 0 0 0 3.54 21H20.46A2 2 0 0 0 22.18 18L13.71 3.86A2 2 0 0 0 10.29 3.86Z"
349 stroke="currentColor" stroke-width="2" stroke-linecap="round"
350 stroke-linejoin="round" />
351 <path d="M12 9V13" stroke="currentColor" stroke-width="2" stroke-linecap="round"
352 stroke-linejoin="round" />
353 <circle cx="12" cy="17" r="1" stroke="currentColor" stroke-width="2" />
354 </svg>
355 </div>
356 <div class="ai-warning-content">
357 <strong>Active subscription required</strong>
358 <p>You need an active subscription to purchase additional credits. Get a subscription first
359 to unlock this feature.</p>
360 </div>
361 </div>
362
363 <button type="button" class="ai-primary-btn" id="buy-credits-btn" onclick="handleCreditPurchase()">
364 <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
365 <path d="M12 2V6" stroke="currentColor" stroke-width="2" stroke-linecap="round"
366 stroke-linejoin="round" />
367 <path d="M12 18V22" stroke="currentColor" stroke-width="2" stroke-linecap="round"
368 stroke-linejoin="round" />
369 <path d="M4.93 4.93L7.76 7.76" stroke="currentColor" stroke-width="2" stroke-linecap="round"
370 stroke-linejoin="round" />
371 <path d="M16.24 16.24L19.07 19.07" stroke="currentColor" stroke-width="2"
372 stroke-linecap="round" stroke-linejoin="round" />
373 <path d="M2 12H6" stroke="currentColor" stroke-width="2" stroke-linecap="round"
374 stroke-linejoin="round" />
375 <path d="M18 12H22" stroke="currentColor" stroke-width="2" stroke-linecap="round"
376 stroke-linejoin="round" />
377 <path d="M4.93 19.07L7.76 16.24" stroke="currentColor" stroke-width="2"
378 stroke-linecap="round" stroke-linejoin="round" />
379 <path d="M16.24 7.76L19.07 4.93" stroke="currentColor" stroke-width="2"
380 stroke-linecap="round" stroke-linejoin="round" />
381 </svg>
382 Buy Credits
383 </button>
384 </div>
385 </div>
386 </div>
387 </div>
388
389 <!-- Account Management -->
390 <div class="ai-section">
391 <div class="ai-section-header">
392 <h2>Account Management</h2>
393 <p>Manage your billing and account settings</p>
394 </div>
395
396 <div class="ai-account-actions">
397 <div class="ai-action-card">
398 <div class="ai-action-icon">
399 <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
400 <path
401 d="M20 21V19C20 17.9391 19.5786 16.9217 18.8284 16.1716C18.0783 15.4214 17.0609 15 16 15H8C6.93913 15 5.92172 15.4214 5.17157 16.1716C4.42143 16.9217 4 17.9391 4 19V21"
402 stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
403 <circle cx="12" cy="7" r="4" stroke="currentColor" stroke-width="2" stroke-linecap="round"
404 stroke-linejoin="round" />
405 </svg>
406 </div>
407 <div class="ai-action-content">
408 <h3>Stripe Account</h3>
409 <p>Access your Stripe dashboard for billing management</p>
410 <button type="button" class="ai-secondary-btn" onclick="handleStripeAccount()">
411 <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
412 <path d="M18 13V19A2 2 0 0 1 16 21H8A2 2 0 0 1 6 19V13" stroke="currentColor"
413 stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
414 <path d="M12 3V15" stroke="currentColor" stroke-width="2" stroke-linecap="round"
415 stroke-linejoin="round" />
416 <path d="M9 6L12 3L15 6" stroke="currentColor" stroke-width="2" stroke-linecap="round"
417 stroke-linejoin="round" />
418 </svg>
419 View Stripe Account
420 </button>
421 </div>
422 </div>
423 </div>
424 </div>
425
426 <!-- Manage Subscription (shown when user has active subscription) -->
427 <div class="ai-section">
428 <div class="ai-action-card" id="cancel-subscription-card" style="display: none;">
429 <div class="ai-action-icon">
430 <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
431 <path d="M12 2V6" stroke="currentColor" stroke-width="2" stroke-linecap="round"
432 stroke-linejoin="round" />
433 <path d="M12 18V22" stroke="currentColor" stroke-width="2" stroke-linecap="round"
434 stroke-linejoin="round" />
435 <path d="M4.93 4.93L7.76 7.76" stroke="currentColor" stroke-width="2" stroke-linecap="round"
436 stroke-linejoin="round" />
437 <path d="M16.24 16.24L19.07 19.07" stroke="currentColor" stroke-width="2" stroke-linecap="round"
438 stroke-linejoin="round" />
439 <path d="M2 12H6" stroke="currentColor" stroke-width="2" stroke-linecap="round"
440 stroke-linejoin="round" />
441 <path d="M18 12H22" stroke="currentColor" stroke-width="2" stroke-linecap="round"
442 stroke-linejoin="round" />
443 <path d="M4.93 19.07L7.76 16.24" stroke="currentColor" stroke-width="2" stroke-linecap="round"
444 stroke-linejoin="round" />
445 <path d="M16.24 7.76L19.07 4.93" stroke="currentColor" stroke-width="2" stroke-linecap="round"
446 stroke-linejoin="round" />
447 </svg>
448 </div>
449 <div class="ai-action-content">
450 <h3>Manage Subscription</h3>
451 <button type="button" class="ai-cancel-subscription-btn" id="subscription-btn" style="opacity: 0.7; font-weight: 400;">
452 <span class="ai-loading" style="display: none;"></span>
453 <span class="btn-text">Cancel Subscription</span>
454 </button>
455 </div>
456 </div>
457 </div>
458
459 <!-- Messages -->
460 <div id="message-container"></div>
461 </div>
462
463 <!-- Confirmation Modal -->
464 <div id="confirmation-modal" class="ai-modal" style="display: none;">
465 <div class="ai-modal-content">
466 <div class="ai-modal-header">
467 <h3>Cancel Subscription</h3>
468 <button type="button" class="ai-modal-close" onclick="closeModal()">×</button>
469 </div>
470 <div class="ai-modal-body">
471 <p>Are you sure you want to cancel your subscription? You will lose access to monthly credits at the end of
472 your current billing period.</p>
473 <p style="margin-top: 16px; padding: 12px; background: #fef3c7; border-left: 3px solid #f59e0b; border-radius: 4px; color: #92400e;">
474 <strong>Important:</strong> Once your credits are used up, you will no longer be able to use AI features such as page translation and AI-powered content creation.
475 </p>
476 </div>
477 <div class="ai-modal-footer">
478 <button type="button" class="ai-secondary-btn" onclick="closeModal()">Keep Subscription</button>
479 <button type="button" class="ai-danger-btn" onclick="confirmCancelSubscription()">
480 <span class="ai-loading" style="display: none;"></span>
481 Yes, Cancel Subscription
482 </button>
483 </div>
484 </div>
485 </div>
486
487 <style>
488 /* Subscription Plans Container */
489 .ai-subscription-actions {
490 display: grid;
491 grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
492 gap: 24px;
493 margin-bottom: 24px;
494 }
495
496 .ai-plan-card-wrapper {
497 position: relative;
498 }
499
500 /* Modern Plan Card Styles */
501 .ai-plan-card {
502 --plan-accent: #4f46e5;
503 background: #ffffff;
504 border-radius: 16px;
505 padding: 32px;
506 color: #0f172a;
507 box-shadow: 0 18px 30px rgba(15, 23, 42, 0.07);
508 border: 1px solid #e4e8ef;
509 position: relative;
510 overflow: hidden;
511 transition: all 0.3s ease;
512 height: 100%;
513 display: flex;
514 flex-direction: column;
515 }
516
517 .ai-plan-card:hover {
518 transform: translateY(-4px);
519 box-shadow: 0 24px 45px rgba(15, 23, 42, 0.12);
520 }
521
522 .ai-plan-card::before {
523 content: '';
524 position: absolute;
525 top: 0;
526 left: 16px;
527 right: 16px;
528 height: 3px;
529 border-radius: 999px;
530 background: linear-gradient(90deg, var(--plan-accent), rgba(79, 70, 229, 0.1));
531 }
532
533 .ai-plan-card>* {
534 position: relative;
535 z-index: 1;
536 }
537
538 /* Plan Badge */
539 .ai-plan-badge {
540 position: absolute;
541 top: 18px;
542 right: 18px;
543 background: rgba(15, 23, 42, 0.08);
544 color: #0f172a;
545 padding: 6px 14px;
546 border-radius: 999px;
547 font-size: 11px;
548 font-weight: 600;
549 text-transform: uppercase;
550 letter-spacing: 0.6px;
551 }
552
553 .ai-plan-badge-popular {
554 background: rgba(79, 70, 229, 0.12);
555 color: #4338ca;
556 }
557
558 /* Plan Colors */
559 .ai-plan-essential {
560 --plan-accent: #1d4ed8;
561 }
562
563 .ai-plan-premium {
564 --plan-accent: #7c3aed;
565 }
566
567 .ai-plan-creator {
568 --plan-accent: #db2777;
569 }
570
571 .ai-plan-popular {
572 box-shadow: 0 24px 45px rgba(76, 29, 149, 0.18);
573 border-color: rgba(76, 29, 149, 0.2);
574 }
575
576 .ai-plan-header {
577 text-align: center;
578 margin-bottom: 24px;
579 }
580
581 .ai-plan-header:first-of-type {
582 margin-top: 16px;
583 }
584
585 .ai-plan-title h3 {
586 font-size: 26px;
587 font-weight: 600;
588 margin: 0 0 6px 0;
589 color: #0f172a;
590 }
591
592 .ai-plan-price {
593 display: flex;
594 align-items: baseline;
595 justify-content: center;
596 gap: 4px;
597 }
598
599 .ai-price-amount {
600 font-size: 38px;
601 font-weight: 600;
602 color: #0f172a;
603 margin-top: 12px;
604 }
605
606 .ai-price-period {
607 font-size: 16px;
608 font-weight: 500;
609 color: #6b7280;
610 }
611
612 .ai-plan-features {
613 margin-bottom: 24px;
614 flex-grow: 1;
615 }
616
617 .ai-feature-item {
618 display: flex;
619 align-items: center;
620 gap: 12px;
621 margin-bottom: 16px;
622 padding: 12px 16px;
623 background: #f8fafc;
624 border-radius: 12px;
625 border: 1px solid #e2e8f0;
626 transition: all 0.3s ease;
627 }
628
629 .ai-feature-item:hover {
630 border-color: rgba(79, 70, 229, 0.4);
631 transform: translateX(4px);
632 }
633
634 .ai-feature-icon {
635 flex-shrink: 0;
636 width: 32px;
637 height: 32px;
638 background: rgba(79, 70, 229, 0.12);
639 border-radius: 50%;
640 display: flex;
641 align-items: center;
642 justify-content: center;
643 color: var(--plan-accent);
644 border: 1px solid rgba(79, 70, 229, 0.2);
645 }
646
647 .ai-feature-text {
648 font-size: 16px;
649 font-weight: 500;
650 color: #0f172a;
651 line-height: 1.4;
652 }
653
654 .ai-plan-cta {
655 text-align: center;
656 }
657
658 .ai-cta-btn {
659 background: var(--plan-accent);
660 color: #fff;
661 border: 2px solid var(--plan-accent);
662 padding: 14px 28px;
663 border-radius: 12px;
664 font-size: 16px;
665 font-weight: 600;
666 display: inline-flex;
667 align-items: center;
668 justify-content: center;
669 gap: 8px;
670 cursor: pointer;
671 transition: all 0.3s ease;
672 box-shadow: 0 10px 25px rgba(79, 70, 229, 0.25);
673 text-transform: none;
674 letter-spacing: 0;
675 width: 100%;
676 backdrop-filter: none;
677 }
678
679 .ai-cta-btn:hover {
680 background: #fff;
681 color: var(--plan-accent);
682 transform: translateY(-2px);
683 box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
684 }
685
686 .ai-cta-btn:active {
687 transform: translateY(0);
688 }
689
690 .ai-cta-btn:disabled {
691 opacity: 0.6;
692 cursor: not-allowed;
693 transform: none;
694 }
695
696 .ai-plan-btn.current-plan {
697 background: rgba(79, 70, 229, 0.08);
698 border-color: rgba(79, 70, 229, 0.2);
699 cursor: default;
700 }
701
702 .ai-plan-btn.current-plan:hover {
703 transform: none;
704 }
705
706 /* Action Card Container */
707 .ai-action-card {
708 background: white;
709 border-radius: 16px;
710 padding: 32px;
711 box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
712 border: 1px solid rgba(0, 0, 0, 0.06);
713 transition: all 0.3s ease;
714 }
715
716 .ai-action-card:hover {
717 transform: translateY(-4px);
718 box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
719 }
720
721 /* Current Plan Indicator */
722 .ai-plan-card-wrapper[data-current-plan="true"] .ai-plan-card {
723 border: 3px solid rgba(255, 255, 255, 0.8);
724 box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3), 0 24px 48px rgba(102, 126, 234, 0.3);
725 }
726
727 /* Responsive Design */
728 @media (max-width: 768px) {
729 .ai-subscription-actions {
730 grid-template-columns: 1fr;
731 }
732
733 .ai-plan-card {
734 padding: 24px;
735 }
736
737 .ai-price-amount {
738 font-size: 36px;
739 }
740
741 .ai-feature-item {
742 padding: 10px 12px;
743 }
744
745 .ai-cta-btn {
746 padding: 12px 24px;
747 font-size: 15px;
748 }
749
750 .ai-plan-badge {
751 font-size: 10px;
752 padding: 4px 8px;
753 }
754 }
755
756 /* Animation for loading states */
757 .ai-loading {
758 animation: spin 1s linear infinite;
759 }
760
761 @keyframes spin {
762 from {
763 transform: rotate(0deg);
764 }
765
766 to {
767 transform: rotate(360deg);
768 }
769 }
770 </style>