/**
 * User Dashboard Styles for WC Advanced Wallet
 */

/* Main Dashboard Container */
.wc-wallet-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Wallet Locked Notice */
.wc-wallet-alert {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.wc-wallet-locked-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.wc-wallet-alert .dashicons {
    font-size: 32px;
    margin-top: 2px;
}

.wc-wallet-alert h3,
.wc-wallet-alert strong {
    margin: 0 0 5px;
    font-size: 18px;
}

.wc-wallet-alert p {
    margin: 5px 0 0;
}

/* Balance Section */
.wc-wallet-balance-section {
    margin-bottom: 40px;
}

.wc-wallet-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.wc-wallet-balance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
}

.balance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.balance-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    opacity: 0.9;
}

.wallet-icon {
    font-size: 32px;
}

.balance-amount {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1;
}

.balance-details {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 20px;
}

.balance-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.balance-item .label {
    font-size: 13px;
    opacity: 0.8;
}

.balance-item .value {
    font-size: 18px;
    font-weight: 600;
}

.balance-item .value.locked {
    color: #ffc107;
}

.balance-actions {
    display: flex;
    gap: 10px;
}

.wc-wallet-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.wc-wallet-btn-primary {
    background: #fff;
    color: #667eea;
}

.wc-wallet-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.wc-wallet-btn-secondary {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.wc-wallet-btn-secondary:hover {
    background: rgba(255,255,255,0.3);
}

.wc-wallet-btn-large {
    padding: 15px 30px;
    font-size: 16px;
    width: 100%;
    justify-content: center;
}

.wc-wallet-btn .dashicons {
    font-size: 18px;
}

/* Quick Actions */
.wc-wallet-quick-actions {
    margin-bottom: 40px;
}

.wc-wallet-quick-actions h2 {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
}

.wc-wallet-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.wc-wallet-action-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 2px solid transparent;
}

.wc-wallet-action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.wc-wallet-action-card .action-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.wc-wallet-action-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
}

.wc-wallet-action-card p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Fixed Deposit Section */
.wc-wallet-fd-section {
    margin-bottom: 40px;
}

.wc-wallet-fd-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
}

.wc-wallet-fd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.wc-wallet-fd-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.fd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.fd-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.fd-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.fd-amount {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 15px;
}

.fd-details {
    margin-bottom: 15px;
}

.fd-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.fd-detail-item:last-child {
    border-bottom: none;
}

.fd-detail-item .label {
    color: #666;
    font-size: 14px;
}

.fd-detail-item .value {
    font-weight: 600;
    color: #333;
}

.fd-progress {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.fd-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s;
}

.fd-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fd-actions .penalty-notice {
    text-align: center;
    color: #dc3545;
    font-size: 12px;
}

/* Transactions Section */
.wc-wallet-transactions-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.view-all-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.view-all-link:hover {
    color: #764ba2;
}

.wc-wallet-transactions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wc-wallet-transaction-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.2s;
}

.wc-wallet-transaction-item:hover {
    background: #e9ecef;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wc-wallet-transaction-item.credit .transaction-icon {
    background: #d4edda;
    color: #155724;
}

.wc-wallet-transaction-item.debit .transaction-icon {
    background: #f8d7da;
    color: #721c24;
}

.transaction-icon .dashicons {
    font-size: 20px;
}

.transaction-details {
    flex: 1;
}

.transaction-desc {
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.transaction-date {
    font-size: 13px;
    color: #666;
}

.transaction-amount {
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
}

.transaction-amount.credit {
    color: #28a745;
}

.transaction-amount.debit {
    color: #dc3545;
}

/* Empty State */
.wc-wallet-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.wc-wallet-empty-state .dashicons {
    font-size: 64px;
    opacity: 0.5;
    margin-bottom: 15px;
}

.wc-wallet-empty-state p {
    font-size: 16px;
    margin: 0;
}

/* Modal Styles */
.wc-wallet-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wc-wallet-modal {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.3s;
}

.wc-wallet-modal-large {
    max-width: 900px;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.wc-wallet-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
}

.wc-wallet-modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.wc-wallet-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.wc-wallet-modal-close:hover {
    color: #333;
}

.wc-wallet-modal-body {
    padding: 30px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group .help-text {
    margin: 8px 0 0;
    font-size: 13px;
    color: #666;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

/* FD Plans Grid in Modal */
.fd-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.fd-plan-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    cursor: pointer;
}

.fd-plan-card:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.plan-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.plan-rate {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
}

.plan-details {
    margin: 15px 0;
}

.plan-detail {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.plan-detail .label {
    color: #666;
}

.plan-detail .value {
    font-weight: 600;
    color: #333;
}

.plan-example {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.plan-example small {
    color: #666;
    font-size: 12px;
}

/* FD Calculation Display */
.fd-calculation {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.calc-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 15px;
}

.calc-item.total {
    border-top: 2px solid #667eea;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

/* Transaction History Page */
.wc-wallet-transaction-history {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.transaction-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.transaction-history-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
}

.transaction-filters {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    font-weight: 600;
    font-size: 14px;
}

.filter-group input,
.filter-group select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.transaction-list-container {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #667eea;
}

.loading-spinner .dashicons {
    font-size: 32px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.pagination-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination-container button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-container button:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.pagination-container button.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wc-wallet-dashboard {
        padding: 15px;
    }
    
    .balance-amount {
        font-size: 36px;
    }
    
    .balance-details {
        flex-direction: column;
        gap: 15px;
    }
    
    .wc-wallet-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .wc-wallet-fd-grid {
        grid-template-columns: 1fr;
    }
    
    .fd-plans-grid {
        grid-template-columns: 1fr;
    }
    
    .wc-wallet-modal {
        width: 95%;
        margin: 20px;
    }
    
    .wc-wallet-modal-body {
        padding: 20px;
    }
    
    .transaction-filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .wc-wallet-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .balance-amount {
        font-size: 28px;
    }
    
    .wc-wallet-action-card {
        padding: 20px;
    }
    
    .wc-wallet-modal-header {
        padding: 15px 20px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
