/* Frontend Styles for Stripe Payment Tiers */

.stripe-tiers-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.tier-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 35px 30px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.tier-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border-color: #0073aa;
}

.tier-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0073aa, #005177);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.tier-card:hover::before {
    transform: scaleX(1);
}

.tier-card h3 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #1e293b;
    letter-spacing: -0.5px;
}

.tier-price {
    margin: 20px 0 25px 0;
    padding: 20px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.tier-price .currency {
    font-size: 18px;
    font-weight: 600;
    color: #64748b;
    vertical-align: super;
    margin-right: 2px;
}

.tier-price .amount {
    font-size: 48px;
    font-weight: 800;
    color: #0073aa;
    line-height: 1;
    letter-spacing: -1px;
}

.tier-price .interval {
    font-size: 16px;
    color: #64748b;
    font-weight: 500;
    margin-left: 5px;
}

.tier-description {
    font-size: 15px;
    line-height: 1.6;
    color: #475569;
    margin: 0 0 25px 0;
    min-height: 50px;
}

.tier-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    text-align: left;
    flex-grow: 1;
}

.tier-features li {
    padding: 12px 0;
    font-size: 15px;
    color: #334155;
    position: relative;
    padding-left: 30px;
    line-height: 1.5;
}

.tier-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 700;
    font-size: 18px;
}

.tier-button {
    background: #0073aa;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 15px 35px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 115, 170, 0.2);
    width: 100%;
    margin-top: auto;
}

.tier-button:hover {
    background: #005177;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 115, 170, 0.3);
}

.tier-button:active {
    transform: translateY(0);
}

.tier-button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

.tier-button.loading {
    position: relative;
    color: transparent;
}

.tier-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spinner 0.8s ease infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Featured/Highlighted Tier */
.tier-card.featured {
    border-color: #0073aa;
    box-shadow: 0 10px 30px rgba(0, 115, 170, 0.15);
    transform: scale(1.05);
}

.tier-card.featured::before {
    transform: scaleX(1);
    height: 6px;
}

.tier-card.featured .tier-button {
    background: linear-gradient(135deg, #0073aa, #005177);
    padding: 17px 35px;
    font-size: 17px;
}

/* Error Message */
.tier-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

/* Success Message */
.tier-success {
    background: #efe;
    border: 1px solid #cfc;
    color: #3c3;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .stripe-tiers-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }
    
    .tier-card {
        padding: 25px 20px;
    }
    
    .tier-card.featured {
        transform: scale(1);
    }
    
    .tier-price .amount {
        font-size: 40px;
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .stripe-tiers-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .tier-card {
        background: #1e293b;
        border-color: #334155;
        color: #e2e8f0;
    }
    
    .tier-card h3 {
        color: #f1f5f9;
    }
    
    .tier-description {
        color: #cbd5e1;
    }
    
    .tier-features li {
        color: #e2e8f0;
    }
    
    .tier-price {
        border-color: #334155;
    }
}