/* Modulix Wallet Frontend Styles */

/* Wallet Account Page */
.modulix-wallet-account {
    max-width: 800px;
    margin: 0 auto;
}

/* Tab Navigation */
.modulix-wallet-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
    gap: 0;
}

.modulix-wallet-tab {
    padding: 12px 20px;
    text-decoration: none;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.modulix-wallet-tab:hover {
    color: #0073aa;
    background-color: #f9f9f9;
}

.modulix-wallet-tab.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
    background-color: #f9f9f9;
}

/* Wallet Content */
.modulix-wallet-content {
    min-height: 400px;
}

/* Balance Tab */
.modulix-wallet-balance-tab {
    display: grid;
    gap: 30px;
}

.modulix-wallet-balance-card {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.3);
}

.modulix-wallet-balance-card h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    opacity: 0.9;
    font-weight: 400;
}

.balance-amount {
    font-size: 36px;
    font-weight: bold;
    margin: 15px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.balance-description {
    margin: 15px 0 0 0;
    opacity: 0.9;
    font-size: 14px;
}

/* Quick Stats */
.modulix-wallet-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-item h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    margin: 10px 0;
}

.stat-value.credit {
    color: #28a745;
}

.stat-value.debit {
    color: #dc3545;
}

/* Recent Transactions */
.modulix-recent-transactions {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.modulix-recent-transactions h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

/* Transaction Items */
.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-info {
    flex: 1;
}

.transaction-method {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    display: block;
}

.transaction-date {
    font-size: 12px;
    color: #999;
}

.transaction-amount {
    font-weight: bold;
    font-size: 16px;
}

.transaction-item.credit .transaction-amount {
    color: #28a745;
}

.transaction-item.debit .transaction-amount {
    color: #dc3545;
}

/* Transactions Tab */
.modulix-wallet-transactions-tab h3 {
    color: #333;
    margin-bottom: 25px;
}

.modulix-transactions-list {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.modulix-transactions-list .transaction-item {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: block;
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.transaction-type {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    color: white;
}

.transaction-item.credit .transaction-type {
    background: #28a745;
}

.transaction-item.debit .transaction-type {
    background: #dc3545;
}

.transaction-details {
    margin: 10px 0;
}

.transaction-method {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.transaction-note {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.transaction-balance {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

/* Top-up Tab */
.modulix-wallet-topup-tab h3 {
    color: #333;
    margin-bottom: 25px;
}

.modulix-topup-form {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.topup-amounts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.topup-amount-option {
    display: block;
    text-align: center;
    cursor: pointer;
}

.topup-amount-option input[type="radio"] {
    display: none;
}

.amount-display {
    display: block;
    padding: 15px 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    transition: all 0.3s ease;
    font-weight: 500;
}

.topup-amount-option:hover .amount-display {
    border-color: #0073aa;
    background: #f0f8ff;
}

.topup-amount-option input[type="radio"]:checked + .amount-display {
    border-color: #0073aa;
    background: #0073aa;
    color: white;
}

.custom-amount-input {
    margin: 20px 0;
}

.custom-amount-input label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.custom-amount-input input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* Transfer Tab */
.modulix-wallet-transfer-tab h3 {
    color: #333;
    margin-bottom: 25px;
}

.current-balance {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 25px;
    text-align: center;
}

.modulix-wallet-transfer-form {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* Checkout Integration */
.modulix-wallet-checkout-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.modulix-wallet-checkout-info h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

/* Payment Fields */
#modulix-wallet-payment-fields {
    padding: 15px 0;
}

.wallet-balance-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.wallet-sufficient {
    color: #28a745;
    font-weight: 500;
}

.wallet-partial {
    color: #ffc107;
    font-weight: 500;
}

.wallet-insufficient {
    color: #dc3545;
    font-weight: 500;
}

/* Pagination */
.modulix-pagination {
    text-align: center;
    margin: 30px 0;
}

.page-number {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    transition: all 0.3s ease;
}

.page-number:hover {
    background: #f0f8ff;
    border-color: #0073aa;
    color: #0073aa;
}

.page-number.current {
    background: #0073aa;
    border-color: #0073aa;
    color: white;
}

/* Shortcode Styles */
.modulix-wallet-history-shortcode {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    max-width: 500px;
}

.modulix-wallet-history-shortcode .wallet-transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.modulix-wallet-history-shortcode .wallet-transaction-item:last-child {
    border-bottom: none;
}

/* Loading States */
.modulix-wallet-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.modulix-wallet-loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #ddd;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: modulix-wallet-spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes modulix-wallet-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.modulix-wallet-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.modulix-wallet-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modulix-wallet-tabs {
        flex-direction: column;
    }
    
    .modulix-wallet-tab {
        text-align: center;
    }
    
    .modulix-wallet-stats {
        grid-template-columns: 1fr;
    }
    
    .topup-amounts {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .transaction-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .transaction-date {
        margin-top: 5px;
    }
    
    .balance-amount {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .modulix-wallet-account {
        margin: 0 10px;
    }
    
    .modulix-wallet-balance-card,
    .modulix-topup-form,
    .modulix-wallet-transfer-form,
    .modulix-recent-transactions {
        padding: 20px;
    }
    
    .topup-amounts {
        grid-template-columns: 1fr;
    }
    
    .balance-amount {
        font-size: 24px;
    }
}
