/* MyAiLocal Upgrade Page Styles */

.myailocal-upgrade-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.upgrade-header {
    text-align: center;
    margin-bottom: 40px;
}

.upgrade-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #1f2937;
}

.upgrade-header p {
    font-size: 1.2em;
    color: #6b7280;
}

.current-status {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.current-status h3 {
    margin: 0 0 20px 0;
    font-size: 1.5em;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.status-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.status-item .label {
    display: block;
    font-size: 0.9em;
    opacity: 0.8;
    margin-bottom: 5px;
}

.status-item .value {
    display: block;
    font-size: 1.4em;
    font-weight: bold;
}

.low-credits-warning {
    background: rgba(255, 235, 59, 0.2);
    border: 1px solid rgba(255, 235, 59, 0.5);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 1024px) {
    .plans-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

.plan-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.plan-card.current {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}

.plan-card.current::before {
    content: "CURRENT PLAN";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.plan-card.popular {
    border-color: #f59e0b;
    transform: scale(1.05);
}

.plan-card.payg {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
}

.plan-card.payg .plan-name {
    color: #8b5cf6;
}

.plan-card.payg .plan-price {
    color: #8b5cf6;
}

.plan-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #f59e0b;
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.plan-name {
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #1f2937;
}

.plan-price {
    font-size: 3em;
    font-weight: bold;
    color: #3b82f6;
    margin-bottom: 5px;
}

.plan-period {
    color: #6b7280;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 30px 0;
    text-align: left;
}

.plan-features li {
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    position: relative;
    padding-left: 30px;
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features li.included::before {
    content: "✅";
    position: absolute;
    left: 0;
    top: 10px;
}

.plan-features li.excluded::before {
    content: "❌";
    position: absolute;
    left: 0;
    top: 10px;
}

.plan-features li.excluded {
    opacity: 0.6;
}

.upgrade-btn {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.upgrade-btn:disabled,
.upgrade-btn.current {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.payment-security {
    background: #f8fafc;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 30px;
}

.payment-security h3 {
    margin: 0 0 15px 0;
    color: #1f2937;
}

.payment-security p {
    color: #6b7280;
    margin-bottom: 20px;
}

.payment-methods {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.method {
    background: white;
    padding: 8px 15px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    font-weight: 500;
}

.guarantee {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
}

.guarantee h4 {
    margin: 0 0 10px 0;
    color: #065f46;
}

.guarantee p {
    margin: 0;
    color: #047857;
}

/* Responsive Design */
@media (max-width: 768px) {
    .myailocal-upgrade-container {
        padding: 15px;
    }
    
    .upgrade-header h1 {
        font-size: 2em;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .plan-card.popular {
        transform: none;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .payment-methods {
        gap: 10px;
    }
    
    .method {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Animation for plan switching */
@keyframes planSwitch {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

.plan-card.switching {
    animation: planSwitch 0.3s ease-out;
}

/* Loading state */
.upgrade-btn.loading {
    position: relative;
    color: transparent;
}

.upgrade-btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
