/**
 * Billing Page Responsive Styles
 * Optimized for mobile, tablet, and desktop
 */

/* Billing Cards Grid */
.billing-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .billing-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .billing-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .billing-cards-grid {
        gap: 0.75rem;
    }
}

/* Plan Card */
.plan-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .plan-card {
        padding: 1.25rem;
    }
    
    .plan-card h3 {
        font-size: 1.25rem !important;
    }
    
    .plan-card .price {
        font-size: 2rem !important;
    }
}

@media (max-width: 480px) {
    .plan-card {
        padding: 1rem;
    }
    
    .plan-card h3 {
        font-size: 1.1rem !important;
    }
    
    .plan-card .price {
        font-size: 1.75rem !important;
    }
    
    .plan-card ul li {
        font-size: 0.85rem !important;
        padding: 0.4rem 0;
    }
}

/* Current Subscription Card */
.current-subscription {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .current-subscription {
        padding: 1.25rem;
    }
    
    .current-subscription h2 {
        font-size: 1.25rem !important;
    }
}

@media (max-width: 480px) {
    .current-subscription {
        padding: 1rem;
    }
    
    .current-subscription h2 {
        font-size: 1.1rem !important;
    }
    
    .current-subscription .stats {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }
}

/* Billing History Table */
.billing-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .billing-table-wrapper table {
        font-size: 0.85rem;
    }
    
    .billing-table-wrapper th,
    .billing-table-wrapper td {
        padding: 0.5rem;
    }
    
    .billing-table-wrapper .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

@media (max-width: 480px) {
    .billing-table-wrapper table {
        font-size: 0.75rem;
    }
    
    .billing-table-wrapper th,
    .billing-table-wrapper td {
        padding: 0.4rem 0.3rem;
    }
    
    .billing-table-wrapper .badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.3rem;
    }
}

/* Page Header */
.billing-page-header {
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .billing-page-header h1 {
        font-size: 1.5rem;
    }
    
    .billing-page-header p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .billing-page-header h1 {
        font-size: 1.25rem;
    }
    
    .billing-page-header p {
        font-size: 0.85rem;
    }
}

/* Feature List */
.plan-features {
    list-style: none;
    padding: 0;
}

.plan-features li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 480px) {
    .plan-features li {
        font-size: 0.85rem;
        padding: 0.4rem 0;
    }
}

/* Upgrade Button */
.upgrade-button {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

@media (max-width: 480px) {
    .upgrade-button {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
}

/* Usage Stats */
.usage-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .usage-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* Usage Bar */
.usage-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

@media (max-width: 480px) {
    .usage-bar {
        height: 6px;
    }
}

/* Payment Method Card */
.payment-method-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

@media (max-width: 768px) {
    .payment-method-card {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .payment-method-card {
        padding: 0.75rem;
    }
}

/* Invoice Download Button */
.invoice-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

@media (max-width: 480px) {
    .invoice-download {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }
}

/* Compact Table for Mobile */
@media (max-width: 480px) {
    .billing-table-wrapper .hide-mobile {
        display: none;
    }
}

/* Empty State */
.billing-empty-state {
    text-align: center;
    padding: 3rem;
}

@media (max-width: 768px) {
    .billing-empty-state {
        padding: 2rem;
    }
    
    .billing-empty-state svg {
        width: 48px;
        height: 48px;
    }
    
    .billing-empty-state h3 {
        font-size: 1rem;
    }
    
    .billing-empty-state p {
        font-size: 0.85rem;
    }
}
