/**
 * استایل‌های فرانت‌اند کیف پول - دسکتاپ
 *
 * @package Bakala
 * @subpackage Wallet
 */

/* === ویجت موجودی === */
.bakala-wallet-balance-widget {
    margin-bottom: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    overflow: hidden;
}

.wallet-balance-container {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.wallet-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.wallet-info {
    flex: 1;
}

.wallet-label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.wallet-amount {
    font-size: 24px;
    font-weight: bold;
}

.wallet-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.wallet-link:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.wallet-link .arrow {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.wallet-link:hover .arrow {
    transform: translateX(5px);
}

.bakala-wallet-balance-shortcode {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 15px;
}

.bakala-wallet-balance-shortcode .wallet-icon {
    font-size: 20px;
}

.bakala-wallet-balance-shortcode .wallet-label {
    color: #666;
}

.bakala-wallet-balance-shortcode .wallet-amount {
    font-weight: bold;
    color: #667eea;
}

/* دکمه مشاهده همه */
.wallet-view-all-btn {
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.wallet-view-all-btn:hover {
    background: #5568d3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.wallet-view-all-btn:active {
    transform: translateY(0);
}

/* تاریخچه کامل */
.wallet-full-history {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    animation: slideDown 0.4s ease;
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === داشبورد === */
.bakala-wallet-dashboard {
    max-width: 1200px;
}

.wallet-balance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.wallet-balance-card h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    opacity: 0.9;
}

.balance-amount {
    font-size: 48px;
    font-weight: bold;
    margin: 20px 0;
}

.balance-description {
    margin: 0 0 20px 0;
    opacity: 0.8;
    font-size: 14px;
}

.bakala-wallet-topup-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s;
}

.bakala-wallet-topup-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.wallet-topup-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 2px solid #e0e0e0;
}

.wallet-topup-section#topup-form-section {
    display: none;
}

.wallet-topup-section h3 {
    margin: 0 0 20px 0;
}

.amounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.suggested-amounts label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.suggested-amount-btn {
    padding: 12px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.suggested-amount-btn:hover,
.suggested-amount-btn.active {
    border-color: #667eea;
    background: #f0f3ff;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.2);
}

.topup-amount-input {
    margin: 20px 0;
}

.topup-amount-input label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.topup-amount-input input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.topup-amount-input p {
    margin: 5px 0 0 0;
    font-size: 13px;
    color: #666;
}

.topup-actions {
    display: flex;
    gap: 10px;
}

.wallet-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.wallet-stat-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

.stat-icon-credit {
    background: #d4edda;
    color: #155724;
}

.stat-icon-debit {
    background: #f8d7da;
    color: #721c24;
}

.stat-icon-total {
    background: #d1ecf1;
    color: #0c5460;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 3px;
}

.stat-count {
    font-size: 12px;
    color: #999;
}

.wallet-recent-transactions {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
}

.wallet-recent-transactions h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
}

/* === تاریخچه === */
.bakala-wallet-history {
    margin: 20px 0;
}

