/* Billing Page - Minimal & Professional */

.billing-page {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Page Header */
.billing-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
}

.header-content h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.header-subtitle {
    font-size: 0.9375rem;
    color: #6B7280;
    margin: 0;
    font-weight: 400;
}

.btn-add-funds {
    background: linear-gradient(135deg, #7B1FA2 0%, #9C27B0 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(123, 31, 162, 0.2);
}

.btn-add-funds:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(123, 31, 162, 0.3);
}

/* Balance Cards - Hero Section with Hierarchy */
.balance-cards {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.balance-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.2s;
}

.balance-card:hover {
    border-color: #D1D5DB;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Primary Balance Card - Hero Element (2x size) */
.balance-card-primary {
    border: 2px solid #7B1FA2;
    background: linear-gradient(135deg, #F3E5F5 0%, #FFFFFF 100%);
    padding: 2rem;
}

.card-icon {
    font-size: 1.5rem;
    color: #7B1FA2;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F3E5F5;
    border-radius: 10px;
    flex-shrink: 0;
}

.balance-card-primary .card-icon {
    font-size: 2.5rem;
    width: 4rem;
    height: 4rem;
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.balance-card-primary .card-value {
    color: #7B1FA2;
    font-size: 3rem;
}

.card-hint {
    font-size: 0.8125rem;
    color: #6B7280;
}

/* Pricing Info Banner */
.pricing-info-banner {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.banner-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    color: #7B1FA2;
}

.banner-content {
    font-size: 0.875rem;
    color: #374151;
}

.banner-content strong {
    font-weight: 600;
    color: #111827;
}

/* Transactions Section */
.transactions-section {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.section-badge {
    background: #F3F4F6;
    color: #6B7280;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Transaction List */
.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid #E5E7EB;
    transition: all 0.2s;
}

.transaction-item:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}

.transaction-topup {
    border-left: 3px solid #10B981;
}

.transaction-charge {
    border-left: 3px solid #7B1FA2;
}

.transaction-icon {
    font-size: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F3F4F6;
    border-radius: 10px;
    flex-shrink: 0;
}

.transaction-details {
    flex: 1;
    min-width: 0;
}

.transaction-description {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 0.25rem;
}

.transaction-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #6B7280;
    flex-wrap: wrap;
}

.meta-separator {
    color: #D1D5DB;
}

.transaction-amount-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    min-width: 120px;
}

.transaction-amount {
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
}

.amount-positive {
    color: #10B981;
}

.amount-negative {
    color: #7B1FA2;
}

.transaction-balance {
    font-size: 0.75rem;
    color: #9CA3AF;
    white-space: nowrap;
}

.transaction-balance strong {
    color: #6B7280;
    font-weight: 600;
}

/* Empty State */
.transactions-empty {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.transactions-empty p {
    font-size: 0.9375rem;
    color: #6B7280;
    margin: 0;
}

/* Loading State */
.loading-spinner {
    text-align: center;
    padding: 4rem;
    font-size: 1rem;
    color: #6B7280;
}

/* Add Funds Modal */
.add-funds-modal {
    max-width: 500px;
}

.amount-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.amount-option {
    padding: 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.amount-option:hover {
    border-color: #7B1FA2;
    background: #F9FAFB;
}

.amount-option.active {
    border-color: #7B1FA2;
    background: #F3E5F5;
    box-shadow: 0 0 0 3px rgba(123, 31, 162, 0.1);
}

.amount-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.amount-option.active .amount-value {
    color: #7B1FA2;
}

.amount-messages {
    font-size: 0.8125rem;
    color: #6B7280;
}

.custom-amount-section {
    margin-bottom: 1.5rem;
}

.custom-amount-section label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.custom-amount-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 1rem;
    color: #111827;
    transition: all 0.2s;
}

.custom-amount-input:focus {
    outline: none;
    border-color: #7B1FA2;
    box-shadow: 0 0 0 3px rgba(123, 31, 162, 0.1);
}

.payment-summary {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.summary-row:last-child {
    margin-bottom: 0;
    padding-top: 0.75rem;
    border-top: 1px solid #E5E7EB;
    font-weight: 600;
    font-size: 1.125rem;
}

.summary-label {
    color: #6B7280;
}

.summary-value {
    color: #111827;
    font-weight: 600;
}

.summary-row:last-child .summary-value {
    color: #7B1FA2;
}

/* Stripe Payment Element Container */
#payment-element {
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .balance-cards {
        grid-template-columns: 1fr 1fr;
    }

    .balance-card-primary {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .billing-page {
        padding: 1rem;
    }

    .billing-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .btn-add-funds {
        width: 100%;
        justify-content: center;
    }

    .balance-cards {
        grid-template-columns: 1fr;
    }

    .balance-card-primary {
        grid-column: auto;
    }

    .amount-selector {
        grid-template-columns: 1fr;
    }

    .transaction-item {
        flex-wrap: wrap;
    }

    .transaction-amount-section {
        width: 100%;
        align-items: flex-start;
        margin-top: 0.5rem;
    }
}
