/**
 * Billing Styles for Prism DNS
 * Simple, clean styling following KISS principles
 */

.billing-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.billing-section h2 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.5rem;
}

/* Usage Grid */
.usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.usage-metric {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.usage-metric h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.5px;
}

.usage-bar {
    height: 24px;
    background: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.usage-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
    border-radius: 12px;
}

.usage-fill.usage-normal {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.usage-fill.usage-warning {
    background: linear-gradient(90deg, #ffc107, #fd7e14);
}

.usage-fill.usage-danger {
    background: linear-gradient(90deg, #dc3545, #c82333);
}

.usage-metric p {
    margin: 0;
    font-size: 0.875rem;
    color: #495057;
    text-align: center;
}

.plan-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
    color: #495057;
}

/* Subscription Info */
.subscription-info {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
}

.subscription-info p {
    margin-bottom: 0.75rem;
}

.subscription-info .status-active {
    color: #28a745;
    font-weight: 600;
}

.subscription-info .status-pending {
    color: #ffc107;
    font-weight: 600;
}

.subscription-info .status-past_due {
    color: #dc3545;
    font-weight: 600;
}

.subscription-info .status-cancelled {
    color: #6c757d;
    font-weight: 600;
}

/* Plans Grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.plan-card {
    background: white;
    border: 2px solid #e9ecef;
    padding: 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.plan-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
    transform: translateY(-2px);
}

.plan-card.current {
    border-color: #28a745;
    background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
}

.plan-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    color: #333;
}

.plan-card .price {
    font-size: 2rem;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 1.5rem;
}

.plan-card.current .price {
    color: #28a745;
}

.plan-limits {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.plan-limits li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.plan-limits li::before {
    content: "✓";
    color: #28a745;
    font-weight: bold;
    margin-right: 0.5rem;
}

.btn-change-plan {
    width: 100%;
    padding: 0.75rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-change-plan:hover {
    background: #0056b3;
}

.badge.bg-success {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #28a745;
    color: white;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    width: 100%;
    text-align: center;
}

/* Alert styles */
.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 6px;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.text-warning {
    color: #ffc107 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .usage-grid {
        grid-template-columns: 1fr;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
    }
    
    .plan-card .price {
        font-size: 1.5rem;
    }
}

/* Loading states */
.billing-section p {
    color: #6c757d;
    font-style: italic;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.billing-section {
    animation: fadeIn 0.3s ease;
}