.wallet-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.filter-group select {
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

/* === تراکنش‌ها === */
.transactions-list {
    margin: 15px 0;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    animation: fadeIn 0.3s ease;
}

.transaction-item:hover {
    background: #f8f9fa;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.transaction-credit .transaction-icon {
    background: #d4edda;
    color: #155724;
}

.transaction-debit .transaction-icon {
    background: #f8d7da;
    color: #721c24;
}

.transaction-details {
    flex: 1;
}

.transaction-type {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.transaction-date {
    font-size: 12px;
    color: #999;
}

.transaction-description {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

.transaction-amount {
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.transaction-amount-credit {
    color: #28a745;
}

.transaction-amount-debit {
    color: #dc3545;
}

/* === جدول تراکنش‌ها === */
.wallet_transactions_table {
    width: 100%;
    border-collapse: collapse;
}

.wallet_transactions_table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: right;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.wallet_transactions_table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.transaction-badge {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.transaction-badge-credit {
    background: #d4edda;
    color: #155724;
}

.transaction-badge-debit {
    background: #f8d7da;
    color: #721c24;
}

/* === انیمیشن‌ها === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === دکمه‌ها === */
.wallet-actions {
    text-align: center;
    padding: 15px 0;
}

/* === صفحه شارژ === */
.bakala-wallet-topup {
    max-width: 800px;
}

.wallet-current-balance {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.wallet-current-balance > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wallet-current-balance p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.wallet-current-balance h3 {
    margin: 10px 0 0 0;
    font-size: 32px;
    font-weight: bold;
}

.wallet-current-balance .dashicons {
    font-size: 48px;
    opacity: 0.3;
}

.wallet-topup-form {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.suggested-amounts {
    margin-bottom: 30px;
}

.suggested-amounts label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 16px;
}

.suggested-amounts .amounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.suggested-amounts .suggested-amount-btn {
    padding: 15px;
    border: 2px solid #e0e0e0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.custom-amount {
    margin-bottom: 30px;
}

.custom-amount label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 16px;
}

.custom-amount > div {
    position: relative;
}

.custom-amount input[type="number"] {
    width: 100%;
    padding: 15px 80px 15px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    direction: ltr;
    text-align: right;
}

.custom-amount input[type="number"]:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.custom-amount > div > span {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 14px;
}

.custom-amount p {
    margin: 10px 0 0 0;
    font-size: 13px;
    color: #666;
}

.topup-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: none;
}

.topup-summary > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.topup-summary > div:last-child {
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
    margin-bottom: 0;
}

.topup-summary span:first-child {
    font-size: 14px;
    color: #666;
}

.topup-amount-display {
    font-size: 18px;
    font-weight: 600;
    color: #667eea;
}

.balance-after-display {
    font-size: 18px;
    font-weight: 600;
    color: #28a745;
}

.wallet-topup-form .button.alt {
    width: 100%;
    padding: 18px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.wallet-topup-form .button.alt:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.wallet-topup-form .button.alt .dashicons {
    vertical-align: middle;
    margin-right: 5px;
}

.security-notice {
    margin-top: 25px;
    padding: 15px;
    background: #e7f7ef;
    border-radius: 8px;
    border-right: 4px solid #28a745;
}

.security-notice p {
    margin: 0;
    font-size: 13px;
    color: #155724;
    line-height: 1.6;
}

.security-notice .dashicons {
    vertical-align: middle;
    color: #28a745;
}

.wallet-topup-help {
    margin-top: 30px;
    background: #f0f6fc;
    padding: 20px;
    border-radius: 8px;
    border-right: 4px solid #0073aa;
}

.wallet-topup-help h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #0073aa;
}

.wallet-topup-help .dashicons {
    vertical-align: middle;
}

.wallet-topup-help ul {
    margin: 0;
    padding-right: 20px;
    line-height: 1.8;
    color: #666;
}

/* === صفحه تشکر === */
.woocommerce-wallet-thankyou {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-right: 4px solid #667eea;
}

.woocommerce-wallet-thankyou h2 {
    margin-top: 0;
    color: #667eea;
}

.woocommerce-thankyou-wallet-message {
    margin: 10px 0;
}

.wallet-remaining-balance {
    margin: 10px 0 0 0;
    font-size: 14px;
    color: #666;
}

/* === چک‌اوت === */
.bakala-wallet-checkout-option {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #e0e0e0;
}

.bakala-wallet-checkout-option h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
}

.wallet-balance-info {
    background: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.wallet-balance-text {
    margin: 0;
    font-size: 15px;
}

.wallet-balance-text strong {
    color: #667eea;
    font-size: 18px;
}

.wallet-usage-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
}

.wallet-usage-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.wallet-payment-breakdown {
    margin-top: 15px;
    background: white;
    padding: 15px;
    border-radius: 5px;
    display: none;
}

.wallet-breakdown-table {
    width: 100%;
}

.wallet-breakdown-table td {
    padding: 8px 0;
    font-size: 14px;
}

.wallet-breakdown-table td:last-child {
    text-align: left;
    font-weight: bold;
}

.remaining-amount {
    color: #dc3545;
    font-weight: bold;
}
