/* Billing Page Specific Styles */

/* Plan Section */
.plan-section {
    margin-bottom: 2rem;
}

.plan-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.plan-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.plan-name {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.plan-detail {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.plan-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.plan-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-badge {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 100px;
    width: fit-content;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-badge.paid {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

/* Usage Section */
.usage-section {
    margin-bottom: 2rem;
}

.usage-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

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

.usage-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
}

.usage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.usage-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.usage-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.usage-bar {
    height: 8px;
    background: var(--border-light);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.usage-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--purple), var(--blue));
    border-radius: 100px;
    transition: width 0.3s ease;
}

.usage-detail {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

/* Payment Section */
.payment-section {
    margin-bottom: 2rem;
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header-row h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.btn-secondary-small {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary-small:hover {
    background: var(--bg-card);
}

.payment-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.card-icon-wrapper {
    flex-shrink: 0;
}

.card-details {
    flex: 1;
}

.card-type {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.card-expiry {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.card-default {
    padding: 0.25rem 0.75rem;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 6px;
}

/* Billing History */
.history-section {
    margin-bottom: 2rem;
}

.history-table-wrapper {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table thead {
    background: var(--bg-card);
}

.history-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.history-table td {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.invoice-link {
    color: var(--purple);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.invoice-link:hover {
    color: var(--blue);
}

/* Danger Section */
.danger-section {
    margin-bottom: 2rem;
}

.danger-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 16px;
}

.danger-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.danger-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.btn-danger {
    padding: 0.75rem 1.5rem;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-danger:hover {
    background: #DC2626;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    .plan-header {
        flex-direction: column;
        gap: 1rem;
    }

    .plan-details {
        grid-template-columns: 1fr;
    }

    .usage-grid {
        grid-template-columns: 1fr;
    }

    .payment-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .history-table-wrapper {
        overflow-x: auto;
    }

    .history-table {
        min-width: 600px;
    }

    .danger-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-danger {
        width: 100%;
    }
}